!******************************************************************************!
! Test for having the HOMEPATH follow the CWD
!
! Arguments: None
!
! @bug      2481 HOMEPATH: Set to track CWD
! @author:  J Bauer
!******************************************************************************!
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
    ! NXM-3845 since NeXtMidas 4.1.1
    if ^{env.NMROOT} EQS "classpath:" then
      info "SKIPPING ^reg.main.name because nmd is not included when running from a jar file"
    else
      set instructions "Open NeXtMidas in a new Shell and run the following commands: \n\n &
                       \u0021 Set CWD to $NMROOT/nxm/sys/test \n  &
                       nM> nmd test sys   \n\n &
                       \u0021 Set home to follow CWD \n  &
                       nM> home/cwd      \n\n &
                       \u0021 Set CWD to $NMROOT/nxm/sys/mcr \n  &
                       nM> nmd mcr sys   \n\n &
                       \u0021 The HOMEPATH should match CWD above (MCR area in SYS). \n  &
                       nM> aux  \n\n &
                       Press 'PASS' if  AUX.HOMEPATH matches AUX.CWD. "

      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  idtext "Instructions" instructions 24 16 /title

      pipe off
    endif
  endif
endmacro

!******************************************************************************!
! Main process message for this macro. Should be right after the 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
  else
    say "Unhandled message name: ^msg.name from fid: ^msg.fid data: ^msg.data"
  endif
return

!******************************************************************************!
! Sample test procedure description
procedure test_xyz

return
