t7508: demonstrate status's failure to use --porcelain format with -z
When 'git status' is supplied the -z switch, and no output format has been selected, it is supposed to use the --porcelain format. This does not happen. Instead, the standard long format is used. Add a test to demonstrate this failure. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brandon Casey committed
May 26, 2011 at 13:43 UTC
95b9f9f927a7d9ea2bc2849b6ae624335e98362f
1 file changed
+7
t/t7508-status.sh
+7
@@ -364,6 +364,13 @@ test_expect_success 'status submodule summary (clean submodule)' '
364
test_cmp expect output
365
'
366
367
+test_expect_failure 'status -z implies porcelain' '
368
+ git status --porcelain |
369
+ perl -pe "s/\012/\000/g" >expect &&
370
+ git status -z >output &&
371
+ test_cmp expect output
372
+'
373
+
374
cat >expect <<EOF
375
# On branch master
376
# Changes to be committed: