3
3
test_description=' stash -p'
4
4
. ./lib-patch-mode.sh
5
5
6
- test_expect_success PERL ' setup' '
6
+ if ! test_have_prereq PERL
7
+ then
8
+ skip_all=' skipping stash -p tests, perl not available'
9
+ test_done
10
+ fi
11
+
12
+ test_expect_success ' setup' '
7
13
mkdir dir &&
8
14
echo parent > dir/foo &&
9
15
echo dummy > bar &&
@@ -20,7 +26,7 @@ test_expect_success PERL 'setup' '
20
26
21
27
# note: order of files with unstaged changes: HEAD bar dir/foo
22
28
23
- test_expect_success PERL ' saying "n" does nothing' '
29
+ test_expect_success ' saying "n" does nothing' '
24
30
set_state HEAD HEADfile_work HEADfile_index &&
25
31
set_state dir/foo work index &&
26
32
(echo n; echo n; echo n) | test_must_fail git stash save -p &&
@@ -29,7 +35,7 @@ test_expect_success PERL 'saying "n" does nothing' '
29
35
verify_state dir/foo work index
30
36
'
31
37
32
- test_expect_success PERL ' git stash -p' '
38
+ test_expect_success ' git stash -p' '
33
39
(echo y; echo n; echo y) | git stash save -p &&
34
40
verify_state HEAD committed HEADfile_index &&
35
41
verify_saved_state bar &&
@@ -41,7 +47,7 @@ test_expect_success PERL 'git stash -p' '
41
47
verify_state dir/foo work head
42
48
'
43
49
44
- test_expect_success PERL ' git stash -p --no-keep-index' '
50
+ test_expect_success ' git stash -p --no-keep-index' '
45
51
set_state HEAD HEADfile_work HEADfile_index &&
46
52
set_state bar bar_work bar_index &&
47
53
set_state dir/foo work index &&
@@ -56,7 +62,7 @@ test_expect_success PERL 'git stash -p --no-keep-index' '
56
62
verify_state dir/foo work index
57
63
'
58
64
59
- test_expect_success PERL ' git stash --no-keep-index -p' '
65
+ test_expect_success ' git stash --no-keep-index -p' '
60
66
set_state HEAD HEADfile_work HEADfile_index &&
61
67
set_state bar bar_work bar_index &&
62
68
set_state dir/foo work index &&
@@ -71,7 +77,7 @@ test_expect_success PERL 'git stash --no-keep-index -p' '
71
77
verify_state dir/foo work index
72
78
'
73
79
74
- test_expect_success PERL ' none of this moved HEAD' '
80
+ test_expect_success ' none of this moved HEAD' '
75
81
verify_saved_head
76
82
'
77
83
0 commit comments