summaryrefslogtreecommitdiff
path: root/t/t7502-status.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t7502-status.sh')
-rwxr-xr-xt/t7502-status.sh32
1 files changed, 31 insertions, 1 deletions
diff --git a/t/t7502-status.sh b/t/t7502-status.sh
index 9ce50ca..e006074 100755
--- a/t/t7502-status.sh
+++ b/t/t7502-status.sh
@@ -17,6 +17,9 @@ test_expect_success 'setup' '
: > dir1/tracked &&
: > dir1/modified &&
git add . &&
+
+ git status >output &&
+
test_tick &&
git commit -m initial &&
: > untracked &&
@@ -28,6 +31,12 @@ test_expect_success 'setup' '
git add dir2/added
'
+test_expect_success 'status (1)' '
+
+ grep -e "use \"git rm --cached <file>\.\.\.\" to unstage" output
+
+'
+
cat > expect << \EOF
# On branch master
# Changes to be committed:
@@ -51,7 +60,7 @@ cat > expect << \EOF
# untracked
EOF
-test_expect_success 'status' '
+test_expect_success 'status (2)' '
git status > output &&
git diff expect output
@@ -119,4 +128,25 @@ test_expect_success 'status without relative paths' '
'
+cat <<EOF >expect
+# On branch master
+# Changes to be committed:
+# (use "git reset HEAD <file>..." to unstage)
+#
+# modified: dir1/modified
+#
+# Untracked files:
+# (use "git add <file>..." to include in what will be committed)
+#
+# dir1/untracked
+# dir2/
+# expect
+# output
+# untracked
+EOF
+test_expect_success 'status of partial commit excluding new file in index' '
+ git status dir1/modified >output &&
+ diff -u expect output
+'
+
test_done