aboutsummaryrefslogtreecommitdiffstats
path: root/tests/t0002-fail.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t0002-fail.t')
-rwxr-xr-xtests/t0002-fail.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/t0002-fail.t b/tests/t0002-fail.t
index c8ed4a2..58bf019 100755
--- a/tests/t0002-fail.t
+++ b/tests/t0002-fail.t
@@ -1,5 +1,5 @@
#!/bin/sh -e
-# Copyright (c) 2015 Tharre
+# Copyright (c) 2015-2016 Tharre
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
@@ -14,10 +14,19 @@ echo "fail" > $3
exit 1
EOF
+cat > "chain_fail.do" <<'EOF'
+#!/bin/sh -e
+redo-ifchange fail
+EOF
+
test_expect_success "return nonzero" "
test_must_fail redo fail
"
+test_expect_success "return nonzero when dependency failed" "
+ test_must_fail redo chain_fail
+"
+
test_expect_success "target file was not created" "
test_must_fail test -e fail
"