From f54dc2b60a42da523751467918a7cca262779ec6 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Wed, 28 Sep 2005 16:10:24 +0000 Subject: [PATCH] Import newsuperior test from HEAD --- tests/scripts/test005-modrdn | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/scripts/test005-modrdn b/tests/scripts/test005-modrdn index ca983aac16..16c94cf4df 100755 --- a/tests/scripts/test005-modrdn +++ b/tests/scripts/test005-modrdn @@ -199,8 +199,6 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ 'cn=James A Jones 1' > $SEARCHOUT 2>&1 RC=$? -test $KILLSERVERS != no && kill -HUP $KILLPIDS - if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" exit $RC @@ -220,5 +218,19 @@ if test $? != 0 ; then exit 1 fi +echo "Testing modrdn with newSuperior as child of target " +$LDAPMODRDN -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \ + $TESTOUT 2>&1 -s 'cn=Sub1, ou=FooBar, cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan,c=us' \ + 'cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US' 'cn=James A Jones 1' + +RC=$? +if test $RC -eq 0 ; then + echo "ldapmodrdn succeeded, should have failed!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 +fi + +test $KILLSERVERS != no && kill -HUP $KILLPIDS + echo ">>>>> Test succeeded" exit 0 -- 2.39.2