Fix X500PrincipalTest.

X500Principal constructor takes string in rfc2253 or rfc1779 format.
In rfc1779 \n is a special character so it can be escaped.
This means the IllegalArgumentException should be thrown.
On the other hand when we ask for it's name in rfc2253 format then
\n shouldn't be escaped since it's not special any more.

Change-Id: I7cbfb026d1741b59103dad275b54fbc4293ff90c
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
index b4fe30a..d730650 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
@@ -1692,17 +1692,11 @@
     /**
      * Inits X500Principal with the string with special characters - \\nB
      * gets Name in RFC2253 format
-     * compares with expected value of name - \\nB
+     * compares with expected value of name - \nB
      */
     public void testNameSpecialChars_RFC2253_01() throws Exception {
-
-        try {
-            // compatibility issue:
-            // don't accept escaped \n because it is not a special char
-            new X500Principal("CN=\\\nB");
-            fail("No expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-        }
+        X500Principal p = new X500Principal("CN=\\\nB");
+        assertEquals("CN=\nB", p.getName(X500Principal.RFC2253));
     }
 
     /**