You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,13 +60,13 @@ If you want to use the script, you basically have two options:
60
60
Opening a terminal from the working directory containing your program, the solution, and the folder with the tests, run the below commands.
61
61
First, make the script executable:
62
62
63
-
```linux
63
+
```shell
64
64
chmod +x ../../../ctest.sh
65
65
```
66
66
67
67
Then run the script by using the following command:
68
68
69
-
```linux
69
+
```shell
70
70
../../../ctest.sh myprogram.c
71
71
```
72
72
@@ -75,27 +75,27 @@ Then run the script by using the following command:
75
75
Alternatively, you can add the script to your PATH variable and run it from anywhere.
76
76
To display the current $PATH, run the following command:
77
77
78
-
```linux
78
+
```shell
79
79
echo$PATH
80
80
```
81
81
82
82
Then, copy the script to one of the folders in $PATH. If you have copied the script to the folder before, the command will simply overwrite the previous version. For example:
83
83
84
-
```linux
84
+
```shell
85
85
sudo cp ctest.sh /usr/bin/
86
86
```
87
87
88
88
Now you can run the script from the directory containing your program and the folder with test cases by using the following command:
89
89
90
-
```linux
90
+
```shell
91
91
ctest.sh myprogram.c
92
92
```
93
93
94
94
95
95
96
96
You may also choose to redirect the output to a file, in which case the color codes will be removed automatically to render a plain text file:
97
97
98
-
```linux
98
+
```shell
99
99
ctest.sh myprogram.c > results.txt
100
100
```
101
101
@@ -119,11 +119,15 @@ The script was tested on Ubuntu 22.04 LTS, using GCC 13.1.0, Valgrind 3.18.1, an
119
119
120
120
If you want to compile and test your code manually, you can use the following commands:
0 commit comments