# This file is part of Megatest.
#
# Megatest is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Megatest is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Megatest. If not, see <http://www.gnu.org/licenses/>.
[setup]
[ezsteps]
lookittmp ls /tmp
lookithome ls /home
# $CURRENT should be /tmp/nada
currentisblah currentisblah.sh
# $BOGOUS should NOT be set
bogousnotset bogousnotset.sh
# ALT_VAR should NOT be set
altvarnotset altvarnotset.sh
# EMPTY_VAR should be an empty string
empty_var empty_var.sh
# VACKYVAR should be set to a path
vackyvar vackyvar.sh
# test-path and test-file
test-path test-path-file.sh
# verify that vars with $ signs get expanded
varwithdollar eval_vars.sh
emptyvars bash -c 'if [[ $VARNOVAL == "" ]];then echo HAVE_VARNOVAL;else echo "ERROR: VARNOVAL not found";fi'
emptyvar_withspace bash -c 'if [[ $VARNOVAL_WITHSPACE == "" ]];then echo HAVE_VARNOVAL_WITHSPACE;else echo "ERROR: VARNOVAL_WITHSPACE not found";fi'
emptyvar_megatest.sh egrep VARNO megatest.sh
[requirements]
waiton runfirst
priority 0
[items]
NUMNUM [system cat $MT_RUN_AREA_HOME/tmp/$USER/$sysname/$fsname/$datapath/$MT_RUNNAME/$PREDICTABLE]
[logpro]
emptyvars ;;
(expect:error in "LogFileBody" = 0 "VARNOVAL not found" #/ERROR: VARNOVAL not found/)
(expect:required in "LogFileBody" = 1 "HAVE_VARNOVAL" #/HAVE_VARNOVAL/)
emptyvar_withspace ;;
(expect:error in "LogFileBody" = 0 "VARNOVAL_WITHSPACE not found" #/ERROR: VARNOVAL_WITHSPACE not found/)
(expect:required in "LogFileBody" = 1 "HAVE_VARNOVAL_WITHSPACE" #/HAVE_VARNOVAL_WITHSPACE/)
emptyvar_megatest.sh ;;
(expect:error in "LogFileBody" = 0 "No errors expected" #/ERR/i)
(expect:required in "LogFileBody" = 1 "VARNOVAL_WITHSPACE" #/VARNOVAL_WITHSPACE/)
(expect:required in "LogFileBody" = 1 "VARNOVAL" #/VARNOVAL/)
[test_meta]
author matt
owner bob
description This test runs a single ezstep which is expected to pass, no logpro file.
tags quick,first,single
reviewed 09/10/2011, by Matt