(CommandList
  children: [
    (C {(Lit_Other ':')} 
      {
        (BracedVarSub
          token: <VSub_Name ATF_SH>
          suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(DQ (__ATF_SH__))})
          spids: [75 81]
        )
      }
    )
    (FuncDef
      name: create_test_program
      body: 
        (BraceGroup
          children: [
            (Sentence
              child: 
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:output)
                      op: Equal
                      rhs: {(DQ (${ VSub_Number 1))}
                      spids: [93]
                    )
                  ]
                  spids: [91]
                )
              terminator: <Op_Semi ';'>
            )
            (C {(shift)})
            (SimpleCommand
              words: [{(echo)} {(DQ ('#! ') (${ VSub_Name ATF_SH) (' ') (${ VSub_Star '*'))}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name output))}
                  spids: [117]
                )
              ]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_DGreat
                  fd: 16777215
                  arg_word: {(DQ (${ VSub_Name output))}
                  spids: [127]
                )
              ]
            )
            (C {(chmod)} {(Lit_Other '+') (x)} {(DQ (${ VSub_Name output))})
          ]
          spids: [88]
        )
      spids: [84 87]
    )
    (C {(atf_test_case)} {(no_args)})
    (FuncDef
      name: no_args_body
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:16777215 arg_word:{(experr)} spids:[162])
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('atf-sh: ERROR: No test program provided\n') 
                        ('atf-sh: See atf-sh(1) for usage details.\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [165]
                )
              ]
            )
            (C {(atf_check)} {(-s)} {(eq) (Lit_Other ':') (1)} {(-o)} {(ignore)} {(-e)} 
              {(file) (Lit_Other ':') (experr)} {(DQ (${ VSub_Name ATF_SH))}
            )
          ]
          spids: [157]
        )
      spids: [153 156]
    )
    (C {(atf_test_case)} {(missing_script)})
    (FuncDef
      name: missing_script_body
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:16777215 arg_word:{(experr)} spids:[212])
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ("atf-sh: ERROR: The test program 'non-existent' does not exist\n"))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [215]
                )
              ]
            )
            (C {(atf_check)} {(-s)} {(eq) (Lit_Other ':') (1)} {(-o)} {(ignore)} {(-e)} 
              {(file) (Lit_Other ':') (experr)} {(DQ (${ VSub_Name ATF_SH))} {(non-existent)}
            )
          ]
          spids: [207]
        )
      spids: [203 206]
    )
    (C {(atf_test_case)} {(arguments)})
    (FuncDef
      name: arguments_body
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(create_test_program)} {(tp)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('main() {\n') ('    echo ') (Right_DoubleQuote '"') ('>>>') 
                        (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{0}<<<') (Right_DoubleQuote '"') ('\n') ('    while test ') 
                        (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{#} -gt 0; do\n') ('        echo ') (Right_DoubleQuote '"') ('>>>') 
                        (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{1}<<<') (Right_DoubleQuote '"') ('\n') ('        shift\n') ('    done\n') ('    true\n') ('}\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [265]
                )
              ]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:16777215 arg_word:{(expout)} spids:[295])
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('>>>./tp<<<\n') ('>>> a b <<<\n') ('>>>foo<<<\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [298]
                )
              ]
            )
            (C {(atf_check)} {(-s)} {(eq) (Lit_Other ':') (0)} {(-o)} {(file) (Lit_Other ':') (expout)} 
              {(-e)} {(empty)} {(./tp)} {(SQ <' a b '>)} {(foo)}
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:16777215 arg_word:{(expout)} spids:[336])
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('>>>tp<<<\n') ('>>> hello bye <<<\n') ('>>>foo bar<<<\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [339]
                )
              ]
            )
            (C {(atf_check)} {(-s)} {(eq) (Lit_Other ':') (0)} {(-o)} {(file) (Lit_Other ':') (expout)} 
              {(-e)} {(empty)} {(DQ (${ VSub_Name ATF_SH))} {(tp)} {(SQ <' hello bye '>)} {(SQ <'foo bar'>)}
            )
          ]
          spids: [258]
        )
      spids: [254 257]
    )
    (C {(atf_test_case)} {(custom_shell__command_line)})
    (FuncDef
      name: custom_shell__command_line_body
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:16777215 arg_word:{(expout)} spids:[399])
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('This is the custom shell\n') ('This is the test program\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [402]
                )
              ]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(custom-shell)}
                  spids: [412]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('#! /bin/sh\n') ('echo ') (Right_DoubleQuote '"') 
                        ('This is the custom shell') (Right_DoubleQuote '"') ('\n') ('exec /bin/sh ') (Right_DoubleQuote '"') 
                        (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{@}') (Right_DoubleQuote '"') ('\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [415]
                )
              ]
            )
            (C {(chmod)} {(Lit_Other '+') (x)} {(custom-shell)})
            (Pipeline
              children: [
                (C {(echo)} {(SQ <'main() { echo "This is the test program"; }'>)})
                (C {(create_test_program)} {(tp)})
              ]
              negated: False
            )
            (C {(atf_check)} {(-s)} {(eq) (Lit_Other ':') (0)} {(-o)} {(file) (Lit_Other ':') (expout)} 
              {(-e)} {(empty)} {(DQ (${ VSub_Name ATF_SH))} {(-s)} {(./custom-shell)} {(tp)}
            )
          ]
          spids: [394]
        )
      spids: [390 393]
    )
    (C {(atf_test_case)} {(custom_shell__shebang)})
    (FuncDef
      name: custom_shell__shebang_body
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:16777215 arg_word:{(expout)} spids:[500])
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: {(DQ ('This is the custom shell\n') ('This is the test program\n'))}
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [503]
                )
              ]
            )
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(custom-shell)}
                  spids: [513]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('#! /bin/sh\n') ('echo ') (Right_DoubleQuote '"') 
                        ('This is the custom shell') (Right_DoubleQuote '"') ('\n') ('exec /bin/sh ') (Right_DoubleQuote '"') 
                        (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{@}') (Right_DoubleQuote '"') ('\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [516]
                )
              ]
            )
            (C {(chmod)} {(Lit_Other '+') (x)} {(custom-shell)})
            (Pipeline
              children: [
                (C {(echo)} {(SQ <'main() { echo "This is the test program"; }'>)})
                (C {(create_test_program)} {(tp)} 
                  {
                    (DQ (-s) 
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(pwd)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [558 560]
                      ) (/custom-shell)
                    )
                  }
                )
              ]
              negated: False
            )
            (C {(atf_check)} {(-s)} {(eq) (Lit_Other ':') (0)} {(-o)} {(file) (Lit_Other ':') (expout)} 
              {(-e)} {(empty)} {(./tp)}
            )
          ]
          spids: [495]
        )
      spids: [491 494]
    )
    (C {(atf_test_case)} {(set_e)})
    (FuncDef
      name: set_e_head
      body: 
        (BraceGroup
          children: [
            (C {(atf_set)} {(DQ (descr))} {(DQ ('Simple test to validate that atf-sh works even when'))} 
              {(DQ ('set -e is enabled'))}
            )
          ]
          spids: [596]
        )
      spids: [592 595]
    )
    (FuncDef
      name: set_e_body
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(custom-shell)}
                  spids: [626]
                )
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('#! /bin/sh\n') ('exec /bin/sh -e ') (Right_DoubleQuote '"') 
                        (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('{@}') (Right_DoubleQuote '"') ('\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [629]
                )
              ]
            )
            (C {(chmod)} {(Lit_Other '+') (x)} {(custom-shell)})
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (Redir op_id:Redir_Great fd:16777215 arg_word:{(tp)} spids:[652])
                (HereDoc
                  op_id: Redir_DLess
                  fd: 16777215
                  body: 
                    {
                      (DQ ('atf_test_case helper\n') ('helper_body() {\n') ('    atf_skip ') 
                        (Right_DoubleQuote '"') (reached) (Right_DoubleQuote '"') ('\n') ('}\n') ('atf_init_test_cases() {\n') 
                        ('    atf_add_test_case helper\n') ('}\n')
                      )
                    }
                  do_expansion: True
                  here_end: EOF
                  was_filled: True
                  spids: [655]
                )
              ]
            )
            (C {(atf_check)} {(-s)} {(eq) (Lit_Other ':') (0)} {(-o)} 
              {(match) (Lit_Other ':') (skipped.) (Lit_Other '*') (reached)} {(DQ (${ VSub_Name ATF_SH))} {(-s)} {(./custom-shell)} {(tp)} {(helper)}
            )
          ]
          spids: [621]
        )
      spids: [617 620]
    )
    (FuncDef
      name: atf_init_test_cases
      body: 
        (BraceGroup
          children: [
            (C {(atf_add_test_case)} {(no_args)})
            (C {(atf_add_test_case)} {(missing_script)})
            (C {(atf_add_test_case)} {(arguments)})
            (C {(atf_add_test_case)} {(custom_shell__command_line)})
            (C {(atf_add_test_case)} {(custom_shell__shebang)})
            (C {(atf_add_test_case)} {(set_e)})
          ]
          spids: [710]
        )
      spids: [706 709]
    )
  ]
)