File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Move to analysis directory where the ash binary is located
34cd ..
45
56PASS_COUNT=0
67FAIL_COUNT=0
78
8- echo " Running positive tests..."
9+ GREEN=' \033[0;32m'
10+ RED=' \033[0;31m'
11+ YELLOW=' \033[1;33m'
12+ NC=' \033[0m' # No Color
13+
14+ echo -e " ${YELLOW} Running positive tests...${NC} "
915for file in tests/positive/* .ash; do
10- echo " $file "
16+ echo " → $file "
1117 ./ash < " $file " > /dev/null
1218 if [ $? -eq 0 ]; then
13- echo " ✅ Passed"
19+ echo -e " ${GREEN} ✔ Passed${NC} "
1420 (( PASS_COUNT++ ))
1521 else
16- echo " Unexpected failure: $file "
22+ echo -e " ${RED} ✘ Unexpected failure: $file ${NC} "
1723 (( FAIL_COUNT++ ))
1824 fi
1925 echo
2026done
2127
22- echo " 🔍 Running negative tests..."
28+ echo -e " ${YELLOW} Running negative tests...${NC} "
2329for file in tests/negative/* .ash; do
24- echo " $file "
30+ echo " → $file "
2531 ./ash < " $file " > /dev/null
2632 if [ $? -ne 0 ]; then
27- echo " Correctly failed"
33+ echo -e " ${GREEN} ✔ Correctly failed${NC} "
2834 (( PASS_COUNT++ ))
2935 else
30- echo " Unexpected pass: $file "
36+ echo -e " ${RED} ✘ Unexpected pass: $file ${NC} "
3137 (( FAIL_COUNT++ ))
3238 fi
3339 echo
3440done
3541
36- echo " Total passed: $PASS_COUNT "
37- echo " Total failed: $FAIL_COUNT "
42+ echo -e " ${YELLOW} Summary:${NC} "
43+ echo -e " ${GREEN} ✔ Total passed: $PASS_COUNT ${NC} "
44+ echo -e " ${RED} ✘ Total failed: $FAIL_COUNT ${NC} "
3845
3946if [ $FAIL_COUNT -ne 0 ]; then
4047 exit 1
You can’t perform that action at this time.
0 commit comments