diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-18 11:16:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-18 11:16:55 -0700 |
commit | 880bd9d08081752bb4e2891aa3c16c82808ecb2e (patch) | |
tree | 03528a146b1e7cca8a7c57b1f9574d05a9ec9ffd /t | |
parent | 7c1b228d26107d2cac9fd9549a6a1cff41c24b51 (diff) | |
parent | 46077fa5d477a3e96e0bb96042a2a9fdc9c818cb (diff) | |
download | git-880bd9d08081752bb4e2891aa3c16c82808ecb2e.tar.gz |
Merge branch 'mg/status-b'
* mg/status-b:
Documentation+t5708: document and test status -s -b
Show branch information in short output of git status
Diffstat (limited to 't')
-rwxr-xr-x | t/t7508-status.sh | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh index 008d5711b8..9e081073fb 100755 --- a/t/t7508-status.sh +++ b/t/t7508-status.sh @@ -107,13 +107,32 @@ A dir2/added ?? untracked EOF -test_expect_success 'status -s (2)' ' +test_expect_success 'status -s' ' git status -s >output && test_cmp expect output ' +cat >expect <<\EOF +## master + M dir1/modified +A dir2/added +?? dir1/untracked +?? dir2/modified +?? dir2/untracked +?? expect +?? output +?? untracked +EOF + +test_expect_success 'status -s -b' ' + + git status -s -b >output && + test_cmp expect output + +' + cat >expect <<EOF # On branch master # Changes to be committed: @@ -437,6 +456,25 @@ test_expect_success 'status -s with color.status' ' ' cat >expect <<\EOF +## <GREEN>master<RESET> + <RED>M<RESET> dir1/modified +<GREEN>A<RESET> dir2/added +<BLUE>??<RESET> dir1/untracked +<BLUE>??<RESET> dir2/modified +<BLUE>??<RESET> dir2/untracked +<BLUE>??<RESET> expect +<BLUE>??<RESET> output +<BLUE>??<RESET> untracked +EOF + +test_expect_success 'status -s -b with color.status' ' + + git status -s -b | test_decode_color >output && + test_cmp expect output + +' + +cat >expect <<\EOF M dir1/modified A dir2/added ?? dir1/untracked @@ -469,6 +507,13 @@ test_expect_success 'status --porcelain ignores color.status' ' git config --unset color.status git config --unset color.ui +test_expect_success 'status --porcelain ignores -b' ' + + git status --porcelain -b >output && + test_cmp expect output + +' + cat >expect <<\EOF # On branch master # Changes to be committed: |