Skip to content

Commit f9f7c11

Browse files
sunshinecogitster
authored andcommitted
t9119: fix broken &&-chains
Signed-off-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cff4243 commit f9f7c11

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

t/t9119-git-svn-info.sh

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ esac
2222
# same value as "svn info" (i.e. the commit timestamp that touched the
2323
# path most recently); do not expect that field to match.
2424
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 &&
2727
test_cmp tmp.expect tmp.actual &&
2828
rm -f tmp.expect tmp.actual
2929
}
@@ -59,24 +59,24 @@ test_expect_success 'setup repository and import' '
5959
'
6060

6161
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 &&
6464
test_cmp_info expected.info actual.info
6565
"
6666

6767
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"
6969
'
7070

7171
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 &&
7474
test_cmp_info expected.info-dot actual.info-dot
7575
"
7676

7777
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 &&
8080
grep -v ^Path: <expected.info-pwd >expected.info-np &&
8181
grep -v ^Path: <actual.info-pwd >actual.info-np &&
8282
test_cmp_info expected.info-np actual.info-np &&
@@ -85,8 +85,8 @@ test_expect_success 'info $(pwd)' '
8585
'
8686

8787
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 &&
9090
grep -v ^Path: <expected.info-pwd >expected.info-np &&
9191
grep -v ^Path: <actual.info-pwd >actual.info-np &&
9292
test_cmp_info expected.info-np actual.info-np &&
@@ -95,8 +95,8 @@ test_expect_success 'info $(pwd)/../___wc' '
9595
'
9696

9797
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 &&
100100
grep -v ^Path: <expected.info-pwd >expected.info-np &&
101101
grep -v ^Path: <actual.info-pwd >actual.info-np &&
102102
test_cmp_info expected.info-np actual.info-np &&
@@ -105,56 +105,56 @@ test_expect_success 'info $(pwd)/../___wc//file' '
105105
'
106106

107107
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"
109109
'
110110

111111
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 &&
114114
test_cmp_info expected.info-file actual.info-file
115115
"
116116

117117
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"
119119
'
120120

121121
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 &&
124124
test_cmp_info expected.info-directory actual.info-directory
125125
"
126126

127127
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 &&
130130
test_cmp_info expected.info-inside-directory actual.info-inside-directory
131131
"
132132

133133
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"
135135
'
136136

137137
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 &&
140140
test_cmp_info expected.info-symlink-file actual.info-symlink-file
141141
"
142142

143143
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)" \
145145
= "$quoted_svnrepo/symlink-file"
146146
'
147147

148148
test_expect_success 'info symlink-directory' "
149-
(cd svnwc; svn info symlink-directory) \
149+
(cd svnwc && svn info symlink-directory) \
150150
> expected.info-symlink-directory &&
151-
(cd gitwc; git svn info symlink-directory) \
151+
(cd gitwc && git svn info symlink-directory) \
152152
> actual.info-symlink-directory &&
153153
test_cmp_info expected.info-symlink-directory actual.info-symlink-directory
154154
"
155155

156156
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)" \
158158
= "$quoted_svnrepo/symlink-directory"
159159
'
160160

@@ -169,13 +169,13 @@ test_expect_success 'info added-file' "
169169
cd svnwc &&
170170
svn_cmd add added-file > /dev/null
171171
) &&
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 &&
174174
test_cmp_info expected.info-added-file actual.info-added-file
175175
"
176176

177177
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)" \
179179
= "$quoted_svnrepo/added-file"
180180
'
181181

@@ -190,15 +190,15 @@ test_expect_success 'info added-directory' "
190190
cd gitwc &&
191191
git add added-directory
192192
) &&
193-
(cd svnwc; svn info added-directory) \
193+
(cd svnwc && svn info added-directory) \
194194
> expected.info-added-directory &&
195-
(cd gitwc; git svn info added-directory) \
195+
(cd gitwc && git svn info added-directory) \
196196
> actual.info-added-directory &&
197197
test_cmp_info expected.info-added-directory actual.info-added-directory
198198
"
199199

200200
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)" \
202202
= "$quoted_svnrepo/added-directory"
203203
'
204204

@@ -213,16 +213,16 @@ test_expect_success 'info added-symlink-file' "
213213
ln -s added-file added-symlink-file &&
214214
svn_cmd add added-symlink-file > /dev/null
215215
) &&
216-
(cd svnwc; svn info added-symlink-file) \
216+
(cd svnwc && svn info added-symlink-file) \
217217
> expected.info-added-symlink-file &&
218-
(cd gitwc; git svn info added-symlink-file) \
218+
(cd gitwc && git svn info added-symlink-file) \
219219
> actual.info-added-symlink-file &&
220220
test_cmp_info expected.info-added-symlink-file \
221221
actual.info-added-symlink-file
222222
"
223223

