t9000-t9999: fix broken &&-chains
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Sunshine committed
Jul 1, 2018 at 20:24 UTC
cff4243db9eec386c17222d545ec7dbf51768672
26 files changed
+51
-51
t/t9001-send-email.sh
+3
-3
@@ -330,7 +330,7 @@ test_expect_success $PREREQ 'Show all headers' '
330
331
test_expect_success $PREREQ 'Prompting works' '
332
clean_fake_sendmail &&
333
- (echo "to@example.com"
333
+ (echo "to@example.com" &&
334
echo ""
335
) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
336
--smtp-server="$(pwd)/fake.sendmail" \
@@ -470,8 +470,8 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
470
471
test_expect_success $PREREQ 'Valid In-Reply-To when prompting' '
472
clean_fake_sendmail &&
473
- (echo "From Example <from@example.com>"
474
- echo "To Example <to@example.com>"
473
+ (echo "From Example <from@example.com>" &&
474
+ echo "To Example <to@example.com>" &&
475
echo ""
476
) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
477
--smtp-server="$(pwd)/fake.sendmail" \
t/t9100-git-svn-basic.sh
+1
-1
@@ -31,7 +31,7 @@ test_expect_success \
31
(
32
cd import &&
33
echo foo >foo &&
34
- ln -s foo foo.link
34
+ ln -s foo foo.link &&
35
mkdir -p dir/a/b/c/d/e &&
36
echo "deep dir" >dir/a/b/c/d/e/file &&
37
mkdir bar &&
t/t9101-git-svn-props.sh
+1
-1
@@ -149,7 +149,7 @@ test_expect_success 'test show-ignore' "
149
svn_cmd up &&
150
svn_cmd propset -R svn:ignore '
151
no-such-file*
152
-' .
152
+' . &&
153
svn_cmd commit -m 'propset svn:ignore'
154
) &&
155
git svn show-ignore > show-ignore.got &&
t/t9122-git-svn-author.sh
+3
-3
@@ -7,8 +7,8 @@ test_expect_success 'setup svn repository' '
7
svn_cmd checkout "$svnrepo" work.svn &&
8
(
9
cd work.svn &&
10
- echo >file
11
- svn_cmd add file
10
+ echo >file &&
11
+ svn_cmd add file &&
12
svn_cmd commit -m "first commit" file
13
)
14
'
@@ -17,7 +17,7 @@ test_expect_success 'interact with it via git svn' '
17
mkdir work.git &&
18
(
19
cd work.git &&
20
- git svn init "$svnrepo"
20
+ git svn init "$svnrepo" &&
21
git svn fetch &&
22
23
echo modification >file &&
t/t9129-git-svn-i18n-commitencoding.sh
+1
-1
@@ -51,7 +51,7 @@ do
51
git add F &&
52
git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
53
E=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") &&
54
- test "z$E" = "z$H"
54
+ test "z$E" = "z$H" &&
55
compare_git_head_with "$TEST_DIRECTORY"/t3900/$H.txt
56
)
57
'
t/t9130-git-svn-authors-file.sh
+2
-2
@@ -25,7 +25,7 @@ test_expect_success 'start import with incomplete authors file' '
25
26
test_expect_success 'imported 2 revisions successfully' '
27
(
28
- cd x
28
+ cd x &&
29
git rev-list refs/remotes/git-svn >actual &&
30
test_line_count = 2 actual &&
31
git rev-list -1 --pretty=raw refs/remotes/git-svn >actual &&
@@ -42,7 +42,7 @@ EOF
42
43
test_expect_success 'continues to import once authors have been added' '
44
(
45
- cd x
45
+ cd x &&
46
git svn fetch --authors-file=../svn-authors &&
47
git rev-list refs/remotes/git-svn >actual &&
48
test_line_count = 4 actual &&
t/t9134-git-svn-ignore-paths.sh
+3
-3
@@ -82,7 +82,7 @@ test_expect_success 'update git svn-cloned repo (option ignore)' '
82
test_expect_success 'SVN-side change inside of ignored www' '
83
(
84
cd s &&
85
- echo zaq >> www/test_www.txt
85
+ echo zaq >> www/test_www.txt &&
86
svn_cmd commit -m "SVN-side change inside of www/test_www.txt" &&
87
svn_cmd up &&
88
svn_cmd log -v | fgrep "SVN-side change inside of www/test_www.txt"
@@ -114,8 +114,8 @@ test_expect_success 'update git svn-cloned repo (option ignore)' '
114
test_expect_success 'SVN-side change in and out of ignored www' '
115
(
116
cd s &&
117
- echo cvf >> www/test_www.txt
118
- echo ygg >> qqq/test_qqq.txt
117
+ echo cvf >> www/test_www.txt &&
118
+ echo ygg >> qqq/test_qqq.txt &&
119
svn_cmd commit -m "SVN-side change in and out of ignored www" &&
120
svn_cmd up &&
121
svn_cmd log -v | fgrep "SVN-side change in and out of ignored www"
t/t9137-git-svn-dcommit-clobber-series.sh
+1
-1
@@ -7,7 +7,7 @@ test_description='git svn dcommit clobber series'
7
test_expect_success 'initialize repo' '
8
mkdir import &&
9
(cd import &&
10
- awk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file
10
+ awk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file &&
11
svn_cmd import -m "initial" . "$svnrepo"
12
) &&
13
git svn init "$svnrepo" &&
t/t9138-git-svn-authors-prog.sh
+3
-3
@@ -38,7 +38,7 @@ test_expect_success 'import authors with prog and file' '
38
39
test_expect_success 'imported 6 revisions successfully' '
40
(
41
- cd x
41
+ cd x &&
42
git rev-list refs/remotes/git-svn >actual &&
43
test_line_count = 6 actual
44
)
@@ -46,7 +46,7 @@ test_expect_success 'imported 6 revisions successfully' '
46
47
test_expect_success 'authors-prog ran correctly' '
48
(
49
- cd x
49
+ cd x &&
50
git rev-list -1 --pretty=raw refs/remotes/git-svn~1 >actual &&
51
grep "^author ee-foo <ee-foo@example\.com> " actual &&
52
git rev-list -1 --pretty=raw refs/remotes/git-svn~2 >actual &&
@@ -62,7 +62,7 @@ test_expect_success 'authors-prog ran correctly' '
62
63
test_expect_success 'authors-file overrode authors-prog' '
64
(
65
- cd x
65
+ cd x &&
66
git rev-list -1 --pretty=raw refs/remotes/git-svn >actual &&
67
grep "^author FFFFFFF FFFFFFF <fFf@other\.example\.com> " actual
68
)
t/t9146-git-svn-empty-dirs.sh
+10
-10
@@ -21,7 +21,7 @@ test_expect_success 'empty directories exist' '
21
do
22
if ! test -d "$i"
23
then
24
- echo >&2 "$i does not exist"
24
+ echo >&2 "$i does not exist" &&
25
exit 1
26
fi
27
done
@@ -38,7 +38,7 @@ test_expect_success 'option automkdirs set to false' '
38
do
39
if test -d "$i"
40
then
41
- echo >&2 "$i exists"
41
+ echo >&2 "$i exists" &&
42
exit 1
43
fi
44
done
@@ -63,7 +63,7 @@ test_expect_success 'git svn mkdirs recreates empty directories' '
63
do
64
if ! test -d "$i"
65
then
66
- echo >&2 "$i does not exist"
66
+ echo >&2 "$i does not exist" &&
67
exit 1
68
fi
69
done
@@ -79,21 +79,21 @@ test_expect_success 'git svn mkdirs -r works' '
79
do
80
if ! test -d "$i"
81
then
82
- echo >&2 "$i does not exist"
82
+ echo >&2 "$i does not exist" &&
83
exit 1
84
fi
85
- done
85
+ done &&
86
87
if test -d "! !"
88
then
89
- echo >&2 "$i should not exist"
89
+ echo >&2 "$i should not exist" &&
90
exit 1
91
- fi
91
+ fi &&
92
93
git svn mkdirs -r8 &&
94
if ! test -d "! !"
95
then
96
- echo >&2 "$i not exist"
96
+ echo >&2 "$i not exist" &&
97
exit 1
98
fi
99
)
@@ -115,7 +115,7 @@ test_expect_success 'empty directories in trunk exist' '
115
do
116
if ! test -d "$i"
117
then
118
- echo >&2 "$i does not exist"
118
+ echo >&2 "$i does not exist" &&
119
exit 1
120
fi
121
done
@@ -148,7 +148,7 @@ test_expect_success 'git svn gc-ed files work' '
148
do
149
if ! test -d "$i"
150
then
151
- echo >&2 "$i does not exist"
151
+ echo >&2 "$i does not exist" &&
152
exit 1
153
fi
154
done
t/t9147-git-svn-include-paths.sh
+3
-3
@@ -84,7 +84,7 @@ test_expect_success 'update git svn-cloned repo (option include)' '
84
test_expect_success 'SVN-side change inside of ignored www' '
85
(
86
cd s &&
87
- echo zaq >> www/test_www.txt
87
+ echo zaq >> www/test_www.txt &&
88
svn_cmd commit -m "SVN-side change inside of www/test_www.txt" &&
89
svn_cmd up &&
90
svn_cmd log -v | fgrep "SVN-side change inside of www/test_www.txt"
@@ -116,8 +116,8 @@ test_expect_success 'update git svn-cloned repo (option include)' '
116
test_expect_success 'SVN-side change in and out of included qqq' '
117
(
118
cd s &&
119
- echo cvf >> www/test_www.txt
120
- echo ygg >> qqq/test_qqq.txt
119
+ echo cvf >> www/test_www.txt &&
120
+ echo ygg >> qqq/test_qqq.txt &&
121
svn_cmd commit -m "SVN-side change in and out of ignored www" &&
122
svn_cmd up &&
123
svn_cmd log -v | fgrep "SVN-side change in and out of ignored www"
t/t9152-svn-empty-dirs-after-gc.sh
+1
-1
@@ -30,7 +30,7 @@ test_expect_success 'git svn mkdirs recreates empty directories after git svn gc
30
do
31
if ! test -d "$i"
32
then
33
- echo >&2 "$i does not exist"
33
+ echo >&2 "$i does not exist" &&
34
exit 1
35
fi
36
done
t/t9164-git-svn-dcommit-concurrent.sh
+1
-1
@@ -12,7 +12,7 @@ test_expect_success 'setup svn repository' '
12
svn_cmd checkout "$svnrepo" work.svn &&
13
(
14
cd work.svn &&
15
- echo >file && echo > auto_updated_file
15
+ echo >file && echo > auto_updated_file &&
16
svn_cmd add file auto_updated_file &&
17
svn_cmd commit -m "initial commit"
18
) &&
t/t9165-git-svn-fetch-merge-branch-of-branch.sh
+1
-1
@@ -39,7 +39,7 @@ test_expect_success 'initialize source svn repo' '
39
svn_cmd commit -m trunk &&
40
svn_cmd switch "$svnrepo"/branches/branch2 &&
41
svn_cmd merge "$svnrepo"/trunk &&
42
- svn_cmd commit -m "merge trunk"
42
+ svn_cmd commit -m "merge trunk" &&
43
svn_cmd switch "$svnrepo"/trunk &&
44
svn_cmd merge --reintegrate "$svnrepo"/branches/branch2 &&
45
svn_cmd commit -m "merge branch2"
t/t9200-git-cvsexportcommit.sh
+3
-3
@@ -187,7 +187,7 @@ test_expect_success \
187
git commit -a -m "Update with spaces" &&
188
id=$(git rev-list --max-count=1 HEAD) &&
189
(cd "$CVSWORK" &&
190
- git cvsexportcommit -c $id
190
+ git cvsexportcommit -c $id &&
191
check_entries "G g" "with spaces.png/1.2/-kb|with spaces.txt/1.2/"
192
)'
193
@@ -245,7 +245,7 @@ test_expect_success FILEMODE \
245
git add G/off &&
246
git commit -a -m "Execute test" &&
247
(cd "$CVSWORK" &&
248
- git cvsexportcommit -c HEAD
248
+ git cvsexportcommit -c HEAD &&
249
test -x G/on &&
250
! test -x G/off
251
)'
@@ -303,7 +303,7 @@ test_expect_success 're-commit a removed filename which remains in CVS attic' '
303
git add attic_gremlin &&
304
git commit -m "Added attic_gremlin" &&
305
git cvsexportcommit -w "$CVSWORK" -c HEAD &&
306
- (cd "$CVSWORK"; cvs -Q update -d) &&
306
+ (cd "$CVSWORK" && cvs -Q update -d) &&
307
test -f "$CVSWORK/attic_gremlin"
308
'
309
t/t9302-fast-import-unpack-limit.sh
+1
-1
@@ -80,7 +80,7 @@ test_expect_success 'lookups after checkpoint works' '
80
do
81
if test $n -gt 30
82
then
83
- echo >&2 "checkpoint did not update branch"
83
+ echo >&2 "checkpoint did not update branch" &&
84
exit 1
85
else
86
n=$(($n + 1))
t/t9400-git-cvsserver-server.sh
+3
-3
@@ -371,7 +371,7 @@ test_expect_success 'cvs update (merge)' \
371
'echo Line 0 >expected &&
372
for i in 1 2 3 4 5 6 7
373
do
374
- echo Line $i >>merge
374
+ echo Line $i >>merge &&
375
echo Line $i >>expected
376
done &&
377
echo Line 8 >>expected &&
@@ -382,7 +382,7 @@ test_expect_success 'cvs update (merge)' \
382
GIT_CONFIG="$git_config" cvs -Q update &&
383
test "$(echo $(grep merge CVS/Entries|cut -d/ -f2,3,5))" = "merge/1.1/" &&
384
test_cmp merge ../merge &&
385
- ( echo Line 0; cat merge ) >merge.tmp &&
385
+ ( echo Line 0 && cat merge ) >merge.tmp &&
386
mv merge.tmp merge &&
387
cd "$WORKDIR" &&
388
echo Line 8 >>merge &&
@@ -410,7 +410,7 @@ do
410
done
411
412
test_expect_success 'cvs update (conflict merge)' \
413
- '( echo LINE 0; cat merge ) >merge.tmp &&
413
+ '( echo LINE 0 && cat merge ) >merge.tmp &&
414
mv merge.tmp merge &&
415
git add merge &&
416
git commit -q -m "Merge test (conflict)" &&
t/t9600-cvsimport.sh
+1
-1
@@ -135,7 +135,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '
135
136
(cd module-git &&
137
git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
138
- git log --format="o_fortuna 1.2 %H" -1 HEAD^
138
+ git log --format="o_fortuna 1.2 %H" -1 HEAD^ &&
139
git log --format="tick 1.1 %H" -1 HEAD) > expected &&
140
test_cmp expected module-git/.git/cvs-revisions
141
'
t/t9806-git-p4-options.sh
+1
-1
@@ -134,7 +134,7 @@ test_expect_success 'clone --changesfile' '
134
(
135
cd "$git" &&
136
git log --oneline p4/master >lines &&
137
- test_line_count = 2 lines
137
+ test_line_count = 2 lines &&
138
test_path_is_file file1 &&
139
test_path_is_missing file2 &&
140
test_path_is_file file3
t/t9810-git-p4-rcs.sh
+1
-1
@@ -161,7 +161,7 @@ test_expect_success 'cleanup after failure' '
161
test_expect_success 'ktext expansion should not expand multi-line $File::' '
162
(
163
cd "$cli" &&
164
- cat >lv.pm <<-\EOF
164
+ cat >lv.pm <<-\EOF &&
165
my $wanted = sub { my $f = $File::Find::name;
166
if ( -f && $f =~ /foo/ ) {
167
EOF
t/t9811-git-p4-label-import.sh
+1
-1
@@ -133,7 +133,7 @@ test_expect_success 'export git tags to p4' '
133
p4 labels ... | grep LIGHTWEIGHT_TAG &&
134
p4 label -o GIT_TAG_1 | grep "tag created in git:xyzzy" &&
135
p4 sync ...@GIT_TAG_1 &&
136
- ! test -f main/f10
136
+ ! test -f main/f10 &&
137
p4 sync ...@GIT_TAG_2 &&
138
test -f main/f10
139
)
t/t9815-git-p4-submit-fail.sh
+1
-1
@@ -394,7 +394,7 @@ test_expect_success 'cleanup rename after submit cancel' '
394
(
395
cd "$cli" &&
396
test_path_is_missing text2 &&
397
- p4 fstat -T action text2 2>&1 | grep "no such file"
397
+ p4 fstat -T action text2 2>&1 | grep "no such file" &&
398
test_path_is_file text &&
399
! p4 fstat -T action text
400
)
t/t9830-git-p4-symlink-dir.sh
+1
-1
@@ -30,7 +30,7 @@ test_expect_success 'symlinked directory' '
30
(
31
cd "$cli" &&
32
p4 sync &&
33
- test -L some/sub/directory/subdir2
33
+ test -L some/sub/directory/subdir2 &&
34
test_path_is_file some/sub/directory/subdir2/file.t
35
)
36
t/t9831-git-p4-triggers.sh
+1
-1
@@ -13,7 +13,7 @@ test_expect_success 'init depot' '
13
cd "$cli" &&
14
echo file1 >file1 &&
15
p4 add file1 &&
16
- p4 submit -d "change 1"
16
+ p4 submit -d "change 1" &&
17
echo file2 >file2 &&
18
p4 add file2 &&
19
p4 submit -d "change 2"
t/t9902-completion.sh
+2
-2
@@ -1103,7 +1103,7 @@ test_expect_success '__git_complete_refs - remote' '
1103
master-in-other Z
1104
EOF
1105
(
1106
- cur=
1106
+ cur= &&
1107
__git_complete_refs --remote=other &&
1108
print_comp
1109
) &&
@@ -1122,7 +1122,7 @@ test_expect_success '__git_complete_refs - track' '
1122
master-in-other Z
1123
EOF
1124
(
1125
- cur=
1125
+ cur= &&
1126
__git_complete_refs --track &&
1127
print_comp
1128
) &&
t/t9903-bash-prompt.sh
+1
-1
@@ -529,7 +529,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '
529
printf "BEFORE: (${c_green}\${__git_ps1_branch_name}${c_clear}):AFTER\\nmaster" >expected &&
530
(
531
GIT_PS1_SHOWCOLORHINTS=y &&
532
- __git_ps1 "BEFORE:" ":AFTER" >"$actual"
532
+ __git_ps1 "BEFORE:" ":AFTER" >"$actual" &&
533
printf "%s\\n%s" "$PS1" "${__git_ps1_branch_name}" >"$actual"
534
) &&
535
test_cmp expected "$actual"