summaryrefslogtreecommitdiff
path: root/tests/variables.at
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2019-10-21 18:08:57 +0000
committerBrooks Davis <brooks@FreeBSD.org>2019-10-21 18:08:57 +0000
commit6dbf9acb98fdd3c3ca6d260fb38b23b78b33a47a (patch)
tree0dbe1b24d85739d9ba1914260a1429db8bbc5957 /tests/variables.at
parent320f2946781af5deaf568d19136cf96fe2c436dd (diff)
Notes
Diffstat (limited to 'tests/variables.at')
-rw-r--r--tests/variables.at18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/variables.at b/tests/variables.at
index ffa0da299cc6b..a1f098d423054 100644
--- a/tests/variables.at
+++ b/tests/variables.at
@@ -41,13 +41,16 @@ VAR_UNSET([ampm])
AT_SETUP([$ anyerror])
+echo 'exit 1' > myfalse
+chmod +x myfalse
+
AT_DATA([exit_status.csh],
[[echo $?anyerror $anyerror
-false | true ; echo $?
+./myfalse | true ; echo $?
unset anyerror ; echo $?anyerror
-false | true ; echo $?
+./myfalse | true ; echo $?
set anyerror
-false | true ; echo $?
+./myfalse | true ; echo $?
]])
AT_CHECK([tcsh -f exit_status.csh],,
@@ -588,7 +591,7 @@ printenv HOME
setenv HOME /bar
echo $home
]])
-AT_CHECK([tcsh -f home.csh], ,
+AT_CHECK([export HOME=$(getent passwd $(id -nu) | awk -F: '{ print $(NF - 1) }'); tcsh -f home.csh], ,
[1
1
/foo
@@ -705,7 +708,7 @@ AT_CLEANUP
AT_SETUP([$ cdtohome])
-AT_CHECK([tcsh -f -c 'cd'], 0)
+AT_CHECK([export HOME=$(getent passwd $(id -nu) | awk -F: '{ print $(NF - 1) }'); tcsh -f -c 'cd'], 0)
AT_CLEANUP
AT_SETUP([$ noimplicithome])
AT_CHECK([tcsh -f -c 'unset cdtohome; cd'], 1, , [cd: Too few arguments.
@@ -781,10 +784,13 @@ AT_CLEANUP
AT_SETUP([$ printexitvalue])
+echo 'exit 1' > myfalse
+chmod +x myfalse
+
AT_DATA([printexitvalue.csh],
[[echo $?printexitvalue
set printexitvalue
-false
+./myfalse
(exit 3 >/dev/null)
:
]])