From c4a9fe93792b11d26f20028cba6f97b0ede8beb7 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 23 Oct 2015 04:30:00 +0000 Subject: [PATCH] test harness: Exit 1 if a 'todo' test passed. --- tests/test-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-highlighting.zsh b/tests/test-highlighting.zsh index c77b3ca..4ecee08 100755 --- a/tests/test-highlighting.zsh +++ b/tests/test-highlighting.zsh @@ -110,7 +110,7 @@ run_test() { integer something_failed=0 for data_file in ${0:h:h}/highlighters/$1/test-data/*.zsh; do echo "# ${data_file:t:r}" - (run_test "$data_file") | tee >(cat) | grep '^not ok' | grep -qv ' # TODO' && (( something_failed=1 )) + (run_test "$data_file") | tee >(cat) | grep -v '^not ok.*# TODO' | grep -q '^not ok\|^ok.*# TODO' && (( something_failed=1 )) (( $pipestatus[1] )) && exit 2 done