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>
This commit is contained in:
parent
d599e0484f
commit
18f3b5a9d3
@ -68,6 +68,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
|
cat >expect <<\EOF
|
||||||
M dir1/modified
|
M dir1/modified
|
||||||
A dir2/added
|
A dir2/added
|
||||||
@ -115,6 +143,23 @@ test_expect_success 'status (status.showUntrackedFiles no)' '
|
|||||||
test_cmp expect output
|
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
|
cat >expect << EOF
|
||||||
M dir1/modified
|
M dir1/modified
|
||||||
A dir2/added
|
A dir2/added
|
||||||
|
Loading…
x
Reference in New Issue
Block a user