(command.CommandList
  children: [
    (command.ShFunction
      name: source_bad_syntax
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {<_tmp/bad-syntax.sh>}
                )
                (redir.HereDoc
                  op: <Id.Redir_DLess '<<'>
                  fd: -1
                  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>} {<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: 
        (command.BraceGroup
          children: [
            (C {<Id.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 {<Id.KW_Set set>} {<-o>} {<errexit>})
            (C {<echo>} 
              {
                (command_sub
                  left_token: <Id.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 {<Id.KW_Set set>} {<-o>} {<errexit>})
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir.HereDoc
                  op: <Id.Redir_DLess '<<'>
                  fd: -1
                  here_begin: {<EOF>}
                  here_end_span_id: 202
                  stdin_parts: [
                    <'one\n'>
                    (command_sub
                      left_token: <Id.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 {<Id.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 {<Id.KW_Set set>} {<-o>} {<errexit>})
            (C {<Id.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 {<Id.KW_Set set>} {<-o>} {<errexit>} {<-o>} {<pipefail>})
            (command.ShFunction
              name: f
              body: 
                (command.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: 
        (command.BraceGroup
          children: [
            (C {<Id.KW_Set set>} {<-o>} {<errexit>} {<-o>} {<pipefail>})
            (command.Pipeline
              children: [
                (C {<echo>} {<hi>})
                (command.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: 
        (command.BraceGroup
          children: [
            (C {<Id.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: <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: 
        (command.BraceGroup
          children: [
            (C {<Id.KW_Set set>} {<-o>} {<errexit>} {<-o>} {<pipefail>})
            (command.Pipeline
              children: [
                (C {<seq>} {<3>})
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: [(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: [
                                (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: 
        (command.BraceGroup
          children: [
            (C {<Id.KW_Set set>} {<-o>} {<errexit>} {<-o>} {<pipefail>})
            (command.Pipeline
              children: [
                (command.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 _>
                    )
                  ]
                )
                (command.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 _>
                    )
                  ]
                )
                (command.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: 
        (command.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: 
        (command.BraceGroup
          children: [
            (C {<Id.KW_Set set>} {<-o>} {<nounset>})
            (C {<echo>} {($ Id.VSub_DollarName '$x')})
            (C {<echo>} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: nounset_arith
      body: 
        (command.BraceGroup
          children: [
            (C {<Id.KW_Set set>} {<-o>} {<nounset>})
            (C {<echo>} {(word_part.ArithSub anode:(arith_expr.VarRef token:<Id.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: Id.Arith_Slash
                      left: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                      right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>})
                    )
                )
              }
            )
            (C {<echo>} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: divzero_var
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'zero='> <0>})
            (C {<echo>} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Slash
                      left: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>})
                      right: (arith_expr.VarRef token:<Id.Lit_ArithVarLike zero>)
                    )
                )
              }
            )
            (C {<echo>} {(SQ <'SHOULD NOT GET HERE'>)})
          ]
        )
    )
    (command.ShFunction
      name: string_to_int_arith
      body: 
        (command.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: (arith_expr.VarRef token:<Id.Lit_ArithVarLike x>)
                      right: (arith_expr.ArithWord w:{<Id.Lit_Digits 5>})
                    )
                )
              }
            )
            (C {<Id.KW_Set set>} {<-o>} {<strict-arith>})
            (C {<echo>} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Plus
                      left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike x>)
                      right: (arith_expr.ArithWord w:{<Id.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: Id.Arith_Plus
                      left: (arith_expr.ArithWord w:{<Id.Lit_Digits 0> <Id.Lit_ArithVarLike xGG>})
                      right: (arith_expr.ArithWord w:{<Id.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: Id.Arith_Plus
                      left: (arith_expr.ArithWord w:{<Id.Lit_Digits 018>})
                      right: (arith_expr.ArithWord w:{<Id.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: {<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: 
        (command.BraceGroup
          children: [
            (command.DBracket
              expr: (bool_expr.Binary op_id:Id.BoolBinary_eq left:{<a>} right:{<0>})
            )
            (C {<Id.KW_Set 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: 
        (command.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
              command_list: (command.CommandList children:[(C {($ Id.VSub_DollarName '$t')})])
            )
            (C {<echo>} {(DQ <'    STATUS: '> ($ Id.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>} {($ Id.VSub_DollarName '$t')})])
            )
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)