(command.CommandList
  children: [
    (command.ShFunction
      name: source_bad_syntax
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(_tmp/bad-syntax.sh)}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 46
                  stdin_parts: [('if foo; echo ls; fi\n')]
                )
              ]
            )
            (C {(.)} {(_tmp/bad-syntax.sh)})
          ]
        )
    )
    (command.ShFunction
      name: eval_bad_syntax
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'code=') (SQ <'if foo; echo ls; fi'>)})
            (C {(eval)} {(DQ ('echo --\n') ('        ') ($ VSub_DollarName '$code'))})
          ]
        )
    )
    (command.ShFunction
      name: no_such_command
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)})
            (C {(ZZZZZ)})
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: no_such_command_commandsub
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)})
            (C {(echo)} 
              {
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: (command.CommandList children:[(C {(ZZZZZ)})])
                )
              }
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: no_such_command_heredoc
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)})
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 202
                  stdin_parts: [
                    ('one\n')
                    (command_sub
                      left_token: <Left_DollarParen '$('>
                      command_list: (command.CommandList children:[(C {(ZZZZZ)})])
                    )
                    ('\n')
                    ('three\n')
                  ]
                )
              ]
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: failed_command
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)})
            (C {(false)})
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: pipefail
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline children:[(C {(false)}) (C {(wc)} {(-l)})] negated:F)
            (C {(KW_Set set)} {(-o)} {(errexit)})
            (C {(KW_Set set)} {(-o)} {(pipefail)})
            (command.Pipeline children:[(C {(false)}) (C {(wc)} {(-l)})] negated:F)
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: pipefail_func
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)})
            (command.ShFunction
              name: f
              body: 
                (command.BraceGroup
                  children: [
                    (C {(cat)})
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(42)}
                    )
                  ]
                )
            )
            (command.Pipeline
              children: [(C {(echo)} {(hi)}) (C {(f)}) (C {(wc)})]
              negated: F
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: pipefail_group
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)})
            (command.Pipeline
              children: [
                (C {(echo)} {(hi)})
                (command.BraceGroup
                  children: [
                    (command.Sentence child:(C {(cat)}) terminator:<Op_Semi ';'>)
                    (command.Sentence
                      child: (C {(sh)} {(-c)} {(SQ <'exit 42'>)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
                (C {(wc)})
              ]
              negated: F
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: pipefail_subshell
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)})
            (command.Pipeline
              children: [
                (C {(echo)} {(hi)})
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Sentence
                          child: (C {(cat)})
                          terminator: <Op_Semi ';'>
                        )
                        (C {(sh)} {(-c)} {(SQ <'exit 42'>)})
                      ]
                    )
                )
                (C {(wc)})
              ]
              negated: F
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: pipefail_while
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)})
            (command.Pipeline
              children: [
                (C {(seq)} {(3)})
                (command.WhileUntil
                  keyword: <KW_While while>
                  cond: [(command.Sentence child:(C {(true)}) terminator:<Op_Semi ';'>)]
                  body: 
                    (command.DoGroup
                      children: [
                        (C {(read)} {(line)})
                        (C {(echo)} {(X)} {($ VSub_DollarName '$line')} {(X)})
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (command.Sentence
                                  child: 
                                    (C {(test)} {(DQ ($ VSub_DollarName '$line'))} {(Lit_Equals '=')} 
                                      {(2)}
                                    )
                                  terminator: <Op_Semi ';'>
                                )
                              ]
                              action: [(C {(sh)} {(-c)} {(SQ <'exit 42'>)})]
                            )
                          ]
                        )
                      ]
                    )
                )
                (C {(wc)})
              ]
              negated: F
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: pipefail_multiple
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(errexit)} {(-o)} {(pipefail)})
            (command.Pipeline
              children: [
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {(echo)} {(SQ <four>)})
                      terminator: <Op_Semi ';'>
                    )
                    (command.Sentence
                      child: (C {(sh)} {(-c)} {(SQ <'exit 4'>)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {(echo)} {(SQ <five>)})
                      terminator: <Op_Semi ';'>
                    )
                    (command.Sentence
                      child: (C {(sh)} {(-c)} {(SQ <'exit 5'>)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {(echo)} {(SQ <six>)})
                      terminator: <Op_Semi ';'>
                    )
                    (command.Sentence
                      child: (C {(sh)} {(-c)} {(SQ <'exit 6'>)})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: control_flow
      body: 
        (command.BraceGroup
          children: [
            (command.ControlFlow token:<ControlFlow_Break break>)
            (command.ControlFlow token:<ControlFlow_Continue continue>)
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: nounset
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(nounset)})
            (C {(echo)} {($ VSub_DollarName '$x')})
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: nounset_arith
      body: 
        (command.BraceGroup
          children: [
            (C {(KW_Set set)} {(-o)} {(nounset)})
            (C {(echo)} {(word_part.ArithSub anode:(arith_expr.VarRef token:<Lit_ArithVarLike x>))})
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: divzero
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Arith_Slash
                      left: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                      right: (arith_expr.ArithWord w:{(Lit_Digits 0)})
                    )
                )
              }
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: divzero_var
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'zero=') (0)})
            (C {(echo)} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Arith_Slash
                      left: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                      right: (arith_expr.VarRef token:<Lit_ArithVarLike zero>)
                    )
                )
              }
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: string_to_int_arith
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 'x=') (SQ <ZZZ>)})
            (C {(echo)} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Arith_Plus
                      left: (arith_expr.VarRef token:<Lit_ArithVarLike x>)
                      right: (arith_expr.ArithWord w:{(Lit_Digits 5)})
                    )
                )
              }
            )
            (C {(KW_Set set)} {(-o)} {(strict-arith)})
            (C {(echo)} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Arith_Plus
                      left: (arith_expr.VarRef token:<Lit_ArithVarLike x>)
                      right: (arith_expr.ArithWord w:{(Lit_Digits 5)})
                    )
                )
              }
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: string_to_hex
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Arith_Plus
                      left: (arith_expr.ArithWord w:{(Lit_Digits 0) (Lit_ArithVarLike xGG)})
                      right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                    )
                )
              }
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: string_to_octal
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Arith_Plus
                      left: (arith_expr.ArithWord w:{(Lit_Digits 018)})
                      right: (arith_expr.ArithWord w:{(Lit_Digits 1)})
                    )
                )
              }
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: string_to_intbase
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.ArithWord
                      w: {(Lit_Digits 16) (Lit_Pound '#') (Lit_ArithVarLike GG)}
                    )
                )
              }
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: string_to_int_bool
      body: 
        (command.BraceGroup
          children: [
            (command.DBracket
              expr: (bool_expr.Binary op_id:BoolBinary_eq left:{(a)} right:{(0)})
            )
            (C {(KW_Set set)} {(-o)} {(strict-arith)})
            (command.DBracket
              expr: (bool_expr.Binary op_id:BoolBinary_eq left:{(a)} right:{(0)})
            )
            (C {(echo)} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: _run_test
      body: 
        (command.BraceGroup
          children: [
            (C {(local)} {(Lit_VarLike 't=') ($ VSub_Number '$1')})
            (C {(echo)} {(DQ (--------))})
            (C {(echo)} {(DQ ('    CASE: ') ($ VSub_DollarName '$t'))})
            (command.Subshell
              command_list: (command.CommandList children:[(C {($ VSub_DollarName '$t')})])
            )
            (C {(echo)} {(DQ ('    STATUS: ') ($ VSub_QMark '$?'))})
            (C {(echo)})
          ]
        )
    )
    (command.ShFunction
      name: all
      body: 
        (command.BraceGroup
          children: [
            (C {(_run_test)} {(control_flow)})
            (command.ForEach
              iter_name: t
              iter_words: [
                {(no_such_command)}
                {(no_such_command_commandsub)}
                {(no_such_command_heredoc)}
                {(failed_command)}
                {(pipefail)}
                {(pipefail_group)}
                {(pipefail_subshell)}
                {(pipefail_func)}
                {(pipefail_while)}
                {(nonexistent)}
                {(nounset)}
                {(nounset_arith)}
                {(divzero)}
                {(divzero_var)}
                {(string_to_int_arith)}
                {(string_to_hex)}
                {(string_to_octal)}
                {(string_to_intbase)}
                {(string_to_int_bool)}
              ]
              do_arg_iter: F
              body: (command.DoGroup children:[(C {(_run_test)} {($ VSub_DollarName '$t')})])
            )
          ]
        )
    )
    (C {(DQ ($ VSub_At '$@'))})
  ]
)