X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft2016-checkout-patch.sh;h=7657ec190c2620b1eda03522c0f392a2c6f78f5a;hb=154adcf9c08218077275f7a4c7a6e61632516561;hp=2144184d790055ab12dfbb53ec10f519de598f72;hpb=bc32d342c2aaa1fa425e7924e4b64951a76bb314;p=git.git diff --git a/t/t2016-checkout-patch.sh b/t/t2016-checkout-patch.sh index 2144184d7..7657ec190 100755 --- a/t/t2016-checkout-patch.sh +++ b/t/t2016-checkout-patch.sh @@ -4,7 +4,7 @@ test_description='git checkout --patch' . ./lib-patch-mode.sh -test_expect_success 'setup' ' +test_expect_success PERL 'setup' ' mkdir dir && echo parent > dir/foo && echo dummy > bar && @@ -18,40 +18,40 @@ test_expect_success 'setup' ' # note: bar sorts before dir/foo, so the first 'n' is always to skip 'bar' -test_expect_success 'saying "n" does nothing' ' +test_expect_success PERL 'saying "n" does nothing' ' set_and_save_state dir/foo work head && (echo n; echo n) | git checkout -p && verify_saved_state bar && verify_saved_state dir/foo ' -test_expect_success 'git checkout -p' ' +test_expect_success PERL 'git checkout -p' ' (echo n; echo y) | git checkout -p && verify_saved_state bar && verify_state dir/foo head head ' -test_expect_success 'git checkout -p with staged changes' ' +test_expect_success PERL 'git checkout -p with staged changes' ' set_state dir/foo work index (echo n; echo y) | git checkout -p && verify_saved_state bar && verify_state dir/foo index index ' -test_expect_success 'git checkout -p HEAD with NO staged changes: abort' ' +test_expect_success PERL 'git checkout -p HEAD with NO staged changes: abort' ' set_and_save_state dir/foo work head && (echo n; echo y; echo n) | git checkout -p HEAD && verify_saved_state bar && verify_saved_state dir/foo ' -test_expect_success 'git checkout -p HEAD with NO staged changes: apply' ' +test_expect_success PERL 'git checkout -p HEAD with NO staged changes: apply' ' (echo n; echo y; echo y) | git checkout -p HEAD && verify_saved_state bar && verify_state dir/foo head head ' -test_expect_success 'git checkout -p HEAD with change already staged' ' +test_expect_success PERL 'git checkout -p HEAD with change already staged' ' set_state dir/foo index index # the third n is to get out in case it mistakenly does not apply (echo n; echo y; echo n) | git checkout -p HEAD && @@ -59,14 +59,14 @@ test_expect_success 'git checkout -p HEAD with change already staged' ' verify_state dir/foo head head ' -test_expect_success 'git checkout -p HEAD^' ' +test_expect_success PERL 'git checkout -p HEAD^' ' # the third n is to get out in case it mistakenly does not apply (echo n; echo y; echo n) | git checkout -p HEAD^ && verify_saved_state bar && verify_state dir/foo parent parent ' -test_expect_success 'git checkout -p handles deletion' ' +test_expect_success PERL 'git checkout -p handles deletion' ' set_state dir/foo work index && rm dir/foo && (echo n; echo y) | git checkout -p && @@ -79,28 +79,28 @@ test_expect_success 'git checkout -p handles deletion' ' # dir/foo. There's always an extra 'n' to reject edits to dir/foo in # the failure case (and thus get out of the loop). -test_expect_success 'path limiting works: dir' ' +test_expect_success PERL 'path limiting works: dir' ' set_state dir/foo work head && (echo y; echo n) | git checkout -p dir && verify_saved_state bar && verify_state dir/foo head head ' -test_expect_success 'path limiting works: -- dir' ' +test_expect_success PERL 'path limiting works: -- dir' ' set_state dir/foo work head && (echo y; echo n) | git checkout -p -- dir && verify_saved_state bar && verify_state dir/foo head head ' -test_expect_success 'path limiting works: HEAD^ -- dir' ' +test_expect_success PERL 'path limiting works: HEAD^ -- dir' ' # the third n is to get out in case it mistakenly does not apply (echo y; echo n; echo n) | git checkout -p HEAD^ -- dir && verify_saved_state bar && verify_state dir/foo parent parent ' -test_expect_success 'path limiting works: foo inside dir' ' +test_expect_success PERL 'path limiting works: foo inside dir' ' set_state dir/foo work head && # the third n is to get out in case it mistakenly does not apply (echo y; echo n; echo n) | (cd dir && git checkout -p foo) && @@ -108,7 +108,7 @@ test_expect_success 'path limiting works: foo inside dir' ' verify_state dir/foo head head ' -test_expect_success 'none of this moved HEAD' ' +test_expect_success PERL 'none of this moved HEAD' ' verify_saved_head '