summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranton <anton@cvs.openbsd.org>2018-09-29 16:24:14 +0000
committeranton <anton@cvs.openbsd.org>2018-09-29 16:24:14 +0000
commitc2caebe2a7b61ec815fc973915e8aebf33b01f18 (patch)
treed0d4392d83b9505de73db5c38fba620d9035ec5d
parentf088f212fa5df79ace0adee7fb73ab4f99c7d7b5 (diff)
test that PWD and OLDPWD are exported
-rw-r--r--regress/bin/ksh/obsd-regress.t13
1 files changed, 12 insertions, 1 deletions
diff --git a/regress/bin/ksh/obsd-regress.t b/regress/bin/ksh/obsd-regress.t
index fda01793945..887a83fed22 100644
--- a/regress/bin/ksh/obsd-regress.t
+++ b/regress/bin/ksh/obsd-regress.t
@@ -1,4 +1,4 @@
-# $OpenBSD: obsd-regress.t,v 1.7 2018/07/09 00:23:55 anton Exp $
+# $OpenBSD: obsd-regress.t,v 1.8 2018/09/29 16:24:13 anton Exp $
#
# ksh regression tests from OpenBSD
@@ -485,3 +485,14 @@ expected-exit: e == 1
expected-stderr-pattern:
/: 1: parameter not set$/
---
+
+name: pwd
+description:
+ PWD and OLDPWD must be exported
+stdin:
+ d=$(printenv PWD)
+ : ${d:?"PWD not exported"}
+ cd .
+ d=$(printenv OLDPWD)
+ : ${d:?"OLDPWD not exported"}
+---