-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Description
It seems that shunit2 does not work with the -e flag of bash in some cases (but works fine in other). In particular assertNotNull raises an error (no matter if the assert fails or not). I don't know if the -e flag of bash is compatible with shunit2 but I use it to be sure to catch all errors.
set -e : Exit immediately if a command exits with a non-zero status.
Observed with bash 5.1.16. Here is a simple script to reproduce the bug:
set -e
testSomething() {
# this behaves correctly
assertNotSame "Not same" "aaa" "bbb"
# this fails with message: ASSERT:Unknown failure encountered running a test
assertNotNull "Not null(1)" "something"
}
source shunit2
Fresa
Metadata
Metadata
Assignees
Labels
No labels