aboutsummaryrefslogtreecommitdiffstats
path: root/test/fail.bats
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2015-01-25 20:38:20 +0100
committerTharre <tharre3@gmail.com>2015-01-25 20:41:16 +0100
commit5322817d1c382d5ba377be0080bd4c5da525cd2f (patch)
treea6053e4c13e72ed29f6441e7626b5d751d79102a /test/fail.bats
parentc4a2f0dec7bd7d3f50115bb88467a0841c91d957 (diff)
downloadredo-5322817d1c382d5ba377be0080bd4c5da525cd2f.tar.gz
redo-5322817d1c382d5ba377be0080bd4c5da525cd2f.tar.xz
redo-5322817d1c382d5ba377be0080bd4c5da525cd2f.zip
Add testing framework `bats`, this fixes #6
Diffstat (limited to 'test/fail.bats')
-rw-r--r--test/fail.bats13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/fail.bats b/test/fail.bats
new file mode 100644
index 0000000..1a77ced
--- /dev/null
+++ b/test/fail.bats
@@ -0,0 +1,13 @@
+#!/usr/bin/env bats
+
+load test_helper
+
+@test "invoke with target without do-file" {
+ run redo this-does-not-exist
+ [ $status -ne 0 ]
+}
+
+@test "invoke with failing do-file" {
+ run redo fail
+ [ $status -ne 0 ] && [ ! -e fail_result ]
+}