summaryrefslogtreecommitdiff
path: root/test/test-common.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-02-02 22:24:28 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-02-02 22:24:28 -0500
commit6fb2295a25ee4a24b38f4fce1b652a60cedd1b64 (patch)
tree4eef41fc33185611f67232fb28089180c496caeb /test/test-common.sh
parentef7a330eae68da2f47c617502b28a2f8c9eeb792 (diff)
test: `! true` doesn't trip `set -e`, do subshell magic
Diffstat (limited to 'test/test-common.sh')
-rw-r--r--test/test-common.sh6
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 "$@"
+)