(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git apply with weird postimage filenames'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<test_expect_success>} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'\tvector=$TEST_DIRECTORY/t4135 &&\n'> <'\n'> <'\ttest_tick &&\n'> 
          <'\tgit commit --allow-empty -m preimage &&\n'> <'\tgit tag preimage &&\n'> <'\n'> <'\treset_preimage() {\n'> <'\t\tgit checkout -f preimage^0 &&\n'> 
          <'\t\tgit read-tree -u --reset HEAD &&\n'> <'\t\tgit update-index --refresh\n'> <'\t} &&\n'> <'\n'> 
          <'\ttest_when_finished "rm -f \\"tab\tembedded.txt\\"" &&\n'> <'\ttest_when_finished "rm -f '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'\\"quoteembedded\\".txt'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'" &&\n'> <'\tif test_have_prereq !MINGW &&\n'> <'\t\ttouch -- "tab\tembedded.txt" '>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'"quoteembedded".txt'>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'\n'> <'\tthen\n'> <'\t\ttest_set_prereq FUNNYNAMES\n'> <'\tfi\n'>)
      }
    )
    (command.ShFunction
      name: try_filename
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:desc)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [68]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:postimage)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [72]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:prereq)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Number 3>
                        suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{})
                      )
                    }
                  spids: [76]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:exp1)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Number 4>
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VTest_ColonHyphen ':-'>
                            arg_word: {<success>}
                          )
                      )
                    }
                  spids: [83]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:exp2)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Number 5>
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VTest_ColonHyphen ':-'>
                            arg_word: {<success>}
                          )
                      )
                    }
                  spids: [91]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:exp3)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <Id.VSub_Number 6>
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VTest_ColonHyphen ':-'>
                            arg_word: {<success>}
                          )
                      )
                    }
                  spids: [99]
                )
              ]
            )
            (C {<test_expect_> ($ Id.VSub_DollarName '$exp1')} {($ Id.VSub_DollarName '$prereq')} 
              {(DQ ($ Id.VSub_DollarName '$desc') <', git-style file creation patch'>)} 
              {
                (DQ <'\n'> <'\t\techo postimage >expected &&\n'> <'\t\treset_preimage &&\n'> 
                  <'\t\trm -f \''> ($ Id.VSub_DollarName '$postimage') <'\' &&\n'> <'\t\tgit apply -v '> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <vector> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'/\'git-'> ($ Id.VSub_DollarName '$desc') <'.diff\' &&\n'> <'\t\ttest_cmp expected \''> 
                  ($ Id.VSub_DollarName '$postimage') <'\'\n'> <'\t'>
                )
              }
            )
            (C {<test_expect_> ($ Id.VSub_DollarName '$exp2')} {($ Id.VSub_DollarName '$prereq')} 
              {(DQ ($ Id.VSub_DollarName '$desc') <', traditional patch'>)} 
              {
                (DQ <'\n'> <'\t\techo postimage >expected &&\n'> <'\t\treset_preimage &&\n'> 
                  <'\t\techo preimage >\''> ($ Id.VSub_DollarName '$postimage') <'\' &&\n'> <'\t\tgit apply -v '> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <vector> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'/\'diff-'> ($ Id.VSub_DollarName '$desc') <'.diff\' &&\n'> <'\t\ttest_cmp expected \''> 
                  ($ Id.VSub_DollarName '$postimage') <'\'\n'> <'\t'>
                )
              }
            )
            (C {<test_expect_> ($ Id.VSub_DollarName '$exp3')} {($ Id.VSub_DollarName '$prereq')} 
              {(DQ ($ Id.VSub_DollarName '$desc') <', traditional file creation patch'>)} 
              {
                (DQ <'\n'> <'\t\techo postimage >expected &&\n'> <'\t\treset_preimage &&\n'> 
                  <'\t\trm -f \''> ($ Id.VSub_DollarName '$postimage') <'\' &&\n'> <'\t\tgit apply -v '> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <vector> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'/\'add-'> ($ Id.VSub_DollarName '$desc') <'.diff\' &&\n'> <'\t\ttest_cmp expected \''> 
                  ($ Id.VSub_DollarName '$postimage') <'\'\n'> <'\t'>
                )
              }
            )
          ]
        )
    )
    (C {<try_filename>} {(SQ <plain>)} {(SQ <postimage.txt>)})
    (C {<try_filename>} {(SQ <'with spaces'>)} {(SQ <'post image.txt'>)})
    (C {<try_filename>} {(SQ <'with tab'>)} {(SQ <'post\timage.txt'>)} {<FUNNYNAMES>})
    (C {<try_filename>} {(SQ <'with backslash'>)} {(SQ <'post\\image.txt'>)} {<BSLASHPSPEC>})
    (C {<try_filename>} {(SQ <'with quote'>)} {(SQ <'"postimage".txt'>)} {<FUNNYNAMES>} {<success>} 
      {<failure>} {<success>}
    )
    (C {<test_expect_success>} {(SQ <'whitespace-damaged traditional patch'>)} 
      {
        (SQ <'\n'> <'\techo postimage >expected &&\n'> <'\treset_preimage &&\n'> 
          <'\trm -f postimage.txt &&\n'> <'\tgit apply -v "$vector/damaged.diff" &&\n'> <'\ttest_cmp expected postimage.txt\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'traditional patch with colon in timezone'>)} 
      {
        (SQ <'\n'> <'\techo postimage >expected &&\n'> <'\treset_preimage &&\n'> 
          <'\trm -f "post image.txt" &&\n'> <'\tgit apply "$vector/funny-tz.diff" &&\n'> <'\ttest_cmp expected "post image.txt"\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'traditional, whitespace-damaged, colon in timezone'>)} 
      {
        (SQ <'\n'> <'\techo postimage >expected &&\n'> <'\treset_preimage &&\n'> 
          <'\trm -f "post image.txt" &&\n'> <'\tgit apply "$vector/damaged-tz.diff" &&\n'> <'\ttest_cmp expected "post image.txt"\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)