(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'quoted output'>)} spids: [13] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FN) op: assign_op.Equal rhs: {(SQ <'濱野'>)} spids: [24] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GN) op: assign_op.Equal rhs: {(SQ <'純'>)} spids: [29] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HT) op: assign_op.Equal rhs: {(SQ <'\t'>)} spids: [34] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DQ) op: assign_op.Equal rhs: {(SQ <'"'>)} spids: [39] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test_have_prereq>} {<MINGW>}) (command.Simple words: [{<echo>} {<foo>}] redirects: [ (redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>}) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ <'Name and an'> (${ Id.VSub_Name HT) <HT>)} ) ] do_fork: T ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Pipeline children: [(C {<test>} {<-f>} {(DQ <'Name and an'> (${ Id.VSub_Name HT) <HT>)})] negated: T ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'Your filesystem does not allow tabs in filenames'>)} spids: [91] ) ] ) (C {<test_done>}) ] spids: [68 84] ) ] ) (command.ShFunction name: for_each_name body: (BraceGroup children: [ (command.ForEach iter_names: [name] iterable: (for_iter.Words words: [ {<Name>} {(DQ <'Name and a'> (${ Id.VSub_Name LF) <LF>)} {(DQ <'Name and an'> (${ Id.VSub_Name HT) <HT>)} {(DQ <Name> (${ Id.VSub_Name DQ))} { (DQ ($ Id.VSub_DollarName '$FN') ($ Id.VSub_DollarName '$HT') ($ Id.VSub_DollarName '$GN') ) } { (DQ ($ Id.VSub_DollarName '$FN') ($ Id.VSub_DollarName '$LF') ($ Id.VSub_DollarName '$GN') ) } {(DQ ($ Id.VSub_DollarName '$FN') <' '> ($ Id.VSub_DollarName '$GN'))} {(DQ ($ Id.VSub_DollarName '$FN') ($ Id.VSub_DollarName '$GN'))} { (DQ ($ Id.VSub_DollarName '$FN') ($ Id.VSub_DollarName '$DQ') ($ Id.VSub_DollarName '$GN') ) } {(DQ <'With SP in it'>)} {(DQ ($ Id.VSub_DollarName '$FN') <'/file'>)} ] ) body: (command.DoGroup children:[(C {<eval>} {(DQ ($ Id.VSub_Number '$1'))})]) ) ] ) ) (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'> <'"濱野\\t純"\n'> <'"濱野\\n純"\n'> <'濱野 純\n'> <'"濱野\\"純"\n'> <'濱野/file\n'> <'濱野純\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>}) ] )