(command.CommandList
  children: [
    (command.ShFunction
      name: test_validate_is_function
      body: 
        (BraceGroup
          children: [
            (C {<_Dbg_is_function>})
            (C {<assertFalse>} {(SQ <'No function given; is_function should report false'>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (C {<unset>} {<-f>} {<function_test>})
            (C {<_Dbg_is_function>} {<function_test>})
            (C {<assertFalse>} {(SQ <'function_test should not be defined'>)} 
              {(DQ ($ Id.VSub_QMark '$?'))}
            )
            (C {<typeset>} {<-i>} {<Id.Lit_VarLike 'function_test='> <1>})
            (C {<_Dbg_is_function>} {<function_test>})
            (C {<assertFalse>} {(SQ <'test_function should still not be defined'>)} 
              {(DQ ($ Id.VSub_QMark '$?'))}
            )
            (command.ShFunction
              name: function_test
              body: 
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {<Id.Lit_Colon ':'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
            )
            (C {<_Dbg_is_function>} {<function_test>})
            (C {<assertTrue>} {(SQ <'test_function should now be defined'>)} 
              {(DQ ($ Id.VSub_QMark '$?'))}
            )
            (command.ShFunction
              name: another_function_test
              body: 
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {<Id.Lit_Colon ':'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
            )
            (C {<_Dbg_is_function>} {<another_function_test>} {(DQ ($ Id.VSub_QMark '$?'))})
            (command.ShFunction
              name: _function_test
              body: 
                (BraceGroup
                  children: [
                    (command.Sentence
                      child: (C {<Id.Lit_Colon ':'>})
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                )
            )
            (C {<_Dbg_is_function>} {<_function_test>})
            (C {<assertFalse>} 
              {(SQ <'fn _function_test is system fn; is_function should report false'>)} {($ Id.VSub_QMark '$?')}
            )
            (C {<_Dbg_is_function>} {<_function_test>} {<1>})
            (C {<assertTrue>} 
              {(SQ <'fn _function_test is system fn which we want; should report true'>)} {($ Id.VSub_QMark '$?')}
            )
          ]
        )
    )
    (command.ShFunction
      name: test_validate_is_integer
      body: 
        (BraceGroup
          children: [
            (C {<_Dbg_is_int>})
            (C {<assertFalse>} {(SQ <'No integer given; is_int should report false'>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (command.ForEach
              iter_name: arg
              iter_words: [{<a>} {<a1>} {(SQ <'-+-'>)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<_Dbg_is_int>} {($ Id.VSub_DollarName '$arg')})
                    (C {<assertFalse>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$arg') 
                          <' is not an integer; is_int should report false'>
                        )
                      } {($ Id.VSub_QMark '$?')}
                    )
                  ]
                )
            )
            (command.ForEach
              iter_name: arg
              iter_words: [{<0>} {<123>} {<9999999>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<_Dbg_is_int>} {($ Id.VSub_DollarName '$arg')})
                    (C {<assertTrue>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$arg') 
                          <' is an integer; is_int should report true'>
                        )
                      } {($ Id.VSub_QMark '$?')}
                    )
                    (C {<_Dbg_is_signed_int>} {($ Id.VSub_DollarName '$arg')})
                    (C {<assertTrue>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$arg') 
                          <' is a signed integer; is_int should report true'>
                        )
                      } {($ Id.VSub_QMark '$?')}
                    )
                  ]
                )
            )
            (command.ForEach
              iter_name: arg
              iter_words: [{<Id.Lit_Other '+'> <0>} {<-123>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<_Dbg_is_signed_int>} {($ Id.VSub_DollarName '$arg')})
                    (C {<assertTrue>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$arg') 
                          <' is not a signed integer; is_int should report true'>
                        )
                      } {($ Id.VSub_QMark '$?')}
                    )
                    (C {<_Dbg_is_int>} {($ Id.VSub_DollarName '$arg')})
                    (C {<assertFalse>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$arg') 
                          <' is not an integer; is_int should report true'>
                        )
                      } {($ Id.VSub_QMark '$?')}
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(SQ <'/src/external-vcs/sourceforge/bashdb'>)} 
                      {<Id.Lit_Equals '='>} {(SQ )} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Something is wrong: abs_top_srcdir is not set.'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [350 367]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:abs_top_srcdir)
          op: assign_op.Equal
          rhs: {<'/src/external-vcs/sourceforge/bashdb'>}
          spids: [383]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:abs_top_srcdir)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: <Id.VSub_Name abs_top_srcdir>
                suffix_op: (suffix_op.Unary tok:<Id.VOp1_DPercent '%%'> arg_word:{<Id.Lit_Slash '/'>})
              ) <'/'>
            }
          spids: [389]
        )
      ]
    )
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'test/unit/helper.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'init/vars.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'init/pre.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'lib/journal.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'lib/save-restore.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'lib/validate.sh'>})
    (C {<set>} {<-->})
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (command.DBracket
          expr: 
            (bool_expr.Binary
              op_id: Id.BoolBinary_GlobDEqual
              left: {($ Id.VSub_Number '$0')}
              right: {(${ Id.VSub_Name BASH_SOURCE)}
            )
        )
        (C {<.>} {(${ Id.VSub_Name shunit_file)})
      ]
    )
  ]
)