Code

Merge branch 'tr/maint-roff-quote' into maint
[git.git] / t / t3701-add-interactive.sh
index b68141f48ab6ef5b9d2449dfe6750245c794a99d..687bd7ab53397d3bc9d5150bc7cd290efa8ebdbc 100755 (executable)
@@ -138,6 +138,20 @@ test_expect_success 'real edit works' '
        test_cmp expected output
 '
 
+test_expect_success 'skip files similarly as commit -a' '
+       git reset &&
+       echo file >.gitignore &&
+       echo changed >file &&
+       echo y | git add -p file &&
+       git diff >output &&
+       git reset &&
+       git commit -am commit &&
+       git diff >expected &&
+       test_cmp expected output &&
+       git reset --hard HEAD^
+'
+rm -f .gitignore
+
 if test "$(git config --bool core.filemode)" = false
 then
        say 'skipping filemode tests (filesystem does not properly support modes)'
@@ -164,7 +178,7 @@ test_expect_success FILEMODE 'stage mode but not hunk' '
 '
 
 
-test_expect_failure FILEMODE 'stage mode and hunk' '
+test_expect_success FILEMODE 'stage mode and hunk' '
        git reset --hard &&
        echo content >>file &&
        chmod +x file &&
@@ -176,6 +190,12 @@ test_expect_failure FILEMODE 'stage mode and hunk' '
 
 # end of tests disabled when filemode is not usable
 
+test_expect_success 'setup again' '
+       git reset --hard &&
+       test_chmod +x file &&
+       echo content >>file
+'
+
 # Write the patch file with a new line at the top and bottom
 cat >patch <<EOF
 index 180b47c..b6f2c08 100644