File tree 1 file changed +8
-27
lines changed 1 file changed +8
-27
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
echo " mini-javascript test script"
3
- echo
4
3
5
4
BINARY=./javascript
6
5
if [ ! -f $BINARY ]; then
@@ -9,29 +8,11 @@ if [ ! -f $BINARY ]; then
9
8
exit
10
9
fi
11
10
12
- echo " Test variable declaration"
13
- $BINARY samples/variable.js
14
-
15
- echo
16
- echo " Test condition statements"
17
- $BINARY samples/condition.js
18
-
19
- echo
20
- echo " Test iteration stastements"
21
- $BINARY samples/iteration.js
22
-
23
- echo
24
- echo " Test unary expressions"
25
- $BINARY samples/unary.js
26
-
27
- echo
28
- echo " Test strict mode"
29
- $BINARY samples/use_strict.js
30
-
31
- echo
32
- echo " Test error file"
33
- $BINARY samples/err.js
34
-
35
- echo
36
- echo " Test simple javascript source"
37
- $BINARY samples/simple.js
11
+ SAMPLE_DIR=./samples
12
+ for SRC in " $SAMPLE_DIR " /* .js
13
+ do
14
+ if [ -f $SRC ]; then
15
+ echo -e " \nTest $SRC "
16
+ $BINARY $SRC
17
+ fi
18
+ done
You can’t perform that action at this time.
0 commit comments