From 36bba298843322628ef1c9429175b314f9f7e96b Mon Sep 17 00:00:00 2001
From: Matthieu Patou <mat@matws.net>
Date: Tue, 9 Mar 2010 15:39:56 +0300
Subject: [PATCH] s4:unittest: Test wbinfo --group-info and --gid-info

---
 nsswitch/tests/test_wbinfo.sh |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh
index b92b8f0..7170753 100755
--- a/nsswitch/tests/test_wbinfo.sh
+++ b/nsswitch/tests/test_wbinfo.sh
@@ -181,6 +181,17 @@ knownfail "wbinfo --gid-info against $TARGET" $wbinfo --gid-info 30001
 
 testit "wbinfo -r against $TARGET" $wbinfo -r "$DOMAIN/$USERNAME" || failed=`expr $failed + 1`
 
+echo "test: wbinfo --group-info against $TARGET"
+rawgid=`$wbinfo --group-info "Domain admins" | sed 's/.*:\([0-9][0-9]*\):/\1/'`
+if test x$? = x0; then
+	echo "success: wbinfo --group-info $TARGET"
+else
+	echo "failure: wbinfo --group-info against $TARGET"
+fi
+
+gid=`echo $rawgid | sed 's/.*:\([0-9][0-9]*\):/\1/'`
+testit "wbinfo --gid-info against $TARGET" $wbinfo --gid-info $gid || failed=`expr $failed + 1`
+
 testit "wbinfo --user-domgroups against $TARGET" $wbinfo --user-domgroups $admin_sid || failed=`expr $failed + 1`
 
 testit "wbinfo --user-sids against $TARGET" $wbinfo --user-sids $admin_sid || failed=`expr $failed + 1`
-- 
1.6.3.3

