! Tests listing a file that was an overwrote of an existing huge file (BUG 2168)
!
! Author:  JC4, J. Bauer
! Version: $Id: test_list2_overwrite.mm,v 1.2 2011/02/08 16:14:40 ntn Exp $
!
startmacro
  switch INTERACTIVE interAct GET DEF=TRUE  SDEF=TRUE  ! for normal interactive test(s)
  switch BASELINE    baseline GET DEF=FALSE SDEF=TRUE  ! for defects or more obscure test case(s)

  if interAct then
    set testfile "bug2168.tmp"
    wave testfile elem=100m
    wave testfile elem=100

    set instr "Give this test case a few seconds to create test files... You should see a list2 of a small datafile (100 elements)."

    pipe on
      panel/msgid=MAIN/setup/controls=gc
      gcontrol label macro "Test MACRO"
      gcontrol menu  main "Exit with Status =" "PASS,FAIL" TABLE={ItemColors={PASS="GREEN",FAIL="RED"}} /tleft

      gcontrol text  info   "Instructions" instr ,, 12 /title

      list2/id=idlist testfile

    pipe off

    erase/warn=no testfile
  endif

endmacro

!******************************************************************************!
procedure processMessage m:msg

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

return
