File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ if [ "${VERBOSE}" == "1" ]; then
11
11
set -x
12
12
fi
13
13
14
+ passed=0
15
+ failed=0
16
+ skipped=0
17
+
14
18
check () {
15
19
grep --silent " // ignore-lexer-test" $1 ;
16
20
@@ -21,14 +25,27 @@ check() {
21
25
# seem to have anny effect.
22
26
if $3 RustLexer tokens -tokens < $1 | $4 $1 $5 ; then
23
27
echo " pass: $1 "
28
+ passed=` expr $passed + 1`
24
29
else
25
30
echo " fail: $1 "
31
+ failed=` expr $failed + 1`
26
32
fi
27
33
else
28
34
echo " skip: $1 "
35
+ skipped=` expr $skipped + 1`
29
36
fi
30
37
}
31
38
32
39
for file in $( find $1 -iname ' *.rs' ! -path ' */test/compile-fail*' ) ; do
33
40
check $file $2 $3 $4 $5
34
41
done
42
+
43
+ printf " \ntest result: "
44
+
45
+ if [ $failed -eq 0 ]; then
46
+ printf " ok. $passed passed; $failed failed; $skipped skipped\n\n"
47
+ else
48
+ printf " failed. $passed passed; $failed failed; $skipped skipped\n\n"
49
+ exit 1
50
+ fi
51
+
You can’t perform that action at this time.
0 commit comments