Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t7508: test git status -v
author
Michael J Gruber
<git@drmicha.warpmail.net>
Fri, 6 Mar 2015 09:43:34 +0000
(10:43 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 6 Mar 2015 18:51:46 +0000
(10:51 -0800)
"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>
t/t7508-status.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
ec8a896
)
diff --git
a/t/t7508-status.sh
b/t/t7508-status.sh
index 514df671c9b19c5c8d8cc0b18ff3d98649534375..e3c9cf9c104e6d1bd1aa01290f988bc2e2258794 100755
(executable)
--- a/
t/t7508-status.sh
+++ b/
t/t7508-status.sh
@@
-137,6
+137,12
@@
test_expect_success 'status with status.displayCommentPrefix=false' '
test_i18ncmp expect output
'
test_i18ncmp expect output
'
+test_expect_success 'status -v' '
+ (cat expect && git diff --cached) >expect-with-v &&
+ git status -v >output &&
+ test_i18ncmp expect-with-v output
+'
+
test_expect_success 'setup fake editor' '
cat >.git/editor <<-\EOF &&
#! /bin/sh
test_expect_success 'setup fake editor' '
cat >.git/editor <<-\EOF &&
#! /bin/sh
@@
-201,7
+207,7
@@
test_expect_success 'status -s' '
test_expect_success 'status with gitignore' '
{
echo ".gitignore" &&
test_expect_success 'status with gitignore' '
{
echo ".gitignore" &&
- echo "expect" &&
+ echo "expect
*
" &&
echo "output" &&
echo "untracked"
} >.gitignore &&
echo "output" &&
echo "untracked"
} >.gitignore &&
@@
-222,6
+228,7
@@
test_expect_success 'status with gitignore' '
!! dir1/untracked
!! dir2/untracked
!! expect
!! dir1/untracked
!! dir2/untracked
!! expect
+ !! expect-with-v
!! output
!! untracked
EOF
!! output
!! untracked
EOF
@@
-253,6
+260,7
@@
Ignored files:
dir1/untracked
dir2/untracked
expect
dir1/untracked
dir2/untracked
expect
+ expect-with-v
output
untracked
output
untracked
@@
-264,7
+272,7
@@
EOF
test_expect_success 'status with gitignore (nothing untracked)' '
{
echo ".gitignore" &&
test_expect_success 'status with gitignore (nothing untracked)' '
{
echo ".gitignore" &&
- echo "expect" &&
+ echo "expect
*
" &&
echo "dir2/modified" &&
echo "output" &&
echo "untracked"
echo "dir2/modified" &&
echo "output" &&
echo "untracked"
@@
-285,6
+293,7
@@
test_expect_success 'status with gitignore (nothing untracked)' '
!! dir2/modified
!! dir2/untracked
!! expect
!! dir2/modified
!! dir2/untracked
!! expect
+ !! expect-with-v
!! output
!! untracked
EOF
!! output
!! untracked
EOF
@@
-312,6
+321,7
@@
Ignored files:
dir2/modified
dir2/untracked
expect
dir2/modified
dir2/untracked
expect
+ expect-with-v
output
untracked
output
untracked