!******************************************************************************!
! Test plotting a file with large start index.
!
! Arguments: None
!
! Issue    NXM-1838 PLOT / LAYER: Add /INDEX switch to avoid using
!                   START and DELTA values from metadata
! Since    NeXtMidas 2.7.3
! Author:  J. Bauer
!******************************************************************************!
startmacro
switch INTERACTIVE interAct GET DEF=TRUE  SDEF=TRUE
switch BASELINE    baseline GET DEF=FALSE SDEF=TRUE

set defaultInstructions &
    "Verify: START axis of 0.\n\n\n&
    ******************************\n&
     Note: Prior to NXM-1838 this would show a start AXIS of 1e5."

if interAct then
  pipe init

  waveform temp_axis_index.tmp start=1e5

  panel/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 text idtext "Instructions" "^defaultInstructions" 10 10 /title

  plot/msgid=MAIN/id=idplot/index  temp_axis_index.tmp /READOUT="-DateString"

  pipe off

endif

! NXM-1658
erase/quiet/warn=n temp_axis_index

endmacro

!******************************************************************************!
procedure processMessage m:msg
!say "got ^{msg.toString(NAME|DATA)}"

  if msg.name eqs "MAIN" then
    assert/text="^reg.main.name: User indicated tests" msg.data eqss "PASS"
    pipe stop
  else
    !do nothing
  endif

return
