Skip to content

Commit 9c4ed70

Browse files
committed
t3904: fix incorrect demonstration of a bug
In 7e9e048 (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 <[email protected]>
1 parent 2125656 commit 9c4ed70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t3904-stash-patch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ test_expect_failure 'stash -p with split hunk' '
106106
ccc
107107
EOF
108108
printf "%s\n" s n y q |
109-
test_might_fail git stash -p 2>error &&
110-
! test_must_be_empty error &&
109+
git stash -p 2>error &&
110+
test_must_be_empty error &&
111111
grep "added line 1" test &&
112112
! grep "added line 2" test
113113
'

0 commit comments

Comments
 (0)