t7508: test git status -v

"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>

Michael J Gruber committed Mar 6, 2015 at 10:43 UTC f8c65c1f97b364a8e90267e66193cf20aa60ca6e
1 file changed +12 -2
t/t7508-status.sh
+12 -2
@@ -137,6 +137,12 @@ test_expect_success 'status with status.displayCommentPrefix=false' '
137 test_i18ncmp expect output
138 '
139
140 +test_expect_success 'status -v' '
141 + (cat expect && git diff --cached) >expect-with-v &&
142 + git status -v >output &&
143 + test_i18ncmp expect-with-v output
144 +'
145 +
146 test_expect_success 'setup fake editor' '
147 cat >.git/editor <<-\EOF &&
148 #! /bin/sh
@@ -201,7 +207,7 @@ test_expect_success 'status -s' '
207 test_expect_success 'status with gitignore' '
208 {
209 echo ".gitignore" &&
204 - echo "expect" &&
210 + echo "expect*" &&
211 echo "output" &&
212 echo "untracked"
213 } >.gitignore &&
@@ -222,6 +228,7 @@ test_expect_success 'status with gitignore' '
228 !! dir1/untracked
229 !! dir2/untracked
230 !! expect
231 + !! expect-with-v
232 !! output
233 !! untracked
234 EOF
@@ -253,6 +260,7 @@ Ignored files:
260 dir1/untracked
261 dir2/untracked
262 expect
263 + expect-with-v
264 output
265 untracked
266
@@ -264,7 +272,7 @@ EOF
272 test_expect_success 'status with gitignore (nothing untracked)' '
273 {
274 echo ".gitignore" &&
267 - echo "expect" &&
275 + echo "expect*" &&
276 echo "dir2/modified" &&
277 echo "output" &&
278 echo "untracked"
@@ -285,6 +293,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '
293 !! dir2/modified
294 !! dir2/untracked
295 !! expect
296 + !! expect-with-v
297 !! output
298 !! untracked
299 EOF
@@ -312,6 +321,7 @@ Ignored files:
321 dir2/modified
322 dir2/untracked
323 expect
324 + expect-with-v
325 output
326 untracked
327