!------------------------------------------------------------------------------!
! Tests for ASK command.
!
!   Author : J. Hallam
!   Version: $Id: test_ask.mm,v 1.5 2011/06/01 14:11:21 ntn Exp $
!
!------------------------------------------------------------------------------!
startmacro
  switch INTERACTIVE interAct GET DEF=TRUE  SDEF=TRUE  ! for normal interactive test(s)

  if interAct then
    remove aval
    ask aval "Press ENTER to get DEFAULT [DEFAULT]: "
    assert/text="^reg.main.name: get default value = '^aval'" aval EQS "DEFAULT"

    remove aval
    ask aval "ENTER the string 'str' to override default [DEFAULT]: "
    assert/text="^reg.main.name: get entered value = '^aval'" aval EQS "STR"

    remove aval
    ask/once aval "Press ENTER without typing anything else: "
    assert/text="^reg.main.name: get entered value = '^aval'" aval EQS ""

  endif

endmacro
