diff options
Diffstat (limited to 't/t4115-apply-symlink.sh')
-rwxr-xr-x | t/t4115-apply-symlink.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t4115-apply-symlink.sh b/t/t4115-apply-symlink.sh index 14e0f4d705..2d03c4e4d1 100755 --- a/t/t4115-apply-symlink.sh +++ b/t/t4115-apply-symlink.sh @@ -125,4 +125,19 @@ test_expect_success SYMLINKS 'symlink escape when deleting file' ' test_path_is_file .git/delete-me ' +test_expect_success SYMLINKS '--reject removes .rej symlink if it exists' ' + test_when_finished "git reset --hard && git clean -dfx" && + + test_commit file && + echo modified >file.t && + git diff -- file.t >patch && + echo modified-again >file.t && + + ln -s foo file.t.rej && + test_must_fail git apply patch --reject 2>err && + test_i18ngrep "Rejected hunk" err && + test_path_is_missing foo && + test_path_is_file file.t.rej +' + test_done |