diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1998-10-27 08:34:40 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1998-10-27 08:34:40 +0000 |
commit | 606932feba6a7c07d368ce4e766975b0fe622bfc (patch) | |
tree | 5ef565e9ff2f82f6eb6b2690e33ef1bc87242384 /t | |
parent | 8b3146cf0bef8def0f8924fdcf8a1d5c5d4a110e (diff) | |
download | perl-606932feba6a7c07d368ce4e766975b0fe622bfc.tar.gz |
`id -Gn` might be available where `groups` is not.
p4raw-id: //depot/cfgperl@2098
Diffstat (limited to 't')
-rwxr-xr-x | t/op/groups.t | 11 |
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) { |