-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrunExamples.sh
More file actions
executable file
·34 lines (32 loc) · 1 KB
/
Copy pathrunExamples.sh
File metadata and controls
executable file
·34 lines (32 loc) · 1 KB
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
#!/bin/bash
errFolder="Errors"
for dirName in Example/*/; do
if [[ "$dirName" != *"$errFolder"* ]]; then
echo "Running examples in $dirName"
echo "----------------------------------------------------"
for fileName in $dirName/*.owo; do
./wow.sh $fileName
echo '================================================'
done
echo ""
fi
done
echo "Running whitespace optimization example"
echo "----------------------------------------------------"
./wow.sh -w Example/OptimizationExamples/whitespace_opt.owo
echo '================================================'
echo "Running Error cases in Errors folder, each line should be an error"
sourceCode=$1
defaultVer=$(python --version 2>/dev/null)
v3=" 3."
if [[ "$defaultVer" == *"$v3"* ]]; then
python test_parser.py
else
pythonVer=$(which python3 2>/dev/null)
v3="python3"
if [[ "$pythonVer" == *"$v3"* ]]; then
python3 test_parser.py
else
echo "Requires python3"
fi
fi