! This will test BUG 1849: plotting a Type 2000 file with
!   number of elements * frame size > 2G
!
! @author  John Marsh
! @issue   NXM-1763
!
startmacro
  switch INTERACTIVE interAct GET DEF=TRUE SDEF=TRUE

  ! JMM: current test scenario for Bug 1849 is "non-interactive, but uses graphics,
  !      so allow tester to disable running test via the /interactive switch
  if interAct then
    INFO "It okay to see a warning about DataFile l2dtemp_bug1849 does not have expected size"
    res bug1849 1
    waveform l2dtemp_bug1849
    headermod l2dtemp_bug1849 type=2000 fs=30290     ! type 2000, frame size 30290
    headermod l2dtemp_bug1849 size=99042          ! force number of frames 99042!
    plot l2dtemp_bug1849 /bg /id=plot
    pause 0.1
    invoke lay reg.plot.getLayer()
    if lay REXISTS then
      message func=sendw id=plot name=exit
    endif
    assert/text="Plot (faked) giant 2D file" lay REXISTS
    erase l2dtemp_bug1849
  endif
endmacro

procedure processException
!!  say "Exception while running test"
  res bug1849 0
return
