(List (= scope= flags=0 words=[] bindings=[('test_description', {[SQ ]})]) (Com {[LIT_CHARS ../git]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) (If (Com {[LIT_CHARS test]} {[VarSub ?]} {[LIT_NEQUAL "!="]} {[LIT_CHARS 1]} ) (List (Com {[LIT_CHARS echo]} {[SQ ]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ should-be-empty &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ full-of-directories &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_failure]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\tmkdir passing-todo &&\n"][LIT_CHARS "\t(cd passing-todo &&\n"][LIT_CHARS "\tcat >passing-todo.sh <<-EOF &&\n"][LIT_CHARS "\t#!"][VarSub SHELL_PATH][LIT_CHARS "\n"][LIT_CHARS "\n"][LIT_CHARS "\ttest_description='A passing TODO test\n"][LIT_CHARS "\n"][LIT_CHARS "\tThis is run in a sub test-lib so that we do not get incorrect\n"][LIT_CHARS "\tpassing metrics\n"][LIT_CHARS "\t'\n"][LIT_CHARS "\n"][LIT_CHARS "\t# Point to the t/test-lib.sh, which isn't in ../ as usual\n"][LIT_CHARS "\tTEST_DIRECTORY="][\ LIT_ESCAPED_CHAR "\\\""][VarSub TEST_DIRECTORY][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "\n"][LIT_CHARS "\t. "][\ LIT_ESCAPED_CHAR "\\\""][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS TEST_DIRECTORY][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "/test-lib.sh\n"][LIT_CHARS "\n"][LIT_CHARS "\ttest_expect_failure 'pretend we have fixed a known breakage' '\n"][LIT_CHARS "\t\t:\n"][LIT_CHARS "\t'\n"][LIT_CHARS "\n"][LIT_CHARS "\ttest_done\n"][LIT_CHARS "\tEOF\n"][LIT_CHARS "\tchmod +x passing-todo.sh &&\n"][LIT_CHARS "\t./passing-todo.sh >out 2>err &&\n"][LIT_CHARS "\t! test -s err &&\n"][LIT_CHARS "\tsed -e 's/^> //' >expect <<-"][\ LIT_ESCAPED_CHAR "\\\\"][LIT_CHARS "EOF &&\n"][LIT_CHARS "\t> ok 1 - pretend we have fixed a known breakage # TODO known breakage\n"][LIT_CHARS "\t> # fixed 1 known breakage(s)\n"][LIT_CHARS "\t> # passed all 1 test(s)\n"][LIT_CHARS "\t> 1..1\n"][LIT_CHARS "\tEOF\n"][LIT_CHARS "\ttest_cmp expect out)\n"]]} ) (Com {[LIT_CHARS test_set_prereq]} {[LIT_CHARS HAVEIT]} ) (= scope= flags=0 words=[] bindings=[('haveit', {[LIT_CHARS no]})]) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS HAVEIT]} {[SQ ]} {[SQ ]} ) (= scope= flags=0 words=[] bindings=[('donthaveit', {[LIT_CHARS yes]})]) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS DONTHAVEIT]} {[SQ ]} {[SQ ]} ) (If (Com {[LIT_CHARS test]} {[VarSub haveit] [VarSub donthaveit]} {[LIT_NEQUAL "!="]} {[LIT_CHARS yesyes]} ) (List (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS "bug in test framework: prerequisite tags do not work reliably"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (Com {[LIT_CHARS test_set_prereq]} {[LIT_CHARS HAVETHIS]} ) (= scope= flags=0 words=[] bindings=[('haveit', {[LIT_CHARS no]})]) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS HAVETHIS] [LIT_COMMA ","] [LIT_CHARS HAVEIT]} {[SQ ]} {[SQ ]} ) (= scope= flags=0 words=[] bindings=[('donthaveit', {[LIT_CHARS yes]})]) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS HAVEIT] [LIT_COMMA ","] [LIT_CHARS DONTHAVEIT]} {[SQ ]} {[SQ ]} ) (= scope= flags=0 words=[] bindings=[('donthaveiteither', {[LIT_CHARS yes]})]) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS DONTHAVEIT] [LIT_COMMA ","] [LIT_CHARS HAVEIT]} {[SQ ]} {[SQ ]} ) (If (Com {[LIT_CHARS test]} {[VarSub haveit] [VarSub donthaveit] [VarSub donthaveiteither]} {[LIT_NEQUAL "!="]} {[LIT_CHARS yesyesyes]} ) (List (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS "bug in test framework: multiple prerequisite tags do not work reliably"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=0 words=[] bindings=[('clean', {[LIT_CHARS no]})]) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (If (Com {[LIT_CHARS test]} {[VarSub clean]} {[LIT_NEQUAL "!="]} {[LIT_CHARS yes]} ) (List (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS "bug in test framework: basic cleanup command does not work reliably"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[DQ [LIT_CHARS "\n"][LIT_CHARS "\tmkdir failing-cleanup &&\n"][LIT_CHARS "\t(\n"][LIT_CHARS "\tcd failing-cleanup &&\n"][LIT_CHARS "\n"][LIT_CHARS "\tcat >failing-cleanup.sh <<-EOF &&\n"][LIT_CHARS "\t#!"][VarSub SHELL_PATH][LIT_CHARS "\n"][LIT_CHARS "\n"][LIT_CHARS "\ttest_description='Failing tests with cleanup commands'\n"][LIT_CHARS "\n"][LIT_CHARS "\t# Point to the t/test-lib.sh, which isn't in ../ as usual\n"][LIT_CHARS "\tTEST_DIRECTORY="][\ LIT_ESCAPED_CHAR "\\\""][VarSub TEST_DIRECTORY][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "\n"][LIT_CHARS "\t. "][\ LIT_ESCAPED_CHAR "\\\""][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS TEST_DIRECTORY][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "/test-lib.sh\n"][LIT_CHARS "\n"][LIT_CHARS "\ttest_expect_success 'tests clean up even after a failure' '\n"][LIT_CHARS "\t\ttouch clean-after-failure &&\n"][LIT_CHARS "\t\ttest_when_finished rm clean-after-failure &&\n"][LIT_CHARS "\t\t(exit 1)\n"][LIT_CHARS "\t'\n"][LIT_CHARS "\ttest_expect_success 'failure to clean up causes the test to fail' '\n"][LIT_CHARS "\t\ttest_when_finished "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "(exit 2)"][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "\n"][LIT_CHARS "\t'\n"][LIT_CHARS "\ttest_done\n"][LIT_CHARS "\n"][LIT_CHARS "\tEOF\n"][LIT_CHARS "\n"][LIT_CHARS "\tchmod +x failing-cleanup.sh &&\n"][LIT_CHARS "\ttest_must_fail ./failing-cleanup.sh >out 2>err &&\n"][LIT_CHARS "\t! test -s err &&\n"][LIT_CHARS "\t! test -f "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "trash directory.failing-cleanup/clean-after-failure"][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " &&\n"][LIT_CHARS "\tsed -e 's/Z"][LIT_OTHER "$"][LIT_CHARS "//' -e 's/^> //' >expect <<-"][\ LIT_ESCAPED_CHAR "\\\\"][LIT_CHARS "EOF &&\n"][LIT_CHARS "\t> not ok - 1 tests clean up even after a failure\n"][LIT_CHARS "\t> #\tZ\n"][LIT_CHARS "\t> #\ttouch clean-after-failure &&\n"][LIT_CHARS "\t> #\ttest_when_finished rm clean-after-failure &&\n"][LIT_CHARS "\t> #\t(exit 1)\n"][LIT_CHARS "\t> #\tZ\n"][LIT_CHARS "\t> not ok - 2 failure to clean up causes the test to fail\n"][LIT_CHARS "\t> #\tZ\n"][LIT_CHARS "\t> #\ttest_when_finished "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "(exit 2)"][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "\n"][LIT_CHARS "\t> #\tZ\n"][LIT_CHARS "\t> # failed 2 among 2 test(s)\n"][LIT_CHARS "\t> 1..2\n"][LIT_CHARS "\tEOF\n"][LIT_CHARS "\ttest_cmp expect out\n"][LIT_CHARS "\t)\n"]]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (If (Com {[LIT_CHARS test_have_prereq]} {[LIT_CHARS SYMLINKS]} ) (List (= scope= flags=0 words=[] bindings=[('expectfilter', {[LIT_CHARS cat]})]) (= scope= flags=0 words=[] bindings=[('expectedtree', {[LIT_CHARS 087704a96baf1c2d1c869a8b084481e121c88b5b]})]) (= scope= flags=0 words=[] bindings=[('expectedptree1', {[LIT_CHARS 21ae8269cacbe57ae09138dcc3a2887f904d02b3]})]) (= scope= flags=0 words=[] bindings=[('expectedptree2', {[LIT_CHARS 3c5e5399f3a333eddecce7a9b9465b63f65f51e2]})]) ) (ElseTrue) (List (= scope= flags=0 words=[] bindings=[('expectfilter', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('expectedtree', {[LIT_CHARS 8e18edf7d7edcf4371a3ac6ae5f07c2641db7c46]})]) (= scope= flags=0 words=[] bindings=[('expectedptree1', {[LIT_CHARS cfb8591b2f65de8b8cc1020cd7d9e67e7793b325]})]) (= scope= flags=0 words=[] bindings=[('expectedptree2', {[LIT_CHARS ce580448f0148b985a513b693fdf7d802cacb44f]})]) ) ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ $p || exit 1\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ current\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expected <<-\\EOF &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ current\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS SYMLINKS]} {[SQ ]} {[SQ expected <<-\\EOF &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ current\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expected <<-\\EOF &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ current\n">]} ) (Com {[LIT_CHARS test_expect_success]} {[LIT_CHARS SYMLINKS]} {[SQ ]} {[SQ expected <<-\\EOF &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ badobjects <<-\\EOF &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expected <<\\EOF &&\n"> current &&\n"> ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ current &&\n"> ]} ) (= scope= flags=0 words=[] bindings=[('P', {[VarSub expectedtree]})]) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]} ) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ path4 &&\n"> ]} ) (Com {[LIT_CHARS test_done]} ) )