From: Michael J Gruber Date: Thu, 22 Apr 2010 20:30:19 +0000 (+0200) Subject: t7508: test advice.statusHints X-Git-Tag: v1.7.2-rc0~104^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=18f3b5a9d37de606604f00360df55e5a5fe70739;p=git.git 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 Signed-off-by: Junio C Hamano --- 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 @@ -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 M dir1/modified A dir2/added @@ -115,6 +143,23 @@ test_expect_success 'status (status.showUntrackedFiles no)' ' test_cmp expect output ' +cat >expect <output && + test_cmp expect output +' +git config --unset advice.statusHints + cat >expect << EOF M dir1/modified A dir2/added