(CommandList children: [ (AndOr children: [ (C {(source)} { (DQ (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} { (DQ (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr: (ArithWord w:{(Lit_Digits 0)}) ) spids: [63 68] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [59 70] ) ) } ) (C {(pwd)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [55 76] ) (/unittest.bash) ) } ) (BraceGroup children: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ("Could not source unittest.sh"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[92])] ) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [84] ) ] op_id: Op_DPipe ) (AndOr children: [ (C {(source)} { (DQ (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(dirname)} { (DQ (BracedVarSub token: <VSub_Name BASH_SOURCE> bracket_op: (ArrayIndex expr: (ArithWord w:{(Lit_Digits 0)}) ) spids: [115 120] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [111 122] ) ) } ) (C {(pwd)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [107 128] ) (/shell_utils.sh) ) } ) (BraceGroup children: [ (Sentence child: (SimpleCommand words: [{(echo)} {(DQ ("shell_utils.sh not found!"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[144])] ) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [136] ) ] op_id: Op_DPipe ) (C {(set)} {(-eu)}) (C {(cd)} {(DQ ($ VSub_Name "$TEST_TMPDIR"))}) (FuncDef name: assert_fails_to body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:method) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [181] ) ] spids: [177] ) (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:arg) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Number 2> suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(SQ )}) spids: [193 196] ) ) } spids: [191] ) ] spids: [187] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$arg"))} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) ] action: [ (AndOr children: [ (C {(DQ ($ VSub_Name "$method"))} {(DQ ($ VSub_Name "$arg"))}) (C {(fail)} { (DQ ("'") ($ VSub_Name "$method") ("' should have failed for '") ($ VSub_Name "$arg") ("'") ) } ) ] op_id: Op_DAmp ) ] spids: [-1 213] ) ] else_action: [ (AndOr children: [ (C {(DQ ($ VSub_Name "$method"))}) (C {(fail)} { (DQ ("'") ($ VSub_Name "$method") ("' should have failed for empty argument")) } ) ] op_id: Op_DAmp ) ] spids: [237 255] ) (C {(true)}) ] spids: [174] ) spids: [168 173] ) (FuncDef name: test_resolve_bad_links body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FUNCNAME> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [281 286] ) ) } spids: [279] ) ] spids: [275] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$dir"))}) (C {(fail)} {(DQ ("mkdir -p ") ($ VSub_Name "$dir"))}) ] op_id: Op_DPipe ) (C {(assert_fails_to)} {(resolve_links)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [319 321] ) (/) (${ VSub_Name dir) (/non-existent) ) } ) (C {(assert_fails_to)} {(resolve_links)} {(DQ (${ VSub_Name dir) (/non-existent))}) (C {(ln)} {(-s)} {(DQ (/non-existent))} {(DQ (${ VSub_Name dir) (/bad-absolute.sym))}) (C {(assert_fails_to)} {(resolve_links)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [373 375] ) (/) (${ VSub_Name dir) (/bad-absolute.sym) ) } ) (C {(assert_fails_to)} {(resolve_links)} {(DQ (${ VSub_Name dir) (/bad-absolute.sym))}) (C {(ln)} {(-s)} {(DQ (non-existent))} {(DQ (${ VSub_Name dir) (/bad-relative.sym))}) (C {(assert_fails_to)} {(resolve_links)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [422 424] ) (/) (${ VSub_Name dir) (/bad-relative.sym) ) } ) (C {(assert_fails_to)} {(resolve_links)} {(DQ (${ VSub_Name dir) (/bad-relative.sym))}) (C {(ln)} {(-s)} {(DQ (circular.sym))} {(DQ (${ VSub_Name dir) (/circular.sym))}) (C {(assert_fails_to)} {(resolve_links)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [471 473] ) (/) (${ VSub_Name dir) (/circular.sym) ) } ) (C {(assert_fails_to)} {(resolve_links)} {(DQ (${ VSub_Name dir) (/circular.sym))}) ] spids: [272] ) spids: [266 271] ) (FuncDef name: test_resolve_non_links body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FUNCNAME> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [511 516] ) ) } spids: [509] ) ] spids: [505] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$dir"))}) (C {(fail)} {(DQ ("mkdir -p ") ($ VSub_Name "$dir"))}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(echo)} {(hello)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ (${ VSub_Name dir) (/hello.txt))} spids: [543] ) ] ) (C {(assert_equals)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [561 563] ) ) } { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(resolve_links)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [571 573] ) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [567 575] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name dir))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ ($ VSub_Name "$dir"))})] ) left_token: <Left_CommandSub "$("> spids: [593 599] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ (${ VSub_Name dir) (/hello.txt))})] ) left_token: <Left_CommandSub "$("> spids: [618 627] ) ) } ) (C {(assert_equals)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [641 643] ) (/) (${ VSub_Name dir) (/hello.txt) ) } { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(resolve_links)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [656 658] ) (/) (${ VSub_Name dir) (/hello.txt) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [652 665] ) ) } ) ] spids: [502] ) spids: [496 501] ) (FuncDef name: test_resolve_symlinks body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FUNCNAME> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [686 691] ) ) } spids: [684] ) ] spids: [680] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name dir) (/a/b))}) (C {(fail)} {(DQ ("mkdir -p ") (${ VSub_Name dir) (/a/b))}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(echo)} {(hello)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ (${ VSub_Name dir) (/hello.txt))} spids: [724] ) ] ) (C {(ln)} {(-s)} {(DQ (.))} {(DQ (${ VSub_Name dir) (/self))}) (C {(ln)} {(-s)} {(DQ (../hello.txt))} {(DQ (${ VSub_Name dir) (/a/sym))}) (C {(ln)} {(-s)} {(DQ (../sym))} {(DQ (${ VSub_Name dir) (/a/b/sym))}) (C {(ln)} {(-s)} {(DQ (.././sym))} {(DQ (${ VSub_Name dir) (/a/b/sym-not-normalized))}) (C {(assert_equals)} {(DQ (${ VSub_Name dir) (/.))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ (${ VSub_Name dir) (/self))})] ) left_token: <Left_CommandSub "$("> spids: [810 819] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name dir) (/a/../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ (${ VSub_Name dir) (/a/sym))})] ) left_token: <Left_CommandSub "$("> spids: [833 842] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name dir) (/a/b/../../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ (${ VSub_Name dir) (/a/b/sym))})] ) left_token: <Left_CommandSub "$("> spids: [856 865] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name dir) (/a/b/.././../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(resolve_links)} {(DQ (${ VSub_Name dir) (/a/b/sym-not-normalized))}) ] ) left_token: <Left_CommandSub "$("> spids: [883 892] ) ) } ) (C {(cd)} {(DQ ($ VSub_Name "$dir"))}) (C {(assert_equals)} {(DQ (./.))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (self))})]) left_token: <Left_CommandSub "$("> spids: [911 917] ) ) } ) (C {(assert_equals)} {(DQ (./.))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (./self))})]) left_token: <Left_CommandSub "$("> spids: [928 934] ) ) } ) (C {(assert_equals)} {(DQ (a/../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (a/sym))})]) left_token: <Left_CommandSub "$("> spids: [945 951] ) ) } ) (C {(assert_equals)} {(DQ (a/b/../../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (a/b/sym))})]) left_token: <Left_CommandSub "$("> spids: [962 968] ) ) } ) (C {(assert_equals)} {(DQ (a/b/.././../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ (a/b/sym-not-normalized))})] ) left_token: <Left_CommandSub "$("> spids: [983 989] ) ) } ) (C {(cd)} {(a)}) (C {(assert_equals)} {(DQ (../.))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (../self))})]) left_token: <Left_CommandSub "$("> spids: [1006 1012] ) ) } ) (C {(assert_equals)} {(DQ (./../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (sym))})]) left_token: <Left_CommandSub "$("> spids: [1023 1029] ) ) } ) (C {(assert_equals)} {(DQ (./../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (./sym))})]) left_token: <Left_CommandSub "$("> spids: [1040 1046] ) ) } ) (C {(assert_equals)} {(DQ (b/../../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (b/sym))})]) left_token: <Left_CommandSub "$("> spids: [1057 1063] ) ) } ) (C {(assert_equals)} {(DQ (b/.././../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ (b/sym-not-normalized))})] ) left_token: <Left_CommandSub "$("> spids: [1078 1084] ) ) } ) (C {(cd)} {(b)}) (C {(assert_equals)} {(DQ (../../.))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (../../self))})]) left_token: <Left_CommandSub "$("> spids: [1101 1107] ) ) } ) (C {(assert_equals)} {(DQ (../../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (../sym))})]) left_token: <Left_CommandSub "$("> spids: [1118 1124] ) ) } ) (C {(assert_equals)} {(DQ (./../../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (sym))})]) left_token: <Left_CommandSub "$("> spids: [1135 1141] ) ) } ) (C {(assert_equals)} {(DQ (./../../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(resolve_links)} {(DQ (./sym))})]) left_token: <Left_CommandSub "$("> spids: [1152 1158] ) ) } ) (C {(assert_equals)} {(DQ (./.././../hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(resolve_links)} {(DQ (sym-not-normalized))})] ) left_token: <Left_CommandSub "$("> spids: [1173 1179] ) ) } ) ] spids: [677] ) spids: [671 676] ) (FuncDef name: test_normalize_path body: (BraceGroup children: [ (C {(assert_equals)} {(DQ (.))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ )})]) left_token: <Left_CommandSub "$("> spids: [1201 1206] ) ) } ) (C {(assert_equals)} {(DQ (.))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (.))})]) left_token: <Left_CommandSub "$("> spids: [1217 1223] ) ) } ) (C {(assert_equals)} {(DQ (.))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (./.))})]) left_token: <Left_CommandSub "$("> spids: [1234 1240] ) ) } ) (C {(assert_equals)} {(DQ (..))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (..))})]) left_token: <Left_CommandSub "$("> spids: [1251 1257] ) ) } ) (C {(assert_equals)} {(DQ (..))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (./..))})]) left_token: <Left_CommandSub "$("> spids: [1268 1274] ) ) } ) (C {(assert_equals)} {(DQ (..))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (../.))})]) left_token: <Left_CommandSub "$("> spids: [1285 1291] ) ) } ) (C {(assert_equals)} {(DQ (../..))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (../././..))})]) left_token: <Left_CommandSub "$("> spids: [1302 1308] ) ) } ) (C {(assert_equals)} {(DQ (blah))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (blah))})]) left_token: <Left_CommandSub "$("> spids: [1320 1326] ) ) } ) (C {(assert_equals)} {(DQ (blah))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (blah/.))})]) left_token: <Left_CommandSub "$("> spids: [1337 1343] ) ) } ) (C {(assert_equals)} {(DQ (blah))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (blah/./hello/..))})] ) left_token: <Left_CommandSub "$("> spids: [1354 1360] ) ) } ) (C {(assert_equals)} {(DQ (blah))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (blah/./hello/../))})] ) left_token: <Left_CommandSub "$("> spids: [1371 1377] ) ) } ) (C {(assert_equals)} {(DQ (blah/hello))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (blah/./hello/../a/b/.././.././hello))})] ) left_token: <Left_CommandSub "$("> spids: [1390 1396] ) ) } ) (C {(assert_equals)} {(DQ (.))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (blah/./hello/../a/b/.././.././..))})] ) left_token: <Left_CommandSub "$("> spids: [1407 1413] ) ) } ) (C {(assert_equals)} {(DQ (..))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (blah/.././..))})] ) left_token: <Left_CommandSub "$("> spids: [1424 1430] ) ) } ) (C {(assert_equals)} {(DQ (../..))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (blah/.././../..))})] ) left_token: <Left_CommandSub "$("> spids: [1441 1447] ) ) } ) (C {(assert_equals)} {(DQ (/))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (/))})]) left_token: <Left_CommandSub "$("> spids: [1459 1465] ) ) } ) (C {(assert_equals)} {(DQ (/))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (/.))})]) left_token: <Left_CommandSub "$("> spids: [1476 1482] ) ) } ) (C {(assert_equals)} {(DQ (/))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (/./.))})]) left_token: <Left_CommandSub "$("> spids: [1493 1499] ) ) } ) (C {(assert_equals)} {(DQ (/blah))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (/blah))})]) left_token: <Left_CommandSub "$("> spids: [1510 1516] ) ) } ) (C {(assert_equals)} {(DQ (/blah))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(normalize_path)} {(DQ (/blah/.))})]) left_token: <Left_CommandSub "$("> spids: [1527 1533] ) ) } ) (C {(assert_equals)} {(DQ (/blah))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (/blah/./hello/..))})] ) left_token: <Left_CommandSub "$("> spids: [1544 1550] ) ) } ) (C {(assert_equals)} {(DQ (/blah))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (/blah/./hello/../))})] ) left_token: <Left_CommandSub "$("> spids: [1561 1567] ) ) } ) (C {(assert_equals)} {(DQ (/blah))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(normalize_path)} {(DQ (/blah/./hello/../a/b/.././../.))})] ) left_token: <Left_CommandSub "$("> spids: [1578 1584] ) ) } ) ] spids: [1191] ) spids: [1185 1190] ) (FuncDef name: test_get_realpath body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FUNCNAME> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [1605 1610] ) ) } spids: [1603] ) ] spids: [1599] ) (AndOr children: [ (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name dir) (/a/b))}) (C {(fail)} {(DQ ("mkdir -p ") (${ VSub_Name dir) (/a/b))}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(echo)} {(hello)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ (${ VSub_Name dir) (/hello.txt))} spids: [1643] ) ] ) (C {(ln)} {(-s)} {(DQ (.))} {(DQ (${ VSub_Name dir) (/self))}) (C {(ln)} {(-s)} {(DQ (../hello.txt))} {(DQ (${ VSub_Name dir) (/a/sym))}) (C {(ln)} {(-s)} {(DQ (../sym))} {(DQ (${ VSub_Name dir) (/a/b/sym))}) (C {(ln)} {(-s)} {(DQ (.././sym))} {(DQ (${ VSub_Name dir) (/a/b/sym-not-normalized))}) (C {(assert_equals)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [1722 1724] ) (/) (${ VSub_Name dir) ) } { (DQ (CommandSubPart command_list: (CommandList children: [(C {(get_real_path)} {(DQ (${ VSub_Name dir) (/self))})] ) left_token: <Left_CommandSub "$("> spids: [1732 1741] ) ) } ) (C {(assert_equals)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [1748 1750] ) (/) (${ VSub_Name dir) (/hello.txt) ) } { (DQ (CommandSubPart command_list: (CommandList children: [(C {(get_real_path)} {(DQ (${ VSub_Name dir) (/a/sym))})] ) left_token: <Left_CommandSub "$("> spids: [1759 1768] ) ) } ) (C {(assert_equals)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [1775 1777] ) (/) (${ VSub_Name dir) (/hello.txt) ) } { (DQ (CommandSubPart command_list: (CommandList children: [(C {(get_real_path)} {(DQ (${ VSub_Name dir) (/a/b/sym))})] ) left_token: <Left_CommandSub "$("> spids: [1786 1795] ) ) } ) (C {(assert_equals)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [1804 1806] ) (/) (${ VSub_Name dir) (/hello.txt) ) } { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(get_real_path)} {(DQ (${ VSub_Name dir) (/a/b/sym-not-normalized))}) ] ) left_token: <Left_CommandSub "$("> spids: [1817 1826] ) ) } ) (C {(cd)} {(DQ ($ VSub_Name "$dir"))}) (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:abs_dir) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub "$("> spids: [1843 1845] ) } spids: [1842] ) ] spids: [1838] ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (self))})]) left_token: <Left_CommandSub "$("> spids: [1857 1863] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (./self))})]) left_token: <Left_CommandSub "$("> spids: [1876 1882] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (a/sym))})]) left_token: <Left_CommandSub "$("> spids: [1896 1902] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (a/b/sym))})]) left_token: <Left_CommandSub "$("> spids: [1916 1922] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(get_real_path)} {(DQ (a/b/sym-not-normalized))})] ) left_token: <Left_CommandSub "$("> spids: [1938 1944] ) ) } ) (C {(cd)} {(a)}) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (../self))})]) left_token: <Left_CommandSub "$("> spids: [1963 1969] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (sym))})]) left_token: <Left_CommandSub "$("> spids: [1983 1989] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (./sym))})]) left_token: <Left_CommandSub "$("> spids: [2003 2009] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (b/sym))})]) left_token: <Left_CommandSub "$("> spids: [2023 2029] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(get_real_path)} {(DQ (b/sym-not-normalized))})] ) left_token: <Left_CommandSub "$("> spids: [2043 2049] ) ) } ) (C {(cd)} {(b)}) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (../../self))})]) left_token: <Left_CommandSub "$("> spids: [2068 2074] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (../sym))})]) left_token: <Left_CommandSub "$("> spids: [2088 2094] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (sym))})]) left_token: <Left_CommandSub "$("> spids: [2108 2114] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(get_real_path)} {(DQ (./sym))})]) left_token: <Left_CommandSub "$("> spids: [2128 2134] ) ) } ) (C {(assert_equals)} {(DQ (${ VSub_Name abs_dir) (/hello.txt))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(get_real_path)} {(DQ (sym-not-normalized))})] ) left_token: <Left_CommandSub "$("> spids: [2148 2154] ) ) } ) (C {(assert_fails_to)} {(get_real_path)} {(DQ (non-existent))}) (C {(ln)} {(-s)} {(self)} {(self)}) (C {(assert_fails_to)} {(get_real_path)} {(DQ (self))}) ] spids: [1596] ) spids: [1590 1595] ) (FuncDef name: test_md5_sum body: (BraceGroup children: [ (Assignment keyword: Assign_Local flags: ["'-r'"] pairs: [ (assign_pair lhs: (LhsName name:dir) op: Equal rhs: { (DQ (BracedVarSub token: <VSub_Name FUNCNAME> bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 0)})) spids: [2203 2208] ) ) } spids: [2201] ) ] spids: [2197] ) (AndOr children: [ (C {(mkdir)} {(DQ ($ VSub_Name "$dir"))}) (C {(fail)} {(DQ ("mkdir ") ($ VSub_Name "$dir"))}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(echo)} {(hello)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ (${ VSub_Name dir) (/a.txt))} spids: [2233] ) ] ) (SimpleCommand words: [{(echo)} {(world)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ (${ VSub_Name dir) (/b.txt))} spids: [2247] ) ] ) (C {(assert_fails_to)} {(md5_file)}) (C {(assert_fails_to)} {(md5_file)} {(DQ (non-existent))}) (C {(assert_equals)} {(DQ (b1946ac92492d2347c6235b4d2611184))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(md5_file)} {(DQ (${ VSub_Name dir) (/a.txt))})] ) left_token: <Left_CommandSub "$("> spids: [2280 2289] ) ) } ) (C {(assert_equals)} {(DQ (591785b794601e212b260e25925636fd))} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(md5_file)} {(DQ (${ VSub_Name dir) (/b.txt))})] ) left_token: <Left_CommandSub "$("> spids: [2300 2309] ) ) } ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:sums) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(echo)} {(-e)} { (DQ (b1946ac92492d2347c6235b4d2611184) (EscapedLiteralPart token: <Lit_EscapedChar "\\n"> ) (591785b794601e212b260e25925636fd) ) } ) ] ) left_token: <Left_CommandSub "$("> spids: [2318 2330] ) ) } spids: [2316] ) ] spids: [2314] ) (C {(assert_equals)} {(DQ ($ VSub_Name "$sums"))} { (DQ (CommandSubPart command_list: (CommandList children: [ (C {(md5_file)} {(DQ (${ VSub_Name dir) (/a.txt))} {(DQ (${ VSub_Name dir) (/b.txt))} ) ] ) left_token: <Left_CommandSub "$("> spids: [2341 2357] ) ) } ) ] spids: [2194] ) spids: [2188 2193] ) (C {(run_suite)} {(DQ ("Tests for Bash utilities"))}) ] )