#!/bin/bash
######################################################################################
#
# This script is used for testing filename behavior from outside the Shell.
#
# Issue:  NXM-4106 filename behavior from os prompt needs to be tested
# Since:  NeXtMidas 4.1.4
# Author: Zachary Matthews
#
######################################################################################

# Check if NMROOT is defined
if [[ -z "${NMROOT}" ]]; then
  echo "WARNING: NMROOT is not defined"
  exit 1
fi

# Check if JAVAHOME is defined
if [[ -z "${JAVA_HOME}" ]]; then
  echo "WARNING: JAVA_HOME is not defined"
  exit 1
fi

# Start new NeXtMidas session
source ${NMROOT}/os/unix/nmstart.sh
echo ""

##############################################################################
# Get version of NeXtMidas
##############################################################################
ver=$(source ${NMROOT}/os/unix/nm.sh invoke ,, env.nmversion.replace\(\".\",\"\"\))
ver=(${ver})
ver=${ver[-1]}

##############################################################################
# Set write aux to a new temporary directory and add it to the read aux
##############################################################################
script=`basename $0`
writeAux=${HOME}/nextmidas_${script::-3}/
if [[ ! -d ${writeAux} ]] ; then
  mkdir ${writeAux}
fi

auxNum=2
source ${NMROOT}/os/unix/nm.sh res aux.${auxNum} \"${writeAux}\"
source ${NMROOT}/os/unix/nm.sh aux ${auxNum} ${auxNum}+,-1

##############################################################################
# Lower Case
##############################################################################

# Lower case with escaped quotes with filename extension
echo ""
echo "******************************************************************************"
echo "LOWER CASE WITH ESCAPED QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform \"jvm${ver}elcewave.tmp\"
tmpFile=jvm${ver}elcewave.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting jvm${ver}elcewave.tmp when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot  \"jvm${ver}elcewave.tmp\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}elcefn \"jvm${ver}elcewave.tmp\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Lower case with escaped quotes result matches expected value\" jvm${ver}elcefn eqs "jvm${ver}elcewave.tmp"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting jvm${ver}elcewave.tmp when specifying the filename as a result...\"
source ${NMROOT}/os/unix/nm.sh plot \"^{jvm${ver}elcefn}\"
rm -f ${writeAux}/*

# Lower case with no quotes with filename extension
echo ""
echo "******************************************************************************"
echo "LOWER CASE WITH NO QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform jvm${ver}nlcewave.tmp
tmpFile=jvm${ver}nlcewave.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting jvm${ver}nlcewave.tmp when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot jvm${ver}nlcewave.tmp
source ${NMROOT}/os/unix/nm.sh res jvm${ver}nlcefn jvm${ver}nlcewave.tmp
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"NOTE: Expected and actual results should match\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Expected Result:\"
source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}NLCEFN = jvm${ver}nlcewave.tmp\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Actual Result:\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}nlcefn
source ${NMROOT}/os/unix/nm.sh say \"\"
#source ${NMROOT}/os/unix/nm.sh say \"Plotting jvm${ver}nlcewave.tmp when specifying the filename as a result...\"
#source ${NMROOT}/os/unix/nm.sh plot ^{jvm${ver}nlcefn}
source ${NMROOT}/os/unix/nm.sh say \"WARNING: Expected and actual results tend to not match in this case, so skipping plot when specifying the filename as a result until the results issue is fixed.\"
rm -f ${writeAux}/*

# Lower case with regular quotes with filename extension
echo ""
echo "******************************************************************************"
echo "LOWER CASE WITH REGULAR QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform "jvm${ver}qlcewave.tmp"
tmpFile=jvm${ver}qlcewave.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting jvm${ver}qlcewave.tmp when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot "jvm${ver}qlcewave.tmp"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}qlcefn "jvm${ver}qlcewave.tmp"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"NOTE: Expected and actual results should match\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Expected Result:\"
source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}QLCEFN = jvm${ver}qlcewave.tmp\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Actual Result:\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}qlcefn
source ${NMROOT}/os/unix/nm.sh say \"\"
#source ${NMROOT}/os/unix/nm.sh say \"Plotting jvm${ver}qlcewave.tmp when specifying the filename as a result...\"
#source ${NMROOT}/os/unix/nm.sh plot "^{jvm${ver}qlcefn}"
source ${NMROOT}/os/unix/nm.sh say \"WARNING: Expected and actual results tend to not match in this case, so skipping plot when specifying the filename as a result until the results issue is fixed.\"
rm -f ${writeAux}/*

##############################################################################
# Upper Case
##############################################################################

# Upper case with escaped quotes with filename extension
echo ""
echo "******************************************************************************"
echo "UPPER CASE WITH ESCAPED QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform \"JVM${ver}EUCEWAVE.TMP\"
tmpFile=JVM${ver}EUCEWAVE.TMP
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}EUCEWAVE.TMP when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot \"JVM${ver}EUCEWAVE.TMP\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}eucefn \"JVM${ver}EUCEWAVE.TMP\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Upper case with escaped quotes result matches expected value\" jvm${ver}eucefn eqs "JVM${ver}EUCEWAVE.TMP"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}EUCEWAVE.TMP when specifying the filename as a result...\"
source ${NMROOT}/os/unix/nm.sh plot \"^{jvm${ver}eucefn}\"
rm -f ${writeAux}/*

# Upper case with no quotes with filename extension
echo ""
echo "******************************************************************************"
echo "UPPER CASE WITH NO QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform JVM${ver}NUCEWAVE.TMP
tmpFile=JVM${ver}NUCEWAVE.TMP
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isFalse
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isTrue
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}NUCEWAVE.TMP when specifying the filename directly...\"
  source ${NMROOT}/os/unix/nm.sh plot JVM${ver}NUCEWAVE.TMP
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}NUCEWAVE.TMP does NOT exist, so skipping plot when specifying the filename directly...\"
fi
source ${NMROOT}/os/unix/nm.sh res jvm${ver}nucefn JVM${ver}NUCEWAVE.TMP
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Upper case with no quotes result matches expected value\" jvm${ver}nucefn eqs "JVM${ver}NUCEWAVE.TMP"
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}NUCEWAVE.TMP when specifying the filename as a result...\"
  source ${NMROOT}/os/unix/nm.sh plot ^{jvm${ver}nucefn}
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}NUCEWAVE.TMP does NOT exist, so skipping plot when specifying the filename as a result...\"
fi
rm -f ${writeAux}/*

# Upper case with regular quotes with filename extension
echo ""
echo "******************************************************************************"
echo "UPPER CASE WITH REGULAR QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform "JVM${ver}QUCEWAVE.TMP"
tmpFile=JVM${ver}QUCEWAVE.TMP
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isFalse
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isTrue
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}QUCEWAVE.TMP when specifying the filename directly...\"
  source ${NMROOT}/os/unix/nm.sh plot "JVM${ver}QUCEWAVE.TMP"
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}QUCEWAVE.TMP does NOT exist, so skipping plot when specifying the filename directly...\"
fi
source ${NMROOT}/os/unix/nm.sh res jvm${ver}qucefn "JVM${ver}QUCEWAVE.TMP"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Upper case with regular quotes result matches expected value\" jvm${ver}qucefn eqs "JVM${ver}QUCEWAVE.TMP"
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}QUCEWAVE.TMP when specifying the filename as a result...\"
  source ${NMROOT}/os/unix/nm.sh plot "^{jvm${ver}qucefn}"
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}QUCEWAVE.TMP does NOT exist, so skipping plot when specifying the filename as a result...\"
fi
rm -f ${writeAux}/*

# Upper case with escaped quotes with no filename extension
echo ""
echo "******************************************************************************"
echo "UPPER CASE WITH ESCAPED QUOTES WITH NO FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform \"JVM${ver}EUCWAVE\"
tmpFile=JVM${ver}EUCWAVE.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}EUCWAVE when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot \"JVM${ver}EUCWAVE\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}eucfn \"JVM${ver}EUCWAVE\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Upper case with escaped quotes with no filename extension result matches expected value\" jvm${ver}eucfn eqs "JVM${ver}EUCWAVE"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}EUCWAVE when specifying the filename as a result...\"
source ${NMROOT}/os/unix/nm.sh plot \"^{jvm${ver}eucfn}\"
rm -f ${writeAux}/*

# Upper case with no quotes with no filename extension
echo ""
echo "******************************************************************************"
echo "UPPER CASE WITH NO QUOTES WITH NO FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform JVM${ver}NUCWAVE
tmpFile=JVM${ver}NUCWAVE.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isFalse
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isTrue
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}NUCWAVE when specifying the filename directly...\"
  source ${NMROOT}/os/unix/nm.sh plot JVM${ver}NUCWAVE
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}NUCWAVE does NOT exist, so skipping plot when specifying the filename directly...\"
fi
source ${NMROOT}/os/unix/nm.sh res jvm${ver}nucfn JVM${ver}NUCWAVE
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Upper case with no quotes with no filename extension result matches expected value\" jvm${ver}nucfn eqs "JVM${ver}NUCWAVE"
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}NUCWAVE when specifying the filename as a result...\"
  source ${NMROOT}/os/unix/nm.sh plot ^{jvm${ver}nucfn}
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}NUCWAVE does NOT exist, so skipping plot when specifying the filename as a result\"
fi
rm -f ${writeAux}/*

# Upper case with regular quotes with no filename extension
echo ""
echo "******************************************************************************"
echo "UPPER CASE WITH REGULAR QUOTES WITH NO FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform "JVM${ver}QUCWAVE"
tmpFile=JVM${ver}QUCWAVE.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isFalse
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} does NOT exist\" true isTrue
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}QUCWAVE when specifying the filename directly...\"
  source ${NMROOT}/os/unix/nm.sh plot "JVM${ver}QUCWAVE"
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}QUCWAVE does NOT exist, so skipping plot when specifying the filename directly\"
fi
source ${NMROOT}/os/unix/nm.sh res jvm${ver}qucfn "JVM${ver}QUCWAVE"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Upper case with regular quotes with no filename extension result matches expected value\" jvm${ver}qucfn eqs "JVM${ver}QUCWAVE"
source ${NMROOT}/os/unix/nm.sh say \"\"
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh say \"Plotting JVM${ver}QUCWAVE when specifying the filename as a result...\"
  source ${NMROOT}/os/unix/nm.sh plot "^{jvm${ver}qucfn}"
else
  source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}QUCWAVE does NOT exist, so skipping plot when specifying the filename as a result\"
fi
rm -f ${writeAux}/*

##############################################################################
# Mixed Case
##############################################################################

# Mixed case with escaped quotes with filename extension
echo ""
echo "******************************************************************************"
echo "MIXED CASE WITH ESCAPED QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform \"JvM${ver}emCewave.tmp\"
tmpFile=JvM${ver}emCewave.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JvM${ver}emCewave.tmp when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot \"JvM${ver}emCewave.tmp\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}emcefn \"JvM${ver}emCewave.tmp\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh assert/cs/text=\"Mixed case with escaped quotes result matches expected value\" jvm${ver}emcefn eqs "JvM${ver}emCewave.tmp"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JvM${ver}emCewave.tmp when specifying the filename as a result...\"
source ${NMROOT}/os/unix/nm.sh plot \"^{jvm${ver}emcefn}\"
rm -f ${writeAux}/*

# Mixed case with no quotes with filename extension
echo ""
echo "******************************************************************************"
echo "MIXED CASE WITH NO QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform JvM${ver}NmCewave.tmp
tmpFile=JvM${ver}NmCewave.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JvM${ver}NmCewave.tmp when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot JvM${ver}NmCewave.tmp
source ${NMROOT}/os/unix/nm.sh res jvm${ver}nmcefn JvM${ver}NmCewave.tmp
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"NOTE: Expected and actual results should match\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Expected Result:\"
source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}NMCEFN = JvM${ver}NmCewave.tmp\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Actual Result:\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}nmcefn
source ${NMROOT}/os/unix/nm.sh say \"\"
#source ${NMROOT}/os/unix/nm.sh say \"Plotting JvM${ver}NmCewave.tmp when specifying the filename as a result...\"
#source ${NMROOT}/os/unix/nm.sh plot ^{jvm${ver}nmcefn}
source ${NMROOT}/os/unix/nm.sh say \"WARNING: Expected and actual results tend to not match in this case, so skipping plot when specifying the filename as a result until the results issue is fixed.\"
rm -f ${writeAux}/*

# Mixed case with regular quotes with filename extension
echo ""
echo "******************************************************************************"
echo "MIXED CASE WITH REGULAR QUOTES WITH FILENAME EXTENSION"
echo "******************************************************************************"
echo ""
source ${NMROOT}/os/unix/nm.sh waveform "JvM${ver}qMcewave.tmp"
tmpFile=JvM${ver}qMcewave.tmp
if [[ -f ${writeAux}${tmpFile} ]] ; then
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isTrue
else
  source ${NMROOT}/os/unix/nm.sh assert/text=\"${tmpFile} exists\" true isFalse
fi
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Plotting JvM${ver}qMcewave.tmp when specifying the filename directly...\"
source ${NMROOT}/os/unix/nm.sh plot "JvM${ver}qMcewave.tmp"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}qmcefn "JvM${ver}qMcewave.tmp"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"NOTE: Expected and actual results should match\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Expected Result:\"
source ${NMROOT}/os/unix/nm.sh say \"JVM${ver}QMCEFN = JvM${ver}qMcewave.tmp\"
source ${NMROOT}/os/unix/nm.sh say \"\"
source ${NMROOT}/os/unix/nm.sh say \"Actual Result:\"
source ${NMROOT}/os/unix/nm.sh res jvm${ver}qmcefn
source ${NMROOT}/os/unix/nm.sh say \"\"
#source ${NMROOT}/os/unix/nm.sh say \"Plotting JvM${ver}qMcewave.tmp when specifying the filename as a result...\"
#source ${NMROOT}/os/unix/nm.sh plot "^{jvm${ver}qmcefn}"
source ${NMROOT}/os/unix/nm.sh say \"WARNING: Expected and actual results tend to not match in this case, so skipping plot when specifying the filename as a result until the results issue is fixed.\"
rm -f ${writeAux}/*

##############################################################################
# Cleanup files
##############################################################################
echo ""
echo "Removing temporary Write Aux ${writeAux}..."
rm -rf ${writeAux}

source ${NMROOT}/os/unix/nmend.sh
