File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,15 @@ mkdir -p "$tmp_base_dir"
18
18
tmp_dir=" $( mktemp --directory " $tmp_base_dir /XXXXXX" ) "
19
19
test_case_dir=' tests'
20
20
21
- test_pass () { PASSED+=(" $1 " ); }
21
+ test_pass () { PASSED+=(" $1 " ); echo ' ::endgroup:: ' ; }
22
22
test_fail () {
23
23
FAILED+=(" $1 " )
24
+ echo ' ::endgroup::'
24
25
echo " ::error file=clj/indent-test/$test_case_dir /$1 /out.clj::Failed indent test case."
25
26
}
26
27
test_skip () {
27
28
SKIPPED+=(" $1 " )
29
+ echo ' ::endgroup::'
28
30
echo " ::warning file=clj/indent-test/$test_case_dir /$1 /out.clj::Skipped indent test case."
29
31
}
30
32
@@ -33,7 +35,7 @@ run_test_case() {
33
35
in_file=" $test_case_dir /$test_case /in.clj"
34
36
expected_file=" $test_case_dir /$test_case /out.clj"
35
37
36
- echo " ::group::$EDITOR -- $test_case "
38
+ echo " ::group::$EDITOR : $test_case "
37
39
38
40
if [ -f " $test_case_dir /$test_case /SKIP" ]; then
39
41
test_skip " $test_case "
@@ -55,13 +57,15 @@ run_test_case() {
55
57
56
58
[ $? -eq 0 ] && test_pass " $test_case " || test_fail " $test_case "
57
59
fi
58
-
59
- echo ' ::endgroup::'
60
60
}
61
61
62
62
for tcase in $test_case_dir /* /; do
63
63
run_test_case " $( basename " $tcase " ) "
64
64
done
65
65
66
66
echo " passed: ${# PASSED[@]} , failed: ${# FAILED[@]} , skipped: ${# SKIPPED[@]} "
67
- exit ${# FAILED[@]}
67
+
68
+ # If none passed, or some failed, exit with error.
69
+ if [ ${# PASSED[@]} -eq 0 ] || [ ${# FAILED[@]} -gt 0 ]; then
70
+ exit 1
71
+ fi
You can’t perform that action at this time.
0 commit comments