(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git apply test patches with whitespace expansion.'>)}
          spids: [13]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<test_expect_success>} {<setup>} 
      {
        (SQ <'\n'> <'\t#\n'> <'\t## create test-N, patchN.patch, expect-N files\n'> <'\t#\n'> <'\n'> 
          <'\t# test 1\n'> <'\tprintf "\\t%s\\n" 1 2 3 4 5 6 >before &&\n'> <'\tprintf "\\t%s\\n" 1 2 3 >after &&\n'> 
          <'\tprintf "%64s\\n" a b c >>after &&\n'> <'\tprintf "\\t%s\\n" 4 5 6 >>after &&\n'> <'\tgit diff --no-index before after |\n'> 
          <'\t\tsed -e "s/before/test-1/" -e "s/after/test-1/" >patch1.patch &&\n'> <'\tprintf "%64s\\n" 1 2 3 4 5 6 >test-1 &&\n'> 
          <'\tprintf "%64s\\n" 1 2 3 a b c 4 5 6 >expect-1 &&\n'> <'\n'> <'\t# test 2\n'> <'\tprintf "\\t%s\\n" a b c d e f >before &&\n'> 
          <'\tprintf "\\t%s\\n" a b c >after &&\n'> <'\tn=10 &&\n'> <'\tx=1 &&\n'> <'\twhile test $x -lt $n\n'> <'\tdo\n'> 
          <'\t\tprintf "%63s%d\\n" "" $x >>after\n'> <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\tprintf "\\t%s\\n" d e f >>after &&\n'> 
          <'\tgit diff --no-index before after |\n'> <'\t\tsed -e "s/before/test-2/" -e "s/after/test-2/" >patch2.patch &&\n'> 
          <'\tprintf "%64s\\n" a b c d e f >test-2 &&\n'> <'\tprintf "%64s\\n" a b c >expect-2 &&\n'> <'\tx=1 &&\n'> <'\twhile test $x -lt $n\n'> <'\tdo\n'> 
          <'\t\tprintf "%63s%d\\n" "" $x >>expect-2\n'> <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\tprintf "%64s\\n" d e f >>expect-2 &&\n'> <'\n'> 
          <'\t# test 3\n'> <'\tprintf "\\t%s\\n" a b c d e f >before &&\n'> <'\tprintf "\\t%s\\n" a b c >after &&\n'> 
          <'\tn=100 &&\n'> <'\tx=0 &&\n'> <'\twhile test $x -lt $n\n'> <'\tdo\n'> <'\t\tprintf "%63s%02d\\n" "" $x >>after\n'> 
          <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\tprintf "\\t%s\\n" d e f >>after &&\n'> <'\tgit diff --no-index before after |\n'> 
          <'\tsed -e "s/before/test-3/" -e "s/after/test-3/" >patch3.patch &&\n'> <'\tprintf "%64s\\n" a b c d e f >test-3 &&\n'> <'\tprintf "%64s\\n" a b c >expect-3 &&\n'> 
          <'\tx=0 &&\n'> <'\twhile test $x -lt $n\n'> <'\tdo\n'> <'\t\tprintf "%63s%02d\\n" "" $x >>expect-3\n'> 
          <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\tprintf "%64s\\n" d e f >>expect-3 &&\n'> <'\n'> <'\t# test 4\n'> <'\t>before &&\n'> 
          <'\tx=0 &&\n'> <'\twhile test $x -lt 50\n'> <'\tdo\n'> <'\t\tprintf "\\t%02d\\n" $x >>before\n'> 
          <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\tcat before >after &&\n'> <'\tprintf "%64s\\n" a b c >>after &&\n'> 
          <'\twhile test $x -lt 100\n'> <'\tdo\n'> <'\t\tprintf "\\t%02d\\n" $x >>before\n'> <'\t\tprintf "\\t%02d\\n" $x >>after\n'> 
          <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\tgit diff --no-index before after |\n'> 
          <'\tsed -e "s/before/test-4/" -e "s/after/test-4/" >patch4.patch &&\n'> <'\t>test-4 &&\n'> <'\tx=0 &&\n'> <'\twhile test $x -lt 50\n'> <'\tdo\n'> 
          <'\t\tprintf "%63s%02d\\n" "" $x >>test-4\n'> <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\tcat test-4 >expect-4 &&\n'> 
          <'\tprintf "%64s\\n" a b c >>expect-4 &&\n'> <'\twhile test $x -lt 100\n'> <'\tdo\n'> <'\t\tprintf "%63s%02d\\n" "" $x >>test-4\n'> 
          <'\t\tprintf "%63s%02d\\n" "" $x >>expect-4\n'> <'\t\tx=$(( $x + 1 ))\n'> <'\tdone &&\n'> <'\n'> 
          <'\tgit config core.whitespace tab-in-indent,tabwidth=63 &&\n'> <'\tgit config apply.whitespace fix\n'> <'\n'>
        )
      }
    )
    (command.ForEach
      iter_name: t
      iter_words: [{<1>} {<2>} {<3>} {<4>}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {<test_expect_success>} {(SQ <'apply with ws expansion (t=$t)'>)} 
              {
                (SQ <'\n'> <'\t\tgit apply patch$t.patch &&\n'> <'\t\ttest_cmp test-$t expect-$t\n'> 
                  <'\t'>
                )
              }
            )
          ]
        )
    )
    (C {<test_done>})
  ]
)