(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description spids:[21]) op: Equal rhs: {(SQ <'quoted output'>)} spids: [21] ) ] spids: [21] ) (C {(.)} {(./test-lib.sh)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:FN spids:[32]) op: Equal rhs: {(SQ <'\xe6\xbf\xb1\xe9\x87\x8e'>)} spids: [32] ) ] spids: [32] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:GN spids:[37]) op: Equal rhs: {(SQ <'\xe7\xb4\x94'>)} spids: [37] ) ] spids: [37] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:HT spids:[42]) op: Equal rhs: {(SQ <'\t'>)} spids: [42] ) ] spids: [42] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DQ spids:[47]) op: Equal rhs: {(SQ <'"'>)} spids: [47] ) ] spids: [47] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test_have_prereq)} {(MINGW)}) (command.SimpleCommand words: [{(echo)} {(foo)}] redirects: [ (redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)}) (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ('Name and an') (${ VSub_Name HT) (HT))} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [(C {(test)} {(-f)} {(DQ ('Name and an') (${ VSub_Name HT) (HT))})] negated: T ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:skip_all spids:[99]) op: Equal rhs: {(SQ <'Your filesystem does not allow tabs in filenames'>)} spids: [99] ) ] spids: [99] ) (C {(test_done)}) ] spids: [16777215 92] ) ] spids: [16777215 107] ) (command.FuncDef name: for_each_name body: (command.BraceGroup children: [ (command.ForEach iter_name: name iter_words: [ {(Name)} {(DQ ('Name and a') (${ VSub_Name LF) (LF))} {(DQ ('Name and an') (${ VSub_Name HT) (HT))} {(DQ (Name) (${ VSub_Name DQ))} {(DQ ($ VSub_Name '$FN') ($ VSub_Name '$HT') ($ VSub_Name '$GN'))} {(DQ ($ VSub_Name '$FN') ($ VSub_Name '$LF') ($ VSub_Name '$GN'))} {(DQ ($ VSub_Name '$FN') (' ') ($ VSub_Name '$GN'))} {(DQ ($ VSub_Name '$FN') ($ VSub_Name '$GN'))} {(DQ ($ VSub_Name '$FN') ($ VSub_Name '$DQ') ($ VSub_Name '$GN'))} {(DQ ('With SP in it'))} {(DQ ($ VSub_Name '$FN') (/file))} ] do_arg_iter: F body: (command.DoGroup children: [(C {(eval)} {(DQ ($ VSub_Number '$1'))})] spids: [194 204] ) spids: [123 16777215] ) ] spids: [115] ) spids: [110 114] ) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <'\n'> <'\n'> <'\tmkdir "$FN" &&\n'> <'\tfor_each_name "echo initial >\\"\\$name\\"" &&\n'> <'\tgit add . &&\n'> <'\tgit commit -q -m Initial &&\n'> <'\n'> <'\tfor_each_name "echo second >\\"\\$name\\"" &&\n'> <'\tgit commit -a -m Second &&\n'> <'\n'> <'\tfor_each_name "echo modified >\\"\\$name\\""\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'setup expected files'>)} { (SQ <'\n'> <'cat >expect.quoted <<\\EOF &&\n'> <'Name\n'> <'"Name and a\\nLF"\n'> <'"Name and an\\tHT"\n'> <'"Name\\""\n'> <'With SP in it\n'> <'"\\346\\277\\261\\351\\207\\216\\t\\347\\264\\224"\n'> <'"\\346\\277\\261\\351\\207\\216\\n\\347\\264\\224"\n'> <'"\\346\\277\\261\\351\\207\\216 \\347\\264\\224"\n'> <'"\\346\\277\\261\\351\\207\\216\\"\\347\\264\\224"\n'> <'"\\346\\277\\261\\351\\207\\216/file"\n'> <'"\\346\\277\\261\\351\\207\\216\\347\\264\\224"\n'> <'EOF\n'> <'\n'> <'cat >expect.raw <<\\EOF\n'> <'Name\n'> <'"Name and a\\nLF"\n'> <'"Name and an\\tHT"\n'> <'"Name\\""\n'> <'With SP in it\n'> <'"\xe6\xbf\xb1\xe9\x87\x8e\\t\xe7\xb4\x94"\n'> <'"\xe6\xbf\xb1\xe9\x87\x8e\\n\xe7\xb4\x94"\n'> <'\xe6\xbf\xb1\xe9\x87\x8e \xe7\xb4\x94\n'> <'"\xe6\xbf\xb1\xe9\x87\x8e\\"\xe7\xb4\x94"\n'> <'\xe6\xbf\xb1\xe9\x87\x8e/file\n'> <'\xe6\xbf\xb1\xe9\x87\x8e\xe7\xb4\x94\n'> <'EOF\n'> ) } ) (C {(test_expect_success)} {(SQ <'check fully quoted output from ls-files'>)} {(SQ <'\n'> <'\n'> <'\tgit ls-files >current && test_cmp expect.quoted current\n'> <'\n'>)} ) (C {(test_expect_success)} {(SQ <'check fully quoted output from diff-files'>)} { (SQ <'\n'> <'\n'> <'\tgit diff --name-only >current &&\n'> <'\ttest_cmp expect.quoted current\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'check fully quoted output from diff-index'>)} { (SQ <'\n'> <'\n'> <'\tgit diff --name-only HEAD >current &&\n'> <'\ttest_cmp expect.quoted current\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'check fully quoted output from diff-tree'>)} { (SQ <'\n'> <'\n'> <'\tgit diff --name-only HEAD^ HEAD >current &&\n'> <'\ttest_cmp expect.quoted current\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'check fully quoted output from ls-tree'>)} { (SQ <'\n'> <'\n'> <'\tgit ls-tree --name-only -r HEAD >current &&\n'> <'\ttest_cmp expect.quoted current\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'setting core.quotepath'>)} {(SQ <'\n'> <'\n'> <'\tgit config --bool core.quotepath false\n'> <'\n'>)} ) (C {(test_expect_success)} {(SQ <'check fully quoted output from ls-files'>)} {(SQ <'\n'> <'\n'> <'\tgit ls-files >current && test_cmp expect.raw current\n'> <'\n'>)} ) (C {(test_expect_success)} {(SQ <'check fully quoted output from diff-files'>)} { (SQ <'\n'> <'\n'> <'\tgit diff --name-only >current &&\n'> <'\ttest_cmp expect.raw current\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'check fully quoted output from diff-index'>)} { (SQ <'\n'> <'\n'> <'\tgit diff --name-only HEAD >current &&\n'> <'\ttest_cmp expect.raw current\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'check fully quoted output from diff-tree'>)} { (SQ <'\n'> <'\n'> <'\tgit diff --name-only HEAD^ HEAD >current &&\n'> <'\ttest_cmp expect.raw current\n'> <'\n'> ) } ) (C {(test_expect_success)} {(SQ <'check fully quoted output from ls-tree'>)} { (SQ <'\n'> <'\n'> <'\tgit ls-tree --name-only -r HEAD >current &&\n'> <'\ttest_cmp expect.raw current\n'> <'\n'> ) } ) (C {(test_done)}) ] )