summaryrefslogtreecommitdiff
path: root/t/t2203-add-intent.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-12-27 10:18:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-12-27 20:38:35 (GMT)
commit6de5aafdd12104df3d10ef54ac74723a41174290 (patch)
treedee18581a89e7f220fe2642e37b5145b652f3144 /t/t2203-add-intent.sh
parent42e6fde5c28150206956ea4be490d886c4ecbd68 (diff)
downloadgit-6de5aafdd12104df3d10ef54ac74723a41174290.zip
git-6de5aafdd12104df3d10ef54ac74723a41174290.tar.gz
git-6de5aafdd12104df3d10ef54ac74723a41174290.tar.bz2
t2203: test status output with porcelain v2 format
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2203-add-intent.sh')
-rwxr-xr-xt/t2203-add-intent.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh
index 84a9028..06e69e8 100755
--- a/t/t2203-add-intent.sh
+++ b/t/t2203-add-intent.sh
@@ -25,6 +25,18 @@ test_expect_success 'git status' '
test_cmp expect actual
'
+test_expect_success 'git status with porcelain v2' '
+ git status --porcelain=v2 | grep -v "^?" >actual &&
+ nam1=d00491fd7e5bb6fa28c517a0bb32b8b506539d4d &&
+ nam2=ce013625030ba8dba906f756967f9e9ca394464a &&
+ cat >expect <<-EOF &&
+ 1 DA N... 100644 000000 100644 $nam1 $_z40 1.t
+ 1 A. N... 000000 100644 100644 $_z40 $nam2 elif
+ 1 .A N... 000000 000000 100644 $_z40 $_z40 file
+ EOF
+ test_cmp expect actual
+'
+
test_expect_success 'check result of "add -N"' '
git ls-files -s file >actual &&
empty=$(git hash-object --stdin </dev/null) &&