summaryrefslogtreecommitdiff
path: root/t/t3904-stash-patch.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-04-08 18:52:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-08 19:17:58 (GMT)
commit121c0d4151a602f528887486d627a7230abbd85d (patch)
tree0bcf88d965b4b878d60f8ea209faaf943242673d /t/t3904-stash-patch.sh
parent274b9cc25322d9ee79aa8e6d4e86f0ffe5ced925 (diff)
downloadgit-121c0d4151a602f528887486d627a7230abbd85d.zip
git-121c0d4151a602f528887486d627a7230abbd85d.tar.gz
git-121c0d4151a602f528887486d627a7230abbd85d.tar.bz2
t3904: fix incorrect demonstration of a bug
In 7e9e048661 (stash -p: demonstrate failure of split with mixed y/n, 2015-04-16), a regression test for a known breakage that was added to the test script `t3904-stash-patch.sh` that demonstrated that splitting a hunk and trying to stash only part of that split hunk fails (but shouldn't). As expected, it still fails, but for the wrong reason: once the bug is fixed, we would expect stderr to show nothing, yet the regression test expects stderr to show something. Let's fix that by telling that regression test case to expect nothing to be printed to stderr. While at it, also drop the obvious left-over from debugging where the regression test did not mind `git stash -p` to return a non-zero exit status. Of course, the regression test still fails, but this time for the correct reason. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3904-stash-patch.sh')
-rwxr-xr-xt/t3904-stash-patch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t3904-stash-patch.sh b/t/t3904-stash-patch.sh
index 9546b6f..ab7d7aa 100755
--- a/t/t3904-stash-patch.sh
+++ b/t/t3904-stash-patch.sh
@@ -106,8 +106,8 @@ test_expect_failure 'stash -p with split hunk' '
ccc
EOF
printf "%s\n" s n y q |
- test_might_fail git stash -p 2>error &&
- ! test_must_be_empty error &&
+ git stash -p 2>error &&
+ test_must_be_empty error &&
grep "added line 1" test &&
! grep "added line 2" test
'