Skip to content

Commit f8c65c1

Browse files
Michael J Grubergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ec8a896 commit f8c65c1

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

t/t7508-status.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ test_expect_success 'status with status.displayCommentPrefix=false' '
137137
test_i18ncmp expect output
138138
'
139139

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+
140146
test_expect_success 'setup fake editor' '
141147
cat >.git/editor <<-\EOF &&
142148
#! /bin/sh
@@ -201,7 +207,7 @@ test_expect_success 'status -s' '
201207
test_expect_success 'status with gitignore' '
202208
{
203209
echo ".gitignore" &&
204-
echo "expect" &&
210+
echo "expect*" &&
205211
echo "output" &&
206212
echo "untracked"
207213
} >.gitignore &&
@@ -222,6 +228,7 @@ test_expect_success 'status with gitignore' '
222228
!! dir1/untracked
223229
!! dir2/untracked
224230
!! expect
231+
!! expect-with-v
225232
!! output
226233
!! untracked
227234
EOF
@@ -253,6 +260,7 @@ Ignored files:
253260
dir1/untracked
254261
dir2/untracked
255262
expect
263+
expect-with-v
256264
output
257265
untracked
258266
@@ -264,7 +272,7 @@ EOF
264272
test_expect_success 'status with gitignore (nothing untracked)' '
265273
{
266274
echo ".gitignore" &&
267-
echo "expect" &&
275+
echo "expect*" &&
268276
echo "dir2/modified" &&
269277
echo "output" &&
270278
echo "untracked"
@@ -285,6 +293,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '
285293
!! dir2/modified
286294
!! dir2/untracked
287295
!! expect
296+
!! expect-with-v
288297
!! output
289298
!! untracked
290299
EOF
@@ -312,6 +321,7 @@ Ignored files:
312321
dir2/modified
313322
dir2/untracked
314323
expect
324+
expect-with-v
315325
output
316326
untracked
317327

0 commit comments

Comments
 (0)