Skip to content

Commit

Permalink
t7508: test git status -v
Browse files Browse the repository at this point in the history
"status -v" had no test. Include one.

This also requires changing the .gitignore subtests, which is a good thing:
they include testing a .gitignore pattern now.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael J Gruber authored and Junio C Hamano committed Mar 6, 2015
1 parent ec8a896 commit f8c65c1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions t/t7508-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ test_expect_success 'status with status.displayCommentPrefix=false' '
test_i18ncmp expect output
'

test_expect_success 'status -v' '
(cat expect && git diff --cached) >expect-with-v &&
git status -v >output &&
test_i18ncmp expect-with-v output
'

test_expect_success 'setup fake editor' '
cat >.git/editor <<-\EOF &&
#! /bin/sh
Expand Down Expand Up @@ -201,7 +207,7 @@ test_expect_success 'status -s' '
test_expect_success 'status with gitignore' '
{
echo ".gitignore" &&
echo "expect" &&
echo "expect*" &&
echo "output" &&
echo "untracked"
} >.gitignore &&
Expand All @@ -222,6 +228,7 @@ test_expect_success 'status with gitignore' '
!! dir1/untracked
!! dir2/untracked
!! expect
!! expect-with-v
!! output
!! untracked
EOF
Expand Down Expand Up @@ -253,6 +260,7 @@ Ignored files:
dir1/untracked
dir2/untracked
expect
expect-with-v
output
untracked
Expand All @@ -264,7 +272,7 @@ EOF
test_expect_success 'status with gitignore (nothing untracked)' '
{
echo ".gitignore" &&
echo "expect" &&
echo "expect*" &&
echo "dir2/modified" &&
echo "output" &&
echo "untracked"
Expand All @@ -285,6 +293,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '
!! dir2/modified
!! dir2/untracked
!! expect
!! expect-with-v
!! output
!! untracked
EOF
Expand Down Expand Up @@ -312,6 +321,7 @@ Ignored files:
dir2/modified
dir2/untracked
expect
expect-with-v
output
untracked
Expand Down

0 comments on commit f8c65c1

Please sign in to comment.