Code

Documentation: update [section.subsection] to reflect what git does
[git.git] / t / t2200-add-update.sh
index b2ddf5ace3581bc2a7056c61b9d43499b2657b65..2ad2819a345af53ff6ab0b7c28fa313f1a0a5956 100755 (executable)
@@ -80,7 +80,7 @@ test_expect_success 'change gets noticed' '
 
 '
 
-test_expect_success 'replace a file with a symlink' '
+test_expect_success SYMLINKS 'replace a file with a symlink' '
 
        rm foo &&
        ln -s top foo &&
@@ -150,7 +150,7 @@ test_expect_success 'add -u resolves unmerged paths' '
        echo 2 >path3 &&
        echo 2 >path5 &&
        git add -u &&
-       git ls-files -s "path?" >actual &&
+       git ls-files -s path1 path2 path3 path4 path5 path6 >actual &&
        {
                echo "100644 $three 0   path1"
                echo "100644 $one 1     path3"
@@ -176,4 +176,9 @@ test_expect_success 'add -u resolves unmerged paths' '
 
 '
 
+test_expect_success '"add -u non-existent" should fail' '
+       test_must_fail git add -u non-existent &&
+       ! (git ls-files | grep "non-existent")
+'
+
 test_done