Skip to content

Commit 4256397

Browse files
Pete Wyckoffgitster
authored andcommitted
git p4 test: check for error message in failed test
Make sure the test fails for the expected reason. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a64f732 commit 4256397

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t9800-git-p4-basic.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ test_expect_success 'git p4 sync uninitialized repo' '
4545
test_when_finished cleanup_git &&
4646
(
4747
cd "$git" &&
48-
test_must_fail git p4 sync
48+
test_must_fail git p4 sync 2>errs &&
49+
test_i18ngrep "Perhaps you never did" errs
4950
)
5051
'
5152

0 commit comments

Comments
 (0)