Replies: 1 comment 1 reply
-
|
Hey @zregvart, Try changing |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all!
I want to test the error handling of my function and I can't wrap my head around this: when I run the script
a.shdirectly, it immediately exits; but when I try to test for this behavior the it looks likeset -eis ignored.Here is what I have:
a.sh:
a_spec.sh:
Calling directly:
Running the tests:
$ shellspec F Examples: 1) a call a When call a 1.1) The status should be failure expected: failure (non-zero) got: success (zero) [status: 0] # test/a_spec.sh:12 1.2) The output should equal expected: "" got: "Got from b(): in b" # test/a_spec.sh:13 1.3) The error should equal erroring in b() expected: "erroring in b()" got: "erroring in b() in a(), should not reach this" # test/a_spec.sh:14 Finished in 0.30 seconds (user 0.30 seconds, sys 0.08 seconds) 1 example, 1 failure Failure examples / Errors: (Listed here affect your suite's status) shellspec test/a_spec.sh:10 # 1) a call a FAILEDBeta Was this translation helpful? Give feedback.
All reactions