aboutsummaryrefslogtreecommitdiff
path: root/t/t7508-status.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2010-05-25 16:52:03 +0200
committerJunio C Hamano <gitster@pobox.com>2010-06-03 15:02:12 -0700
commit46077fa5d477a3e96e0bb96042a2a9fdc9c818cb (patch)
tree80bf13f2acce5d27000aed6465f417dae775c9ca /t/t7508-status.sh
parent05a59a087c29c0b5dd267ec0bd488829427cc3d7 (diff)
downloadgit-46077fa5d477a3e96e0bb96042a2a9fdc9c818cb.tar.gz
git-46077fa5d477a3e96e0bb96042a2a9fdc9c818cb.tar.xz
Documentation+t5708: document and test status -s -b
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.sh47
1 files changed, 46 insertions, 1 deletions
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index 008d5711b..9e081073f 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: