!******************************************************************************!
! Tests for the IMPORT command when environment variable has dots in them.
!
! 2012-08-10: RHEL6+ tcsh no longer allow invalid characters (including dot) in
!             environment variable names. So this test is no longer valid for RHEL6+
!             RedHat Bug 436901 - It should not be allowed if environment variable begins with a digit
!             https://bugzilla.redhat.com/show_bug.cgi?id=436901  see comment #5
!
! @bug     1822
! @author  Neon Ngo
! @version $Id: test_import_with_dot.mm,v 1.3 2014/01/29 17:49:16 jtm Exp $
! @since   NeXtMidas 2.7.1
!******************************************************************************!
startmacro
  switch INTERACTIVE interAct GET DEF=TRUE SDEF=TRUE
  switch BASELINE    baseline GET DEF=TRUE SDEF=TRUE

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

      gcontrol label instructions "INSTRUCTIONS"
      gcontrol panel tdisp
      textdisplay/id=tdisp text=""

      message send tdisp,,"APPENDL",,"This test cannot be run on RHEL6+ or Solaris (SKIP it)."
      message send tdisp,,"APPENDL",," "
      message send tdisp,,"APPENDL",,"In another OS terminal do the following:"
      message send tdisp,,"APPENDL",," "
      if env.OSTYPE EQS "DOS" then
        message send tdisp,,"APPENDL",,"  set a.b=123"
      else
        message send tdisp,,"APPENDL",,"  setenv a.b 123"
      endif
      message send tdisp,,"APPENDL",,"  nm home test sys"
      message send tdisp,,"APPENDL",,"  nm %test_import_dot 123"
      message send tdisp,,"APPENDL",," "
      message send tdisp,,"APPENDL",,"Make sure none of the tests fails."

    pipe off
  endif
endmacro

!******************************************************************************!
procedure processMessage m:msg
  if msg.name eqs "MAIN" then
    assert/text="^reg.main.name: Tests for IMPORT of env with dots" msg.data eqss "PASS"
    pipe stop
  else
    say "^reg.main.name: Unhandled message name: ^msg.name from fid: ^msg.fid data: ^msg.data"
  endif
return
