(command.CommandList
  children: [
    (command.ShFunction
      name: test_msg
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<-i>} {<Id.Lit_VarLike '_Dbg_logging='> <0>})
            (C {<local>} {<-i>} {<Id.Lit_VarLike '_Dbg_logging_redirect='> <0>})
            (C {<local>} {<Id.Lit_VarLike '_Dbg_tty='> (SQ )})
            (C {<local>} 
              {<Id.Lit_VarLike 'msg='> 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: (C {<_Dbg_msg>} {<hi>})
                )
              }
            )
            (C {<assertEquals>} {(SQ <hi>)} {(DQ ($ Id.VSub_DollarName '$msg'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:msg)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<_Dbg_msg_nocr>} {<hi>})
                      )
                    }
                  spids: [58]
                )
              ]
            )
            (C {<assertEquals>} {(SQ <hi>)} {(DQ ($ Id.VSub_DollarName '$msg'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:msg)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<_Dbg_printf>} {(SQ <'%03d'>)} {<5>})
                      )
                    }
                  spids: [77]
                )
              ]
            )
            (C {<assertEquals>} {(SQ <005>)} {(DQ ($ Id.VSub_DollarName '$msg'))})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:msg)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<_Dbg_printf_nocr>} {(SQ <'%-3s'>)} {(SQ <fo>)})
                      )
                    }
                  spids: [100]
                )
              ]
            )
            (C {<assertEquals>} {(SQ <'fo '>)} {(DQ ($ Id.VSub_DollarName '$msg'))})
          ]
        )
    )
    (command.ShFunction
      name: test_undefined
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} {<-i>} {<Id.Lit_VarLike '_Dbg_logging='> <0>})
            (C {<typeset>} {<-i>} {<Id.Lit_VarLike '_Dbg_logging_redirect='> <0>})
            (C {<typeset>} {<Id.Lit_VarLike '_Dbg_tty='> (SQ )})
            (C {<typeset>} {<msg>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:msg)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<_Dbg_undefined_cmd>} {<foo>} {<bar>})
                      )
                    }
                  spids: [162]
                )
              ]
            )
            (C {<assertEquals>} {(SQ <'** Undefined foo subcommand "bar". Try "help foo".'>)} 
              {(DQ ($ Id.VSub_DollarName '$msg'))}
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:msg)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<_Dbg_undefined_cmd>} {<foo>})
                      )
                    }
                  spids: [183]
                )
              ]
            )
            (C {<assertEquals>} {(SQ <'** Undefined command "foo". Try "help".'>)} 
              {(DQ ($ Id.VSub_DollarName '$msg'))}
            )
          ]
        )
    )
    (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: [204]
        )
      ]
    )
    (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: [210]
        )
      ]
    )
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'test/unit/helper.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'/lib/msg.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'/init/io.sh'>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:_Dbg_set_highlight)
          op: assign_op.Equal
          rhs: {(SQ )}
          spids: [239]
        )
      ]
    )
    (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)})
      ]
    )
  ]
)