(command.CommandList
  children: [
    (command.ShFunction
      name: test_set0
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Pipeline
                              children: [
                                (command.Simple
                                  words: [
                                    {<enable>}
                                    {<-f>}
                                    {(${ Id.VSub_Name abs_top_builddir) <'/builtin/set0'>}
                                    {<set0>}
                                  ]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                    (redir
                                      op: <Id.Redir_GreatAnd '2>&'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<1>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                              negated: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} {(SQ <'set0 tests skipped because you do not have the builtin'>)})
                    (C {<startSkipping>})
                    (command.ControlFlow token:<Id.ControlFlow_Return return>)
                  ]
                  spids: [14 37]
                )
              ]
            )
            (C {<typeset>} {<Id.Lit_VarLike 'oldname='> ($ Id.VSub_Number '$0')})
            (command.Simple
              words: [{<set0>} {(SQ <newname>)} {(SQ <bar>)}]
              redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})]
              do_fork: T
            )
            (C {<assertFalse>} {(DQ <'set0 should fail.'>)} {(DQ ($ Id.VSub_QMark '$?'))})
            (C {<set0>} {(SQ <newname>)})
            (C {<assertTrue>} {(DQ <'set0 should work this time.'>)} {(DQ ($ Id.VSub_QMark '$?'))})
            (C {<assertEquals>} {(SQ <newname>)} {(DQ ($ Id.VSub_Number '$0'))})
            (command.DBracket
              expr: 
                (bool_expr.Binary
                  op_id: Id.BoolBinary_GlobNEqual
                  left: {($ Id.VSub_DollarName '$oldname')}
                  right: {($ Id.VSub_Number '$0')}
                )
            )
            (C {<assertTrue>} 
              {
                (DQ <'old '> ($ Id.VSub_DollarName '$oldname') <' should not equal new '> 
                  ($ Id.VSub_Number '$0')
                )
              } {(DQ ($ 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: [144 161]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:abs_top_builddir)
          op: assign_op.Equal
          rhs: {<'/src/external-vcs/sourceforge/bashdb'>}
          spids: [177]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:abs_top_builddir)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: <Id.VSub_Name abs_top_builddir>
                suffix_op: (suffix_op.Unary tok:<Id.VOp1_DPercent '%%'> arg_word:{<Id.Lit_Slash '/'>})
              ) <'/'>
            }
          spids: [180]
        )
      ]
    )
    (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: [188]
        )
      ]
    )
    (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: [194]
        )
      ]
    )
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'test/unit/helper.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)})
      ]
    )
  ]
)