commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang StringsTest.java
Date Sat, 13 Jul 2002 06:03:53 GMT
bayard      2002/07/12 23:03:53

  Modified:    lang/src/test/org/apache/commons/lang StringsTest.java
  Log:
  Added escape unit tests.
  
  Revision  Changes    Path
  1.14      +21 -1     jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsTest.java
  
  Index: StringsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/test/org/apache/commons/lang/StringsTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StringsTest.java	13 Jul 2002 05:38:50 -0000	1.13
  +++ StringsTest.java	13 Jul 2002 06:03:53 -0000	1.14
  @@ -299,5 +299,25 @@
           assertEquals("defaultString(null,String) failed",
                        BAR, Strings.defaultString(null, BAR) );
       }
  +
  +    public void testEscapeFunctions() {
  +        assertEquals("escape(empty-string) failed",
  +                     "", Strings.escape("") );
  +        assertEquals("escape(String) failed",
  +                     FOO, Strings.escape(FOO) );
  +        assertEquals("escape(String) failed",
  +                     "\\t", Strings.escape("\t") );
  +        assertEquals("escape(String) failed",
  +                     "\\\\", Strings.escape("\\") );
  +        assertEquals("escape(String) failed",
  +                     "\\\\\\b\\t\\r", Strings.escape("\\\b\t\r") );
  +        assertEquals("escape(String) failed",
  +                     "\\u1234", Strings.escape("\u1234") );
  +        assertEquals("escape(String) failed",
  +                     "\\u0234", Strings.escape("\u0234") );
  +        assertEquals("escape(String) failed",
  +                     "\\u00fd", Strings.escape("\u00fd") );
  +    }
  +
   }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message