{"thread":{"id":"24732","subject":"[PATCH 04/10] t/t9600-cvsimport.sh: change from skip_all=* to prereq skip","startedAt":"2010-08-13T20:40:03Z","lastAt":"2010-08-13T20:40:13Z","messageCount":11,"participants":["Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"148025","messageId":"1281732013-18284-1-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":null,"subject":"[PATCH 00/10] More test suite prerequisite cleanup","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:03Z","receivedAt":"2010-08-13T20:40:03Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"This series:\n\n  * Moves the FILEMODE prerequisite test to lib-prereq-FILEMODE.sh\n  * Continues the skip_all=* -> test prerequisite work. The patches to\n    t/t9001-send-email.sh are in three parts for easier reviewing.\n  * Adds a PERL prerequisite to tests that had an undeclared\n    dependency on Perl via the -p switch.\n\nThis should take care of all the low hanging fruit skip_all=* wise,\nwhat's left now either needs test-lib changes (the external tests), or\nis a bit more hairy like the SVN, CVS and HTTP tests.\n\nWith this series these are the files still using skip_all=*:\n    \n    $ ack -l skip_all= *sh\n    gitweb-lib.sh\n    lib-cvs.sh\n    lib-git-svn.sh\n    lib-httpd.sh\n    t0202-gettext-perl.sh\n    t1509-root-worktree.sh\n    t5540-http-push.sh\n    t5541-http-push.sh\n    t5550-http-fetch.sh\n    t5551-http-fetch.sh\n    t5561-http-backend.sh\n    t9119-git-svn-info.sh\n    t9200-git-cvsexportcommit.sh\n    t9400-git-cvsserver-server.sh\n    t9401-git-cvsserver-crlf.sh\n    t9700-perl-git.sh\n    test-lib.sh\n\nÆvar Arnfjörð Bjarmason (10):\n  tests: Move FILEMODE prerequisite to lib-prereq-FILEMODE.sh\n  t/t3701-add-interactive.sh: change from skip_all=* to prereq skip\n  lib-patch-mode tests: change from skip_all=* to prereq skip\n  t/t9600-cvsimport.sh: change from skip_all=* to prereq skip\n  t/t9001-send-email.sh: Remove needless PROG=* assignment\n  t/t9001-send-email.sh: change from skip_all=* to prereq skip\n  t/t9001-send-email.sh: convert setup code to tests\n  t/t7105-reset-patch.sh: Add a PERL prerequisite\n  t/t9601-cvsimport-vendor-branch.sh: Add a PERL prerequisite\n  t/t9602-cvsimport-branches-tags.sh: Add a PERL prerequisite\n\n t/lib-patch-mode.sh                |    5 -\n t/lib-prereq-FILEMODE.sh           |   11 ++\n t/t2016-checkout-patch.sh          |   28 +++---\n t/t3701-add-interactive.sh         |  112 ++++++++++++-------\n t/t3904-stash-patch.sh             |   10 +-\n t/t4102-apply-rename.sh            |    8 +--\n t/t4129-apply-samemode.sh          |    8 +--\n t/t6031-merge-recursive.sh         |    6 +-\n t/t7105-reset-patch.sh             |   16 ++--\n t/t9001-send-email.sh              |  209 +++++++++++++++++++++---------------\n t/t9200-git-cvsexportcommit.sh     |    6 +-\n t/t9600-cvsimport.sh               |   39 +++----\n t/t9601-cvsimport-vendor-branch.sh |   24 +++--\n t/t9602-cvsimport-branches-tags.sh |   28 +++---\n 14 files changed, 282 insertions(+), 228 deletions(-)\n create mode 100644 t/lib-prereq-FILEMODE.sh\n\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148030","messageId":"1281732013-18284-2-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 01/10] tests: Move FILEMODE prerequisite to lib-prereq-FILEMODE.sh","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:04Z","receivedAt":"2010-08-13T20:40:04Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change the five tests that were all checking \"git config --bool\ncore.filemode\" to use a new FILEMODE prerequisite in\nlib-prereq-FILEMODE.sh.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/lib-prereq-FILEMODE.sh       |   11 +++++++++++\n t/t3701-add-interactive.sh     |    8 +-------\n t/t4102-apply-rename.sh        |    8 +-------\n t/t4129-apply-samemode.sh      |    8 +-------\n t/t6031-merge-recursive.sh     |    6 +-----\n t/t9200-git-cvsexportcommit.sh |    6 +-----\n 6 files changed, 16 insertions(+), 31 deletions(-)\n create mode 100644 t/lib-prereq-FILEMODE.sh\n\ndiff --git a/t/lib-prereq-FILEMODE.sh b/t/lib-prereq-FILEMODE.sh\nnew file mode 100644\nindex 0000000..bce5a4c\n--- /dev/null\n+++ b/t/lib-prereq-FILEMODE.sh\n@@ -0,0 +1,11 @@\n+#!/bin/sh\n+#\n+# Copyright (c) 2010 Ævar Arnfjörð Bjarmason\n+#\n+\n+if test \"$(git config --bool core.filemode)\" = false\n+then\n+\tsay 'filemode disabled on the filesystem'\n+else\n+\ttest_set_prereq FILEMODE\n+fi\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex 7ad8465..75ec90b 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -2,6 +2,7 @@\n \n test_description='add -i basic tests'\n . ./test-lib.sh\n+. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n if ! test_have_prereq PERL; then\n \tskip_all='skipping git add -i tests, perl not available'\n@@ -152,13 +153,6 @@ test_expect_success 'skip files similarly as commit -a' '\n '\n rm -f .gitignore\n \n-if test \"$(git config --bool core.filemode)\" = false\n-then\n-\tsay '# skipping filemode tests (filesystem does not properly support modes)'\n-else\n-\ttest_set_prereq FILEMODE\n-fi\n-\n test_expect_success FILEMODE 'patch does not affect mode' '\n \tgit reset --hard &&\n \techo content >>file &&\ndiff --git a/t/t4102-apply-rename.sh b/t/t4102-apply-rename.sh\nindex 1597965..e3ea3d5 100755\n--- a/t/t4102-apply-rename.sh\n+++ b/t/t4102-apply-rename.sh\n@@ -7,6 +7,7 @@ test_description='git apply handling copy/rename patch.\n \n '\n . ./test-lib.sh\n+. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n # setup\n \n@@ -31,13 +32,6 @@ test_expect_success setup \\\n test_expect_success apply \\\n     'git apply --index --stat --summary --apply test-patch'\n \n-if test \"$(git config --bool core.filemode)\" = false\n-then\n-\tsay 'filemode disabled on the filesystem'\n-else\n-\ttest_set_prereq FILEMODE\n-fi\n-\n test_expect_success FILEMODE validate \\\n \t    'test -f bar && ls -l bar | grep \"^-..x......\"'\n \ndiff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh\nindex fc7af04..0d36ebd 100755\n--- a/t/t4129-apply-samemode.sh\n+++ b/t/t4129-apply-samemode.sh\n@@ -3,13 +3,7 @@\n test_description='applying patch with mode bits'\n \n . ./test-lib.sh\n-\n-if test \"$(git config --bool core.filemode)\" = false\n-then\n-\tsay 'filemode disabled on the filesystem'\n-else\n-\ttest_set_prereq FILEMODE\n-fi\n+. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n test_expect_success setup '\n \techo original >file &&\ndiff --git a/t/t6031-merge-recursive.sh b/t/t6031-merge-recursive.sh\nindex 8a3304f..66167e3 100755\n--- a/t/t6031-merge-recursive.sh\n+++ b/t/t6031-merge-recursive.sh\n@@ -2,11 +2,7 @@\n \n test_description='merge-recursive: handle file mode'\n . ./test-lib.sh\n-\n-if ! test \"$(git config --bool core.filemode)\" = false\n-then\n-\ttest_set_prereq FILEMODE\n-fi\n+. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n test_expect_success 'mode change in one branch: keep changed version' '\n \t: >file1 &&\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex ee39b36..e5da65b 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -5,6 +5,7 @@\n test_description='Test export of commits to CVS'\n \n . ./test-lib.sh\n+. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n if ! test_have_prereq PERL; then\n \tskip_all='skipping git cvsexportcommit tests, perl not available'\n@@ -229,11 +230,6 @@ test_expect_success \\\n       test_must_fail git cvsexportcommit -c $id\n       )'\n \n-if ! test \"$(git config --bool core.filemode)\" = false\n-then\n-\ttest_set_prereq FILEMODE\n-fi\n-\n test_expect_success FILEMODE \\\n      'Retain execute bit' \\\n      'mkdir G &&\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148027","messageId":"1281732013-18284-3-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 02/10] t/t3701-add-interactive.sh: change from skip_all=* to prereq skip","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:05Z","receivedAt":"2010-08-13T20:40:05Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change this test to skip test with test prerequisites, and to do setup\nwork in tests. This improves the skipped statistics on platforms where\nthe test isn't run.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t3701-add-interactive.sh |  104 +++++++++++++++++++++++++++++--------------\n 1 files changed, 70 insertions(+), 34 deletions(-)\n\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex 75ec90b..d6327e7 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -4,21 +4,18 @@ test_description='add -i basic tests'\n . ./test-lib.sh\n . \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n-if ! test_have_prereq PERL; then\n-\tskip_all='skipping git add -i tests, perl not available'\n-\ttest_done\n-fi\n-\n-test_expect_success 'setup (initial)' '\n+test_expect_success PERL 'setup (initial)' '\n \techo content >file &&\n \tgit add file &&\n \techo more >>file &&\n \techo lines >>file\n '\n-test_expect_success 'status works (initial)' '\n+test_expect_success PERL 'status works (initial)' '\n \tgit add -i </dev/null >output &&\n \tgrep \"+1/-0 *+2/-0 file\" output\n '\n+\n+test_expect_success PERL 'setup expected' '\n cat >expected <<EOF\n new file mode 100644\n index 0000000..d95f3ad\n@@ -27,19 +24,21 @@ index 0000000..d95f3ad\n @@ -0,0 +1 @@\n +content\n EOF\n-test_expect_success 'diff works (initial)' '\n+'\n+\n+test_expect_success PERL 'diff works (initial)' '\n \t(echo d; echo 1) | git add -i >output &&\n \tsed -ne \"/new file/,/content/p\" <output >diff &&\n \ttest_cmp expected diff\n '\n-test_expect_success 'revert works (initial)' '\n+test_expect_success PERL 'revert works (initial)' '\n \tgit add file &&\n \t(echo r; echo 1) | git add -i &&\n \tgit ls-files >output &&\n \t! grep . output\n '\n \n-test_expect_success 'setup (commit)' '\n+test_expect_success PERL 'setup (commit)' '\n \techo baseline >file &&\n \tgit add file &&\n \tgit commit -m commit &&\n@@ -48,10 +47,12 @@ test_expect_success 'setup (commit)' '\n \techo more >>file &&\n \techo lines >>file\n '\n-test_expect_success 'status works (commit)' '\n+test_expect_success PERL 'status works (commit)' '\n \tgit add -i </dev/null >output &&\n \tgrep \"+1/-0 *+2/-0 file\" output\n '\n+\n+test_expect_success PERL 'setup expected' '\n cat >expected <<EOF\n index 180b47c..b6f2c08 100644\n --- a/file\n@@ -60,60 +61,79 @@ index 180b47c..b6f2c08 100644\n  baseline\n +content\n EOF\n-test_expect_success 'diff works (commit)' '\n+'\n+\n+test_expect_success PERL 'diff works (commit)' '\n \t(echo d; echo 1) | git add -i >output &&\n \tsed -ne \"/^index/,/content/p\" <output >diff &&\n \ttest_cmp expected diff\n '\n-test_expect_success 'revert works (commit)' '\n+test_expect_success PERL 'revert works (commit)' '\n \tgit add file &&\n \t(echo r; echo 1) | git add -i &&\n \tgit add -i </dev/null >output &&\n \tgrep \"unchanged *+3/-0 file\" output\n '\n \n+\n+test_expect_success PERL 'setup expected' '\n cat >expected <<EOF\n EOF\n-cat >fake_editor.sh <<EOF\n-EOF\n-chmod a+x fake_editor.sh\n-test_set_editor \"$(pwd)/fake_editor.sh\"\n-test_expect_success 'dummy edit works' '\n+'\n+\n+test_expect_success PERL 'setup fake editor' '\n+\tcat >fake_editor.sh <<EOF\n+\tEOF\n+\tchmod a+x fake_editor.sh &&\n+\ttest_set_editor \"$(pwd)/fake_editor.sh\" &&\n+'\n+\n+test_expect_success PERL 'dummy edit works' '\n \t(echo e; echo a) | git add -p &&\n \tgit diff > diff &&\n \ttest_cmp expected diff\n '\n \n+test_expect_success PERL 'setup patch' '\n cat >patch <<EOF\n @@ -1,1 +1,4 @@\n  this\n +patch\n--doesn't\n+-does not\n  apply\n EOF\n-echo \"#!$SHELL_PATH\" >fake_editor.sh\n-cat >>fake_editor.sh <<\\EOF\n+'\n+\n+test_expect_success PERL 'setup fake editor' '\n+\techo \"#!$SHELL_PATH\" >fake_editor.sh &&\n+\tcat >>fake_editor.sh <<\\EOF &&\n mv -f \"$1\" oldpatch &&\n mv -f patch \"$1\"\n EOF\n-chmod a+x fake_editor.sh\n-test_set_editor \"$(pwd)/fake_editor.sh\"\n-test_expect_success 'bad edit rejected' '\n+\tchmod a+x fake_editor.sh &&\n+\ttest_set_editor \"$(pwd)/fake_editor.sh\"\n+'\n+\n+test_expect_success PERL 'bad edit rejected' '\n \tgit reset &&\n \t(echo e; echo n; echo d) | git add -p >output &&\n \tgrep \"hunk does not apply\" output\n '\n \n+test_expect_success PERL 'setup patch' '\n cat >patch <<EOF\n this patch\n is garbage\n EOF\n-test_expect_success 'garbage edit rejected' '\n+'\n+\n+test_expect_success PERL 'garbage edit rejected' '\n \tgit reset &&\n \t(echo e; echo n; echo d) | git add -p >output &&\n \tgrep \"hunk does not apply\" output\n '\n \n+test_expect_success PERL 'setup patch' '\n cat >patch <<EOF\n @@ -1,0 +1,0 @@\n  baseline\n@@ -121,6 +141,9 @@ cat >patch <<EOF\n +newcontent\n +lines\n EOF\n+'\n+\n+test_expect_success PERL 'setup expected' '\n cat >expected <<EOF\n diff --git a/file b/file\n index b5dd6c9..f910ae9 100644\n@@ -133,13 +156,15 @@ index b5dd6c9..f910ae9 100644\n +more\n  lines\n EOF\n-test_expect_success 'real edit works' '\n+'\n+\n+test_expect_success PERL 'real edit works' '\n \t(echo e; echo n; echo d) | git add -p &&\n \tgit diff >output &&\n \ttest_cmp expected output\n '\n \n-test_expect_success 'skip files similarly as commit -a' '\n+test_expect_success PERL 'skip files similarly as commit -a' '\n \tgit reset &&\n \techo file >.gitignore &&\n \techo changed >file &&\n@@ -153,7 +178,7 @@ test_expect_success 'skip files similarly as commit -a' '\n '\n rm -f .gitignore\n \n-test_expect_success FILEMODE 'patch does not affect mode' '\n+test_expect_success PERL,FILEMODE 'patch does not affect mode' '\n \tgit reset --hard &&\n \techo content >>file &&\n \tchmod +x file &&\n@@ -162,7 +187,7 @@ test_expect_success FILEMODE 'patch does not affect mode' '\n \tgit diff file | grep \"new mode\"\n '\n \n-test_expect_success FILEMODE 'stage mode but not hunk' '\n+test_expect_success PERL,FILEMODE 'stage mode but not hunk' '\n \tgit reset --hard &&\n \techo content >>file &&\n \tchmod +x file &&\n@@ -172,7 +197,7 @@ test_expect_success FILEMODE 'stage mode but not hunk' '\n '\n \n \n-test_expect_success FILEMODE 'stage mode and hunk' '\n+test_expect_success PERL,FILEMODE 'stage mode and hunk' '\n \tgit reset --hard &&\n \techo content >>file &&\n \tchmod +x file &&\n@@ -184,13 +209,14 @@ test_expect_success FILEMODE 'stage mode and hunk' '\n \n # end of tests disabled when filemode is not usable\n \n-test_expect_success 'setup again' '\n+test_expect_success PERL 'setup again' '\n \tgit reset --hard &&\n \ttest_chmod +x file &&\n \techo content >>file\n '\n \n # Write the patch file with a new line at the top and bottom\n+test_expect_success PERL 'setup patch' '\n cat >patch <<EOF\n index 180b47c..b6f2c08 100644\n --- a/file\n@@ -201,7 +227,10 @@ index 180b47c..b6f2c08 100644\n  content\n +lastline\n EOF\n+'\n+\n # Expected output, similar to the patch but w/ diff at the top\n+test_expect_success PERL 'setup expected' '\n cat >expected <<EOF\n diff --git a/file b/file\n index b6f2c08..61b9053 100755\n@@ -213,8 +242,10 @@ index b6f2c08..61b9053 100755\n  content\n +lastline\n EOF\n+'\n+\n # Test splitting the first patch, then adding both\n-test_expect_success 'add first line works' '\n+test_expect_success PERL 'add first line works' '\n \tgit commit -am \"clear local changes\" &&\n \tgit apply patch &&\n \t(echo s; echo y; echo y) | git add -p file &&\n@@ -222,6 +253,7 @@ test_expect_success 'add first line works' '\n \ttest_cmp expected diff\n '\n \n+test_expect_success PERL 'setup expected' '\n cat >expected <<EOF\n diff --git a/non-empty b/non-empty\n deleted file mode 100644\n@@ -231,7 +263,9 @@ index d95f3ad..0000000\n @@ -1 +0,0 @@\n -content\n EOF\n-test_expect_success 'deleting a non-empty file' '\n+'\n+\n+test_expect_success PERL 'deleting a non-empty file' '\n \tgit reset --hard &&\n \techo content >non-empty &&\n \tgit add non-empty &&\n@@ -242,13 +276,15 @@ test_expect_success 'deleting a non-empty file' '\n \ttest_cmp expected diff\n '\n \n+test_expect_success PERL 'setup expected' '\n cat >expected <<EOF\n diff --git a/empty b/empty\n deleted file mode 100644\n index e69de29..0000000\n EOF\n+'\n \n-test_expect_success 'deleting an empty file' '\n+test_expect_success PERL 'deleting an empty file' '\n \tgit reset --hard &&\n \t> empty &&\n \tgit add empty &&\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148028","messageId":"1281732013-18284-4-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 03/10] lib-patch-mode tests: change from skip_all=* to prereq skip","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:06Z","receivedAt":"2010-08-13T20:40:06Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change this test to skip test with test prerequisites, and to do setup\nwork in tests. This improves the skipped statistics on platforms where\nthe test isn't run.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/lib-patch-mode.sh       |    5 -----\n t/t2016-checkout-patch.sh |   28 ++++++++++++++--------------\n t/t3904-stash-patch.sh    |   10 +++++-----\n t/t7105-reset-patch.sh    |    8 ++++----\n 4 files changed, 23 insertions(+), 28 deletions(-)\n\ndiff --git a/t/lib-patch-mode.sh b/t/lib-patch-mode.sh\nindex 375e248..06c3c91 100644\n--- a/t/lib-patch-mode.sh\n+++ b/t/lib-patch-mode.sh\n@@ -2,11 +2,6 @@\n \n . ./test-lib.sh\n \n-if ! test_have_prereq PERL; then\n-\tskip_all='skipping --patch tests, perl not available'\n-\ttest_done\n-fi\n-\n set_state () {\n \techo \"$3\" > \"$1\" &&\n \tgit add \"$1\" &&\ndiff --git a/t/t2016-checkout-patch.sh b/t/t2016-checkout-patch.sh\nindex 2144184..7657ec1 100755\n--- a/t/t2016-checkout-patch.sh\n+++ b/t/t2016-checkout-patch.sh\n@@ -4,7 +4,7 @@ test_description='git checkout --patch'\n \n . ./lib-patch-mode.sh\n \n-test_expect_success 'setup' '\n+test_expect_success PERL 'setup' '\n \tmkdir dir &&\n \techo parent > dir/foo &&\n \techo dummy > bar &&\n@@ -18,40 +18,40 @@ test_expect_success 'setup' '\n \n # note: bar sorts before dir/foo, so the first 'n' is always to skip 'bar'\n \n-test_expect_success 'saying \"n\" does nothing' '\n+test_expect_success PERL 'saying \"n\" does nothing' '\n \tset_and_save_state dir/foo work head &&\n \t(echo n; echo n) | git checkout -p &&\n \tverify_saved_state bar &&\n \tverify_saved_state dir/foo\n '\n \n-test_expect_success 'git checkout -p' '\n+test_expect_success PERL 'git checkout -p' '\n \t(echo n; echo y) | git checkout -p &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n-test_expect_success 'git checkout -p with staged changes' '\n+test_expect_success PERL 'git checkout -p with staged changes' '\n \tset_state dir/foo work index\n \t(echo n; echo y) | git checkout -p &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo index index\n '\n \n-test_expect_success 'git checkout -p HEAD with NO staged changes: abort' '\n+test_expect_success PERL 'git checkout -p HEAD with NO staged changes: abort' '\n \tset_and_save_state dir/foo work head &&\n \t(echo n; echo y; echo n) | git checkout -p HEAD &&\n \tverify_saved_state bar &&\n \tverify_saved_state dir/foo\n '\n \n-test_expect_success 'git checkout -p HEAD with NO staged changes: apply' '\n+test_expect_success PERL 'git checkout -p HEAD with NO staged changes: apply' '\n \t(echo n; echo y; echo y) | git checkout -p HEAD &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n-test_expect_success 'git checkout -p HEAD with change already staged' '\n+test_expect_success PERL 'git checkout -p HEAD with change already staged' '\n \tset_state dir/foo index index\n \t# the third n is to get out in case it mistakenly does not apply\n \t(echo n; echo y; echo n) | git checkout -p HEAD &&\n@@ -59,14 +59,14 @@ test_expect_success 'git checkout -p HEAD with change already staged' '\n \tverify_state dir/foo head head\n '\n \n-test_expect_success 'git checkout -p HEAD^' '\n+test_expect_success PERL 'git checkout -p HEAD^' '\n \t# the third n is to get out in case it mistakenly does not apply\n \t(echo n; echo y; echo n) | git checkout -p HEAD^ &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo parent parent\n '\n \n-test_expect_success 'git checkout -p handles deletion' '\n+test_expect_success PERL 'git checkout -p handles deletion' '\n \tset_state dir/foo work index &&\n \trm dir/foo &&\n \t(echo n; echo y) | git checkout -p &&\n@@ -79,28 +79,28 @@ test_expect_success 'git checkout -p handles deletion' '\n # dir/foo.  There's always an extra 'n' to reject edits to dir/foo in\n # the failure case (and thus get out of the loop).\n \n-test_expect_success 'path limiting works: dir' '\n+test_expect_success PERL 'path limiting works: dir' '\n \tset_state dir/foo work head &&\n \t(echo y; echo n) | git checkout -p dir &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n-test_expect_success 'path limiting works: -- dir' '\n+test_expect_success PERL 'path limiting works: -- dir' '\n \tset_state dir/foo work head &&\n \t(echo y; echo n) | git checkout -p -- dir &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo head head\n '\n \n-test_expect_success 'path limiting works: HEAD^ -- dir' '\n+test_expect_success PERL 'path limiting works: HEAD^ -- dir' '\n \t# the third n is to get out in case it mistakenly does not apply\n \t(echo y; echo n; echo n) | git checkout -p HEAD^ -- dir &&\n \tverify_saved_state bar &&\n \tverify_state dir/foo parent parent\n '\n \n-test_expect_success 'path limiting works: foo inside dir' '\n+test_expect_success PERL 'path limiting works: foo inside dir' '\n \tset_state dir/foo work head &&\n \t# the third n is to get out in case it mistakenly does not apply\n \t(echo y; echo n; echo n) | (cd dir && git checkout -p foo) &&\n@@ -108,7 +108,7 @@ test_expect_success 'path limiting works: foo inside dir' '\n \tverify_state dir/foo head head\n '\n \n-test_expect_success 'none of this moved HEAD' '\n+test_expect_success PERL 'none of this moved HEAD' '\n \tverify_saved_head\n '\n \ndiff --git a/t/t3904-stash-patch.sh b/t/t3904-stash-patch.sh\nindex f37e3bc..d1819ca 100755\n--- a/t/t3904-stash-patch.sh\n+++ b/t/t3904-stash-patch.sh\n@@ -3,7 +3,7 @@\n test_description='git checkout --patch'\n . ./lib-patch-mode.sh\n \n-test_expect_success 'setup' '\n+test_expect_success PERL 'setup' '\n \tmkdir dir &&\n \techo parent > dir/foo &&\n \techo dummy > bar &&\n@@ -19,14 +19,14 @@ test_expect_success 'setup' '\n \n # note: bar sorts before dir, so the first 'n' is always to skip 'bar'\n \n-test_expect_success 'saying \"n\" does nothing' '\n+test_expect_success PERL 'saying \"n\" does nothing' '\n \tset_state dir/foo work index\n \t(echo n; echo n) | test_must_fail git stash save -p &&\n \tverify_state dir/foo work index &&\n \tverify_saved_state bar\n '\n \n-test_expect_success 'git stash -p' '\n+test_expect_success PERL 'git stash -p' '\n \t(echo n; echo y) | git stash save -p &&\n \tverify_state dir/foo head index &&\n \tverify_saved_state bar &&\n@@ -36,7 +36,7 @@ test_expect_success 'git stash -p' '\n \tverify_state bar dummy dummy\n '\n \n-test_expect_success 'git stash -p --no-keep-index' '\n+test_expect_success PERL 'git stash -p --no-keep-index' '\n \tset_state dir/foo work index &&\n \tset_state bar bar_work bar_index &&\n \t(echo n; echo y) | git stash save -p --no-keep-index &&\n@@ -48,7 +48,7 @@ test_expect_success 'git stash -p --no-keep-index' '\n \tverify_state bar dummy bar_index\n '\n \n-test_expect_success 'none of this moved HEAD' '\n+test_expect_success PERL 'none of this moved HEAD' '\n \tverify_saved_head\n '\n \ndiff --git a/t/t7105-reset-patch.sh b/t/t7105-reset-patch.sh\nindex c1f4fc3..4b629f7 100755\n--- a/t/t7105-reset-patch.sh\n+++ b/t/t7105-reset-patch.sh\n@@ -41,27 +41,27 @@ test_expect_success 'git reset -p HEAD^' '\n # dir/foo.  There's always an extra 'n' to reject edits to dir/foo in\n # the failure case (and thus get out of the loop).\n \n-test_expect_success 'git reset -p dir' '\n+test_expect_success PERL 'git reset -p dir' '\n \tset_state dir/foo work work\n \t(echo y; echo n) | git reset -p dir &&\n \tverify_state dir/foo work head &&\n \tverify_saved_state bar\n '\n \n-test_expect_success 'git reset -p -- foo (inside dir)' '\n+test_expect_success PERL 'git reset -p -- foo (inside dir)' '\n \tset_state dir/foo work work\n \t(echo y; echo n) | (cd dir && git reset -p -- foo) &&\n \tverify_state dir/foo work head &&\n \tverify_saved_state bar\n '\n \n-test_expect_success 'git reset -p HEAD^ -- dir' '\n+test_expect_success PERL 'git reset -p HEAD^ -- dir' '\n \t(echo y; echo n) | git reset -p HEAD^ -- dir &&\n \tverify_state dir/foo work parent &&\n \tverify_saved_state bar\n '\n \n-test_expect_success 'none of this moved HEAD' '\n+test_expect_success PERL 'none of this moved HEAD' '\n \tverify_saved_head\n '\n \n-- \n1.7.2.1.338.gf2379\n"},{"id":"148021","messageId":"1281732013-18284-5-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 04/10] t/t9600-cvsimport.sh: change from skip_all=* to prereq skip","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:07Z","receivedAt":"2010-08-13T20:40:07Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change this test to skip test with test prerequisites, and to do setup\nwork in tests. This improves the skipped statistics on platforms where\nthe test isn't run.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t9600-cvsimport.sh |   39 ++++++++++++++++++---------------------\n 1 files changed, 18 insertions(+), 21 deletions(-)\n\ndiff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh\nindex 2eff9cd..559ce41 100755\n--- a/t/t9600-cvsimport.sh\n+++ b/t/t9600-cvsimport.sh\n@@ -3,17 +3,14 @@\n test_description='git cvsimport basic tests'\n . ./lib-cvs.sh\n \n-if ! test_have_prereq PERL; then\n-\tskip_all='skipping git cvsimport tests, perl not available'\n-\ttest_done\n-fi\n-\n-CVSROOT=$(pwd)/cvsroot\n-export CVSROOT\n+test_expect_success PERL 'setup cvsroot environment' '\n+\tCVSROOT=$(pwd)/cvsroot &&\n+\texport CVSROOT\n+'\n \n-test_expect_success 'setup cvsroot' '$CVS init'\n+test_expect_success PERL 'setup cvsroot' '$CVS init'\n \n-test_expect_success 'setup a cvs module' '\n+test_expect_success PERL 'setup a cvs module' '\n \n \tmkdir \"$CVSROOT/module\" &&\n \t$CVS co -d module-cvs module &&\n@@ -45,23 +42,23 @@ EOF\n \tcd ..\n '\n \n-test_expect_success 'import a trivial module' '\n+test_expect_success PERL 'import a trivial module' '\n \n \tgit cvsimport -a -R -z 0 -C module-git module &&\n \ttest_cmp module-cvs/o_fortuna module-git/o_fortuna\n \n '\n \n-test_expect_success 'pack refs' 'cd module-git && git gc && cd ..'\n+test_expect_success PERL 'pack refs' 'cd module-git && git gc && cd ..'\n \n-test_expect_success 'initial import has correct .git/cvs-revisions' '\n+test_expect_success PERL 'initial import has correct .git/cvs-revisions' '\n \n \t(cd module-git &&\n \t git log --format=\"o_fortuna 1.1 %H\" -1) > expected &&\n \ttest_cmp expected module-git/.git/cvs-revisions\n '\n \n-test_expect_success 'update cvs module' '\n+test_expect_success PERL 'update cvs module' '\n \n \tcd module-cvs &&\n \tcat <<EOF >o_fortuna &&\n@@ -90,7 +87,7 @@ EOF\n \tcd ..\n '\n \n-test_expect_success 'update git module' '\n+test_expect_success PERL 'update git module' '\n \n \tcd module-git &&\n \tgit cvsimport -a -R -z 0 module &&\n@@ -100,7 +97,7 @@ test_expect_success 'update git module' '\n \n '\n \n-test_expect_success 'update has correct .git/cvs-revisions' '\n+test_expect_success PERL 'update has correct .git/cvs-revisions' '\n \n \t(cd module-git &&\n \t git log --format=\"o_fortuna 1.1 %H\" -1 HEAD^ &&\n@@ -108,7 +105,7 @@ test_expect_success 'update has correct .git/cvs-revisions' '\n \ttest_cmp expected module-git/.git/cvs-revisions\n '\n \n-test_expect_success 'update cvs module' '\n+test_expect_success PERL 'update cvs module' '\n \n \tcd module-cvs &&\n \t\techo 1 >tick &&\n@@ -118,7 +115,7 @@ test_expect_success 'update cvs module' '\n \n '\n \n-test_expect_success 'cvsimport.module config works' '\n+test_expect_success PERL 'cvsimport.module config works' '\n \n \tcd module-git &&\n \t\tgit config cvsimport.module module &&\n@@ -129,7 +126,7 @@ test_expect_success 'cvsimport.module config works' '\n \n '\n \n-test_expect_success 'second update has correct .git/cvs-revisions' '\n+test_expect_success PERL 'second update has correct .git/cvs-revisions' '\n \n \t(cd module-git &&\n \t git log --format=\"o_fortuna 1.1 %H\" -1 HEAD^^ &&\n@@ -138,7 +135,7 @@ test_expect_success 'second update has correct .git/cvs-revisions' '\n \ttest_cmp expected module-git/.git/cvs-revisions\n '\n \n-test_expect_success 'import from a CVS working tree' '\n+test_expect_success PERL 'import from a CVS working tree' '\n \n \t$CVS co -d import-from-wt module &&\n \tcd import-from-wt &&\n@@ -150,12 +147,12 @@ test_expect_success 'import from a CVS working tree' '\n \n '\n \n-test_expect_success 'no .git/cvs-revisions created by default' '\n+test_expect_success PERL 'no .git/cvs-revisions created by default' '\n \n \t! test -e import-from-wt/.git/cvs-revisions\n \n '\n \n-test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'\n+test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'\n \n test_done\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148026","messageId":"1281732013-18284-6-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 05/10] t/t9001-send-email.sh: Remove needless PROG=* assignment","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:08Z","receivedAt":"2010-08-13T20:40:08Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove the PROG=* assignment from t9001-send-email.sh. It's been there\nsince v1.4.0-rc1~30 when the test was originally added, but only tests\nthat source annotate-tests.sh need it, it was seemingly introduced to\nthis test via copy/paste coding.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t9001-send-email.sh |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 23597cc..6525d1d 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -8,7 +8,6 @@ if ! test_have_prereq PERL; then\n \ttest_done\n fi\n \n-PROG='git send-email'\n test_expect_success \\\n     'prepare reference tree' \\\n     'echo \"1A quick brown fox jumps over the\" >file &&\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148022","messageId":"1281732013-18284-7-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 06/10] t/t9001-send-email.sh: change from skip_all=* to prereq skip","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:09Z","receivedAt":"2010-08-13T20:40:09Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change this test to skip test with test prerequisites, and to do setup\nwork in tests. This improves the skipped statistics on platforms where\nthe test isn't run.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t9001-send-email.sh |  165 +++++++++++++++++++++++++------------------------\n 1 files changed, 83 insertions(+), 82 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 6525d1d..bd17d31 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -3,19 +3,17 @@\n test_description='git send-email'\n . ./test-lib.sh\n \n-if ! test_have_prereq PERL; then\n-\tskip_all='skipping git send-email tests, perl not available'\n-\ttest_done\n-fi\n+# May be altered later in the test\n+PREREQ=\"PERL\"\n \n-test_expect_success \\\n+test_expect_success $PREREQ \\\n     'prepare reference tree' \\\n     'echo \"1A quick brown fox jumps over the\" >file &&\n      echo \"lazy dog\" >>file &&\n      git add file &&\n      GIT_AUTHOR_NAME=\"A\" git commit -a -m \"Initial.\"'\n \n-test_expect_success \\\n+test_expect_success $PREREQ \\\n     'Setup helper tool' \\\n     '(echo \"#!$SHELL_PATH\"\n       echo shift\n@@ -35,7 +33,7 @@ clean_fake_sendmail() {\n \trm -f commandline* msgtxt*\n }\n \n-test_expect_success 'Extract patches' '\n+test_expect_success $PREREQ 'Extract patches' '\n     patches=`git format-patch -s --cc=\"One <one@example.com>\" --cc=two@example.com -n HEAD^1`\n '\n \n@@ -56,31 +54,34 @@ test_no_confirm () {\n \n # Exit immediately to prevent hang if a no-confirm test fails\n check_no_confirm () {\n-\ttest -f no_confirm_okay || {\n-\t\tskip_all='confirm test failed; skipping remaining tests to prevent hanging'\n-\t\ttest_done\n-\t}\n+\tif ! test -f no_confirm_okay\n+\tthen\n+\t\tsay 'confirm test failed; skipping remaining tests to prevent hanging'\n+\t\tPREREQ=\"$PREREQ,CHECK_NO_CONFIRM\"\n+\tfi\n+\treturn 0\n }\n \n-test_expect_success 'No confirm with --suppress-cc' '\n-\ttest_no_confirm --suppress-cc=sob\n+test_expect_success $PREREQ 'No confirm with --suppress-cc' '\n+\ttest_no_confirm --suppress-cc=sob &&\n+\tcheck_no_confirm\n '\n-check_no_confirm\n \n-test_expect_success 'No confirm with --confirm=never' '\n-\ttest_no_confirm --confirm=never\n+\n+test_expect_success $PREREQ 'No confirm with --confirm=never' '\n+\ttest_no_confirm --confirm=never &&\n+\tcheck_no_confirm\n '\n-check_no_confirm\n \n # leave sendemail.confirm set to never after this so that none of the\n # remaining tests prompt unintentionally.\n-test_expect_success 'No confirm with sendemail.confirm=never' '\n+test_expect_success $PREREQ 'No confirm with sendemail.confirm=never' '\n \tgit config sendemail.confirm never &&\n-\ttest_no_confirm --compose --subject=foo\n+\ttest_no_confirm --compose --subject=foo &&\n+\tcheck_no_confirm\n '\n-check_no_confirm\n \n-test_expect_success 'Send patches' '\n+test_expect_success $PREREQ 'Send patches' '\n      git send-email --suppress-cc=sob --from=\"Example <nobody@example.com>\" --to=nobody@example.com --smtp-server=\"$(pwd)/fake.sendmail\" $patches 2>errors\n '\n \n@@ -90,11 +91,11 @@ cat >expected <<\\EOF\n !one@example.com!\n !two@example.com!\n EOF\n-test_expect_success \\\n+test_expect_success $PREREQ \\\n     'Verify commandline' \\\n     'test_cmp expected commandline1'\n \n-test_expect_success 'Send patches with --envelope-sender' '\n+test_expect_success $PREREQ 'Send patches with --envelope-sender' '\n     clean_fake_sendmail &&\n      git send-email --envelope-sender=\"Patch Contributer <patch@example.com>\" --suppress-cc=sob --from=\"Example <nobody@example.com>\" --to=nobody@example.com --smtp-server=\"$(pwd)/fake.sendmail\" $patches 2>errors\n '\n@@ -107,11 +108,11 @@ cat >expected <<\\EOF\n !one@example.com!\n !two@example.com!\n EOF\n-test_expect_success \\\n+test_expect_success $PREREQ \\\n     'Verify commandline' \\\n     'test_cmp expected commandline1'\n \n-test_expect_success 'Send patches with --envelope-sender=auto' '\n+test_expect_success $PREREQ 'Send patches with --envelope-sender=auto' '\n     clean_fake_sendmail &&\n      git send-email --envelope-sender=auto --suppress-cc=sob --from=\"Example <nobody@example.com>\" --to=nobody@example.com --smtp-server=\"$(pwd)/fake.sendmail\" $patches 2>errors\n '\n@@ -124,7 +125,7 @@ cat >expected <<\\EOF\n !one@example.com!\n !two@example.com!\n EOF\n-test_expect_success \\\n+test_expect_success $PREREQ \\\n     'Verify commandline' \\\n     'test_cmp expected commandline1'\n \n@@ -158,7 +159,7 @@ References: <unique-message-id@example.com>\n Result: OK\n EOF\n \n-test_expect_success 'Show all headers' '\n+test_expect_success $PREREQ 'Show all headers' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--suppress-cc=sob \\\n@@ -176,7 +177,7 @@ test_expect_success 'Show all headers' '\n \ttest_cmp expected-show-all-headers actual-show-all-headers\n '\n \n-test_expect_success 'Prompting works' '\n+test_expect_success $PREREQ 'Prompting works' '\n \tclean_fake_sendmail &&\n \t(echo \"Example <from@example.com>\"\n \t echo \"to@example.com\"\n@@ -189,7 +190,7 @@ test_expect_success 'Prompting works' '\n \t\tgrep \"^To: to@example.com\\$\" msgtxt1\n '\n \n-test_expect_success 'cccmd works' '\n+test_expect_success $PREREQ 'cccmd works' '\n \tclean_fake_sendmail &&\n \tcp $patches cccmd.patch &&\n \techo cccmd--cccmd@example.com >>cccmd.patch &&\n@@ -211,7 +212,7 @@ test_expect_success 'cccmd works' '\n z8=zzzzzzzz\n z64=$z8$z8$z8$z8$z8$z8$z8$z8\n z512=$z64$z64$z64$z64$z64$z64$z64$z64\n-test_expect_success 'reject long lines' '\n+test_expect_success $PREREQ 'reject long lines' '\n \tclean_fake_sendmail &&\n \tcp $patches longline.patch &&\n \techo $z512$z512 >>longline.patch &&\n@@ -224,11 +225,11 @@ test_expect_success 'reject long lines' '\n \tgrep longline.patch errors\n '\n \n-test_expect_success 'no patch was sent' '\n+test_expect_success $PREREQ 'no patch was sent' '\n \t! test -e commandline1\n '\n \n-test_expect_success 'Author From: in message body' '\n+test_expect_success $PREREQ 'Author From: in message body' '\n \tclean_fake_sendmail &&\n \tgit send-email \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -239,7 +240,7 @@ test_expect_success 'Author From: in message body' '\n \tgrep \"From: A <author@example.com>\" msgbody1\n '\n \n-test_expect_success 'Author From: not in message body' '\n+test_expect_success $PREREQ 'Author From: not in message body' '\n \tclean_fake_sendmail &&\n \tgit send-email \\\n \t\t--from=\"A <author@example.com>\" \\\n@@ -250,7 +251,7 @@ test_expect_success 'Author From: not in message body' '\n \t! grep \"From: A <author@example.com>\" msgbody1\n '\n \n-test_expect_success 'allow long lines with --no-validate' '\n+test_expect_success $PREREQ 'allow long lines with --no-validate' '\n \tgit send-email \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n \t\t--to=nobody@example.com \\\n@@ -260,7 +261,7 @@ test_expect_success 'allow long lines with --no-validate' '\n \t\t2>errors\n '\n \n-test_expect_success 'Invalid In-Reply-To' '\n+test_expect_success $PREREQ 'Invalid In-Reply-To' '\n \tclean_fake_sendmail &&\n \tgit send-email \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -272,7 +273,7 @@ test_expect_success 'Invalid In-Reply-To' '\n \t! grep \"^In-Reply-To: < *>\" msgtxt1\n '\n \n-test_expect_success 'Valid In-Reply-To when prompting' '\n+test_expect_success $PREREQ 'Valid In-Reply-To when prompting' '\n \tclean_fake_sendmail &&\n \t(echo \"From Example <from@example.com>\"\n \t echo \"To Example <to@example.com>\"\n@@ -283,7 +284,7 @@ test_expect_success 'Valid In-Reply-To when prompting' '\n \t! grep \"^In-Reply-To: < *>\" msgtxt1\n '\n \n-test_expect_success 'setup fake editor' '\n+test_expect_success $PREREQ 'setup fake editor' '\n \t(echo \"#!$SHELL_PATH\" &&\n \t echo \"echo fake edit >>\\\"\\$1\\\"\"\n \t) >fake-editor &&\n@@ -292,7 +293,7 @@ test_expect_success 'setup fake editor' '\n \n test_set_editor \"$(pwd)/fake-editor\"\n \n-test_expect_success '--compose works' '\n+test_expect_success $PREREQ '--compose works' '\n \tclean_fake_sendmail &&\n \tgit send-email \\\n \t--compose --subject foo \\\n@@ -303,11 +304,11 @@ test_expect_success '--compose works' '\n \t2>errors\n '\n \n-test_expect_success 'first message is compose text' '\n+test_expect_success $PREREQ 'first message is compose text' '\n \tgrep \"^fake edit\" msgtxt1\n '\n \n-test_expect_success 'second message is patch' '\n+test_expect_success $PREREQ 'second message is patch' '\n \tgrep \"Subject:.*Second\" msgtxt2\n '\n \n@@ -353,7 +354,7 @@ test_suppression () {\n \ttest_cmp expected-suppress-$1${2+\"-$2\"} actual-suppress-$1${2+\"-$2\"}\n }\n \n-test_expect_success 'sendemail.cc set' '\n+test_expect_success $PREREQ 'sendemail.cc set' '\n \tgit config sendemail.cc cc@example.com &&\n \ttest_suppression sob\n '\n@@ -383,7 +384,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success 'sendemail.cc unset' '\n+test_expect_success $PREREQ 'sendemail.cc unset' '\n \tgit config --unset sendemail.cc &&\n \ttest_suppression sob\n '\n@@ -416,7 +417,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success 'sendemail.cccmd' '\n+test_expect_success $PREREQ 'sendemail.cccmd' '\n \techo echo cc-cmd@example.com > cccmd &&\n \tchmod +x cccmd &&\n \tgit config sendemail.cccmd ./cccmd &&\n@@ -439,7 +440,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success '--suppress-cc=all' '\n+test_expect_success $PREREQ '--suppress-cc=all' '\n \ttest_suppression all\n '\n \n@@ -471,7 +472,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success '--suppress-cc=body' '\n+test_expect_success $PREREQ '--suppress-cc=body' '\n \ttest_suppression body\n '\n \n@@ -500,7 +501,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success '--suppress-cc=body --suppress-cc=cccmd' '\n+test_expect_success $PREREQ '--suppress-cc=body --suppress-cc=cccmd' '\n \ttest_suppression body cccmd\n '\n \n@@ -529,7 +530,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success '--suppress-cc=sob' '\n+test_expect_success $PREREQ '--suppress-cc=sob' '\n \tgit config --unset sendemail.cccmd\n \ttest_suppression sob\n '\n@@ -562,7 +563,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success '--suppress-cc=bodycc' '\n+test_expect_success $PREREQ '--suppress-cc=bodycc' '\n \ttest_suppression bodycc\n '\n \n@@ -588,7 +589,7 @@ X-Mailer: X-MAILER-STRING\n Result: OK\n EOF\n \n-test_expect_success '--suppress-cc=cc' '\n+test_expect_success $PREREQ '--suppress-cc=cc' '\n \ttest_suppression cc\n '\n \n@@ -603,23 +604,23 @@ test_confirm () {\n \tgrep \"Send this email\" stdout\n }\n \n-test_expect_success '--confirm=always' '\n+test_expect_success $PREREQ '--confirm=always' '\n \ttest_confirm --confirm=always --suppress-cc=all\n '\n \n-test_expect_success '--confirm=auto' '\n+test_expect_success $PREREQ '--confirm=auto' '\n \ttest_confirm --confirm=auto\n '\n \n-test_expect_success '--confirm=cc' '\n+test_expect_success $PREREQ '--confirm=cc' '\n \ttest_confirm --confirm=cc\n '\n \n-test_expect_success '--confirm=compose' '\n+test_expect_success $PREREQ '--confirm=compose' '\n \ttest_confirm --confirm=compose --compose\n '\n \n-test_expect_success 'confirm by default (due to cc)' '\n+test_expect_success $PREREQ 'confirm by default (due to cc)' '\n \tCONFIRM=$(git config --get sendemail.confirm) &&\n \tgit config --unset sendemail.confirm &&\n \ttest_confirm\n@@ -628,7 +629,7 @@ test_expect_success 'confirm by default (due to cc)' '\n \ttest $ret = \"0\"\n '\n \n-test_expect_success 'confirm by default (due to --compose)' '\n+test_expect_success $PREREQ 'confirm by default (due to --compose)' '\n \tCONFIRM=$(git config --get sendemail.confirm) &&\n \tgit config --unset sendemail.confirm &&\n \ttest_confirm --suppress-cc=all --compose\n@@ -637,7 +638,7 @@ test_expect_success 'confirm by default (due to --compose)' '\n \ttest $ret = \"0\"\n '\n \n-test_expect_success 'confirm detects EOF (inform assumes y)' '\n+test_expect_success $PREREQ 'confirm detects EOF (inform assumes y)' '\n \tCONFIRM=$(git config --get sendemail.confirm) &&\n \tgit config --unset sendemail.confirm &&\n \trm -fr outdir &&\n@@ -653,7 +654,7 @@ test_expect_success 'confirm detects EOF (inform assumes y)' '\n \ttest $ret = \"0\"\n '\n \n-test_expect_success 'confirm detects EOF (auto causes failure)' '\n+test_expect_success $PREREQ 'confirm detects EOF (auto causes failure)' '\n \tCONFIRM=$(git config --get sendemail.confirm) &&\n \tgit config sendemail.confirm auto &&\n \tGIT_SEND_EMAIL_NOTTY=1 &&\n@@ -668,7 +669,7 @@ test_expect_success 'confirm detects EOF (auto causes failure)' '\n \ttest $ret = \"0\"\n '\n \n-test_expect_success 'confirm doesnt loop forever' '\n+test_expect_success $PREREQ 'confirm doesnt loop forever' '\n \tCONFIRM=$(git config --get sendemail.confirm) &&\n \tgit config sendemail.confirm auto &&\n \tGIT_SEND_EMAIL_NOTTY=1 &&\n@@ -683,7 +684,7 @@ test_expect_success 'confirm doesnt loop forever' '\n \ttest $ret = \"0\"\n '\n \n-test_expect_success 'utf8 Cc is rfc2047 encoded' '\n+test_expect_success $PREREQ 'utf8 Cc is rfc2047 encoded' '\n \tclean_fake_sendmail &&\n \trm -fr outdir &&\n \tgit format-patch -1 -o outdir --cc=\"àéìöú <utf8@example.com>\" &&\n@@ -696,7 +697,7 @@ test_expect_success 'utf8 Cc is rfc2047 encoded' '\n \tgrep \"=?UTF-8?q?=C3=A0=C3=A9=C3=AC=C3=B6=C3=BA?= <utf8@example.com>\"\n '\n \n-test_expect_success '--compose adds MIME for utf8 body' '\n+test_expect_success $PREREQ '--compose adds MIME for utf8 body' '\n \tclean_fake_sendmail &&\n \t(echo \"#!$SHELL_PATH\" &&\n \t echo \"echo utf8 body: àéìöú >>\\\"\\$1\\\"\"\n@@ -713,7 +714,7 @@ test_expect_success '--compose adds MIME for utf8 body' '\n \tgrep \"^Content-Type: text/plain; charset=UTF-8\" msgtxt1\n '\n \n-test_expect_success '--compose respects user mime type' '\n+test_expect_success $PREREQ '--compose respects user mime type' '\n \tclean_fake_sendmail &&\n \t(echo \"#!$SHELL_PATH\" &&\n \t echo \"(echo MIME-Version: 1.0\"\n@@ -736,7 +737,7 @@ test_expect_success '--compose respects user mime type' '\n \t! grep \"^Content-Type: text/plain; charset=UTF-8\" msgtxt1\n '\n \n-test_expect_success '--compose adds MIME for utf8 subject' '\n+test_expect_success $PREREQ '--compose adds MIME for utf8 subject' '\n \tclean_fake_sendmail &&\n \t  GIT_EDITOR=\"\\\"$(pwd)/fake-editor\\\"\" \\\n \t  git send-email \\\n@@ -749,7 +750,7 @@ test_expect_success '--compose adds MIME for utf8 subject' '\n \tgrep \"^Subject: =?UTF-8?q?utf8-s=C3=BCbj=C3=ABct?=\" msgtxt1\n '\n \n-test_expect_success 'detects ambiguous reference/file conflict' '\n+test_expect_success $PREREQ 'detects ambiguous reference/file conflict' '\n \techo master > master &&\n \tgit add master &&\n \tgit commit -m\"add master\" &&\n@@ -757,7 +758,7 @@ test_expect_success 'detects ambiguous reference/file conflict' '\n \tgrep disambiguate errors\n '\n \n-test_expect_success 'feed two files' '\n+test_expect_success $PREREQ 'feed two files' '\n \trm -fr outdir &&\n \tgit format-patch -2 -o outdir &&\n \tgit send-email \\\n@@ -770,7 +771,7 @@ test_expect_success 'feed two files' '\n \ttest \"z$(sed -n -e 2p subjects)\" = \"zSubject: [PATCH 2/2] add master\"\n '\n \n-test_expect_success 'in-reply-to but no threading' '\n+test_expect_success $PREREQ 'in-reply-to but no threading' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -781,7 +782,7 @@ test_expect_success 'in-reply-to but no threading' '\n \tgrep \"In-Reply-To: <in-reply-id@example.com>\"\n '\n \n-test_expect_success 'no in-reply-to and no threading' '\n+test_expect_success $PREREQ 'no in-reply-to and no threading' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -791,7 +792,7 @@ test_expect_success 'no in-reply-to and no threading' '\n \t! grep \"In-Reply-To: \" stdout\n '\n \n-test_expect_success 'threading but no chain-reply-to' '\n+test_expect_success $PREREQ 'threading but no chain-reply-to' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -802,7 +803,7 @@ test_expect_success 'threading but no chain-reply-to' '\n \tgrep \"In-Reply-To: \" stdout\n '\n \n-test_expect_success 'warning with an implicit --chain-reply-to' '\n+test_expect_success $PREREQ 'warning with an implicit --chain-reply-to' '\n \tgit send-email \\\n \t--dry-run \\\n \t--from=\"Example <nobody@example.com>\" \\\n@@ -811,7 +812,7 @@ test_expect_success 'warning with an implicit --chain-reply-to' '\n \tgrep \"no-chain-reply-to\" errors\n '\n \n-test_expect_success 'no warning with an explicit --chain-reply-to' '\n+test_expect_success $PREREQ 'no warning with an explicit --chain-reply-to' '\n \tgit send-email \\\n \t--dry-run \\\n \t--from=\"Example <nobody@example.com>\" \\\n@@ -821,7 +822,7 @@ test_expect_success 'no warning with an explicit --chain-reply-to' '\n \t! grep \"no-chain-reply-to\" errors\n '\n \n-test_expect_success 'no warning with an explicit --no-chain-reply-to' '\n+test_expect_success $PREREQ 'no warning with an explicit --no-chain-reply-to' '\n \tgit send-email \\\n \t--dry-run \\\n \t--from=\"Example <nobody@example.com>\" \\\n@@ -831,7 +832,7 @@ test_expect_success 'no warning with an explicit --no-chain-reply-to' '\n \t! grep \"no-chain-reply-to\" errors\n '\n \n-test_expect_success 'no warning with sendemail.chainreplyto = false' '\n+test_expect_success $PREREQ 'no warning with sendemail.chainreplyto = false' '\n \tgit config sendemail.chainreplyto false &&\n \tgit send-email \\\n \t--dry-run \\\n@@ -841,7 +842,7 @@ test_expect_success 'no warning with sendemail.chainreplyto = false' '\n \t! grep \"no-chain-reply-to\" errors\n '\n \n-test_expect_success 'no warning with sendemail.chainreplyto = true' '\n+test_expect_success $PREREQ 'no warning with sendemail.chainreplyto = true' '\n \tgit config sendemail.chainreplyto true &&\n \tgit send-email \\\n \t--dry-run \\\n@@ -851,7 +852,7 @@ test_expect_success 'no warning with sendemail.chainreplyto = true' '\n \t! grep \"no-chain-reply-to\" errors\n '\n \n-test_expect_success 'sendemail.to works' '\n+test_expect_success $PREREQ 'sendemail.to works' '\n \tgit config --replace-all sendemail.to \"Somebody <somebody@ex.com>\" &&\n \tgit send-email \\\n \t\t--dry-run \\\n@@ -860,7 +861,7 @@ test_expect_success 'sendemail.to works' '\n \tgrep \"To: Somebody <somebody@ex.com>\" stdout\n '\n \n-test_expect_success '--no-to overrides sendemail.to' '\n+test_expect_success $PREREQ '--no-to overrides sendemail.to' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -871,7 +872,7 @@ test_expect_success '--no-to overrides sendemail.to' '\n \t! grep \"To: Somebody <somebody@ex.com>\" stdout\n '\n \n-test_expect_success 'sendemail.cc works' '\n+test_expect_success $PREREQ 'sendemail.cc works' '\n \tgit config --replace-all sendemail.cc \"Somebody <somebody@ex.com>\" &&\n \tgit send-email \\\n \t\t--dry-run \\\n@@ -881,7 +882,7 @@ test_expect_success 'sendemail.cc works' '\n \tgrep \"Cc: Somebody <somebody@ex.com>\" stdout\n '\n \n-test_expect_success '--no-cc overrides sendemail.cc' '\n+test_expect_success $PREREQ '--no-cc overrides sendemail.cc' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -893,7 +894,7 @@ test_expect_success '--no-cc overrides sendemail.cc' '\n \t! grep \"Cc: Somebody <somebody@ex.com>\" stdout\n '\n \n-test_expect_success 'sendemail.bcc works' '\n+test_expect_success $PREREQ 'sendemail.bcc works' '\n \tgit config --replace-all sendemail.bcc \"Other <other@ex.com>\" &&\n \tgit send-email \\\n \t\t--dry-run \\\n@@ -904,7 +905,7 @@ test_expect_success 'sendemail.bcc works' '\n \tgrep \"RCPT TO:<other@ex.com>\" stdout\n '\n \n-test_expect_success '--no-bcc overrides sendemail.bcc' '\n+test_expect_success $PREREQ '--no-bcc overrides sendemail.bcc' '\n \tgit send-email \\\n \t\t--dry-run \\\n \t\t--from=\"Example <nobody@example.com>\" \\\n@@ -933,7 +934,7 @@ Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n EOF\n \n-test_expect_success 'asks about and fixes 8bit encodings' '\n+test_expect_success $PREREQ 'asks about and fixes 8bit encodings' '\n \tclean_fake_sendmail &&\n \techo |\n \tgit send-email --from=author@example.com --to=nobody@example.com \\\n@@ -946,7 +947,7 @@ test_expect_success 'asks about and fixes 8bit encodings' '\n \ttest_cmp actual content-type-decl\n '\n \n-test_expect_success 'sendemail.8bitEncoding works' '\n+test_expect_success $PREREQ 'sendemail.8bitEncoding works' '\n \tclean_fake_sendmail &&\n \tgit config sendemail.assume8bitEncoding UTF-8 &&\n \techo bogus |\n@@ -957,7 +958,7 @@ test_expect_success 'sendemail.8bitEncoding works' '\n \ttest_cmp actual content-type-decl\n '\n \n-test_expect_success '--8bit-encoding overrides sendemail.8bitEncoding' '\n+test_expect_success $PREREQ '--8bit-encoding overrides sendemail.8bitEncoding' '\n \tclean_fake_sendmail &&\n \tgit config sendemail.assume8bitEncoding \"bogus too\" &&\n \techo bogus |\n@@ -983,7 +984,7 @@ cat >expected <<EOF\n Subject: =?UTF-8?q?Dieser=20Betreff=20enth=C3=A4lt=20auch=20einen=20Umlaut!?=\n EOF\n \n-test_expect_success '--8bit-encoding also treats subject' '\n+test_expect_success $PREREQ '--8bit-encoding also treats subject' '\n \tclean_fake_sendmail &&\n \techo bogus |\n \tgit send-email --from=author@example.com --to=nobody@example.com \\\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148024","messageId":"1281732013-18284-8-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 07/10] t/t9001-send-email.sh: convert setup code to tests","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:10Z","receivedAt":"2010-08-13T20:40:10Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change the setup code in t/t9001-send-email.sh to use\ntest_expect_success. This way it isn't needlessly run in environments\nwhere the test prerequisites aren't met.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t9001-send-email.sh |   43 ++++++++++++++++++++++++++++++++++++++++---\n 1 files changed, 40 insertions(+), 3 deletions(-)\n\ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex bd17d31..71b3df9 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -85,12 +85,15 @@ test_expect_success $PREREQ 'Send patches' '\n      git send-email --suppress-cc=sob --from=\"Example <nobody@example.com>\" --to=nobody@example.com --smtp-server=\"$(pwd)/fake.sendmail\" $patches 2>errors\n '\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >expected <<\\EOF\n !nobody@example.com!\n !author@example.com!\n !one@example.com!\n !two@example.com!\n EOF\n+'\n+\n test_expect_success $PREREQ \\\n     'Verify commandline' \\\n     'test_cmp expected commandline1'\n@@ -100,6 +103,7 @@ test_expect_success $PREREQ 'Send patches with --envelope-sender' '\n      git send-email --envelope-sender=\"Patch Contributer <patch@example.com>\" --suppress-cc=sob --from=\"Example <nobody@example.com>\" --to=nobody@example.com --smtp-server=\"$(pwd)/fake.sendmail\" $patches 2>errors\n '\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >expected <<\\EOF\n !patch@example.com!\n !-i!\n@@ -108,6 +112,8 @@ cat >expected <<\\EOF\n !one@example.com!\n !two@example.com!\n EOF\n+'\n+\n test_expect_success $PREREQ \\\n     'Verify commandline' \\\n     'test_cmp expected commandline1'\n@@ -117,6 +123,7 @@ test_expect_success $PREREQ 'Send patches with --envelope-sender=auto' '\n      git send-email --envelope-sender=auto --suppress-cc=sob --from=\"Example <nobody@example.com>\" --to=nobody@example.com --smtp-server=\"$(pwd)/fake.sendmail\" $patches 2>errors\n '\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >expected <<\\EOF\n !nobody@example.com!\n !-i!\n@@ -125,10 +132,13 @@ cat >expected <<\\EOF\n !one@example.com!\n !two@example.com!\n EOF\n+'\n+\n test_expect_success $PREREQ \\\n     'Verify commandline' \\\n     'test_cmp expected commandline1'\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-show-all-headers <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -158,6 +168,7 @@ References: <unique-message-id@example.com>\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ 'Show all headers' '\n \tgit send-email \\\n@@ -209,10 +220,10 @@ test_expect_success $PREREQ 'cccmd works' '\n \tgrep \"^\tcccmd@example.com\" msgtxt1\n '\n \n-z8=zzzzzzzz\n-z64=$z8$z8$z8$z8$z8$z8$z8$z8\n-z512=$z64$z64$z64$z64$z64$z64$z64$z64\n test_expect_success $PREREQ 'reject long lines' '\n+\tz8=zzzzzzzz &&\n+\tz64=$z8$z8$z8$z8$z8$z8$z8$z8 &&\n+\tz512=$z64$z64$z64$z64$z64$z64$z64$z64 &&\n \tclean_fake_sendmail &&\n \tcp $patches longline.patch &&\n \techo $z512$z512 >>longline.patch &&\n@@ -312,6 +323,7 @@ test_expect_success $PREREQ 'second message is patch' '\n \tgrep \"Subject:.*Second\" msgtxt2\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-sob <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -338,6 +350,7 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_suppression () {\n \tgit send-email \\\n@@ -359,6 +372,7 @@ test_expect_success $PREREQ 'sendemail.cc set' '\n \ttest_suppression sob\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-sob <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -383,12 +397,14 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ 'sendemail.cc unset' '\n \tgit config --unset sendemail.cc &&\n \ttest_suppression sob\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-cccmd <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -416,6 +432,7 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ 'sendemail.cccmd' '\n \techo echo cc-cmd@example.com > cccmd &&\n@@ -424,6 +441,7 @@ test_expect_success $PREREQ 'sendemail.cccmd' '\n \ttest_suppression cccmd\n '\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >expected-suppress-all <<\\EOF\n 0001-Second.patch\n Dry-OK. Log says:\n@@ -439,11 +457,13 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+'\n \n test_expect_success $PREREQ '--suppress-cc=all' '\n \ttest_suppression all\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-body <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -471,11 +491,13 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ '--suppress-cc=body' '\n \ttest_suppression body\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-body-cccmd <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -500,11 +522,13 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ '--suppress-cc=body --suppress-cc=cccmd' '\n \ttest_suppression body cccmd\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-sob <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -529,12 +553,14 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ '--suppress-cc=sob' '\n \tgit config --unset sendemail.cccmd\n \ttest_suppression sob\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-bodycc <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -562,11 +588,13 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ '--suppress-cc=bodycc' '\n \ttest_suppression bodycc\n '\n \n+test_expect_success $PREREQ 'setup expect' \"\n cat >expected-suppress-cc <<\\EOF\n 0001-Second.patch\n (mbox) Adding cc: A <author@example.com> from line 'From: A <author@example.com>'\n@@ -588,6 +616,7 @@ X-Mailer: X-MAILER-STRING\n \n Result: OK\n EOF\n+\"\n \n test_expect_success $PREREQ '--suppress-cc=cc' '\n \ttest_suppression cc\n@@ -918,6 +947,7 @@ test_expect_success $PREREQ '--no-bcc overrides sendemail.bcc' '\n \t! grep \"RCPT TO:<other@ex.com>\" stdout\n '\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >email-using-8bit <<EOF\n From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001\n Message-Id: <bogus-message-id@example.com>\n@@ -927,12 +957,15 @@ Subject: subject goes here\n \n Dieser deutsche Text enthält einen Umlaut!\n EOF\n+'\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >content-type-decl <<EOF\n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n EOF\n+'\n \n test_expect_success $PREREQ 'asks about and fixes 8bit encodings' '\n \tclean_fake_sendmail &&\n@@ -970,6 +1003,7 @@ test_expect_success $PREREQ '--8bit-encoding overrides sendemail.8bitEncoding' '\n \ttest_cmp actual content-type-decl\n '\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >email-using-8bit <<EOF\n From fe6ecc66ece37198fe5db91fa2fc41d9f4fe5cc4 Mon Sep 17 00:00:00 2001\n Message-Id: <bogus-message-id@example.com>\n@@ -979,10 +1013,13 @@ Subject: Dieser Betreff enthält auch einen Umlaut!\n \n Nothing to see here.\n EOF\n+'\n \n+test_expect_success $PREREQ 'setup expect' '\n cat >expected <<EOF\n Subject: =?UTF-8?q?Dieser=20Betreff=20enth=C3=A4lt=20auch=20einen=20Umlaut!?=\n EOF\n+'\n \n test_expect_success $PREREQ '--8bit-encoding also treats subject' '\n \tclean_fake_sendmail &&\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148023","messageId":"1281732013-18284-9-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 08/10] t/t7105-reset-patch.sh: Add a PERL prerequisite","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:11Z","receivedAt":"2010-08-13T20:40:11Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change this test to declare a PERL prerequisite. These tests use the\n-p switch, so they implicitly depend on Perl code, but nothing was\ndeclaring this.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t7105-reset-patch.sh |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t7105-reset-patch.sh b/t/t7105-reset-patch.sh\nindex 4b629f7..9891e2c 100755\n--- a/t/t7105-reset-patch.sh\n+++ b/t/t7105-reset-patch.sh\n@@ -3,7 +3,7 @@\n test_description='git reset --patch'\n . ./lib-patch-mode.sh\n \n-test_expect_success 'setup' '\n+test_expect_success PERL 'setup' '\n \tmkdir dir &&\n \techo parent > dir/foo &&\n \techo dummy > bar &&\n@@ -17,20 +17,20 @@ test_expect_success 'setup' '\n \n # note: bar sorts before foo, so the first 'n' is always to skip 'bar'\n \n-test_expect_success 'saying \"n\" does nothing' '\n+test_expect_success PERL 'saying \"n\" does nothing' '\n \tset_and_save_state dir/foo work work\n \t(echo n; echo n) | git reset -p &&\n \tverify_saved_state dir/foo &&\n \tverify_saved_state bar\n '\n \n-test_expect_success 'git reset -p' '\n+test_expect_success PERL 'git reset -p' '\n \t(echo n; echo y) | git reset -p &&\n \tverify_state dir/foo work head &&\n \tverify_saved_state bar\n '\n \n-test_expect_success 'git reset -p HEAD^' '\n+test_expect_success PERL 'git reset -p HEAD^' '\n \t(echo n; echo y) | git reset -p HEAD^ &&\n \tverify_state dir/foo work parent &&\n \tverify_saved_state bar\n-- \n1.7.2.1.338.gf2379\n"},{"id":"148031","messageId":"1281732013-18284-10-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 09/10] t/t9601-cvsimport-vendor-branch.sh: Add a PERL prerequisite","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:12Z","receivedAt":"2010-08-13T20:40:12Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change this test to declare a PERL prerequisite. These tests use the\n-p switch, so they implicitly depend on Perl code, but nothing was\ndeclaring this.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t9601-cvsimport-vendor-branch.sh |   24 +++++++++++++-----------\n 1 files changed, 13 insertions(+), 11 deletions(-)\n\ndiff --git a/t/t9601-cvsimport-vendor-branch.sh b/t/t9601-cvsimport-vendor-branch.sh\nindex 3afaf56..71178e2 100755\n--- a/t/t9601-cvsimport-vendor-branch.sh\n+++ b/t/t9601-cvsimport-vendor-branch.sh\n@@ -34,50 +34,52 @@\n test_description='git cvsimport handling of vendor branches'\n . ./lib-cvs.sh\n \n-CVSROOT=\"$TEST_DIRECTORY\"/t9601/cvsroot\n-export CVSROOT\n+test_expect_success PERL 'setup CVSROOT' '\n+\tCVSROOT=\"$TEST_DIRECTORY\"/t9601/cvsroot &&\n+\texport CVSROOT\n+'\n \n-test_expect_success 'import a module with a vendor branch' '\n+test_expect_success PERL 'import a module with a vendor branch' '\n \n \tgit cvsimport -C module-git module\n \n '\n \n-test_expect_success 'check HEAD out of cvs repository' 'test_cvs_co master'\n+test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co master'\n \n-test_expect_success 'check master out of git repository' 'test_git_co master'\n+test_expect_success PERL 'check master out of git repository' 'test_git_co master'\n \n-test_expect_success 'check a file that was imported once' '\n+test_expect_success PERL 'check a file that was imported once' '\n \n \ttest_cmp_branch_file master imported-once.txt\n \n '\n \n-test_expect_failure 'check a file that was imported twice' '\n+test_expect_failure PERL 'check a file that was imported twice' '\n \n \ttest_cmp_branch_file master imported-twice.txt\n \n '\n \n-test_expect_success 'check a file that was imported then modified on HEAD' '\n+test_expect_success PERL 'check a file that was imported then modified on HEAD' '\n \n \ttest_cmp_branch_file master imported-modified.txt\n \n '\n \n-test_expect_success 'check a file that was imported, modified, then imported again' '\n+test_expect_success PERL 'check a file that was imported, modified, then imported again' '\n \n \ttest_cmp_branch_file master imported-modified-imported.txt\n \n '\n \n-test_expect_success 'check a file that was added to HEAD then imported' '\n+test_expect_success PERL 'check a file that was added to HEAD then imported' '\n \n \ttest_cmp_branch_file master added-imported.txt\n \n '\n \n-test_expect_success 'a vendor branch whose tag has been removed' '\n+test_expect_success PERL 'a vendor branch whose tag has been removed' '\n \n \ttest_cmp_branch_file master imported-anonymously.txt\n \n-- \n1.7.2.1.338.gf2379\n"},{"id":"148029","messageId":"1281732013-18284-11-git-send-email-avarab@gmail.com","threadId":"24732","inReplyTo":"1281732013-18284-1-git-send-email-avarab@gmail.com","subject":"[PATCH 10/10] t/t9602-cvsimport-branches-tags.sh: Add a PERL prerequisite","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-13T20:40:13Z","receivedAt":"2010-08-13T20:40:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Change this test to declare a PERL prerequisite. These tests use the\n-p switch, so they implicitly depend on Perl code, but nothing was\ndeclaring this.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t9602-cvsimport-branches-tags.sh |   28 +++++++++++++++-------------\n 1 files changed, 15 insertions(+), 13 deletions(-)\n\ndiff --git a/t/t9602-cvsimport-branches-tags.sh b/t/t9602-cvsimport-branches-tags.sh\nindex 67878b2..89da4ae 100755\n--- a/t/t9602-cvsimport-branches-tags.sh\n+++ b/t/t9602-cvsimport-branches-tags.sh\n@@ -6,70 +6,72 @@\n test_description='git cvsimport handling of branches and tags'\n . ./lib-cvs.sh\n \n-CVSROOT=\"$TEST_DIRECTORY\"/t9602/cvsroot\n-export CVSROOT\n+test_expect_success PERL 'setup CVSROOT' '\n+\tCVSROOT=\"$TEST_DIRECTORY\"/t9602/cvsroot &&\n+\texport CVSROOT\n+'\n \n-test_expect_success 'import module' '\n+test_expect_success PERL 'import module' '\n \n \tgit cvsimport -C module-git module\n \n '\n \n-test_expect_success 'test branch master' '\n+test_expect_success PERL 'test branch master' '\n \n \ttest_cmp_branch_tree master\n \n '\n \n-test_expect_success 'test branch vendorbranch' '\n+test_expect_success PERL 'test branch vendorbranch' '\n \n \ttest_cmp_branch_tree vendorbranch\n \n '\n \n-test_expect_failure 'test branch B_FROM_INITIALS' '\n+test_expect_failure PERL 'test branch B_FROM_INITIALS' '\n \n \ttest_cmp_branch_tree B_FROM_INITIALS\n \n '\n \n-test_expect_failure 'test branch B_FROM_INITIALS_BUT_ONE' '\n+test_expect_failure PERL 'test branch B_FROM_INITIALS_BUT_ONE' '\n \n \ttest_cmp_branch_tree B_FROM_INITIALS_BUT_ONE\n \n '\n \n-test_expect_failure 'test branch B_MIXED' '\n+test_expect_failure PERL 'test branch B_MIXED' '\n \n \ttest_cmp_branch_tree B_MIXED\n \n '\n \n-test_expect_success 'test branch B_SPLIT' '\n+test_expect_success PERL 'test branch B_SPLIT' '\n \n \ttest_cmp_branch_tree B_SPLIT\n \n '\n \n-test_expect_failure 'test tag vendortag' '\n+test_expect_failure PERL 'test tag vendortag' '\n \n \ttest_cmp_branch_tree vendortag\n \n '\n \n-test_expect_success 'test tag T_ALL_INITIAL_FILES' '\n+test_expect_success PERL 'test tag T_ALL_INITIAL_FILES' '\n \n \ttest_cmp_branch_tree T_ALL_INITIAL_FILES\n \n '\n \n-test_expect_failure 'test tag T_ALL_INITIAL_FILES_BUT_ONE' '\n+test_expect_failure PERL 'test tag T_ALL_INITIAL_FILES_BUT_ONE' '\n \n \ttest_cmp_branch_tree T_ALL_INITIAL_FILES_BUT_ONE\n \n '\n \n-test_expect_failure 'test tag T_MIXED' '\n+test_expect_failure PERL 'test tag T_MIXED' '\n \n \ttest_cmp_branch_tree T_MIXED\n \n-- \n1.7.2.1.338.gf2379\n"}]}