22
22
# same value as "svn info" (i.e. the commit timestamp that touched the
23
23
# path most recently); do not expect that field to match.
24
24
test_cmp_info () {
25
- sed -e ' /^Text Last Updated:/d' " $1 " > tmp.expect
26
- sed -e ' /^Text Last Updated:/d' " $2 " > tmp.actual
25
+ sed -e ' /^Text Last Updated:/d' " $1 " > tmp.expect &&
26
+ sed -e ' /^Text Last Updated:/d' " $2 " > tmp.actual &&
27
27
test_cmp tmp.expect tmp.actual &&
28
28
rm -f tmp.expect tmp.actual
29
29
}
@@ -59,24 +59,24 @@ test_expect_success 'setup repository and import' '
59
59
'
60
60
61
61
test_expect_success ' info' "
62
- (cd svnwc; svn info) > expected.info &&
63
- (cd gitwc; git svn info) > actual.info &&
62
+ (cd svnwc && svn info) > expected.info &&
63
+ (cd gitwc && git svn info) > actual.info &&
64
64
test_cmp_info expected.info actual.info
65
65
"
66
66
67
67
test_expect_success ' info --url' '
68
- test "$(cd gitwc; git svn info --url)" = "$quoted_svnrepo"
68
+ test "$(cd gitwc && git svn info --url)" = "$quoted_svnrepo"
69
69
'
70
70
71
71
test_expect_success ' info .' "
72
- (cd svnwc; svn info .) > expected.info-dot &&
73
- (cd gitwc; git svn info .) > actual.info-dot &&
72
+ (cd svnwc && svn info .) > expected.info-dot &&
73
+ (cd gitwc && git svn info .) > actual.info-dot &&
74
74
test_cmp_info expected.info-dot actual.info-dot
75
75
"
76
76
77
77
test_expect_success ' info $(pwd)' '
78
- (cd svnwc; svn info "$(pwd)") >expected.info-pwd &&
79
- (cd gitwc; git svn info "$(pwd)") >actual.info-pwd &&
78
+ (cd svnwc && svn info "$(pwd)") >expected.info-pwd &&
79
+ (cd gitwc && git svn info "$(pwd)") >actual.info-pwd &&
80
80
grep -v ^Path: <expected.info-pwd >expected.info-np &&
81
81
grep -v ^Path: <actual.info-pwd >actual.info-np &&
82
82
test_cmp_info expected.info-np actual.info-np &&
@@ -85,8 +85,8 @@ test_expect_success 'info $(pwd)' '
85
85
'
86
86
87
87
test_expect_success ' info $(pwd)/../___wc' '
88
- (cd svnwc; svn info "$(pwd)/../svnwc") >expected.info-pwd &&
89
- (cd gitwc; git svn info "$(pwd)/../gitwc") >actual.info-pwd &&
88
+ (cd svnwc && svn info "$(pwd)/../svnwc") >expected.info-pwd &&
89
+ (cd gitwc && git svn info "$(pwd)/../gitwc") >actual.info-pwd &&
90
90
grep -v ^Path: <expected.info-pwd >expected.info-np &&
91
91
grep -v ^Path: <actual.info-pwd >actual.info-np &&
92
92
test_cmp_info expected.info-np actual.info-np &&
@@ -95,8 +95,8 @@ test_expect_success 'info $(pwd)/../___wc' '
95
95
'
96
96
97
97
test_expect_success ' info $(pwd)/../___wc//file' '
98
- (cd svnwc; svn info "$(pwd)/../svnwc//file") >expected.info-pwd &&
99
- (cd gitwc; git svn info "$(pwd)/../gitwc//file") >actual.info-pwd &&
98
+ (cd svnwc && svn info "$(pwd)/../svnwc//file") >expected.info-pwd &&
99
+ (cd gitwc && git svn info "$(pwd)/../gitwc//file") >actual.info-pwd &&
100
100
grep -v ^Path: <expected.info-pwd >expected.info-np &&
101
101
grep -v ^Path: <actual.info-pwd >actual.info-np &&
102
102
test_cmp_info expected.info-np actual.info-np &&
@@ -105,56 +105,56 @@ test_expect_success 'info $(pwd)/../___wc//file' '
105
105
'
106
106
107
107
test_expect_success ' info --url .' '
108
- test "$(cd gitwc; git svn info --url .)" = "$quoted_svnrepo"
108
+ test "$(cd gitwc && git svn info --url .)" = "$quoted_svnrepo"
109
109
'
110
110
111
111
test_expect_success ' info file' "
112
- (cd svnwc; svn info file) > expected.info-file &&
113
- (cd gitwc; git svn info file) > actual.info-file &&
112
+ (cd svnwc && svn info file) > expected.info-file &&
113
+ (cd gitwc && git svn info file) > actual.info-file &&
114
114
test_cmp_info expected.info-file actual.info-file
115
115
"
116
116
117
117
test_expect_success ' info --url file' '
118
- test "$(cd gitwc; git svn info --url file)" = "$quoted_svnrepo/file"
118
+ test "$(cd gitwc && git svn info --url file)" = "$quoted_svnrepo/file"
119
119
'
120
120
121
121
test_expect_success ' info directory' "
122
- (cd svnwc; svn info directory) > expected.info-directory &&
123
- (cd gitwc; git svn info directory) > actual.info-directory &&
122
+ (cd svnwc && svn info directory) > expected.info-directory &&
123
+ (cd gitwc && git svn info directory) > actual.info-directory &&
124
124
test_cmp_info expected.info-directory actual.info-directory
125
125
"
126
126
127
127
test_expect_success ' info inside directory' "
128
- (cd svnwc/directory; svn info) > expected.info-inside-directory &&
129
- (cd gitwc/directory; git svn info) > actual.info-inside-directory &&
128
+ (cd svnwc/directory && svn info) > expected.info-inside-directory &&
129
+ (cd gitwc/directory && git svn info) > actual.info-inside-directory &&
130
130
test_cmp_info expected.info-inside-directory actual.info-inside-directory
131
131
"
132
132
133
133
test_expect_success ' info --url directory' '
134
- test "$(cd gitwc; git svn info --url directory)" = "$quoted_svnrepo/directory"
134
+ test "$(cd gitwc && git svn info --url directory)" = "$quoted_svnrepo/directory"
135
135
'
136
136
137
137
test_expect_success ' info symlink-file' "
138
- (cd svnwc; svn info symlink-file) > expected.info-symlink-file &&
139
- (cd gitwc; git svn info symlink-file) > actual.info-symlink-file &&
138
+ (cd svnwc && svn info symlink-file) > expected.info-symlink-file &&
139
+ (cd gitwc && git svn info symlink-file) > actual.info-symlink-file &&
140
140
test_cmp_info expected.info-symlink-file actual.info-symlink-file
141
141
"
142
142
143
143
test_expect_success ' info --url symlink-file' '
144
- test "$(cd gitwc; git svn info --url symlink-file)" \
144
+ test "$(cd gitwc && git svn info --url symlink-file)" \
145
145
= "$quoted_svnrepo/symlink-file"
146
146
'
147
147
148
148
test_expect_success ' info symlink-directory' "
149
- (cd svnwc; svn info symlink-directory) \
149
+ (cd svnwc && svn info symlink-directory) \
150
150
> expected.info-symlink-directory &&
151
- (cd gitwc; git svn info symlink-directory) \
151
+ (cd gitwc && git svn info symlink-directory) \
152
152
> actual.info-symlink-directory &&
153
153
test_cmp_info expected.info-symlink-directory actual.info-symlink-directory
154
154
"
155
155
156
156
test_expect_success ' info --url symlink-directory' '
157
- test "$(cd gitwc; git svn info --url symlink-directory)" \
157
+ test "$(cd gitwc && git svn info --url symlink-directory)" \
158
158
= "$quoted_svnrepo/symlink-directory"
159
159
'
160
160
@@ -169,13 +169,13 @@ test_expect_success 'info added-file' "
169
169
cd svnwc &&
170
170
svn_cmd add added-file > /dev/null
171
171
) &&
172
- (cd svnwc; svn info added-file) > expected.info-added-file &&
173
- (cd gitwc; git svn info added-file) > actual.info-added-file &&
172
+ (cd svnwc && svn info added-file) > expected.info-added-file &&
173
+ (cd gitwc && git svn info added-file) > actual.info-added-file &&
174
174
test_cmp_info expected.info-added-file actual.info-added-file
175
175
"
176
176
177
177
test_expect_success ' info --url added-file' '
178
- test "$(cd gitwc; git svn info --url added-file)" \
178
+ test "$(cd gitwc && git svn info --url added-file)" \
179
179
= "$quoted_svnrepo/added-file"
180
180
'
181
181
@@ -190,15 +190,15 @@ test_expect_success 'info added-directory' "
190
190
cd gitwc &&
191
191
git add added-directory
192
192
) &&
193
- (cd svnwc; svn info added-directory) \
193
+ (cd svnwc && svn info added-directory) \
194
194
> expected.info-added-directory &&
195
- (cd gitwc; git svn info added-directory) \
195
+ (cd gitwc && git svn info added-directory) \
196
196
> actual.info-added-directory &&
197
197
test_cmp_info expected.info-added-directory actual.info-added-directory
198
198
"
199
199
200
200
test_expect_success ' info --url added-directory' '
201
- test "$(cd gitwc; git svn info --url added-directory)" \
201
+ test "$(cd gitwc && git svn info --url added-directory)" \
202
202
= "$quoted_svnrepo/added-directory"
203
203
'
204
204
@@ -213,16 +213,16 @@ test_expect_success 'info added-symlink-file' "
213
213
ln -s added-file added-symlink-file &&
214
214
svn_cmd add added-symlink-file > /dev/null
215
215
) &&
216
- (cd svnwc; svn info added-symlink-file) \
216
+ (cd svnwc && svn info added-symlink-file) \
217
217
> expected.info-added-symlink-file &&
218
- (cd gitwc; git svn info added-symlink-file) \
218
+ (cd gitwc && git svn info added-symlink-file) \
219
219
> actual.info-added-symlink-file &&
220
220
test_cmp_info expected.info-added-symlink-file \
221
221
actual.info-added-symlink-file
222
222
"
223
223
224
224
test_expect_success ' info --url added-symlink-file' '
225
- test "$(cd gitwc; git svn info --url added-symlink-file)" \
225
+ test "$(cd gitwc && git svn info --url added-symlink-file)" \
226
226
= "$quoted_svnrepo/added-symlink-file"
227
227
'
228
228
@@ -237,16 +237,16 @@ test_expect_success 'info added-symlink-directory' "
237
237
ln -s added-directory added-symlink-directory &&
238
238
svn_cmd add added-symlink-directory > /dev/null
239
239
) &&
240
- (cd svnwc; svn info added-symlink-directory) \
240
+ (cd svnwc && svn info added-symlink-directory) \
241
241
> expected.info-added-symlink-directory &&
242
- (cd gitwc; git svn info added-symlink-directory) \
242
+ (cd gitwc && git svn info added-symlink-directory) \
243
243
> actual.info-added-symlink-directory &&
244
244
test_cmp_info expected.info-added-symlink-directory \
245
245
actual.info-added-symlink-directory
246
246
"
247
247
248
248
test_expect_success ' info --url added-symlink-directory' '
249
- test "$(cd gitwc; git svn info --url added-symlink-directory)" \
249
+ test "$(cd gitwc && git svn info --url added-symlink-directory)" \
250
250
= "$quoted_svnrepo/added-symlink-directory"
251
251
'
252
252
@@ -259,13 +259,13 @@ test_expect_success 'info deleted-file' "
259
259
cd svnwc &&
260
260
svn_cmd rm --force file > /dev/null
261
261
) &&
262
- (cd svnwc; svn info file) >expected.info-deleted-file &&
263
- (cd gitwc; git svn info file) >actual.info-deleted-file &&
262
+ (cd svnwc && svn info file) >expected.info-deleted-file &&
263
+ (cd gitwc && git svn info file) >actual.info-deleted-file &&
264
264
test_cmp_info expected.info-deleted-file actual.info-deleted-file
265
265
"
266
266
267
267
test_expect_success ' info --url file (deleted)' '
268
- test "$(cd gitwc; git svn info --url file)" \
268
+ test "$(cd gitwc && git svn info --url file)" \
269
269
= "$quoted_svnrepo/file"
270
270
'
271
271
@@ -278,13 +278,13 @@ test_expect_success 'info deleted-directory' "
278
278
cd svnwc &&
279
279
svn_cmd rm --force directory > /dev/null
280
280
) &&
281
- (cd svnwc; svn info directory) >expected.info-deleted-directory &&
282
- (cd gitwc; git svn info directory) >actual.info-deleted-directory &&
281
+ (cd svnwc && svn info directory) >expected.info-deleted-directory &&
282
+ (cd gitwc && git svn info directory) >actual.info-deleted-directory &&
283
283
test_cmp_info expected.info-deleted-directory actual.info-deleted-directory
284
284
"
285
285
286
286
test_expect_success ' info --url directory (deleted)' '
287
- test "$(cd gitwc; git svn info --url directory)" \
287
+ test "$(cd gitwc && git svn info --url directory)" \
288
288
= "$quoted_svnrepo/directory"
289
289
'
290
290
@@ -297,13 +297,13 @@ test_expect_success 'info deleted-symlink-file' "
297
297
cd svnwc &&
298
298
svn_cmd rm --force symlink-file > /dev/null
299
299
) &&
300
- (cd svnwc; svn info symlink-file) >expected.info-deleted-symlink-file &&
301
- (cd gitwc; git svn info symlink-file) >actual.info-deleted-symlink-file &&
300
+ (cd svnwc && svn info symlink-file) >expected.info-deleted-symlink-file &&
301
+ (cd gitwc && git svn info symlink-file) >actual.info-deleted-symlink-file &&
302
302
test_cmp_info expected.info-deleted-symlink-file actual.info-deleted-symlink-file
303
303
"
304
304
305
305
test_expect_success ' info --url symlink-file (deleted)' '
306
- test "$(cd gitwc; git svn info --url symlink-file)" \
306
+ test "$(cd gitwc && git svn info --url symlink-file)" \
307
307
= "$quoted_svnrepo/symlink-file"
308
308
'
309
309
@@ -316,13 +316,13 @@ test_expect_success 'info deleted-symlink-directory' "
316
316
cd svnwc &&
317
317
svn_cmd rm --force symlink-directory > /dev/null
318
318
) &&
319
- (cd svnwc; svn info symlink-directory) >expected.info-deleted-symlink-directory &&
320
- (cd gitwc; git svn info symlink-directory) >actual.info-deleted-symlink-directory &&
319
+ (cd svnwc && svn info symlink-directory) >expected.info-deleted-symlink-directory &&
320
+ (cd gitwc && git svn info symlink-directory) >actual.info-deleted-symlink-directory &&
321
321
test_cmp_info expected.info-deleted-symlink-directory actual.info-deleted-symlink-directory
322
322
"
323
323
324
324
test_expect_success ' info --url symlink-directory (deleted)' '
325
- test "$(cd gitwc; git svn info --url symlink-directory)" \
325
+ test "$(cd gitwc && git svn info --url symlink-directory)" \
326
326
= "$quoted_svnrepo/symlink-directory"
327
327
'
328
328
@@ -331,27 +331,27 @@ test_expect_success 'info --url symlink-directory (deleted)' '
331
331
332
332
test_expect_success ' info unknown-file' "
333
333
echo two > gitwc/unknown-file &&
334
- (cd gitwc; test_must_fail git svn info unknown-file) \
334
+ (cd gitwc && test_must_fail git svn info unknown-file) \
335
335
2> actual.info-unknown-file &&
336
336
grep unknown-file actual.info-unknown-file
337
337
"
338
338
339
339
test_expect_success ' info --url unknown-file' '
340
340
echo two > gitwc/unknown-file &&
341
- (cd gitwc; test_must_fail git svn info --url unknown-file) \
341
+ (cd gitwc && test_must_fail git svn info --url unknown-file) \
342
342
2> actual.info-url-unknown-file &&
343
343
grep unknown-file actual.info-url-unknown-file
344
344
'
345
345
346
346
test_expect_success ' info unknown-directory' "
347
347
mkdir gitwc/unknown-directory svnwc/unknown-directory &&
348
- (cd gitwc; test_must_fail git svn info unknown-directory) \
348
+ (cd gitwc && test_must_fail git svn info unknown-directory) \
349
349
2> actual.info-unknown-directory &&
350
350
grep unknown-directory actual.info-unknown-directory
351
351
"
352
352
353
353
test_expect_success ' info --url unknown-directory' '
354
- (cd gitwc; test_must_fail git svn info --url unknown-directory) \
354
+ (cd gitwc && test_must_fail git svn info --url unknown-directory) \
355
355
2> actual.info-url-unknown-directory &&
356
356
grep unknown-directory actual.info-url-unknown-directory
357
357
'
@@ -361,13 +361,13 @@ test_expect_success 'info unknown-symlink-file' "
361
361
cd gitwc &&
362
362
ln -s unknown-file unknown-symlink-file
363
363
) &&
364
- (cd gitwc; test_must_fail git svn info unknown-symlink-file) \
364
+ (cd gitwc && test_must_fail git svn info unknown-symlink-file) \
365
365
2> actual.info-unknown-symlink-file &&
366
366
grep unknown-symlink-file actual.info-unknown-symlink-file
367
367
"
368
368
369
369
test_expect_success ' info --url unknown-symlink-file' '
370
- (cd gitwc; test_must_fail git svn info --url unknown-symlink-file) \
370
+ (cd gitwc && test_must_fail git svn info --url unknown-symlink-file) \
371
371
2> actual.info-url-unknown-symlink-file &&
372
372
grep unknown-symlink-file actual.info-url-unknown-symlink-file
373
373
'
@@ -377,13 +377,13 @@ test_expect_success 'info unknown-symlink-directory' "
377
377
cd gitwc &&
378
378
ln -s unknown-directory unknown-symlink-directory
379
379
) &&
380
- (cd gitwc; test_must_fail git svn info unknown-symlink-directory) \
380
+ (cd gitwc && test_must_fail git svn info unknown-symlink-directory) \
381
381
2> actual.info-unknown-symlink-directory &&
382
382
grep unknown-symlink-directory actual.info-unknown-symlink-directory
383
383
"
384
384
385
385
test_expect_success ' info --url unknown-symlink-directory' '
386
- (cd gitwc; test_must_fail git svn info --url unknown-symlink-directory) \
386
+ (cd gitwc && test_must_fail git svn info --url unknown-symlink-directory) \
387
387
2> actual.info-url-unknown-symlink-directory &&
388
388
grep unknown-symlink-directory actual.info-url-unknown-symlink-directory
389
389
'
0 commit comments