(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:this_script)
          op: assign_op.Equal
          rhs: {<test-filecache.sh>}
          spids: [6]
        )
      ]
    )
    (command.ShFunction
      name: test_get_source_line
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_set_highlight)
                  op: assign_op.Equal
                  rhs: {(SQ )}
                  spids: [20]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_source_line)
                  op: assign_op.Equal
                  rhs: {(SQ <'no good'>)}
                  spids: [25]
                )
              ]
            )
            (C {<_Dbg_get_source_line>} {<2>} {($ Id.VSub_DollarName '$this_script')})
            (C {<assertEquals>} {(SQ <'# -*- shell-script -*-'>)} 
              {(DQ ($ Id.VSub_DollarName '$_Dbg_source_line'))}
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_source_line)
                  op: assign_op.Equal
                  rhs: {(SQ <'no good'>)}
                  spids: [62]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:_Dbg_set_highlight)
                  op: assign_op.Equal
                  rhs: {(SQ <light>)}
                  spids: [68]
                )
              ]
            )
            (C {<_Dbg_get_source_line>} {<2>} {($ Id.VSub_DollarName '$this_script')})
            (C {<assertEquals>} {(DQ <'Requested highlight, it\'s not cached - fallback no highlight'>)} 
              {(SQ <'# -*- shell-script -*-'>)} {(DQ ($ Id.VSub_DollarName '$_Dbg_source_line'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: test_readin_maxline
      body: 
        (BraceGroup
          children: [
            (C {<typeset>} {<filename>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:shu)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (C {<_Dbg_resolve_expand_filename>} {($ Id.VSub_DollarName '$shunit_file')})
                      )
                    }
                  spids: [116]
                )
              ]
            )
            (C {<_Dbg_readin>} {(${ Id.VSub_Name shu)})
            (C {<assertEquals>} {(DQ <'Read '> (${ Id.VSub_Name shu) <' status test'>)} {(SQ <0>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (C {<typeset>} {<file2>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file2)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<_Dbg_is_file>} {(${ Id.VSub_Name shu)})
                      )
                    }
                  spids: [153]
                )
              ]
            )
            (C {<assertEquals>} {(DQ <'Cached read of '> (${ Id.VSub_Name shu) <' test'>)} {(SQ <0>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (C {<assertNotEquals>} {(DQ <'Getting cached file name back'>)} {(SQ )} 
              {(DQ ($ Id.VSub_DollarName '$file2'))}
            )
            (C {<typeset>} {<-i>} {<maxline>})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:maxline)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<_Dbg_get_maxline>} {($ Id.VSub_DollarName '$file2')})
                      )
                    }
                  spids: [201]
                )
              ]
            )
            (C {<assertEquals>} 
              {(DQ <'Line-count of '> ($ Id.VSub_DollarName '$file') <' exit status'>)} {(SQ <0>)} {($ Id.VSub_QMark '$?')}
            )
            (C {<assertEquals>} {(DQ <'Number of lines in '> ($ Id.VSub_DollarName '$file2'))} {<1>} 
              {
                (word_part.ArithSub
                  anode: 
                    (arith_expr.Binary
                      op_id: Id.Arith_Great
                      left: <Id.Lit_ArithVarLike maxline>
                      right: {<Id.Lit_Digits 1000>}
                    )
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: test_check_line
      body: 
        (BraceGroup
          children: [
            (command.ShFunction
              name: _Dbg_errmsg
              body: 
                (BraceGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:errmsg)
                          op: assign_op.PlusEqual
                          rhs: 
                            {
                              (sh_array_literal
                                left: <Id.Op_LParen _>
                                words: [{(DQ ($ Id.VSub_Number '$1'))}]
                              )
                            }
                          spids: [271]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.Sentence
              child: (C {<typeset>} {<-a>} {<errmsg>})
              terminator: <Id.Op_Semi _>
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:errmsg)
                  op: assign_op.Equal
                  rhs: {(sh_array_literal left:<Id.Op_LParen _>)}
                  spids: [289]
                )
              ]
            )
            (C {<_Dbg_check_line>})
            (C {<assertNotEquals>} {(DQ <'check_line with wrong number of args'>)} {(SQ <0>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (C {<_Dbg_check_line>} {<a>})
            (C {<assertNotEquals>} {(DQ <'check_line with wrong number of args'>)} {(SQ <0>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (C {<_Dbg_check_line>} {<a>} {<b>} {<c>})
            (C {<assertNotEquals>} {(DQ <'check_line with wrong number of args'>)} {(SQ <0>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (C {<_Dbg_readin>} {(DQ ($ Id.VSub_DollarName '$shunit_file'))})
            (C {<_Dbg_check_line>} {<10>} {($ Id.VSub_DollarName '$shunit_file')})
            (C {<assertEquals>} 
              {(DQ <'check_line with an in_range number for '> ($ Id.VSub_DollarName '$shunit_file'))} {(SQ <0>)} {($ Id.VSub_QMark '$?')}
            )
            (C {<assertEquals>} 
              {(DQ <'error queue empty so far for '> ($ Id.VSub_DollarName '$shunit_file'))} {(SQ <0>)} 
              {
                (braced_var_sub
                  token: <Id.VSub_Name errmsg>
                  prefix_op: (Id.VSub_Pound)
                  bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                )
              }
            )
            (C {<_Dbg_check_line>} {<10000>} {($ Id.VSub_DollarName '$shunit_file')})
            (C {<assertNotEquals>} {(DQ <'check_line with wrong number of args'>)} {(SQ <0>)} 
              {($ Id.VSub_QMark '$?')}
            )
            (C {<assertEquals>} {(DQ <'error message generated'>)} {(SQ <1>)} 
              {
                (braced_var_sub
                  token: <Id.VSub_Name errmsg>
                  prefix_op: (Id.VSub_Pound)
                  bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                )
              }
            )
            (C {<_Dbg_check_line>} {<10000>} {($ Id.VSub_DollarName '$shunit_file')})
          ]
        )
    )
    (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: [446 463]
        )
      ]
    )
    (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: [480]
        )
      ]
    )
    (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: [486]
        )
      ]
    )
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'test/unit/helper.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'init/pre.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'lib/filecache.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'lib/file.sh'>})
    (C {<.>} {(${ Id.VSub_Name abs_top_srcdir) <'lib/msg.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)})
      ]
    )
  ]
)