I used @assert-fail to assert exit code 1 When something run fail, but it does't work.
This is my example:
source bach.sh
test-something-fail(){
run_something_fail
@assert-fail
}
run_something_fail(){
exit 1
}
And I got the error:
1..1
not ok 1 - something fail
# -----
# All tests: 1, failed: 1, skipped: 0
So, what's wrong with this? what should I do?
I used
@assert-failto assert exit code 1 When something run fail, but it does't work.This is my example:
And I got the error:
So, what's wrong with this? what should I do?