! This will test the ability to set MC.BREAK in a host primitive from within a
! macro.
!
! @author  J. Czechowski IV
! @version $Id: test_set_mc_break.mm,v 1.2 2004/11/05 15:53:59 jxc Exp $
!
startmacro
  res inst "Press the button below to set MC.BREAK for the Host primitives. &
            this should cause the 'm$return' message to be printed to the &
            terminal."

  pipe init
    panel/msgid=MAIN/id=panel/setup=1

    gcontrol label  macro  "Test With /LPS=^lps /LPB=^lpb"
    gcontrol text   idtext "Instructions" ^inst 24 5 /title
    gcontrol menu   MAIN   "Exit with Status = " "PASS,FAIL" /tleft
    gcontrol button SETMC  "" "Set MC.BREAK = 1"

    test_mc_break;xbc/ID=prim

  pipe off

endmacro



procedure processMessage m:msg
  if msg.name EQSS "MAIN" then
    assert/text="Able to set MC.BREAK from a macro" "PASS" SUBS msg.data
    pipe stop

  elseif msg.name eqs "SETMC"
    invoke temp reg.prim.setInterrupt(1)

  else
    say "Unhandled message name: ^msg.name from fid: ^msg.fid data: ^msg.data"
  endif
return
