summaryrefslogtreecommitdiff
path: root/tests/t-lib-helpers.sh
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-11-18 14:40:13 +0100
committerJim Meyering <meyering@redhat.com>2010-11-20 17:03:02 +0100
commit5cb4fae366c3e8b525b126ceb49dd22b9585b53f (patch)
treea621eb1d1ef36a1773fa9be66e6654ae73b6acf9 /tests/t-lib-helpers.sh
parentea465b3dd304118f1dd3e19b92cafdc401ec789f (diff)
downloadparted-5cb4fae366c3e8b525b126ceb49dd22b9585b53f.tar.gz
tests: t-lib-helpers: copy emit_superuser_warning from test-lib.sh
Diffstat (limited to 'tests/t-lib-helpers.sh')
-rw-r--r--tests/t-lib-helpers.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh
index e868532..970d490 100644
--- a/tests/t-lib-helpers.sh
+++ b/tests/t-lib-helpers.sh
@@ -302,3 +302,10 @@ working_umask_or_skip_()
'*) skip_ 'your build directory has unusual umask semantics'
esac
}
+
+emit_superuser_warning()
+{
+ uid=`id -u` || uid=1
+ test "$uid" != 0 &&
+ echo 'WARNING: You are not superuser. Watch out for permissions.' || :
+}