Skip to content

Commit 6de5aaf

Browse files
pcloudsgitster
authored andcommitted
t2203: test status output with porcelain v2 format
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 42e6fde commit 6de5aaf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t2203-add-intent.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ test_expect_success 'git status' '
2525
test_cmp expect actual
2626
'
2727

28+
test_expect_success 'git status with porcelain v2' '
29+
git status --porcelain=v2 | grep -v "^?" >actual &&
30+
nam1=d00491fd7e5bb6fa28c517a0bb32b8b506539d4d &&
31+
nam2=ce013625030ba8dba906f756967f9e9ca394464a &&
32+
cat >expect <<-EOF &&
33+
1 DA N... 100644 000000 100644 $nam1 $_z40 1.t
34+
1 A. N... 000000 100644 100644 $_z40 $nam2 elif
35+
1 .A N... 000000 000000 100644 $_z40 $_z40 file
36+
EOF
37+
test_cmp expect actual
38+
'
39+
2840
test_expect_success 'check result of "add -N"' '
2941
git ls-files -s file >actual &&
3042
empty=$(git hash-object --stdin </dev/null) &&

0 commit comments

Comments
 (0)