summaryrefslogtreecommitdiff
path: root/tests/test-lib.sh
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-09-08 08:23:37 +0200
committerJim Meyering <meyering@redhat.com>2008-09-10 13:20:27 +0200
commit1084bf78eafe4de0d8f0752a638be97e26157ea1 (patch)
treece93e5c4d6ff8047663406447c37418dd2656043 /tests/test-lib.sh
parent68561594ca022703e255b3ef5686f176317e5fd4 (diff)
downloadcoreutils-1084bf78eafe4de0d8f0752a638be97e26157ea1.tar.xz
tests: don't use "local" in bourne shell scripts
* tests/test-lib.sh (remove_tmp_, skip_if_mcstransd_is_running_): Avoid failure on Solaris 11, since their /bin/sh passes the tests in posix-shell.m4, yet does not support "local" (which is not POSIX).
Diffstat (limited to 'tests/test-lib.sh')
-rw-r--r--tests/test-lib.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index e7ec80e6d..ceb4eb673 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -246,11 +246,11 @@ skip_if_mcstransd_is_running_()
# When mcstransd is running, you'll see only the 3-component
# version of file-system context strings. Detect that,
# and if it's running, skip this test.
- local ctx=$(stat --printf='%C\n' .) || framework_failure
- case $ctx in
+ __ctx=$(stat --printf='%C\n' .) || framework_failure
+ case $__ctx in
*:*:*:*) ;; # four components is ok
*) # anything else probably means mcstransd is running
- skip_test_ "unexpected context '$ctx'; turn off mcstransd" ;;
+ skip_test_ "unexpected context '$__ctx'; turn off mcstransd" ;;
esac
}
@@ -298,9 +298,9 @@ t_=$("$abs_top_builddir/src/mktemp" -d --tmp="$test_dir_" cu-$this_test.XXXXXXXX
remove_tmp_()
{
- local st=$?
+ __st=$?
cleanup_
- cd "$test_dir_" && chmod -R u+rwx "$t_" && rm -rf "$t_" && exit $st
+ cd "$test_dir_" && chmod -R u+rwx "$t_" && rm -rf "$t_" && exit $__st
}
# Run each test from within a temporary sub-directory named after the