Code

merge-base-many: add trivial tests based on the documentation
[git.git] / t / t7502-status.sh
index 0d24e259fb69f9e0be51a9f997bb92176b55600d..38a48b57c70a888838cfa114be843e1d4aea00d8 100755 (executable)
@@ -67,6 +67,34 @@ test_expect_success 'status (2)' '
 
 '
 
+cat >expect <<EOF
+# On branch master
+# Changes to be committed:
+#   (use "git reset HEAD <file>..." to unstage)
+#
+#      new file:   dir2/added
+#
+# Changed but not updated:
+#   (use "git add <file>..." to update what will be committed)
+#
+#      modified:   dir1/modified
+#
+# Untracked files not listed (use -u option to show untracked files)
+EOF
+test_expect_success 'status -uno' '
+       mkdir dir3 &&
+       : > dir3/untracked1 &&
+       : > dir3/untracked2 &&
+       git status -uno >output &&
+       test_cmp expect output
+'
+
+test_expect_success 'status (status.showUntrackedFiles no)' '
+       git config status.showuntrackedfiles no
+       git status >output &&
+       test_cmp expect output
+'
+
 cat >expect <<EOF
 # On branch master
 # Changes to be committed:
@@ -91,13 +119,16 @@ cat >expect <<EOF
 #      untracked
 EOF
 test_expect_success 'status -unormal' '
-       mkdir dir3 &&
-       : > dir3/untracked1 &&
-       : > dir3/untracked2 &&
        git status -unormal >output &&
        test_cmp expect output
 '
 
+test_expect_success 'status (status.showUntrackedFiles normal)' '
+       git config status.showuntrackedfiles normal
+       git status >output &&
+       test_cmp expect output
+'
+
 cat >expect <<EOF
 # On branch master
 # Changes to be committed:
@@ -124,7 +155,13 @@ cat >expect <<EOF
 EOF
 test_expect_success 'status -uall' '
        git status -uall >output &&
+       test_cmp expect output
+'
+test_expect_success 'status (status.showUntrackedFiles all)' '
+       git config status.showuntrackedfiles all
+       git status >output &&
        rm -rf dir3 &&
+       git config --unset status.showuntrackedfiles &&
        test_cmp expect output
 '