!******************************************************************************!
!  Tests for BEEP command.
!******************************************************************************!
startmacro
  switch INTERACTIVE interAct GET DEF=TRUE  SDEF=TRUE  ! for normal interactive test(s)

  if interAct then
    pipe init
      panel/setup/controls=gc

     gcontrol label macro "MACRO"

     gcontrol menu main "Exit with Status = " "PASS,FAIL" /tleft
     set gc.main.itemcolors {PASS=GREEN,FAIL=RED}
     gcontrol text info "Instructions" &
       "Change the number of desired beeps and you should hear that many &
       beeps with a one second pause between them.\n\n&
       (Skip this test if you are working on RHEL 6 / CENTOS 6 with Gnome - bug 2633)" 24 5 /title

     gcontrol LVAL numbeeps "Number of Beeps" 0 0 3 1
    pipe off
  endif
endmacro

!******************************************************************************!
procedure processMessage
  if msg.name eqs "MAIN" then
    assert/text="^reg.main.name: User indicated tests" msg.data eqss "PASS"
    pipe stop
  elseif msg.name eqs "NUMBEEPS"  then
    beep ^msg.data 1
  endif
return
