startmacro

  call test_basic
  call test_string_case_sens

endmacro

procedure test_basic
  ! Simple count
  set size 10
  set count 0
  while count lt size
    calc L:count count 1 +
  endwhile
  assert/text="^reg.main.name: BASIC count = ^count" count GT 0 AND count EQ size

return

procedure test_string_case_sens

  ! Case sensitive string comparison
  set count 0
  set maxCount 10
  set testString "lowercase"
  while testString eqs "lowercase" AND count LE maxCount /CS
    calc L:count count 1 +
    if count GT 1 then
      set testString "LOWERCASE"
    endif
  endwhile
  assert/text="^reg.main.name: CASE SENS string, count = ^count" count GT 0 AND count EQ 2

return
