[freenet-cvs] r20951 - trunk/freenet/test/freenet/config

nextgens at freenetproject.org nextgens at freenetproject.org
Thu Jul 3 07:08:53 UTC 2008


Author: nextgens
Date: 2008-07-03 07:08:52 +0000 (Thu, 03 Jul 2008)
New Revision: 20951

Modified:
   trunk/freenet/test/freenet/config/ConfigTest.java
Log:
improve ConfigTest: remove the non-utf8 characters from the file

Modified: trunk/freenet/test/freenet/config/ConfigTest.java
===================================================================
--- trunk/freenet/test/freenet/config/ConfigTest.java	2008-07-03 07:02:15 UTC (rev 20950)
+++ trunk/freenet/test/freenet/config/ConfigTest.java	2008-07-03 07:08:52 UTC (rev 20951)
@@ -17,6 +17,7 @@
 
 import freenet.config.Config;
 import freenet.config.SubConfig;
+import freenet.utils.UTFUtil;
 import junit.framework.TestCase;
 
 /**
@@ -44,7 +45,12 @@
 
 	public void testRegister() {
 		/* test if we can register */
-		assertNotNull(new SubConfig("testing1%¹~#{[|`^@éè&ç", conf));
+		StringBuffer sb = new StringBuffer();
+		for(int i=0; i< UTFUtil.PRINTABLE_ASCII.length; i++)
+			sb.append(UTFUtil.PRINTABLE_ASCII[i]);
+		for(int i=0; i< UTFUtil.STRESSED_UTF.length; i++)
+			sb.append(UTFUtil.STRESSED_UTF[i]);
+		assertNotNull(new SubConfig(sb.toString(), conf));
 		
 		/* test if it prevents multiple registrations */
 		try{




More information about the cvs mailing list