diff options
author | scf <scf@FreeBSD.org> | 2008-04-23 00:49:13 +0000 |
---|---|---|
committer | scf <scf@FreeBSD.org> | 2008-04-23 00:49:13 +0000 |
commit | cab3742f107c2ffe5e778a8fc08b3070278fe4ac (patch) | |
tree | e4b13bb34526bfc901f80321dd423bf46c41e1a0 /tools/regression/lib/libutil/test-grp.t | |
parent | e3c15650b08e098db24738aa1cd64372ffcb7d45 (diff) | |
download | FreeBSD-src-cab3742f107c2ffe5e778a8fc08b3070278fe4ac.zip FreeBSD-src-cab3742f107c2ffe5e778a8fc08b3070278fe4ac.tar.gz |
Add four utility functions related to struct grp processing modeled in-part
after similar calls related to struct pwd in libutil/pw_util.c:
- gr_equal()
Perform a deep comparison of two struct grp's. It does a thorough, yet
unoptimized comparison of all the members regardless of order.
- gr_make()
Create a string (see group(5)) from a struct grp.
- gr_dup()
Duplicate a struct grp. Returns a value that is a single contiguous
block of memory.
- gr_scan()
Create a struct grp from a string (as produced by gr_make()).
MFC after: 3 weeks
Diffstat (limited to 'tools/regression/lib/libutil/test-grp.t')
-rw-r--r-- | tools/regression/lib/libutil/test-grp.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/regression/lib/libutil/test-grp.t b/tools/regression/lib/libutil/test-grp.t new file mode 100644 index 0000000..cbb7c8c --- /dev/null +++ b/tools/regression/lib/libutil/test-grp.t @@ -0,0 +1,12 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +base=$(realpath $(dirname $0)) +name=$(basename $0 .t) + +set -e +cd $base +make -s $name >/dev/null +exec $base/$name |