summaryrefslogtreecommitdiff
path: root/tests/envvar-check
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-03-17 22:12:03 +0000
committerJim Meyering <jim@meyering.net>2001-03-17 22:12:03 +0000
commitd6a685271cdd8142fbd37904ca7d50e1fc2565b3 (patch)
tree8e8be416f44d4885ceb83d66e19ef4ec160fea44 /tests/envvar-check
parentc5e168c0344224ac08f4af5e17d885f9623b7867 (diff)
downloadcoreutils-d6a685271cdd8142fbd37904ca7d50e1fc2565b3.tar.gz
coreutils-d6a685271cdd8142fbd37904ca7d50e1fc2565b3.tar.bz2
coreutils-d6a685271cdd8142fbd37904ca7d50e1fc2565b3.zip
Set/use $as_unset, for those shells
(like Ultrix4's /bin/sh) that don't accept `unset'.
Diffstat (limited to 'tests/envvar-check')
-rw-r--r--tests/envvar-check8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/envvar-check b/tests/envvar-check
index 5784949d2..880eaccfc 100644
--- a/tests/envvar-check
+++ b/tests/envvar-check
@@ -1,4 +1,10 @@
-unset VERSION_CONTROL SIMPLE_BACKUP_SUFFIX
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+$as_unset VERSION_CONTROL SIMPLE_BACKUP_SUFFIX
if test "${VERSION_CONTROL+set}" = set; then
echo "$0: the VERSION_CONTROL envvar is set --" \