! Test case for LayerMulti translating quoted column names before calling set method.
! Note that this is a general PLOT problem that affects other layers, however this is
! the test case we were given.
!
! @issue   NXM-1563
! @author  J. Czechowski IV
! @since   NeXtMidas 2.7.0
!
startmacro

  switch INTERACTIVE interAct GET DEF=TRUE  SDEF=TRUE
  switch BASELINE    baseline GET DEF=FALSE SDEF=TRUE

  call setDatDir

  if interAct then
    set instructions "SKIP until fixed.\n\n&
                      _____________________________________\n&
                      Note: \n&
                      DR #773671-1 The Layer settings are getting translated in quotes. &
                      This causes COLUMNS="12/24" to be translated to 0.5, which is not &
                      the right name of the column.\n\n&
                      When fixed, should see a single navy blue line trace."

    ! Create testfile with names similar to given DR
    noop ^{datDir}.testxy6000.prm ram:testfile
    headermod ram:testfile RecName(0)="06/24" RecName(1)="12/24" RecName(2)="18/24" RecName(3)="24/24"

    pipe on
      panel/msgid=MAIN/setup/controls=gc
      gcontrol menu main "Exit with Status = " "PASS,FAIL" /tleft
      set gc.main.itemColors {PASS=GREEN,FAIL=RED}

      gcontrol text idtext "Instructions" "^{instructions}" 24 12 /title

      plot ram:testfile{LAYER={LT="Multi",COLUMNS="12/24"}}

      assert/text="^reg.main.name: Got COLUMNS=^{reg.plot.layers.testfile.columns}" reg.plot.layers.testfile.columns eqs "12/24"

    pipe off
  endif
endmacro

!**************************************************************************************************!
procedure processMessage
  if msg.name eqs "MAIN" then
    assert/text="^reg.main.name: Interactive tests" msg.data eqss "PASS"
    pipe stop
  else
    warning "^reg.main.name: unrecognized message ^msg.name from ^msg.fid"
  endif
return

!******************************************************************************!
! Set the dat directory
!******************************************************************************!
procedure setDatDir
  invoke nxmMajor env.nmversion.subString(0,1)
  invoke major java.lang.Integer.valueOf(nxmMajor)
  if major GE 4 then
    invoke s:datDir           nxm.sys.test.DatLocator.getDatDirLocation()
    invoke s:datDirSlash      nxm.sys.test.DatLocator.getDatDirSlashLocation()
    invoke z:sysDatFull       nxm.sys.test.DatLocator.sysDatFull()
    invoke z:sysTestDatExists nxm.sys.test.DatLocator.sysTestDatExists()
  else
    set s:datDir           "nxm.sys.dat"
    set s:datDirSlash      "nxm/sys/dat"
    set z:sysDatFull       true
    set z:sysTestDatExists false
  endif
return
