t: fix whitespace around &&
PATCH 1/1 t: fix whitespace around &&
Add missing spaces before '&&' and switch tabs around '&&' to spaces.
These issues were found using git grep '[^ ]&&$' and git grep -P '&&\t'.
--- contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 2 +- contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 4 ++-- t/t1092-sparse-checkout-compatibility.sh | 2 +- t/t3920-crlf-messages.sh | 2 +- t/t4203-mailmap.sh | 2 +- t/t4205-log-pretty-formats.sh | 2 +- t/t7800-difftool.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-)
contrib/mw-to-git/t/t9360-mw-to-git-clone.sh +1 -1
@@ -86,7 +86,7 @@ test_expect_success 'Git clone works with page added' ' test_expect_success 'Git clone works with an edited page ' ' wiki_reset && wiki_editpage foo "this page will be edited" \ - false -s "first edition of page foo"&& + false -s "first edition of page foo" && wiki_editpage foo "this page has been edited and must be on the clone " true && git clone mediawiki::'"$WIKI_URL"' mw_dir_6 && test_path_is_file mw_dir_6/Foo.mw &&
contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh +2 -2
@@ -287,7 +287,7 @@ test_expect_success 'git push with \' ' git add \\ko\\o.mw && git commit -m " \\ko\\o added" && git push - )&& + ) && wiki_page_exist \\ko\\o && wiki_check_content mw_dir_18/\\ko\\o.mw \\ko\\o
@@ -311,7 +311,7 @@ test_expect_success 'git push with \ in format control' ' git add \\fo\\o.mw && git commit -m " \\fo\\o added" && git push - )&& + ) && wiki_page_exist \\fo\\o && wiki_check_content mw_dir_20/\\fo\\o.mw \\fo\\o
t/t1092-sparse-checkout-compatibility.sh +1 -1
@@ -268,7 +268,7 @@ test_expect_success 'diff with renames' ' for branch in rename-out-to-out rename-out-to-in rename-in-to-out do test_all_match git checkout rename-base && - test_all_match git checkout $branch -- .&& + test_all_match git checkout $branch -- . && test_all_match git diff --staged --no-renames && test_all_match git diff --staged --find-renames || return 1 done
t/t3920-crlf-messages.sh +1 -1
@@ -64,7 +64,7 @@ test_crlf_subject_body_and_contents() { while test -n "${atoms}" do set ${atoms} && atom=$1 && shift && atoms="$*" && - set ${files} && file=$1 && shift && files="$*" && + set ${files} && file=$1 && shift && files="$*" && test_expect_success "${command}: --format='%${atom}' works with messages using CRLF" " rm -f expect && for ref in ${LIB_CRLF_BRANCHES}
t/t4203-mailmap.sh +1 -1
@@ -959,7 +959,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' ' test_when_finished "rm .mailmap" && ln -s map .mailmap && git log -1 --format=%aE >actual && - echo "[email protected]" >expect&& + echo "[email protected]" >expect && test_cmp expect actual '
t/t4205-log-pretty-formats.sh +1 -1
@@ -988,7 +988,7 @@ test_expect_success '%(describe) vs git describe' ' test_expect_success '%(describe:match=...) vs git describe --match ...' ' test_when_finished "git tag -d tag-match" && - git tag -a -m tagged tag-match&& + git tag -a -m tagged tag-match && git describe --match "*-match" >expect && git log -1 --format="%(describe:match=*-match)" >actual && test_cmp expect actual
t/t7800-difftool.sh +1 -1
@@ -770,7 +770,7 @@ test_expect_success 'difftool --rotate-to' ' echo 4 >4 && git add 1 2 4 && git commit -a -m "124" && - git difftool --no-prompt --extcmd=cat --rotate-to="2" HEAD^ >output&& + git difftool --no-prompt --extcmd=cat --rotate-to="2" HEAD^ >output && cat >expect <<-\EOF && 2 4
Signature · 1 line
2.31.1
Quoted 4 lines · Andrei Rybak
Add missing spaces before '&&' and switch tabs around '&&' to spaces.
These issues were found using
git grep '[^ ]&&$'andgit grep -P '&&\t'.
Thanks for this mostly-obvious cleanup, especially for fixing the mistakes I made.
t/t3920-crlf-messages.sh test_crlf_subject_body_and_contents() { · line 67
Quoted 2 lines
t/t3920-crlf-messages.sh +1
-1- set ${files} && file=$1 && shift && files="$*" && + set ${files} && file=$1 && shift && files="$*" &&
This is the one that is not obvious, but it is because of an instance of "&&\t" in the middle of the line. Thanks for catching it!
-Stolee
Quoted 6 lines · Andrei Rybak
Add missing spaces before '&&' and switch tabs around '&&' to spaces.
These issues were found using
git grep '[^ ]&&$'andgit grep -P '&&\t'.Signed-off-by Andrei Rybak <[email protected]>
Quoted 9 lines
--- contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 2 +- contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh | 4 ++-- t/t1092-sparse-checkout-compatibility.sh | 2 +- t/t3920-crlf-messages.sh | 2 +- t/t4203-mailmap.sh | 2 +- t/t4205-log-pretty-formats.sh | 2 +- t/t7800-difftool.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-)
Looks trivially correct, all of them. Thanks.
Quoted 100 lines
contrib/mw-to-git/t/t9360-mw-to-git-clone.sh +1
-1@@ -86,7 +86,7 @@ test_expect_success 'Git clone works with page added' ' test_expect_success 'Git clone works with an edited page ' ' wiki_reset && wiki_editpage foo "this page will be edited" \ - false -s "first edition of page foo"&& + false -s "first edition of page foo" && wiki_editpage foo "this page has been edited and must be on the clone " true && git clone mediawiki::'"$WIKI_URL"' mw_dir_6 && test_path_is_file mw_dir_6/Foo.mw &&contrib/mw-to-git/t/t9362-mw-to-git-utf8.sh +2
-2@@ -287,7 +287,7 @@ test_expect_success 'git push with \' ' git add \\ko\\o.mw && git commit -m " \\ko\\o added" && git push - )&& + ) && wiki_page_exist \\ko\\o && wiki_check_content mw_dir_18/\\ko\\o.mw \\ko\\o@@ -311,7 +311,7 @@ test_expect_success 'git push with \ in format control' ' git add \\fo\\o.mw && git commit -m " \\fo\\o added" && git push - )&& + ) && wiki_page_exist \\fo\\o && wiki_check_content mw_dir_20/\\fo\\o.mw \\fo\\ot/t1092-sparse-checkout-compatibility.sh +1
-1@@ -268,7 +268,7 @@ test_expect_success 'diff with renames' ' for branch in rename-out-to-out rename-out-to-in rename-in-to-out do test_all_match git checkout rename-base && - test_all_match git checkout $branch -- .&& + test_all_match git checkout $branch -- . && test_all_match git diff --staged --no-renames && test_all_match git diff --staged --find-renames || return 1 donet/t3920-crlf-messages.sh +1
-1@@ -64,7 +64,7 @@ test_crlf_subject_body_and_contents() { while test -n "${atoms}" do set ${atoms} && atom=$1 && shift && atoms="$*" && - set ${files} && file=$1 && shift && files="$*" && + set ${files} && file=$1 && shift && files="$*" && test_expect_success "${command}: --format='%${atom}' works with messages using CRLF" " rm -f expect && for ref in ${LIB_CRLF_BRANCHES}t/t4203-mailmap.sh +1
-1@@ -959,7 +959,7 @@ test_expect_success SYMLINKS 'symlinks not respected in-tree' ' test_when_finished "rm .mailmap" && ln -s map .mailmap && git log -1 --format=%aE >actual && - echo "[email protected]" >expect&& + echo "[email protected]" >expect && test_cmp expect actual 't/t4205-log-pretty-formats.sh +1
-1@@ -988,7 +988,7 @@ test_expect_success '%(describe) vs git describe' ' test_expect_success '%(describe:match=...) vs git describe --match ...' ' test_when_finished "git tag -d tag-match" && - git tag -a -m tagged tag-match&& + git tag -a -m tagged tag-match && git describe --match "*-match" >expect && git log -1 --format="%(describe:match=*-match)" >actual && test_cmp expect actualt/t7800-difftool.sh +1
-1@@ -770,7 +770,7 @@ test_expect_success 'difftool --rotate-to' ' echo 4 >4 && git add 1 2 4 && git commit -a -m "124" && - git difftool --no-prompt --extcmd=cat --rotate-to="2" HEAD^ >output&& + git difftool --no-prompt --extcmd=cat --rotate-to="2" HEAD^ >output && cat >expect <<-\EOF && 2 4