aboutsummaryrefslogtreecommitdiff
path: root/t/t7105-reset-patch.sh
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-10-30 20:46:54 -0500
committerJunio C Hamano <gitster@pobox.com>2010-11-09 11:59:49 -0800
commita48fcd836971d065b9bf16b8cd046fd1aff9b279 (patch)
tree34f868252e96a6cf1f7fe02014977f7fbb12d4c3 /t/t7105-reset-patch.sh
parent00648ba0505bbe1999bb6ae2f1d02a0ef923b191 (diff)
downloadgit-a48fcd836971d065b9bf16b8cd046fd1aff9b279.tar.gz
git-a48fcd836971d065b9bf16b8cd046fd1aff9b279.tar.xz
tests: add missing &&
Breaks in a test assertion's && chain can potentially hide failures from earlier commands in the chain. Commands intended to fail should be marked with !, test_must_fail, or test_might_fail. The examples in this patch do not require that. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7105-reset-patch.sh')
-rwxr-xr-xt/t7105-reset-patch.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t7105-reset-patch.sh b/t/t7105-reset-patch.sh
index 9891e2c1f..95fab2036 100755
--- a/t/t7105-reset-patch.sh
+++ b/t/t7105-reset-patch.sh
@@ -18,7 +18,7 @@ test_expect_success PERL 'setup' '
# note: bar sorts before foo, so the first 'n' is always to skip 'bar'
test_expect_success PERL 'saying "n" does nothing' '
- set_and_save_state dir/foo work work
+ set_and_save_state dir/foo work work &&
(echo n; echo n) | git reset -p &&
verify_saved_state dir/foo &&
verify_saved_state bar
@@ -42,14 +42,14 @@ test_expect_success PERL 'git reset -p HEAD^' '
# the failure case (and thus get out of the loop).
test_expect_success PERL 'git reset -p dir' '
- set_state dir/foo work work
+ set_state dir/foo work work &&
(echo y; echo n) | git reset -p dir &&
verify_state dir/foo work head &&
verify_saved_state bar
'
test_expect_success PERL 'git reset -p -- foo (inside dir)' '
- set_state dir/foo work work
+ set_state dir/foo work work &&
(echo y; echo n) | (cd dir && git reset -p -- foo) &&
verify_state dir/foo work head &&
verify_saved_state bar