startmacro

! This has to be an interactive test since it doesn't do anything except
! print stuff to the screen and when I'm running it in non-interactive mode
! the command only prints out this macro.

switch INTERACTIVE interAct GET DEF=TRUE
if interAct then
  pipe on
    set inst "This test is to test the MACROFUNC command, which lists the contents &
              of a macro, by line. You should see the 3-line listing for the macro &
              MEDIT, which simply calls the EDIT command."

    panel/msgid=MAIN/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 idtext "Instructions" "^inst" 24 9 /title
    shellgui/id=idshellgui/attach
    macrofunc medit LIST

  pipe off


endif

endmacro

!**************************************************************************************************!
procedure processMessage m:msg
  say "msg.name ^msg.name, from ^msg.fid"

  if msg.name eqs "MAIN" then
    assert/text="^reg.main.name: Tests " msg.data eqss "PASS"
    pipe stop
  else
    say "^reg.main.name: Unhandled message name: ^msg.name from fid: ^msg.fid"
  endif
return
