@@ -4,7 +4,7 @@ test_description='git checkout --patch'
4
4
5
5
. ./lib-patch-mode.sh
6
6
7
- test_expect_success ' setup' '
7
+ test_expect_success PERL ' setup' '
8
8
mkdir dir &&
9
9
echo parent > dir/foo &&
10
10
echo dummy > bar &&
@@ -18,55 +18,55 @@ test_expect_success 'setup' '
18
18
19
19
# note: bar sorts before dir/foo, so the first 'n' is always to skip 'bar'
20
20
21
- test_expect_success ' saying "n" does nothing' '
21
+ test_expect_success PERL ' saying "n" does nothing' '
22
22
set_and_save_state dir/foo work head &&
23
23
(echo n; echo n) | git checkout -p &&
24
24
verify_saved_state bar &&
25
25
verify_saved_state dir/foo
26
26
'
27
27
28
- test_expect_success ' git checkout -p' '
28
+ test_expect_success PERL ' git checkout -p' '
29
29
(echo n; echo y) | git checkout -p &&
30
30
verify_saved_state bar &&
31
31
verify_state dir/foo head head
32
32
'
33
33
34
- test_expect_success ' git checkout -p with staged changes' '
34
+ test_expect_success PERL ' git checkout -p with staged changes' '
35
35
set_state dir/foo work index
36
36
(echo n; echo y) | git checkout -p &&
37
37
verify_saved_state bar &&
38
38
verify_state dir/foo index index
39
39
'
40
40
41
- test_expect_success ' git checkout -p HEAD with NO staged changes: abort' '
41
+ test_expect_success PERL ' git checkout -p HEAD with NO staged changes: abort' '
42
42
set_and_save_state dir/foo work head &&
43
43
(echo n; echo y; echo n) | git checkout -p HEAD &&
44
44
verify_saved_state bar &&
45
45
verify_saved_state dir/foo
46
46
'
47
47
48
- test_expect_success ' git checkout -p HEAD with NO staged changes: apply' '
48
+ test_expect_success PERL ' git checkout -p HEAD with NO staged changes: apply' '
49
49
(echo n; echo y; echo y) | git checkout -p HEAD &&
50
50
verify_saved_state bar &&
51
51
verify_state dir/foo head head
52
52
'
53
53
54
- test_expect_success ' git checkout -p HEAD with change already staged' '
54
+ test_expect_success PERL ' git checkout -p HEAD with change already staged' '
55
55
set_state dir/foo index index
56
56
# the third n is to get out in case it mistakenly does not apply
57
57
(echo n; echo y; echo n) | git checkout -p HEAD &&
58
58
verify_saved_state bar &&
59
59
verify_state dir/foo head head
60
60
'
61
61
62
- test_expect_success ' git checkout -p HEAD^' '
62
+ test_expect_success PERL ' git checkout -p HEAD^' '
63
63
# the third n is to get out in case it mistakenly does not apply
64
64
(echo n; echo y; echo n) | git checkout -p HEAD^ &&
65
65
verify_saved_state bar &&
66
66
verify_state dir/foo parent parent
67
67
'
68
68
69
- test_expect_success ' git checkout -p handles deletion' '
69
+ test_expect_success PERL ' git checkout -p handles deletion' '
70
70
set_state dir/foo work index &&
71
71
rm dir/foo &&
72
72
(echo n; echo y) | git checkout -p &&
@@ -79,36 +79,36 @@ test_expect_success 'git checkout -p handles deletion' '
79
79
# dir/foo. There's always an extra 'n' to reject edits to dir/foo in
80
80
# the failure case (and thus get out of the loop).
81
81
82
- test_expect_success ' path limiting works: dir' '
82
+ test_expect_success PERL ' path limiting works: dir' '
83
83
set_state dir/foo work head &&
84
84
(echo y; echo n) | git checkout -p dir &&
85
85
verify_saved_state bar &&
86
86
verify_state dir/foo head head
87
87
'
88
88
89
- test_expect_success ' path limiting works: -- dir' '
89
+ test_expect_success PERL ' path limiting works: -- dir' '
90
90
set_state dir/foo work head &&
91
91
(echo y; echo n) | git checkout -p -- dir &&
92
92
verify_saved_state bar &&
93
93
verify_state dir/foo head head
94
94
'
95
95
96
- test_expect_success ' path limiting works: HEAD^ -- dir' '
96
+ test_expect_success PERL ' path limiting works: HEAD^ -- dir' '
97
97
# the third n is to get out in case it mistakenly does not apply
98
98
(echo y; echo n; echo n) | git checkout -p HEAD^ -- dir &&
99
99
verify_saved_state bar &&
100
100
verify_state dir/foo parent parent
101
101
'
102
102
103
- test_expect_success ' path limiting works: foo inside dir' '
103
+ test_expect_success PERL ' path limiting works: foo inside dir' '
104
104
set_state dir/foo work head &&
105
105
# the third n is to get out in case it mistakenly does not apply
106
106
(echo y; echo n; echo n) | (cd dir && git checkout -p foo) &&
107
107
verify_saved_state bar &&
108
108
verify_state dir/foo head head
109
109
'
110
110
111
- test_expect_success ' none of this moved HEAD' '
111
+ test_expect_success PERL ' none of this moved HEAD' '
112
112
verify_saved_head
113
113
'
114
114
0 commit comments