diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-02 22:24:28 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-02 22:24:28 -0500 |
commit | 6fb2295a25ee4a24b38f4fce1b652a60cedd1b64 (patch) | |
tree | 4eef41fc33185611f67232fb28089180c496caeb /test/test-common.sh | |
parent | ef7a330eae68da2f47c617502b28a2f8c9eeb792 (diff) |
test: `! true` doesn't trip `set -e`, do subshell magic
Diffstat (limited to 'test/test-common.sh')
-rw-r--r-- | test/test-common.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test-common.sh b/test/test-common.sh index 3df7107..c525dd8 100644 --- a/test/test-common.sh +++ b/test/test-common.sh @@ -70,3 +70,9 @@ empty() ( set +x [[ $(stat -c %s "$1") -eq 0 ]] ) + +# Just using '!' doesn't trip `set -e` +not() ( + set +x + ! eval "$@" +) |