Skip to content

Commit

Permalink
Merge branch 'cb/maint-ls-files-error-report'
Browse files Browse the repository at this point in the history
* cb/maint-ls-files-error-report:
  t3005: do not assume a particular order of stdout and stderr of git-ls-files
  • Loading branch information
Junio C Hamano committed Sep 6, 2011
2 parents 4b1108e + 385ceec commit 5127a07
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions t/t3005-ls-files-relative.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ test_expect_success 'ls-files -c' '
for f in ../y*
do
echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
done >expect &&
echo "Did you forget to ${sq}git add${sq}?" >>expect &&
ls ../x* >>expect &&
test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual 2>&1 &&
test_cmp expect actual
done >expect.err &&
echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
ls ../x* >expect.out &&
test_must_fail git ls-files -c --error-unmatch ../[xy]* >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&
test_cmp expect.err actual.err
)
'

Expand All @@ -59,11 +60,12 @@ test_expect_success 'ls-files -o' '
for f in ../x*
do
echo "error: pathspec $sq$f$sq did not match any file(s) known to git."
done >expect &&
echo "Did you forget to ${sq}git add${sq}?" >>expect &&
ls ../y* >>expect &&
test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual 2>&1 &&
test_cmp expect actual
done >expect.err &&
echo "Did you forget to ${sq}git add${sq}?" >>expect.err &&
ls ../y* >expect.out &&
test_must_fail git ls-files -o --error-unmatch ../[xy]* >actual.out 2>actual.err &&
test_cmp expect.out actual.out &&
test_cmp expect.err actual.err
)
'

Expand Down

0 comments on commit 5127a07

Please sign in to comment.