File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 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"
1818tmp_dir=" $( mktemp --directory " $tmp_base_dir /XXXXXX" ) "
1919test_case_dir=' tests'
2020
21- test_pass () { PASSED+=(" $1 " ); }
21+ test_pass () { PASSED+=(" $1 " ); echo ' ::endgroup:: ' ; }
2222test_fail () {
2323 FAILED+=(" $1 " )
24+ echo ' ::endgroup::'
2425 echo " ::error file=clj/indent-test/$test_case_dir /$1 /out.clj::Failed indent test case."
2526}
2627test_skip () {
2728 SKIPPED+=(" $1 " )
29+ echo ' ::endgroup::'
2830 echo " ::warning file=clj/indent-test/$test_case_dir /$1 /out.clj::Skipped indent test case."
2931}
3032
@@ -33,7 +35,7 @@ run_test_case() {
3335 in_file=" $test_case_dir /$test_case /in.clj"
3436 expected_file=" $test_case_dir /$test_case /out.clj"
3537
36- echo " ::group::$EDITOR -- $test_case "
38+ echo " ::group::$EDITOR : $test_case "
3739
3840 if [ -f " $test_case_dir /$test_case /SKIP" ]; then
3941 test_skip " $test_case "
@@ -55,13 +57,15 @@ run_test_case() {
5557
5658 [ $? -eq 0 ] && test_pass " $test_case " || test_fail " $test_case "
5759 fi
58-
59- echo ' ::endgroup::'
6060}
6161
6262for tcase in $test_case_dir /* /; do
6363 run_test_case " $( basename " $tcase " ) "
6464done
6565
6666echo " 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