!
!  Purpose: Test the GO intrinsic
!   Author: Jay Hallam
!  Version: $Id: test_go.mm,v 1.1 2006/11/10 22:03:01 jph Exp $
!------------------------------------------------------------------------------ 
startmacro

  switch INTERACTIVE interAct GET DEF=TRUE

  if interAct then
    set x 0
    set numToSkip 3
    ask numToSkip "Enter number of lines to skip from 1-5 [^numToSkip]"
    calc L:numToSkip numToSkip 5 MIN

    ask/once temp "Press return. Then type 'GO ^numToSkip'."
    
    ! Should skip over the number of increments indicated.
    pause -1
    calc x x+1
    calc x x+1
    calc x x+1
    calc x x+1
    calc x x+1
    assert/text="^reg.main.name: GO ^numToSkip continues after pause -1, x=^x" x eq 5-numToSkip 
  else
    ! This is only an interactive test
  endif
endmacro
