ref-filter: make remote_ref_atom_parser() use refname_atom_parser_internal()
[gitweb.git] / t / t7508-status.sh
index 514df671c9b19c5c8d8cc0b18ff3d98649534375..fb00e6d9b07f4cc6f478bb532749403017599400 100755 (executable)
@@ -137,6 +137,23 @@ test_expect_success 'status with status.displayCommentPrefix=false' '
        test_i18ncmp expect output
 '
 
+test_expect_success 'status -v' '
+       (cat expect && git diff --cached) >expect-with-v &&
+       git status -v >output &&
+       test_i18ncmp expect-with-v output
+'
+
+test_expect_success 'status -v -v' '
+       (cat expect &&
+        echo "Changes to be committed:" &&
+        git -c diff.mnemonicprefix=true diff --cached &&
+        echo "--------------------------------------------------" &&
+        echo "Changes not staged for commit:" &&
+        git -c diff.mnemonicprefix=true diff) >expect-with-v &&
+       git status -v -v >output &&
+       test_i18ncmp expect-with-v output
+'
+
 test_expect_success 'setup fake editor' '
        cat >.git/editor <<-\EOF &&
        #! /bin/sh
@@ -201,7 +218,7 @@ test_expect_success 'status -s' '
 test_expect_success 'status with gitignore' '
        {
                echo ".gitignore" &&
-               echo "expect" &&
+               echo "expect*" &&
                echo "output" &&
                echo "untracked"
        } >.gitignore &&
@@ -222,6 +239,7 @@ test_expect_success 'status with gitignore' '
        !! dir1/untracked
        !! dir2/untracked
        !! expect
+       !! expect-with-v
        !! output
        !! untracked
        EOF
@@ -253,6 +271,7 @@ Ignored files:
        dir1/untracked
        dir2/untracked
        expect
+       expect-with-v
        output
        untracked
 
@@ -264,7 +283,7 @@ EOF
 test_expect_success 'status with gitignore (nothing untracked)' '
        {
                echo ".gitignore" &&
-               echo "expect" &&
+               echo "expect*" &&
                echo "dir2/modified" &&
                echo "output" &&
                echo "untracked"
@@ -285,6 +304,7 @@ test_expect_success 'status with gitignore (nothing untracked)' '
        !! dir2/modified
        !! dir2/untracked
        !! expect
+       !! expect-with-v
        !! output
        !! untracked
        EOF
@@ -312,6 +332,7 @@ Ignored files:
        dir2/modified
        dir2/untracked
        expect
+       expect-with-v
        output
        untracked
 
@@ -410,7 +431,7 @@ test_expect_success 'status -s -uno' '
 '
 
 test_expect_success 'status -s (status.showUntrackedFiles no)' '
-       git config status.showuntrackedfiles no
+       git config status.showuntrackedfiles no &&
        git status -s >output &&
        test_cmp expect output
 '
@@ -444,7 +465,7 @@ EOF
 '
 
 test_expect_success 'status (status.showUntrackedFiles normal)' '
-       test_config status.showuntrackedfiles normal
+       test_config status.showuntrackedfiles normal &&
        git status >output &&
        test_i18ncmp expect output
 '
@@ -464,7 +485,7 @@ test_expect_success 'status -s -unormal' '
 '
 
 test_expect_success 'status -s (status.showUntrackedFiles normal)' '
-       git config status.showuntrackedfiles normal
+       git config status.showuntrackedfiles normal &&
        git status -s >output &&
        test_cmp expect output
 '
@@ -499,7 +520,7 @@ EOF
 '
 
 test_expect_success 'status (status.showUntrackedFiles all)' '
-       test_config status.showuntrackedfiles all
+       test_config status.showuntrackedfiles all &&
        git status >output &&
        test_i18ncmp expect output
 '
@@ -517,7 +538,7 @@ A  dir2/added
 ?? untracked
 EOF
 test_expect_success 'status -s -uall' '
-       git config --unset status.showuntrackedfiles
+       test_unconfig status.showuntrackedfiles &&
        git status -s -uall >output &&
        test_cmp expect output
 '
@@ -782,7 +803,7 @@ EOF
 '
 
 cat >expect <<EOF
-:100644 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0000000000000000000000000000000000000000 M     dir1/modified
+:100644 100644 $EMPTY_BLOB 0000000000000000000000000000000000000000 M  dir1/modified
 EOF
 test_expect_success 'status refreshes the index' '
        touch dir2/added &&
@@ -1356,7 +1377,7 @@ EOF
        git config --add -f .gitmodules submodule.subname.ignore all &&
        git config --add -f .gitmodules submodule.subname.path sm &&
        git status > output &&
-       test_cmp expect output &&
+       test_i18ncmp expect output &&
        git config -f .gitmodules  --remove-section submodule.subname
 '
 
@@ -1366,7 +1387,7 @@ test_expect_success '.git/config ignore=all suppresses unstaged submodule summar
        git config --add submodule.subname.ignore all &&
        git config --add submodule.subname.path sm &&
        git status > output &&
-       test_cmp expect output &&
+       test_i18ncmp expect output &&
        git config --remove-section submodule.subname &&
        git config -f .gitmodules  --remove-section submodule.subname
 '