(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'diff --relative tests'>)}
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (C {(test_expect_success)} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'\tgit commit --allow-empty -m empty &&\n'> <'\techo content >file1 &&\n'> 
          <'\tmkdir subdir &&\n'> <'\techo other content >subdir/file2 &&\n'> <'\tgit add . &&\n'> <'\tgit commit -m one\n'>
        )
      }
    )
    (command.FuncDef
      name: check_diff
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:expect)
                      op: Equal
                      rhs: {($ VSub_Number '$1')}
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(shift)})
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 65
                  stdin_parts: [
                    ('diff --git a/')
                    ($ VSub_DollarName '$expect')
                    (' b/')
                    ($ VSub_DollarName '$expect')
                    ('\n')
                    ('new file mode 100644\n')
                    ('index 0000000..25c05ef\n')
                    ('--- /dev/null\n')
                    ('+++ b/')
                    ($ VSub_DollarName '$expect')
                    ('\n')
                    ('@@ -0,0 +1 @@\n')
                    ('+other content\n')
                  ]
                )
              ]
            )
            (C {(test_expect_success)} {(DQ ('-p ') ($ VSub_Star '$*'))} 
              {
                (DQ ('\n') ('\tgit diff -p ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') 
                  ('\ttest_cmp expected actual\n')
                )
              }
            )
          ]
        )
    )
    (command.FuncDef
      name: check_numstat
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:expect)
                      op: Equal
                      rhs: {($ VSub_Number '$1')}
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(shift)})
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 108
                  stdin_parts: [('1\t0\t') ($ VSub_DollarName '$expect') ('\n')]
                )
              ]
            )
            (C {(test_expect_success)} {(DQ ('--numstat ') ($ VSub_Star '$*'))} 
              {
                (DQ ('\n') ("\techo '1\t0\t") ($ VSub_DollarName '$expect') ("' >expected &&\n") 
                  ('\tgit diff --numstat ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') ('\ttest_cmp expected actual\n')
                )
              }
            )
          ]
        )
    )
    (command.FuncDef
      name: check_stat
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:expect)
                      op: Equal
                      rhs: {($ VSub_Number '$1')}
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(shift)})
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 155
                  stdin_parts: [
                    (' ')
                    ($ VSub_DollarName '$expect')
                    (' | 1 +\n')
                    (' 1 file changed, 1 insertion(+)\n')
                  ]
                )
              ]
            )
            (C {(test_expect_success)} {(DQ ('--stat ') ($ VSub_Star '$*'))} 
              {
                (DQ ('\n') ('\tgit diff --stat ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') 
                  ('\ttest_i18ncmp expected actual\n')
                )
              }
            )
          ]
        )
    )
    (command.FuncDef
      name: check_raw
      body: 
        (command.BraceGroup
          children: [
            (command.Sentence
              child: 
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:expect)
                      op: Equal
                      rhs: {($ VSub_Number '$1')}
                    )
                  ]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(shift)})
            (command.SimpleCommand
              words: [{(cat)}]
              redirects: [
                (redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expected)})
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 198
                  stdin_parts: [
                    (
':000000 100644 0000000000000000000000000000000000000000 25c05ef3639d2d270e7fe765a67668f098092bc5 A\t'
                    )
                    ($ VSub_DollarName '$expect')
                    ('\n')
                  ]
                )
              ]
            )
            (C {(test_expect_success)} {(DQ ('--raw ') ($ VSub_Star '$*'))} 
              {
                (DQ ('\n') ('\tgit diff --no-abbrev --raw ') ($ VSub_Star '$*') (' HEAD^ >actual &&\n') 
                  ('\ttest_cmp expected actual\n')
                )
              }
            )
          ]
        )
    )
    (command.ForEach
      iter_name: type
      iter_words: [{(diff)} {(numstat)} {(stat)} {(raw)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(check_) ($ VSub_DollarName '$type')} {(file2)} {(--relative) (Lit_Other '=') (subdir/)})
            (C {(check_) ($ VSub_DollarName '$type')} {(file2)} {(--relative) (Lit_Other '=') (subdir)})
            (C {(check_) ($ VSub_DollarName '$type')} {(dir/file2)} {(--relative) (Lit_Other '=') (sub)})
          ]
        )
    )
    (C {(test_done)})
  ]
)