!******************************************************************************!
! Tests for DATALIST command.
!
!   Author : J. Czechowski IV
!******************************************************************************!
startmacro/tsetup=nxm.sys.test.test_datalist_setup.tbl
  switch INTERACTIVE  interAct     GET DEF=TRUE SDEF=TRUE  ! for normal interactive test(s)
  switch STANDALONE   standalone   GET DEF=TRUE SDEF=TRUE
  switch COREGRAPHICS coregraphics GET DEF=FALSE SDEF=TRUE  ! for a quick check of graphics - more extreme tests - since 3.8.1

  if interAct OR coreGraphics then
    pipe on
      panel/msgid=MAIN/setup/controls=gc

      if standalone isTrue then
        gcontrol label macro "MACRO"
        gcontrol menu MAIN "Exit with Status = " "PASS,FAIL" /tleft
        set gc.MAIN.itemColors {PASS=GREEN,FAIL=RED}
      endif

      gcontrol text idtext "INSTRUCTIONS" "Should see a hexdump-like printout with HEX on the &
                                           left and ASCII on the right for the WAVEFORM explain &
                                           file" 24 7 /title

      shellgui/id=idshellgui/attach
      DATALIST/bg nxm.sys.exp.waveform.exp{FG=RAW} NELEM=256

    pipe off
  endif

endmacro

!******************************************************************************!
procedure processMessage m:msg
  if msg.name EQS "MAIN" then
    if msg.data EQS "EXIT" then
      pipe stop
    else
      assert/text="^reg.main.name: User indicated tests" msg.data eqss "PASS"
      pipe stop
    endif
  else
    say "Unhandled message name: ^msg.name from fid: ^msg.fid data: ^msg.data"
  endif
return
