summaryrefslogtreecommitdiffstats
path: root/tests/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tests.sh')
-rwxr-xr-xtests/tests.sh16
1 files changed, 5 insertions, 11 deletions
diff --git a/tests/tests.sh b/tests/tests.sh
index 3047bf4..844de5c 100755
--- a/tests/tests.sh
+++ b/tests/tests.sh
@@ -476,19 +476,13 @@ function bfs_verbose() {
function invoke_bfs() {
bfs_verbose "$@"
"${BFS[@]}" "$@"
-}
-
-# Expect a command to fail, but not crash
-function fail() {
- "$@"
- local STATUS="$?"
+ local status=$?
- if ((STATUS > 125)); then
- exit "$STATUS"
- elif ((STATUS > 0)); then
- return 0
+ # Allow bfs to fail, but not crash
+ if ((status > 125)); then
+ exit $status
else
- return 1
+ return $status
fi
}