diff --git a/functions/fishtape.fish b/functions/fishtape.fish index 7759f92..b15c2fe 100644 --- a/functions/fishtape.fish +++ b/functions/fishtape.fish @@ -94,7 +94,8 @@ function fishtape --description "Test scripts, functions, and plugins in Fish" echo TAP version 13 for file in $files - fish --init-command=(functions @echo | string collect) --init-command=(functions @test | string collect) $file + fish --init-command=(functions @echo | string collect) --init-command=(functions @test | string collect) $file \ + || set _fishtape_test_failed (math $_fishtape_test_failed + 1) end echo diff --git a/tests/invalid.fish b/tests/invalid.fish new file mode 100644 index 0000000..2653fab --- /dev/null +++ b/tests/invalid.fish @@ -0,0 +1,4 @@ +@echo === invalid === + +@test "nothing to see here" -z (true) +end # we want to trigger a parsing error