t9000-t9999: fix broken &&-chains
authorEric Sunshine <sunshine@sunshineco.com>
Mon, 2 Jul 2018 00:24:04 +0000 (20:24 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Jul 2018 21:38:47 +0000 (14:38 -0700)
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
26 files changed:
t/t9001-send-email.sh
t/t9100-git-svn-basic.sh
t/t9101-git-svn-props.sh
t/t9122-git-svn-author.sh
t/t9129-git-svn-i18n-commitencoding.sh
t/t9130-git-svn-authors-file.sh
t/t9134-git-svn-ignore-paths.sh
t/t9137-git-svn-dcommit-clobber-series.sh
t/t9138-git-svn-authors-prog.sh
t/t9146-git-svn-empty-dirs.sh
t/t9147-git-svn-include-paths.sh
t/t9152-svn-empty-dirs-after-gc.sh
t/t9164-git-svn-dcommit-concurrent.sh
t/t9165-git-svn-fetch-merge-branch-of-branch.sh
t/t9200-git-cvsexportcommit.sh
t/t9302-fast-import-unpack-limit.sh
t/t9400-git-cvsserver-server.sh
t/t9600-cvsimport.sh
t/t9806-git-p4-options.sh
t/t9810-git-p4-rcs.sh
t/t9811-git-p4-label-import.sh
t/t9815-git-p4-submit-fail.sh
t/t9830-git-p4-symlink-dir.sh
t/t9831-git-p4-triggers.sh
t/t9902-completion.sh
t/t9903-bash-prompt.sh

index 776769f..53314ff 100755 (executable)
@@ -330,7 +330,7 @@ test_expect_success $PREREQ 'Show all headers' '
 
 test_expect_success $PREREQ 'Prompting works' '
        clean_fake_sendmail &&
-       (echo "to@example.com"
+       (echo "to@example.com" &&
         echo ""
        ) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
                --smtp-server="$(pwd)/fake.sendmail" \
@@ -470,8 +470,8 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
 
 test_expect_success $PREREQ 'Valid In-Reply-To when prompting' '
        clean_fake_sendmail &&
-       (echo "From Example <from@example.com>"
-        echo "To Example <to@example.com>"
+       (echo "From Example <from@example.com>" &&
+        echo "To Example <to@example.com>" &&
         echo ""
        ) | GIT_SEND_EMAIL_NOTTY=1 git send-email \
                --smtp-server="$(pwd)/fake.sendmail" \
index c937330..9af6078 100755 (executable)
@@ -31,7 +31,7 @@ test_expect_success \
        (
                cd import &&
                echo foo >foo &&
-               ln -s foo foo.link
+               ln -s foo foo.link &&
                mkdir -p dir/a/b/c/d/e &&
                echo "deep dir" >dir/a/b/c/d/e/file &&
                mkdir bar &&
index 07bfb63..8a5c8dc 100755 (executable)
@@ -149,7 +149,7 @@ test_expect_success 'test show-ignore' "
                svn_cmd up &&
                svn_cmd propset -R svn:ignore '
 no-such-file*
-' .
+' . &&
                svn_cmd commit -m 'propset svn:ignore'
        ) &&
        git svn show-ignore > show-ignore.got &&
index 30013b7..9e8fe38 100755 (executable)
@@ -7,8 +7,8 @@ test_expect_success 'setup svn repository' '
        svn_cmd checkout "$svnrepo" work.svn &&
        (
                cd work.svn &&
-               echo >file
-               svn_cmd add file
+               echo >file &&
+               svn_cmd add file &&
                svn_cmd commit -m "first commit" file
        )
 '
@@ -17,7 +17,7 @@ test_expect_success 'interact with it via git svn' '
        mkdir work.git &&
        (
                cd work.git &&
-               git svn init "$svnrepo"
+               git svn init "$svnrepo" &&
                git svn fetch &&
 
                echo modification >file &&
index 8dbd647..2c213ae 100755 (executable)
@@ -51,7 +51,7 @@ do
                git add F &&
                git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
                E=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") &&
-               test "z$E" = "z$H"
+               test "z$E" = "z$H" &&
                compare_git_head_with "$TEST_DIRECTORY"/t3900/$H.txt
        )
        '
index d826285..cb764bc 100755 (executable)
@@ -25,7 +25,7 @@ test_expect_success 'start import with incomplete authors file' '
 
 test_expect_success 'imported 2 revisions successfully' '
        (
-               cd x
+               cd x &&
                git rev-list refs/remotes/git-svn >actual &&
                test_line_count = 2 actual &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn >actual &&
@@ -42,7 +42,7 @@ EOF
 
 test_expect_success 'continues to import once authors have been added' '
        (
-               cd x
+               cd x &&
                git svn fetch --authors-file=../svn-authors &&
                git rev-list refs/remotes/git-svn >actual &&
                test_line_count = 4 actual &&
index 09ff10c..fff49c4 100755 (executable)
@@ -82,7 +82,7 @@ test_expect_success 'update git svn-cloned repo (option ignore)' '
 test_expect_success 'SVN-side change inside of ignored www' '
        (
                cd s &&
-               echo zaq >> www/test_www.txt
+               echo zaq >> www/test_www.txt &&
                svn_cmd commit -m "SVN-side change inside of www/test_www.txt" &&
                svn_cmd up &&
                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)' '
 test_expect_success 'SVN-side change in and out of ignored www' '
        (
                cd s &&
-               echo cvf >> www/test_www.txt
-               echo ygg >> qqq/test_qqq.txt
+               echo cvf >> www/test_www.txt &&
+               echo ygg >> qqq/test_qqq.txt &&
                svn_cmd commit -m "SVN-side change in and out of ignored www" &&
                svn_cmd up &&
                svn_cmd log -v | fgrep "SVN-side change in and out of ignored www"
index 5fa07a3..067b15b 100755 (executable)
@@ -7,7 +7,7 @@ test_description='git svn dcommit clobber series'
 test_expect_success 'initialize repo' '
        mkdir import &&
        (cd import &&
-       awk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file
+       awk "BEGIN { for (i = 1; i < 64; i++) { print i } }" > file &&
        svn_cmd import -m "initial" . "$svnrepo"
        ) &&
        git svn init "$svnrepo" &&
index 93ef44f..027b416 100755 (executable)
@@ -38,7 +38,7 @@ test_expect_success 'import authors with prog and file' '
 
 test_expect_success 'imported 6 revisions successfully' '
        (
-               cd x
+               cd x &&
                git rev-list refs/remotes/git-svn >actual &&
                test_line_count = 6 actual
        )
@@ -46,7 +46,7 @@ test_expect_success 'imported 6 revisions successfully' '
 
 test_expect_success 'authors-prog ran correctly' '
        (
-               cd x
+               cd x &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn~1 >actual &&
                grep "^author ee-foo <ee-foo@example\.com> " actual &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn~2 >actual &&
@@ -62,7 +62,7 @@ test_expect_success 'authors-prog ran correctly' '
 
 test_expect_success 'authors-file overrode authors-prog' '
        (
-               cd x
+               cd x &&
                git rev-list -1 --pretty=raw refs/remotes/git-svn >actual &&
                grep "^author FFFFFFF FFFFFFF <fFf@other\.example\.com> " actual
        )
index 6d3130e..5f91c0d 100755 (executable)
@@ -21,7 +21,7 @@ test_expect_success 'empty directories exist' '
                do
                        if ! test -d "$i"
                        then
-                               echo >&2 "$i does not exist"
+                               echo >&2 "$i does not exist" &&
                                exit 1
                        fi
                done
@@ -38,7 +38,7 @@ test_expect_success 'option automkdirs set to false' '
                do
                        if test -d "$i"
                        then
-                               echo >&2 "$i exists"
+                               echo >&2 "$i exists" &&
                                exit 1
                        fi
                done
@@ -63,7 +63,7 @@ test_expect_success 'git svn mkdirs recreates empty directories' '
                do
                        if ! test -d "$i"
                        then
-                               echo >&2 "$i does not exist"
+                               echo >&2 "$i does not exist" &&
                                exit 1
                        fi
                done
@@ -79,21 +79,21 @@ test_expect_success 'git svn mkdirs -r works' '
                do
                        if ! test -d "$i"
                        then
-                               echo >&2 "$i does not exist"
+                               echo >&2 "$i does not exist" &&
                                exit 1
                        fi
-               done
+               done &&
 
                if test -d "! !"
                then
-                       echo >&2 "$i should not exist"
+                       echo >&2 "$i should not exist" &&
                        exit 1
-               fi
+               fi &&
 
                git svn mkdirs -r8 &&
                if ! test -d "! !"
                then
-                       echo >&2 "$i not exist"
+                       echo >&2 "$i not exist" &&
                        exit 1
                fi
        )
@@ -115,7 +115,7 @@ test_expect_success 'empty directories in trunk exist' '
                do
                        if ! test -d "$i"
                        then
-                               echo >&2 "$i does not exist"
+                               echo >&2 "$i does not exist" &&
                                exit 1
                        fi
                done
@@ -148,7 +148,7 @@ test_expect_success 'git svn gc-ed files work' '
                        do
                                if ! test -d "$i"
                                then
-                                       echo >&2 "$i does not exist"
+                                       echo >&2 "$i does not exist" &&
                                        exit 1
                                fi
                        done
index a90ff58..d292bf9 100755 (executable)
@@ -84,7 +84,7 @@ test_expect_success 'update git svn-cloned repo (option include)' '
 test_expect_success 'SVN-side change inside of ignored www' '
        (
                cd s &&
-               echo zaq >> www/test_www.txt
+               echo zaq >> www/test_www.txt &&
                svn_cmd commit -m "SVN-side change inside of www/test_www.txt" &&
                svn_cmd up &&
                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)' '
 test_expect_success 'SVN-side change in and out of included qqq' '
        (
                cd s &&
-               echo cvf >> www/test_www.txt
-               echo ygg >> qqq/test_qqq.txt
+               echo cvf >> www/test_www.txt &&
+               echo ygg >> qqq/test_qqq.txt &&
                svn_cmd commit -m "SVN-side change in and out of ignored www" &&
                svn_cmd up &&
                svn_cmd log -v | fgrep "SVN-side change in and out of ignored www"
index 301e779..89f285d 100755 (executable)
@@ -30,7 +30,7 @@ test_expect_success 'git svn mkdirs recreates empty directories after git svn gc
                do
                        if ! test -d "$i"
                        then
-                               echo >&2 "$i does not exist"
+                               echo >&2 "$i does not exist" &&
                                exit 1
                        fi
                done
index d8464d4..90346ff 100755 (executable)
@@ -12,7 +12,7 @@ test_expect_success 'setup svn repository' '
        svn_cmd checkout "$svnrepo" work.svn &&
        (
                cd work.svn &&
-               echo >file && echo > auto_updated_file
+               echo >file && echo > auto_updated_file &&
                svn_cmd add file auto_updated_file &&
                svn_cmd commit -m "initial commit"
        ) &&
index fa3ef3b..a4813c2 100755 (executable)
@@ -39,7 +39,7 @@ test_expect_success 'initialize source svn repo' '
                svn_cmd commit -m trunk &&
                svn_cmd switch "$svnrepo"/branches/branch2 &&
                svn_cmd merge "$svnrepo"/trunk &&
-               svn_cmd commit -m "merge trunk"
+               svn_cmd commit -m "merge trunk" &&
                svn_cmd switch "$svnrepo"/trunk &&
                svn_cmd merge --reintegrate "$svnrepo"/branches/branch2 &&
                svn_cmd commit -m "merge branch2"
index 1319415..cd61288 100755 (executable)
@@ -187,7 +187,7 @@ test_expect_success \
       git commit -a -m "Update with spaces" &&
       id=$(git rev-list --max-count=1 HEAD) &&
       (cd "$CVSWORK" &&
-      git cvsexportcommit -c $id
+      git cvsexportcommit -c $id &&
       check_entries "G g" "with spaces.png/1.2/-kb|with spaces.txt/1.2/"
       )'
 
@@ -245,7 +245,7 @@ test_expect_success FILEMODE \
       git add G/off &&
       git commit -a -m "Execute test" &&
       (cd "$CVSWORK" &&
-      git cvsexportcommit -c HEAD
+      git cvsexportcommit -c HEAD &&
       test -x G/on &&
       ! test -x G/off
       )'
@@ -303,7 +303,7 @@ test_expect_success 're-commit a removed filename which remains in CVS attic' '
     git add attic_gremlin &&
     git commit -m "Added attic_gremlin" &&
        git cvsexportcommit -w "$CVSWORK" -c HEAD &&
-    (cd "$CVSWORK"; cvs -Q update -d) &&
+    (cd "$CVSWORK" && cvs -Q update -d) &&
     test -f "$CVSWORK/attic_gremlin"
 '
 
index a04de14..bb1c39c 100755 (executable)
@@ -80,7 +80,7 @@ test_expect_success 'lookups after checkpoint works' '
                do
                        if test $n -gt 30
                        then
-                               echo >&2 "checkpoint did not update branch"
+                               echo >&2 "checkpoint did not update branch" &&
                                exit 1
                        else
                                n=$(($n + 1))
index 6b09da7..a5e5dca 100755 (executable)
@@ -371,7 +371,7 @@ test_expect_success 'cvs update (merge)' \
   'echo Line 0 >expected &&
    for i in 1 2 3 4 5 6 7
    do
-     echo Line $i >>merge
+     echo Line $i >>merge &&
      echo Line $i >>expected
    done &&
    echo Line 8 >>expected &&
@@ -382,7 +382,7 @@ test_expect_success 'cvs update (merge)' \
    GIT_CONFIG="$git_config" cvs -Q update &&
    test "$(echo $(grep merge CVS/Entries|cut -d/ -f2,3,5))" = "merge/1.1/" &&
    test_cmp merge ../merge &&
-   ( echo Line 0; cat merge ) >merge.tmp &&
+   ( echo Line 0 && cat merge ) >merge.tmp &&
    mv merge.tmp merge &&
    cd "$WORKDIR" &&
    echo Line 8 >>merge &&
@@ -410,7 +410,7 @@ do
 done
 
 test_expect_success 'cvs update (conflict merge)' \
-  '( echo LINE 0; cat merge ) >merge.tmp &&
+  '( echo LINE 0 && cat merge ) >merge.tmp &&
    mv merge.tmp merge &&
    git add merge &&
    git commit -q -m "Merge test (conflict)" &&
index 804ce38..5dfee07 100755 (executable)
@@ -135,7 +135,7 @@ test_expect_success PERL 'second update has correct .git/cvs-revisions' '
 
        (cd module-git &&
         git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
-        git log --format="o_fortuna 1.2 %H" -1 HEAD^
+        git log --format="o_fortuna 1.2 %H" -1 HEAD^ &&
         git log --format="tick 1.1 %H" -1 HEAD) > expected &&
        test_cmp expected module-git/.git/cvs-revisions
 '
index 1ab76c4..3f5291b 100755 (executable)
@@ -134,7 +134,7 @@ test_expect_success 'clone --changesfile' '
        (
                cd "$git" &&
                git log --oneline p4/master >lines &&
-               test_line_count = 2 lines
+               test_line_count = 2 lines &&
                test_path_is_file file1 &&
                test_path_is_missing file2 &&
                test_path_is_file file3
index 8134ab4..cc53deb 100755 (executable)
@@ -161,7 +161,7 @@ test_expect_success 'cleanup after failure' '
 test_expect_success 'ktext expansion should not expand multi-line $File::' '
        (
                cd "$cli" &&
-               cat >lv.pm <<-\EOF
+               cat >lv.pm <<-\EOF &&
                my $wanted = sub { my $f = $File::Find::name;
                                    if ( -f && $f =~ /foo/ ) {
                EOF
index decb66b..602b0a5 100755 (executable)
@@ -133,7 +133,7 @@ test_expect_success 'export git tags to p4' '
                p4 labels ... | grep LIGHTWEIGHT_TAG &&
                p4 label -o GIT_TAG_1 | grep "tag created in git:xyzzy" &&
                p4 sync ...@GIT_TAG_1 &&
-               ! test -f main/f10
+               ! test -f main/f10 &&
                p4 sync ...@GIT_TAG_2 &&
                test -f main/f10
        )
index 37b42d0..eaf03a6 100755 (executable)
@@ -394,7 +394,7 @@ test_expect_success 'cleanup rename after submit cancel' '
        (
                cd "$cli" &&
                test_path_is_missing text2 &&
-               p4 fstat -T action text2 2>&1 | grep "no such file"
+               p4 fstat -T action text2 2>&1 | grep "no such file" &&
                test_path_is_file text &&
                ! p4 fstat -T action text
        )
index 3dc528b..2ad1b08 100755 (executable)
@@ -30,7 +30,7 @@ test_expect_success 'symlinked directory' '
        (
                cd "$cli" &&
                p4 sync &&
-               test -L some/sub/directory/subdir2
+               test -L some/sub/directory/subdir2 &&
                test_path_is_file some/sub/directory/subdir2/file.t
        )
 
index bbcf14c..be44c97 100755 (executable)
@@ -13,7 +13,7 @@ test_expect_success 'init depot' '
                cd "$cli" &&
                echo file1 >file1 &&
                p4 add file1 &&
-               p4 submit -d "change 1"
+               p4 submit -d "change 1" &&
                echo file2 >file2 &&
                p4 add file2 &&
                p4 submit -d "change 2"
index 3b3a7b6..5ff43b9 100755 (executable)
@@ -1103,7 +1103,7 @@ test_expect_success '__git_complete_refs - remote' '
        master-in-other Z
        EOF
        (
-               cur=
+               cur= &&
                __git_complete_refs --remote=other &&
                print_comp
        ) &&
@@ -1122,7 +1122,7 @@ test_expect_success '__git_complete_refs - track' '
        master-in-other Z
        EOF
        (
-               cur=
+               cur= &&
                __git_complete_refs --track &&
                print_comp
        ) &&
index c3b89ae..0444068 100755 (executable)
@@ -529,7 +529,7 @@ test_expect_success 'prompt - bash color pc mode - branch name' '
        printf "BEFORE: (${c_green}\${__git_ps1_branch_name}${c_clear}):AFTER\\nmaster" >expected &&
        (
                GIT_PS1_SHOWCOLORHINTS=y &&
-               __git_ps1 "BEFORE:" ":AFTER" >"$actual"
+               __git_ps1 "BEFORE:" ":AFTER" >"$actual" &&
                printf "%s\\n%s" "$PS1" "${__git_ps1_branch_name}" >"$actual"
        ) &&
        test_cmp expected "$actual"