-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_examples.sh
More file actions
executable file
·36 lines (28 loc) · 936 Bytes
/
Copy pathcheck_examples.sh
File metadata and controls
executable file
·36 lines (28 loc) · 936 Bytes
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
#!/bin/bash
# Reset
Color_Off='\033[0m' # Text Reset
# Regular Colors
Black='\033[0;30m' # Black
Red='\033[0;31m' # Red
Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow
Blue='\033[0;34m' # Blue
Purple='\033[0;35m' # Purple
Cyan='\033[0;36m' # Cyan
White='\033[0;37m' # White
# Loop through each file in examples/good directory
echo "-------------- GOOD EXAMPLES: --------------"
for file in examples/good/*; do
echo -e "${Green}$file${Color_Off}"
# get error of running src/interpreter on the file
result=$(./interpreter "$file" 2>&1)
echo "$result"
done
# Loop through each file in examples/good directory
echo "-------------- BAD EXAMPLES: --------------"
for file in examples/bad/*; do
echo -e "${Red}$file${Color_Off}"
# get error of running src/interpreter on the file
result=$(./interpreter "$file")
echo "$result"
done