!   Version: $Id: test_dr518956-3.mm,v 1.2 2009/07/29 14:03:06 jph Exp $
startmacro

  pipe init
    panel/msgid=MAIN/setup/controls=gc
    gcontrol label macro "MACRO"
    gcontrol menu main "Exit with Status = " "PASS,SKIP,FAIL" /tleft
    set gc.main.itemColors {PASS=GREEN,SKIP=ORANGE,FAIL=RED}

    textdisplay/id=tdisp text=""
    message send tdisp,,"APPENDL",,"DR 518956-3 Regression Test"
    message send tdisp,,"APPENDL",,"---------------------------"
    message send tdisp,,"APPENDL",,"This test needs NeXtMidas under X-Midas (NeXtOpt). "
    message send tdisp,,"APPENDL",,""
    message send tdisp,,"APPENDL",,"Open a new terminal window and start X-Midas:"
    message send tdisp,,"APPENDL",,"  $ xmstart"
    message send tdisp,,"APPENDL",,"  $ xm"
    message send tdisp,,"APPENDL",,""
    message send tdisp,,"APPENDL",,"Setup NeXtOpt:"
    message send tdisp,,"APPENDL",,"  X-Midas> xmopt nxm $NMROOT/nxm/sys"
    message send tdisp,,"APPENDL",,"  X-Midas> xmpath +nxm"
    message send tdisp,,"APPENDL",,"  X-Midas> xmbopt nxm  ! can be omitted if already built"
    message send tdisp,,"APPENDL",,""
    message send tdisp,,"APPENDL",,"Regression test:"
    message send tdisp,,"APPENDL",,"  X-Midas> message init"
    message send tdisp,,"APPENDL",,"  X-Midas> nm;nxm/on/bg/id=999"
    message send tdisp,,"APPENDL",,"  X-Midas> nm;nxm aux"
    message send tdisp,,"APPENDL",,""
    message send tdisp,,"APPENDL",,"You should see a list of aux associations, something"
    message send tdisp,,"APPENDL",,"like this:"
    message send tdisp,,"APPENDL",,"  Write AUX     = 0"
    message send tdisp,,"APPENDL",,"  Read AUX List = XMPIPE|RAM|0"
    message send tdisp,,"APPENDL",,"  RAM           = ram:         <Type=Ram>"
    message send tdisp,,"APPENDL",,"  XMPIPE        = xmpipe:      <Type=XmPipe>"
    message send tdisp,,"APPENDL",,""
    message send tdisp,,"APPENDL",,"and so on.  A java exception or trace-back indicates an error"
  pipe off
endmacro

procedure processMessage m:msg
  if msg.fid eqs "PANEL"
    if msg.name eqs "MAIN" then
      if msg.data eqss "SKIP" then
        warn "SKIPPING DR 518956-3 regression test."
      else
        assert/text="DR 518956-3 regression test." msg.data eqss "PASS"
      endif
      pipe stop
    endif
  endif
return
