!******************************************************************************!
! Test case to show LIST2 renders new 256 ASCII type
!
! @bug      NXM-3570 Z Data Type - 256 ASCII
! @since    3.9.4
! @author:  Jeanette McCall
!******************************************************************************!
startmacro/tsetup=nxm.sys.test.test_datalist_setup_256ascii.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

    res test_output_file ascii256_t5000.tmp

    nxm.sys.test.plotellipsetester/DIAGONAL/COLOR=4/NOTEMODETYPE=4Z/RT/RATE=500/STARTTIME="2007:01:02::00:00:00" OUT=test_output_file ELEM=5

    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" "Verify the DATALIST output\n\n&
                                           NOTE is 4Z format\n&
                                           (where 'Z' is 256 ASCII type)" 24 7 /title

      shellgui/id=idshellgui/attach
      say "EXPECTED OUTPUT:"
      say "  1: POS=(0.0,2.0,4.0)  ELPS=(30000.0,7000.0,45.0)  NAME=POINT_1  COLOR=GREEN  FLAG=(0,0,4,2,-9,1,4,4)"
      say "     NOTE=__note_1__note_2__note_3__note_4__note_5__note_6__note_7__note_8__note_9__note_0__note +"
      say "_1__note_2__note_3__note_4__note_5__note_6__note_7__note_8__note_9__note_0__note_1__note_2__note +"
      say "_3__note_4__note_5__note_6__note_7__note_8__note_9__note_0__note_1__note_2__note_3__note_4__note +"
      say "_5__note_6__note_7__note_8__note_9__note_0__note_1__note_2__note_3__note_4__note_5__note_6__note +"
      say "_7__note_8__note_9__note_0__note_1__note_2__note_3__note_4__note_5__note_6__note_7__note_8__note +"
      say "_9__note_0__note_1__note_2__note_3__note_4__note_5__note_6__note_7__note_8__note_9__note_0__note +"
      say "_1__note_2__note_3__note_4__note_5__note_6__note_7__note_8__note_9__note_0__note_1__note_2__note +"
      say "_3__note_4__note_5__note_6__note_7__note_8__note_9__note_0__note_1__note_2__note_3__note_4__note +"
      say "_5__note_6__note_7__note_8__note_9__note_0__note_1__note_2__note_3__note_4__note_5__note_6__note +"
      say "_7__note_8__note_9__note_0__note_1__note_2__note_3__note_4__note_5__note_6__note_7__note_8__note +"
      say "_9__note_0__note_1__note_2__note_3__note_4__note_5__note_6__note_7__note_8"
      say ""
      say "ACTUAL OUTPUT:"
      DATALIST/bg test_output_file START=1 NELEM=1

    pipe off
    erase test_output_file
  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
