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