coreutils/tests/group-names
Jim Meyering 112efa81f2 Replace all occurrences of `(exit N); exit' with
`(exit N); exit N'.  Otherwise, those many tests could exit with
improper exit status when exiting via e.g., a trapped interrupt.
Thanks to a report from Bob Proulx.
2004-06-23 15:07:00 +00:00

20 lines
603 B
Bash

# -*- sh -*-
# Set `groups' to a space-separated list of at least two groups of which
# the user is a member.
groups=${FETISH_GROUPS-`(id -nG || /usr/xpg4/bin/id -nG) 2>/dev/null`}
case "$groups" in
*' '*) ;;
*) cat <<EOF 1>&2
$0: this test requires that you be a member of more than one group,
but running \`id -nG' either failed or found just one. If you really
are a member of at least two group, then rerun this test with FETISH_GROUPS
set in your environment to the space-separated list of names. E.g.,
env FETISH_GROUPS='users cdrom' make check
EOF
(exit 77); exit 77
;;
esac