aboutsummaryrefslogtreecommitdiff
path: root/t/t7508-status.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2010-04-22 22:30:19 +0200
committerJunio C Hamano <gitster@pobox.com>2010-05-06 13:22:37 -0700
commit18f3b5a9d37de606604f00360df55e5a5fe70739 (patch)
tree4a60867e9a4fc261a5e6f55369a2eb3cbd692ff7 /t/t7508-status.sh
parentd599e0484f8ebac8cc50e9557a4c3d246826843d (diff)
downloadgit-18f3b5a9d37de606604f00360df55e5a5fe70739.tar.gz
git-18f3b5a9d37de606604f00360df55e5a5fe70739.tar.xz
t7508: test advice.statusHints
edf563f (status: make "how to stage" messages optional, 2009-09-09) introduced advice.statusHints without tests. Add a few tests to describe and test the status quo. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7508-status.sh')
-rwxr-xr-xt/t7508-status.sh45
1 files changed, 45 insertions, 0 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 556d0faa7..7409a06c0 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -69,6 +69,34 @@ test_expect_success 'status (2)' '
'
cat >expect <<\EOF
+# On branch master
+# Changes to be committed:
+# new file: dir2/added
+#
+# Changed but not updated:
+# modified: dir1/modified
+#
+# Untracked files:
+# dir1/untracked
+# dir2/modified
+# dir2/untracked
+# expect
+# output
+# untracked
+EOF
+
+git config advice.statusHints false
+
+test_expect_success 'status (advice.statusHints false)' '
+
+ git status >output &&
+ test_cmp expect output
+
+'
+
+git config --unset advice.statusHints
+
+cat >expect <<\EOF
M dir1/modified
A dir2/added
?? dir1/untracked
@@ -115,6 +143,23 @@ test_expect_success 'status (status.showUntrackedFiles no)' '
test_cmp expect output
'
+cat >expect <<EOF
+# On branch master
+# Changes to be committed:
+# new file: dir2/added
+#
+# Changed but not updated:
+# modified: dir1/modified
+#
+# Untracked files not listed (use -u option to show untracked files)
+EOF
+git config advice.statusHints false
+test_expect_success 'status -uno (advice.statusHints false)' '
+ git status -uno >output &&
+ test_cmp expect output
+'
+git config --unset advice.statusHints
+
cat >expect << EOF
M dir1/modified
A dir2/added