-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·39 lines (33 loc) · 1007 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
./compile.sh
if [ ! -d ./tests/outputs ]; then
mkdir ./tests/outputs
fi
if [[ "$*" == *"dw"* ]]
then
DisableWarnings="-w"
fi
gcc $(find ./src -name '*.c') -lm -g $DisableWarnings -o build/pawscript
# if [ "$1" = "all" ];
# then
# if [ "$2" = "clean" ];
# then
# rm outputs/all.out
# touch outputs/all.out
# fi
# for filename in $(find ./inputs -name '*.in')
# do
# echo $'Input:' >> outputs/all.out
# cat "$filename" >> outputs/all.out
# echo $'\n\nOutput:' >> outputs/all.out
# cat "$filename" | ./build/pawscript >> outputs/all.out
# echo $'' >> outputs/all.out
# cat "$filename" | time -o outputs/all.out --append ./build/pawscript >> /dev/null
# echo $'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-' >> outputs/all.out
# done
# else
# if [ ! -f ./inputs/$1.in ]; then
# echo $"Input file \"inputs/$1.in\" doesn't exist!"
# exit 0
# fi
# cat inputs/$1.in | time -o outputs/$1.out --append ./build/pawscript >> outputs/$1.out
# fi