! These tests match the first few tests in %test_loop and show that the X-Midas
! and NerXtMidas implementations match.
!
! @author  J. Czechowski IV
! @version $Id: test_loop.txt,v 1.1 2007/07/24 15:35:29 jxc Exp $
!
startmacro
  res str "|"
  loop 10 i
    res str "^{str}^{i}|"
  endloop
  if str eqs "|1|2|3|4|5|6|7|8|9|10|" and i eq 10 then
    info "LOOP 10 i ........ PASS"
  else
    warn "LOOP 10 i ........ FAIL"
  endif

  res str "|"
  loop 5 i
    res str "^{str}^{i}|"
  endloop
  if str eqs "|1|2|3|4|5|" and i eq 5 then
    info "LOOP  5 i ........ PASS"
  else
    warn "LOOP  5 i ........ FAIL"
  endif

  ! COUNT<=0 is a special case in X-Midas
  res str "|"
  loop -5 i
    res str "^{str}^{i}|"
  endloop
  if str eqs "|" and i eq 0 then
    info "LOOP -5 i ........ PASS"
  else
    warn "LOOP -5 i ........ FAIL"
  endif
endmacro
