@matheusbsbs / matheus-bagliano / commits / 18f3b5a9d3
Fork 0

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>

Michael J Gruber committed Apr 22, 2010 at 22:30 UTC 18f3b5a9d37de606604f00360df55e5a5fe70739
1 file changed +45
t/t7508-status.sh
+45
@@ -68,6 +68,34 @@ test_expect_success 'status (2)' '
68
69 '
70
71 +cat >expect <<\EOF
72 +# On branch master
73 +# Changes to be committed:
74 +# new file: dir2/added
75 +#
76 +# Changed but not updated:
77 +# modified: dir1/modified
78 +#
79 +# Untracked files:
80 +# dir1/untracked
81 +# dir2/modified
82 +# dir2/untracked
83 +# expect
84 +# output
85 +# untracked
86 +EOF
87 +
88 +git config advice.statusHints false
89 +
90 +test_expect_success 'status (advice.statusHints false)' '
91 +
92 + git status >output &&
93 + test_cmp expect output
94 +
95 +'
96 +
97 +git config --unset advice.statusHints
98 +
99 cat >expect <<\EOF
100 M dir1/modified
101 A dir2/added
@@ -115,6 +143,23 @@ test_expect_success 'status (status.showUntrackedFiles no)' '
143 test_cmp expect output
144 '
145
146 +cat >expect <<EOF
147 +# On branch master
148 +# Changes to be committed:
149 +# new file: dir2/added
150 +#
151 +# Changed but not updated:
152 +# modified: dir1/modified
153 +#
154 +# Untracked files not listed (use -u option to show untracked files)
155 +EOF
156 +git config advice.statusHints false
157 +test_expect_success 'status -uno (advice.statusHints false)' '
158 + git status -uno >output &&
159 + test_cmp expect output
160 +'
161 +git config --unset advice.statusHints
162 +
163 cat >expect << EOF
164 M dir1/modified
165 A dir2/added