diff --git a/tests/data/dn.out b/tests/data/dn.out
index 85bf04e49e77cdf37973935a88d66f95b2277fcb..bc97e96018e13ccb32f83b83b5e71b4cedb725fe 100644
--- a/tests/data/dn.out
+++ b/tests/data/dn.out
@@ -170,3 +170,18 @@ description: #'0010'B // empty "" DN with leading '0's
 description: dc=example,dc=com#'1000'B // with DN portion
 description: dc=example,dc=com#'0'B // with DN portion and just one '0'
 
+dn: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
+objectClass: groupOfUniqueNames
+cn: Name and Optional UID
+uniqueMember: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com
+uniqueMember: #'1'B
+uniqueMember: #'10'B
+uniqueMember: dc=example,dc=com#'1000'B
+uniqueMember: dc=example,dc=com#'0'B
+description: cn=Name and Optional UID,ou=Related Syntaxes,dc=example,dc=com //
+  only DN portion
+description: #'1'B // empty "" DN
+description: #'0010'B // empty "" DN with leading '0's
+description: dc=example,dc=com#'1000'B // with DN portion
+description: dc=example,dc=com#'0'B // with DN portion and just one '0'
+
diff --git a/tests/scripts/test026-dn b/tests/scripts/test026-dn
index 5d7f618b05e5f57df2717e0252d284683ac996b0..6d1223bf610b7af62157f37abba6b96e64276afd 100755
--- a/tests/scripts/test026-dn
+++ b/tests/scripts/test026-dn
@@ -92,6 +92,28 @@ if test $RC != 0 ; then
 	exit $RC
 fi
 
+echo "Searching database for uniqueMember (approx) ..."
+$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
+	"(uniqueMember~=dc=example,dc=com)" >> $SEARCHOUT 2>&1
+
+RC=$?
+if test $RC != 0 ; then
+	echo "ldapsearch failed ($RC)!"
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
+	exit $RC
+fi
+
+echo "Searching database for uniqueMember (approx) ..."
+$LDAPSEARCH -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
+	"(uniqueMember~=dc=example,dc=com#'001000'B)" >> $SEARCHOUT 2>&1
+
+RC=$?
+if test $RC != 0 ; then
+	echo "ldapsearch failed ($RC)!"
+	test $KILLSERVERS != no && kill -HUP $KILLPIDS
+	exit $RC
+fi
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 LDIFOUT=$DNOUT