X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft3701-add-interactive.sh;h=fd2a55a5c23247c010a02513af73a93641cfb067;hb=00d3278c8534a8244ae3447189401111e017fd5d;hp=fe017839c467d10b82f5527bcd143a6c480c878a;hpb=87d2062b3984af5347519c38877b99bce06e6e8d;p=git.git diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index fe017839c..fd2a55a5c 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -3,6 +3,11 @@ test_description='add -i basic tests' . ./test-lib.sh +if ! test_have_prereq PERL; then + say 'skipping git add -i tests, perl not available' + test_done +fi + test_expect_success 'setup (initial)' ' echo content >file && git add file && @@ -160,4 +165,42 @@ test_expect_success FILEMODE 'stage mode but not 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 <expected < diff && + test_cmp expected diff +' + test_done