#!/bin/sh
############################################################################
# (C) Copyright 2001 The Free Standards Group  Inc
# ./tset/LSB.usersgroups/usersgroups/commands/root_funcs.sh
# root_funcs.sh : helper functions for paswd-tc.sh
#
# Log: root_funcs.sh,v 
#
# Revision 1.1  2001/07/05 11:22:05  cyeoh
# 	Adds in passwd command tests
#
# Revision 1.2 2001/07/19 15:42:39 Apham
#	Adds more descriptive comments
#
############################################################################
tet_infoline()
{
    echo "echo $@"
}

execute_passwd_g()
############################################################################
# This function uses cpt to test passwd -g interactively.
############################################################################
{
	OTHER_GROUP=$1
   TestFile=test.passwd_g

cat > $TestFile << EOF
testing
testing
EOF

    ./cpt passwd -g  $OTHER_GROUP < $TestFile > /dev/null 2>&1 
    res=$?
	return $?
}

execute_passwd_g_r()
############################################################################
# This function tests passwd -gr.
############################################################################
{
	OTHER_GROUP=$1
    passwd -g -r  $OTHER_GROUP > /dev/null 2>&1 
	return $?
}

execute_passwd_g_R()
############################################################################
# This function tests passwd -gR.
############################################################################
{
	OTHER_GROUP=$1
    passwd -g -R  $OTHER_GROUP > /dev/null 2>&1 
	return $?
}

# include other required shell function
. $TET_EXECUTE/LIB/usersgroups_funcs.sh

$($@)

