summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1998-10-27 08:34:40 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1998-10-27 08:34:40 +0000
commit606932feba6a7c07d368ce4e766975b0fe622bfc (patch)
tree5ef565e9ff2f82f6eb6b2690e33ef1bc87242384 /t
parent8b3146cf0bef8def0f8924fdcf8a1d5c5d4a110e (diff)
downloadperl-606932feba6a7c07d368ce4e766975b0fe622bfc.tar.gz
`id -Gn` might be available where `groups` is not.
p4raw-id: //depot/cfgperl@2098
Diffstat (limited to 't')
-rwxr-xr-xt/op/groups.t11
1 files changed, 8 insertions, 3 deletions
diff --git a/t/op/groups.t b/t/op/groups.t
index f6f5ba252c..97a41059df 100755
--- a/t/op/groups.t
+++ b/t/op/groups.t
@@ -1,8 +1,11 @@
#!./perl
-if (! -x ($groups = '/usr/ucb/groups') &&
- ! -x ($groups = '/usr/bin/groups') &&
- ! -x ($groups = '/bin/groups')
+if (! -x ($groups = '/usr/ucb/groups') &&
+ ! -x ($groups = '/usr/bin/groups') &&
+ ! -x ($groups = '/bin/groups') &&
+ ! -x ($groups = '/usr/bin/id') &&
+ ! -x ($groups = '/bin/id') &&
+ ! -x ($groups = '/usr/xpg4/bin/id')
) {
print "1..0\n";
exit 0;
@@ -33,6 +36,8 @@ if ($^O eq "uwin") {
$gr1 = join(' ', sort @gr);
}
+$groups .= ' -Gn' if $groups =~ m:/id$:;
+
$gr2 = join(' ', grep(!$basegroup{$_}++, sort split(' ',`$groups`)));
if ($gr1 eq $gr2) {