@@ -4,7 +4,7 @@ test_description='git restore --patch'
4
4
5
5
. ./lib-patch-mode.sh
6
6
7
- test_expect_success PERL ' setup' '
7
+ test_expect_success ' setup' '
8
8
mkdir dir &&
9
9
echo parent >dir/foo &&
10
10
echo dummy >bar &&
@@ -16,28 +16,28 @@ test_expect_success PERL 'setup' '
16
16
save_head
17
17
'
18
18
19
- test_expect_success PERL ' restore -p without pathspec is fine' '
19
+ test_expect_success ' restore -p without pathspec is fine' '
20
20
echo q >cmd &&
21
21
git restore -p <cmd
22
22
'
23
23
24
24
# note: bar sorts before dir/foo, so the first 'n' is always to skip 'bar'
25
25
26
- test_expect_success PERL ' saying "n" does nothing' '
26
+ test_expect_success ' saying "n" does nothing' '
27
27
set_and_save_state dir/foo work head &&
28
28
test_write_lines n n | git restore -p &&
29
29
verify_saved_state bar &&
30
30
verify_saved_state dir/foo
31
31
'
32
32
33
- test_expect_success PERL ' git restore -p' '
33
+ test_expect_success ' git restore -p' '
34
34
set_and_save_state dir/foo work head &&
35
35
test_write_lines n y | git restore -p &&
36
36
verify_saved_state bar &&
37
37
verify_state dir/foo head head
38
38
'
39
39
40
- test_expect_success PERL ' git restore -p with staged changes' '
40
+ test_expect_success ' git restore -p with staged changes' '
41
41
set_state dir/foo work index &&
42
42
test_write_lines n y | git restore -p &&
43
43
verify_saved_state bar &&
@@ -46,7 +46,7 @@ test_expect_success PERL 'git restore -p with staged changes' '
46
46
47
47
for opt in " HEAD" " @"
48
48
do
49
- test_expect_success PERL " git restore -p --source=$opt " '
49
+ test_expect_success " git restore -p --source=$opt " '
50
50
set_state dir/foo work index &&
51
51
# the third n is to get out in case it mistakenly does not apply
52
52
test_write_lines n y n | git restore -p --source=$opt >output &&
56
56
'
57
57
done
58
58
59
- test_expect_success PERL ' git restore -p --source=HEAD^' '
59
+ test_expect_success ' git restore -p --source=HEAD^' '
60
60
set_state dir/foo work index &&
61
61
# the third n is to get out in case it mistakenly does not apply
62
62
test_write_lines n y n | git restore -p --source=HEAD^ &&
63
63
verify_saved_state bar &&
64
64
verify_state dir/foo parent index
65
65
'
66
66
67
- test_expect_success PERL ' git restore -p --source=HEAD^...' '
67
+ test_expect_success ' git restore -p --source=HEAD^...' '
68
68
set_state dir/foo work index &&
69
69
# the third n is to get out in case it mistakenly does not apply
70
70
test_write_lines n y n | git restore -p --source=HEAD^... &&
71
71
verify_saved_state bar &&
72
72
verify_state dir/foo parent index
73
73
'
74
74
75
- test_expect_success PERL ' git restore -p handles deletion' '
75
+ test_expect_success ' git restore -p handles deletion' '
76
76
set_state dir/foo work index &&
77
77
rm dir/foo &&
78
78
test_write_lines n y | git restore -p &&
@@ -85,37 +85,37 @@ test_expect_success PERL 'git restore -p handles deletion' '
85
85
# dir/foo. There's always an extra 'n' to reject edits to dir/foo in
86
86
# the failure case (and thus get out of the loop).
87
87
88
- test_expect_success PERL ' path limiting works: dir' '
88
+ test_expect_success ' path limiting works: dir' '
89
89
set_state dir/foo work head &&
90
90
test_write_lines y n | git restore -p dir &&
91
91
verify_saved_state bar &&
92
92
verify_state dir/foo head head
93
93
'
94
94
95
- test_expect_success PERL ' path limiting works: -- dir' '
95
+ test_expect_success ' path limiting works: -- dir' '
96
96
set_state dir/foo work head &&
97
97
test_write_lines y n | git restore -p -- dir &&
98
98
verify_saved_state bar &&
99
99
verify_state dir/foo head head
100
100
'
101
101
102
- test_expect_success PERL ' path limiting works: HEAD^ -- dir' '
102
+ test_expect_success ' path limiting works: HEAD^ -- dir' '
103
103
set_state dir/foo work head &&
104
104
# the third n is to get out in case it mistakenly does not apply
105
105
test_write_lines y n n | git restore -p --source=HEAD^ -- dir &&
106
106
verify_saved_state bar &&
107
107
verify_state dir/foo parent head
108
108
'
109
109
110
- test_expect_success PERL ' path limiting works: foo inside dir' '
110
+ test_expect_success ' path limiting works: foo inside dir' '
111
111
set_state dir/foo work head &&
112
112
# the third n is to get out in case it mistakenly does not apply
113
113
test_write_lines y n n | (cd dir && git restore -p foo) &&
114
114
verify_saved_state bar &&
115
115
verify_state dir/foo head head
116
116
'
117
117
118
- test_expect_success PERL ' none of this moved HEAD' '
118
+ test_expect_success ' none of this moved HEAD' '
119
119
verify_saved_head
120
120
'
121
121
0 commit comments