add -p tests: remove PERL prerequisites

The Perl version of the add -i/-p commands has been removed since 20b813d (add: remove "add.interactive.useBuiltin" & Perl "git add--interactive", 2023-02-07) Therefore, Perl prerequisite in the test scripts which use the patch mode functionality is not neccessary. Signed-off-by: Ghanshyam Thakkar <shyamthakkar001@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ghanshyam Thakkar committed Feb 13, 2024 at 05:35 UTC 7abc1869e552b80ea35923ae4315cb8bb0b47b64
6 files changed +27 -39
t/t2024-checkout-dwim.sh
+1 -1
@@ -113,7 +113,7 @@ test_expect_success 'checkout of branch from multiple remotes fails with advice'
113 test_grep ! "^hint: " stderr
114 '
115
116 -test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '
116 +test_expect_success 'checkout -p with multiple remotes does not print advice' '
117 git checkout -B main &&
118 test_might_fail git branch -D foo &&
119
t/t2071-restore-patch.sh
+14 -14
@@ -4,7 +4,7 @@ test_description='git restore --patch'
4
5 . ./lib-patch-mode.sh
6
7 -test_expect_success PERL 'setup' '
7 +test_expect_success 'setup' '
8 mkdir dir &&
9 echo parent >dir/foo &&
10 echo dummy >bar &&
@@ -16,28 +16,28 @@ test_expect_success PERL 'setup' '
16 save_head
17 '
18
19 -test_expect_success PERL 'restore -p without pathspec is fine' '
19 +test_expect_success 'restore -p without pathspec is fine' '
20 echo q >cmd &&
21 git restore -p <cmd
22 '
23
24 # note: bar sorts before dir/foo, so the first 'n' is always to skip 'bar'
25
26 -test_expect_success PERL 'saying "n" does nothing' '
26 +test_expect_success 'saying "n" does nothing' '
27 set_and_save_state dir/foo work head &&
28 test_write_lines n n | git restore -p &&
29 verify_saved_state bar &&
30 verify_saved_state dir/foo
31 '
32
33 -test_expect_success PERL 'git restore -p' '
33 +test_expect_success 'git restore -p' '
34 set_and_save_state dir/foo work head &&
35 test_write_lines n y | git restore -p &&
36 verify_saved_state bar &&
37 verify_state dir/foo head head
38 '
39
40 -test_expect_success PERL 'git restore -p with staged changes' '
40 +test_expect_success 'git restore -p with staged changes' '
41 set_state dir/foo work index &&
42 test_write_lines n y | git restore -p &&
43 verify_saved_state bar &&
@@ -46,7 +46,7 @@ test_expect_success PERL 'git restore -p with staged changes' '
46
47 for opt in "HEAD" "@"
48 do
49 - test_expect_success PERL "git restore -p --source=$opt" '
49 + test_expect_success "git restore -p --source=$opt" '
50 set_state dir/foo work index &&
51 # the third n is to get out in case it mistakenly does not apply
52 test_write_lines n y n | git restore -p --source=$opt >output &&
@@ -56,7 +56,7 @@ do
56 '
57 done
58
59 -test_expect_success PERL 'git restore -p --source=HEAD^' '
59 +test_expect_success 'git restore -p --source=HEAD^' '
60 set_state dir/foo work index &&
61 # the third n is to get out in case it mistakenly does not apply
62 test_write_lines n y n | git restore -p --source=HEAD^ &&
@@ -64,7 +64,7 @@ test_expect_success PERL 'git restore -p --source=HEAD^' '
64 verify_state dir/foo parent index
65 '
66
67 -test_expect_success PERL 'git restore -p --source=HEAD^...' '
67 +test_expect_success 'git restore -p --source=HEAD^...' '
68 set_state dir/foo work index &&
69 # the third n is to get out in case it mistakenly does not apply
70 test_write_lines n y n | git restore -p --source=HEAD^... &&
@@ -72,7 +72,7 @@ test_expect_success PERL 'git restore -p --source=HEAD^...' '
72 verify_state dir/foo parent index
73 '
74
75 -test_expect_success PERL 'git restore -p handles deletion' '
75 +test_expect_success 'git restore -p handles deletion' '
76 set_state dir/foo work index &&
77 rm dir/foo &&
78 test_write_lines n y | git restore -p &&
@@ -85,21 +85,21 @@ test_expect_success PERL 'git restore -p handles deletion' '
85 # dir/foo. There's always an extra 'n' to reject edits to dir/foo in
86 # the failure case (and thus get out of the loop).
87
88 -test_expect_success PERL 'path limiting works: dir' '
88 +test_expect_success 'path limiting works: dir' '
89 set_state dir/foo work head &&
90 test_write_lines y n | git restore -p dir &&
91 verify_saved_state bar &&
92 verify_state dir/foo head head
93 '
94
95 -test_expect_success PERL 'path limiting works: -- dir' '
95 +test_expect_success 'path limiting works: -- dir' '
96 set_state dir/foo work head &&
97 test_write_lines y n | git restore -p -- dir &&
98 verify_saved_state bar &&
99 verify_state dir/foo head head
100 '
101
102 -test_expect_success PERL 'path limiting works: HEAD^ -- dir' '
102 +test_expect_success 'path limiting works: HEAD^ -- dir' '
103 set_state dir/foo work head &&
104 # the third n is to get out in case it mistakenly does not apply
105 test_write_lines y n n | git restore -p --source=HEAD^ -- dir &&
@@ -107,7 +107,7 @@ test_expect_success PERL 'path limiting works: HEAD^ -- dir' '
107 verify_state dir/foo parent head
108 '
109
110 -test_expect_success PERL 'path limiting works: foo inside dir' '
110 +test_expect_success 'path limiting works: foo inside dir' '
111 set_state dir/foo work head &&
112 # the third n is to get out in case it mistakenly does not apply
113 test_write_lines y n n | (cd dir && git restore -p foo) &&
@@ -115,7 +115,7 @@ test_expect_success PERL 'path limiting works: foo inside dir' '
115 verify_state dir/foo head head
116 '
117
118 -test_expect_success PERL 'none of this moved HEAD' '
118 +test_expect_success 'none of this moved HEAD' '
119 verify_saved_head
120 '
121
t/t3904-stash-patch.sh
-6
@@ -3,12 +3,6 @@
3 test_description='stash -p'
4 . ./lib-patch-mode.sh
5
6 -if ! test_have_prereq PERL
7 -then
8 - skip_all='skipping stash -p tests, perl not available'
9 - test_done
10 -fi
11 -
6 test_expect_success 'setup' '
7 mkdir dir &&
8 echo parent > dir/foo &&
t/t7105-reset-patch.sh
+11 -11
@@ -5,7 +5,7 @@ test_description='git reset --patch'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./lib-patch-mode.sh
7
8 -test_expect_success PERL 'setup' '
8 +test_expect_success 'setup' '
9 mkdir dir &&
10 echo parent > dir/foo &&
11 echo dummy > bar &&
@@ -19,7 +19,7 @@ test_expect_success PERL 'setup' '
19
20 # note: bar sorts before foo, so the first 'n' is always to skip 'bar'
21
22 -test_expect_success PERL 'saying "n" does nothing' '
22 +test_expect_success 'saying "n" does nothing' '
23 set_and_save_state dir/foo work work &&
24 test_write_lines n n | git reset -p &&
25 verify_saved_state dir/foo &&
@@ -28,7 +28,7 @@ test_expect_success PERL 'saying "n" does nothing' '
28
29 for opt in "HEAD" "@" ""
30 do
31 - test_expect_success PERL "git reset -p $opt" '
31 + test_expect_success "git reset -p $opt" '
32 set_and_save_state dir/foo work work &&
33 test_write_lines n y | git reset -p $opt >output &&
34 verify_state dir/foo work head &&
@@ -37,28 +37,28 @@ do
37 '
38 done
39
40 -test_expect_success PERL 'git reset -p HEAD^' '
40 +test_expect_success 'git reset -p HEAD^' '
41 test_write_lines n y | git reset -p HEAD^ >output &&
42 verify_state dir/foo work parent &&
43 verify_saved_state bar &&
44 test_grep "Apply" output
45 '
46
47 -test_expect_success PERL 'git reset -p HEAD^^{tree}' '
47 +test_expect_success 'git reset -p HEAD^^{tree}' '
48 test_write_lines n y | git reset -p HEAD^^{tree} >output &&
49 verify_state dir/foo work parent &&
50 verify_saved_state bar &&
51 test_grep "Apply" output
52 '
53
54 -test_expect_success PERL 'git reset -p HEAD^:dir/foo (blob fails)' '
54 +test_expect_success 'git reset -p HEAD^:dir/foo (blob fails)' '
55 set_and_save_state dir/foo work work &&
56 test_must_fail git reset -p HEAD^:dir/foo &&
57 verify_saved_state dir/foo &&
58 verify_saved_state bar
59 '
60
61 -test_expect_success PERL 'git reset -p aaaaaaaa (unknown fails)' '
61 +test_expect_success 'git reset -p aaaaaaaa (unknown fails)' '
62 set_and_save_state dir/foo work work &&
63 test_must_fail git reset -p aaaaaaaa &&
64 verify_saved_state dir/foo &&
@@ -70,27 +70,27 @@ test_expect_success PERL 'git reset -p aaaaaaaa (unknown fails)' '
70 # dir/foo. There's always an extra 'n' to reject edits to dir/foo in
71 # the failure case (and thus get out of the loop).
72
73 -test_expect_success PERL 'git reset -p dir' '
73 +test_expect_success 'git reset -p dir' '
74 set_state dir/foo work work &&
75 test_write_lines y n | git reset -p dir &&
76 verify_state dir/foo work head &&
77 verify_saved_state bar
78 '
79
80 -test_expect_success PERL 'git reset -p -- foo (inside dir)' '
80 +test_expect_success 'git reset -p -- foo (inside dir)' '
81 set_state dir/foo work work &&
82 test_write_lines y n | (cd dir && git reset -p -- foo) &&
83 verify_state dir/foo work head &&
84 verify_saved_state bar
85 '
86
87 -test_expect_success PERL 'git reset -p HEAD^ -- dir' '
87 +test_expect_success 'git reset -p HEAD^ -- dir' '
88 test_write_lines y n | git reset -p HEAD^ -- dir &&
89 verify_state dir/foo work parent &&
90 verify_saved_state bar
91 '
92
93 -test_expect_success PERL 'none of this moved HEAD' '
93 +test_expect_success 'none of this moved HEAD' '
94 verify_saved_head
95 '
96
t/t7106-reset-unborn-branch.sh
+1 -1
@@ -34,7 +34,7 @@ test_expect_success 'reset $file' '
34 test_cmp expect actual
35 '
36
37 -test_expect_success PERL 'reset -p' '
37 +test_expect_success 'reset -p' '
38 rm .git/index &&
39 git add a &&
40 echo y >yes &&
t/t7514-commit-patch.sh
-6
@@ -3,12 +3,6 @@
3 test_description='hunk edit with "commit -p -m"'
4 . ./test-lib.sh
5
6 -if ! test_have_prereq PERL
7 -then
8 - skip_all="skipping '$test_description' tests, perl not available"
9 - test_done
10 -fi
11 -
6 test_expect_success 'setup (initial)' '
7 echo line1 >file &&
8 git add file &&