224224
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)" \
226226
= "$quoted_svnrepo/added-symlink-file"
227227
'
228228

@@ -237,16 +237,16 @@ test_expect_success 'info added-symlink-directory' "
237237
ln -s added-directory added-symlink-directory &&
238238
svn_cmd add added-symlink-directory > /dev/null
239239
) &&
240-
(cd svnwc; svn info added-symlink-directory) \
240+
(cd svnwc && svn info added-symlink-directory) \
241241
> expected.info-added-symlink-directory &&
242-
(cd gitwc; git svn info added-symlink-directory) \
242+
(cd gitwc && git svn info added-symlink-directory) \
243243
> actual.info-added-symlink-directory &&
244244
test_cmp_info expected.info-added-symlink-directory \
245245
actual.info-added-symlink-directory
246246
"
247247

248248
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)" \
250250
= "$quoted_svnrepo/added-symlink-directory"
251251
'
252252

@@ -259,13 +259,13 @@ test_expect_success 'info deleted-file' "
259259
cd svnwc &&
260260
svn_cmd rm --force file > /dev/null
261261
) &&
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 &&
264264
test_cmp_info expected.info-deleted-file actual.info-deleted-file
265265
"
266266

267267
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)" \
269269
= "$quoted_svnrepo/file"
270270
'
271271

@@ -278,13 +278,13 @@ test_expect_success 'info deleted-directory' "
278278
cd svnwc &&
279279
svn_cmd rm --force directory > /dev/null
280280
) &&
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 &&
283283
test_cmp_info expected.info-deleted-directory actual.info-deleted-directory
284284
"
285285

286286
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)" \
288288
= "$quoted_svnrepo/directory"
289289
'
290290

@@ -297,13 +297,13 @@ test_expect_success 'info deleted-symlink-file' "
297297
cd svnwc &&
298298
svn_cmd rm --force symlink-file > /dev/null
299299
) &&
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 &&
302302
test_cmp_info expected.info-deleted-symlink-file actual.info-deleted-symlink-file
303303
"
304304

305305
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)" \
307307
= "$quoted_svnrepo/symlink-file"
308308
'
309309

@@ -316,13 +316,13 @@ test_expect_success 'info deleted-symlink-directory' "
316316
cd svnwc &&
317317
svn_cmd rm --force symlink-directory > /dev/null
318318
) &&
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 &&
321321
test_cmp_info expected.info-deleted-symlink-directory actual.info-deleted-symlink-directory
322322
"
323323

324324
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)" \
326326
= "$quoted_svnrepo/symlink-directory"
327327
'
328328

@@ -331,27 +331,27 @@ test_expect_success 'info --url symlink-directory (deleted)' '
331331

332332
test_expect_success 'info unknown-file' "
333333
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) \
335335
2> actual.info-unknown-file &&
336336
grep unknown-file actual.info-unknown-file
337337
"
338338

339339
test_expect_success 'info --url unknown-file' '
340340
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) \
342342
2> actual.info-url-unknown-file &&
343343
grep unknown-file actual.info-url-unknown-file
344344
'
345345

346346
test_expect_success 'info unknown-directory' "
347347
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) \
349349
2> actual.info-unknown-directory &&
350350
grep unknown-directory actual.info-unknown-directory
351351
"
352352

353353
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) \
355355
2> actual.info-url-unknown-directory &&
356356
grep unknown-directory actual.info-url-unknown-directory
357357
'
@@ -361,13 +361,13 @@ test_expect_success 'info unknown-symlink-file' "
361361
cd gitwc &&
362362
ln -s unknown-file unknown-symlink-file
363363
) &&
364-
(cd gitwc; test_must_fail git svn info unknown-symlink-file) \
364+
(cd gitwc && test_must_fail git svn info unknown-symlink-file) \
365365
2> actual.info-unknown-symlink-file &&
366366
grep unknown-symlink-file actual.info-unknown-symlink-file
367367
"
368368

369369
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) \
371371
2> actual.info-url-unknown-symlink-file &&
372372
grep unknown-symlink-file actual.info-url-unknown-symlink-file
373373
'
@@ -377,13 +377,13 @@ test_expect_success 'info unknown-symlink-directory' "
377377
cd gitwc &&
378378
ln -s unknown-directory unknown-symlink-directory
379379
) &&
380-
(cd gitwc; test_must_fail git svn info unknown-symlink-directory) \
380+
(cd gitwc && test_must_fail git svn info unknown-symlink-directory) \
381381
2> actual.info-unknown-symlink-directory &&
382382
grep unknown-symlink-directory actual.info-unknown-symlink-directory
383383
"
384384

385385
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) \
387387
2> actual.info-url-unknown-symlink-directory &&
388388
grep unknown-symlink-directory actual.info-url-unknown-symlink-directory
389389
'

0 commit comments

Comments
 (0)