! Test running a command outside of a Midas Context
!
! Author:  J. Bauer
! Version: $Id: test_nmrunner.mm,v 1.1 2010/10/19 18:29:04 jwb Exp $
!
startmacro
  
  pipe init
  	panel/msgid=MAIN/setup/controls=gc
  	gcontrol label mainLabel "Main"
      gcontrol menu main "Exit with Status = " "PASS,FAIL" /tleft
      set gc.main.itemColors {PASS=GREEN,FAIL=RED}
    gcontrol label panellabel "Instructions"
    gcontrol panel apanel "Instructions" 400 300
      
	  shellgui/attach/bg/win=apanel

	  say ""
	  say "To test this:"
	  say " (1) Open a new shell tab."
	  say " (2) Navigate to $NMROOT (or have $NMROOT in your CLASSPATH)"
	  say " (3) Run the stand-alone java test class 'TestNmRunner'
	  say "       java -classpath . nxm.sys.test.TestNmRunner"
	  say " (4) You should see a plot of a penny. Click the 'X' on the window."
	  say " (5) When the penny plot disappears, you should see the macro 
	  say "     'beandemo' display, which has a text box, line plot, list, "
	  say "     and an embedded sd360 macro running."
	  say " (6) Close the beandemo window and you should see a window appear with "
	  say "     three items. A plot of the world at the top, the plot of a penny "
	  say "     in the center, and a list at the bottom."
	  say ""  
	  say " (7) Close the window and click 'Pass' or 'Fail' on this macro."
	  say ""
  
  pipe off
endmacro

procedure processMessage m:msg
  if msg.name eqs "MAIN" then
    assert/text="^reg.main.name:  User indicated" msg.data eqss "PASS" 
    pipe stop
  endif
return