-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: increase _fishtape_test_failed when file is invalid #66
base: main
Are you sure you want to change the base?
fix: increase _fishtape_test_failed when file is invalid #66
Conversation
5930860
to
7fca022
Compare
|
7fca022
to
f7cbca0
Compare
source ./functions/fishtape.fish; fishtape ./tests/invalid.fish see jorgebucaran#60
I updated the test with a tautology. The invalid file should be considered a failed test, so the pipeline doesn't succeed. Below, I highlighted the output changes ❯ source ./functions/fishtape.fish; fishtape tests/invalid.fish ✖️
TAP version 13
~/projects/contributions/fishtape/tests/invalid.fish (line 4): 'end' outside of a block
end # we want to trigger a parsing error
^~^
warning: Error while reading file /home/edouard/projects/contributions/fishtape/tests/invalid.fish
1..0
# pass 0
-# ok
+# fail 1 |
Isn't that the same situation with |
The |
Are we not currently failing tests when the user misuses |
You can check out the result of |
I thought the expectation was for incorrect flag usage to result in a failure. I can see |
Yep, it's on purpose, so the file is invalid in Fish and it triggers a parsing error. Previously, Fishtape didn't increment the The behaviour I introduce aligns the exit code of Fishtape with the reality of Fish parsing |
related: #60
Here, I reproduce a case of silent error I got on pure due to an invalid file. The change was made through Github UI and suggestion feature so no linting was done.
Test
CI
Not sure how to run this on CI