(List (= scope= flags=0 words=[] bindings=[('test_description', {[SQ ]})]) (Com {[LIT_CHARS .]} {[LIT_CHARS ./test-lib.sh]}) (FunctionDef test_cmp_val [] (List (Com {[LIT_CHARS echo]} {[DQ [VarSub 1]]} < (FilenameRedirectNode filename={[LIT_CHARS expected]} "> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [VarSub 2]]} < (FilenameRedirectNode filename={[LIT_CHARS result]} "> 1), > ) (Com {[LIT_CHARS test_cmp]} {[LIT_CHARS expected]} {[LIT_CHARS result]}) ) ) (FunctionDef test_vars [] (List (Com {[LIT_CHARS test_expect_success]} {[DQ [VarSub 1][LIT_CHARS ": gitdir"]]} {[SQ ] [DQ [VarSub 2]] [SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [VarSub 1][LIT_CHARS ": worktree"]]} {[SQ ] [DQ [VarSub 3]] [SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[DQ [VarSub 1][LIT_CHARS ": prefix"]]} {[SQ ] [DQ [VarSub 4]] [SQ ]}) ) ) (FunctionDef test_foobar_root [] (List (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ result &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ result &&\n"> ]}) ) ) (FunctionDef test_foobar_foo [] (List (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ result &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ result &&\n"> ]}) ) ) (FunctionDef test_foobar_foobar [] (List (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ result &&\n"> ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ result &&\n"> ]}) ) ) (If (Pipeline! (Com {[LIT_CHARS test]} {[LIT_CHARS -w]} {[LIT_CHARS /]}) ) (List (= scope= flags=0 words=[] bindings=[('skip_all', {[DQ [LIT_CHARS "Test requiring writable / skipped. Read this test if you want to run it"]]})]) (Com {[LIT_CHARS test_done]}) ) ) (If (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -e]} {[LIT_CHARS /refs]}) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -e]} {[LIT_CHARS /objects]}) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -e]} {[LIT_CHARS /info]}) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -e]} {[LIT_CHARS /hooks]}) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -e]} {[LIT_CHARS /.git]}) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -e]} {[LIT_CHARS /foo]}) (Com {[LIT_CHARS test]} {[LIT_CHARS -e]} {[LIT_CHARS /me]}) ) ) ) ) ) ) (List (= scope= flags=0 words=[] bindings=[('skip_all', {[DQ [LIT_CHARS "Skip test that clobbers existing files in /"]]})]) (Com {[LIT_CHARS test_done]}) ) ) (If (Com {[LIT_OTHER "["]} {[DQ [VarSub IKNOWWHATIAMDOING]]} {[LIT_OTHER "!"] [LIT_OTHER "="]} {[DQ [LIT_CHARS YES]]} {[LIT_OTHER "]"]}) (List (= scope= flags=0 words=[] bindings=[('skip_all', {[DQ [LIT_CHARS "You must set env var IKNOWWHATIAMDOING=YES in order to run this test"]]})]) (Com {[LIT_CHARS test_done]}) ) ) (If (Pipeline! (Com {[LIT_CHARS test_have_prereq]} {[LIT_CHARS NOT_ROOT]}) ) (List (= scope= flags=0 words=[] bindings=[('skip_all', {[DQ [LIT_CHARS "No you can't run this as root"]]})]) (Com {[LIT_CHARS test_done]}) ) ) (= scope= flags=0 words=[] bindings=[('ONE_SHA1', {[LIT_CHARS d00491fd7e5bb6fa28c517a0bb32b8b506539d4d]})]) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ /foo/foome &&\n"> /foo/bar/barme &&\n"> /me\n">]}) (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS "GIT_DIR absolute, GIT_WORK_TREE set"]]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS cat]} < (FilenameRedirectNode filename={[LIT_CHARS ls.expected]} "> 1), (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "100644 "][VarSub ONE_SHA1][LIT_CHARS " 0\tfoo/bar/barme\n"][LIT_CHARS "100644 "][VarSub ONE_SHA1][LIT_CHARS " 0\tfoo/foome\n"][LIT_CHARS "100644 "][VarSub ONE_SHA1][LIT_CHARS " 0\tme\n"]]} 0), > ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[DQ [VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_DIR]}] bindings=[]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_WORK_TREE', {[LIT_CHARS /]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_WORK_TREE]}] bindings=[]) ) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub GIT_DIR]]} {[DQ [LIT_CHARS /]]} {[DQ ]}) (Com {[LIT_CHARS test_foobar_root]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub GIT_DIR]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/]]}) (Com {[LIT_CHARS test_foobar_foo]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub GIT_DIR]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/bar/]]}) (Com {[LIT_CHARS test_foobar_foobar]}) (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS "GIT_DIR relative, GIT_WORK_TREE set"]]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[DQ [ComSub (Pipeline (Com {[LIT_CHARS echo]} {[VarSub TRASH_DIRECTORY]}) (Com {[LIT_CHARS sed]} {[SQ ]}) )][LIT_CHARS /.git]]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_DIR]}] bindings=[]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_WORK_TREE', {[LIT_CHARS /]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_WORK_TREE]}] bindings=[]) ) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub GIT_DIR]]} {[DQ [LIT_CHARS /]]} {[DQ ]}) (Com {[LIT_CHARS test_foobar_root]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[DQ [LIT_CHARS ../][VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_DIR]}] bindings=[]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_WORK_TREE', {[LIT_CHARS /]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_WORK_TREE]}] bindings=[]) ) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/]]}) (Com {[LIT_CHARS test_foobar_foo]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[DQ [LIT_CHARS ../../][VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_DIR]}] bindings=[]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_WORK_TREE', {[LIT_CHARS /]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_WORK_TREE]}] bindings=[]) ) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/bar/]]}) (Com {[LIT_CHARS test_foobar_foobar]}) (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS "GIT_DIR relative, GIT_WORK_TREE relative"]]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[DQ [ComSub (Pipeline (Com {[LIT_CHARS echo]} {[VarSub TRASH_DIRECTORY]}) (Com {[LIT_CHARS sed]} {[SQ ]}) )][LIT_CHARS /.git]]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_DIR]}] bindings=[]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_WORK_TREE', {[LIT_CHARS .]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_WORK_TREE]}] bindings=[]) ) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub GIT_DIR]]} {[DQ [LIT_CHARS /]]} {[DQ ]}) (Com {[LIT_CHARS test_foobar_root]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[DQ [LIT_CHARS ../][VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_DIR]}] bindings=[]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_WORK_TREE', {[LIT_CHARS ..]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_WORK_TREE]}] bindings=[]) ) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/]]}) (Com {[LIT_CHARS test_foobar_foo]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_DIR', {[DQ [LIT_CHARS ../../][VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_DIR]}] bindings=[]) ) (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('GIT_WORK_TREE', {[LIT_CHARS ../..]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_WORK_TREE]}] bindings=[]) ) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [VarSub TRASH_DIRECTORY][LIT_CHARS /.git]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/bar/]]}) (Com {[LIT_CHARS test_foobar_foobar]}) (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS ".git at root"]]}) (Com {[LIT_CHARS unset]} {[LIT_CHARS GIT_DIR]}) (Com {[LIT_CHARS unset]} {[LIT_CHARS GIT_WORK_TREE]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expected &&\n"> result &&\n"> ]}) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [LIT_CHARS .git]]} {[DQ [LIT_CHARS /]]} {[DQ ]}) (Com {[LIT_CHARS test_foobar_root]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [LIT_CHARS /.git]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/]]}) (Com {[LIT_CHARS test_foobar_foo]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [LIT_CHARS /.git]]} {[DQ [LIT_CHARS /]]} {[DQ [LIT_CHARS foo/bar/]]}) (Com {[LIT_CHARS test_foobar_foobar]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS say]} {[DQ [LIT_CHARS "auto bare gitdir"]]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ expected &&\n"> result &&\n"> ]}) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [LIT_CHARS .]]} {[DQ ]} {[DQ ]}) (Com {[LIT_CHARS test_expect_success]} {[SQ ]} {[SQ ]}) (Com {[LIT_CHARS test_vars]} {[SQ ]} {[DQ [LIT_CHARS /]]} {[DQ ]} {[DQ ]}) (Com {[LIT_CHARS test_done]}) )