Skip to content

Commit 8d66bb0

Browse files
jonseymourgitster
authored andcommitted
t3903: fix broken test_must_fail calls
Some tests in detached-stash are calling test_must_fail in such a way that the arguments to test_must_fail do, indeed, fail but not in the manner expected by the test. This patch removes the unnecessary and unhelpful double quotes. Signed-off-by: Jon Seymour <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b0c6bf4 commit 8d66bb0

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

t/t3903-stash.sh

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ test_expect_success 'stash drop - fail early if specified stash is not a stash r
435435
git stash &&
436436
echo bar > file &&
437437
git stash &&
438-
test_must_fail "git stash drop $(git rev-parse stash@{0})" &&
438+
test_must_fail git stash drop $(git rev-parse stash@{0}) &&
439439
git stash pop &&
440440
test bar = "$(cat file)" &&
441441
git reset --hard HEAD
@@ -449,7 +449,7 @@ test_expect_success 'stash pop - fail early if specified stash is not a stash re
449449
git stash &&
450450
echo bar > file &&
451451
git stash &&
452-
test_must_fail "git stash pop $(git rev-parse stash@{0})" &&
452+
test_must_fail git stash pop $(git rev-parse stash@{0}) &&
453453
git stash pop &&
454454
test bar = "$(cat file)" &&
455455
git reset --hard HEAD
@@ -462,31 +462,31 @@ test_expect_success 'ref with non-existant reflog' '
462462
git add file2 &&
463463
git stash &&
464464
! "git rev-parse --quiet --verify does-not-exist" &&
465-
test_must_fail "git stash drop does-not-exist" &&
466-
test_must_fail "git stash drop does-not-exist@{0}" &&
467-
test_must_fail "git stash pop does-not-exist" &&
468-
test_must_fail "git stash pop does-not-exist@{0}" &&
469-
test_must_fail "git stash apply does-not-exist" &&
470-
test_must_fail "git stash apply does-not-exist@{0}" &&
471-
test_must_fail "git stash show does-not-exist" &&
472-
test_must_fail "git stash show does-not-exist@{0}" &&
473-
test_must_fail "git stash branch tmp does-not-exist" &&
474-
test_must_fail "git stash branch tmp does-not-exist@{0}" &&
465+
test_must_fail git stash drop does-not-exist &&
466+
test_must_fail git stash drop does-not-exist@{0} &&
467+
test_must_fail git stash pop does-not-exist &&
468+
test_must_fail git stash pop does-not-exist@{0} &&
469+
test_must_fail git stash apply does-not-exist &&
470+
test_must_fail git stash apply does-not-exist@{0} &&
471+
test_must_fail git stash show does-not-exist &&
472+
test_must_fail git stash show does-not-exist@{0} &&
473+
test_must_fail git stash branch tmp does-not-exist &&
474+
test_must_fail git stash branch tmp does-not-exist@{0} &&
475475
git stash drop
476476
'
477477

478478
test_expect_success 'invalid ref of the form stash@{n}, n >= N' '
479479
git stash clear &&
480-
test_must_fail "git stash drop stash@{0}" &&
480+
test_must_fail git stash drop stash@{0} &&
481481
echo bar5 > file &&
482482
echo bar6 > file2 &&
483483
git add file2 &&
484484
git stash &&
485-
test_must_fail "git drop stash@{1}" &&
486-
test_must_fail "git pop stash@{1}" &&
487-
test_must_fail "git apply stash@{1}" &&
488-
test_must_fail "git show stash@{1}" &&
489-
test_must_fail "git branch tmp stash@{1}" &&
485+
test_must_fail git drop stash@{1} &&
486+
test_must_fail git pop stash@{1} &&
487+
test_must_fail git apply stash@{1} &&
488+
test_must_fail git show stash@{1} &&
489+
test_must_fail git branch tmp stash@{1} &&
490490
git stash drop
491491
'
492492

0 commit comments

Comments
 (0)