3
3
test_description=' git cvsimport basic tests'
4
4
. ./lib-cvs.sh
5
5
6
- if ! test_have_prereq PERL; then
7
- skip_all=' skipping git cvsimport tests, perl not available'
8
- test_done
9
- fi
10
-
11
- CVSROOT=$( pwd) /cvsroot
12
- export CVSROOT
6
+ test_expect_success PERL ' setup cvsroot environment' '
7
+ CVSROOT=$(pwd)/cvsroot &&
8
+ export CVSROOT
9
+ '
13
10
14
- test_expect_success ' setup cvsroot' ' $CVS init'
11
+ test_expect_success PERL ' setup cvsroot' ' $CVS init'
15
12
16
- test_expect_success ' setup a cvs module' '
13
+ test_expect_success PERL ' setup a cvs module' '
17
14
18
15
mkdir "$CVSROOT/module" &&
19
16
$CVS co -d module-cvs module &&
45
42
cd ..
46
43
'
47
44
48
- test_expect_success ' import a trivial module' '
45
+ test_expect_success PERL ' import a trivial module' '
49
46
50
47
git cvsimport -a -R -z 0 -C module-git module &&
51
48
test_cmp module-cvs/o_fortuna module-git/o_fortuna
52
49
53
50
'
54
51
55
- test_expect_success ' pack refs' ' cd module-git && git gc && cd ..'
52
+ test_expect_success PERL ' pack refs' ' cd module-git && git gc && cd ..'
56
53
57
- test_expect_success ' initial import has correct .git/cvs-revisions' '
54
+ test_expect_success PERL ' initial import has correct .git/cvs-revisions' '
58
55
59
56
(cd module-git &&
60
57
git log --format="o_fortuna 1.1 %H" -1) > expected &&
61
58
test_cmp expected module-git/.git/cvs-revisions
62
59
'
63
60
64
- test_expect_success ' update cvs module' '
61
+ test_expect_success PERL ' update cvs module' '
65
62
66
63
cd module-cvs &&
67
64
cat <<EOF >o_fortuna &&
90
87
cd ..
91
88
'
92
89
93
- test_expect_success ' update git module' '
90
+ test_expect_success PERL ' update git module' '
94
91
95
92
cd module-git &&
96
93
git cvsimport -a -R -z 0 module &&
@@ -100,15 +97,15 @@ test_expect_success 'update git module' '
100
97
101
98
'
102
99
103
- test_expect_success ' update has correct .git/cvs-revisions' '
100
+ test_expect_success PERL ' update has correct .git/cvs-revisions' '
104
101
105
102
(cd module-git &&
106
103
git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
107
104
git log --format="o_fortuna 1.2 %H" -1 HEAD) > expected &&
108
105
test_cmp expected module-git/.git/cvs-revisions
109
106
'
110
107
111
- test_expect_success ' update cvs module' '
108
+ test_expect_success PERL ' update cvs module' '
112
109
113
110
cd module-cvs &&
114
111
echo 1 >tick &&
@@ -118,7 +115,7 @@ test_expect_success 'update cvs module' '
118
115
119
116
'
120
117
121
- test_expect_success ' cvsimport.module config works' '
118
+ test_expect_success PERL ' cvsimport.module config works' '
122
119
123
120
cd module-git &&
124
121
git config cvsimport.module module &&
@@ -129,7 +126,7 @@ test_expect_success 'cvsimport.module config works' '
129
126
130
127
'
131
128
132
- test_expect_success ' second update has correct .git/cvs-revisions' '
129
+ test_expect_success PERL ' second update has correct .git/cvs-revisions' '
133
130
134
131
(cd module-git &&
135
132
git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
@@ -138,7 +135,7 @@ test_expect_success 'second update has correct .git/cvs-revisions' '
138
135
test_cmp expected module-git/.git/cvs-revisions
139
136
'
140
137
141
- test_expect_success ' import from a CVS working tree' '
138
+ test_expect_success PERL ' import from a CVS working tree' '
142
139
143
140
$CVS co -d import-from-wt module &&
144
141
cd import-from-wt &&
@@ -150,12 +147,12 @@ test_expect_success 'import from a CVS working tree' '
150
147
151
148
'
152
149
153
- test_expect_success ' no .git/cvs-revisions created by default' '
150
+ test_expect_success PERL ' no .git/cvs-revisions created by default' '
154
151
155
152
! test -e import-from-wt/.git/cvs-revisions
156
153
157
154
'
158
155
159
- test_expect_success ' test entire HEAD' ' test_cmp_branch_tree master'
156
+ test_expect_success PERL ' test entire HEAD' ' test_cmp_branch_tree master'
160
157
161
158
test_done
0 commit comments