Skip to content

Commit 6d1e59d

Browse files
committed
Improve test script
1 parent eba4f9e commit 6d1e59d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

test.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,22 @@ if [ ! -f $BINARY ]; then
99
fi
1010

1111
SAMPLE_DIR=./samples
12+
SUCCESS=0
13+
ERROR=0
1214
for SRC in "$SAMPLE_DIR"/*.js
1315
do
14-
if [ -f $SRC ]; then
16+
if [ -f $SRC ]
17+
then
1518
echo -e "\nTest $SRC"
1619
$BINARY $SRC
20+
21+
if [ $? = 0 ]
22+
then
23+
((SUCCESS++))
24+
else
25+
((ERROR++))
26+
fi
1727
fi
18-
done
28+
done
29+
30+
echo "Result: $SUCCESS success, $ERROR error"

0 commit comments

Comments
 (0)