diff options
Diffstat (limited to 'src/testcases/org')
-rw-r--r-- | src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java | 18 | ||||
-rw-r--r-- | src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java | 21 |
2 files changed, 19 insertions, 20 deletions
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java b/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java index fa7a093c0e..111561bcc1 100644 --- a/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java +++ b/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java @@ -286,7 +286,7 @@ public class TestMetaDataIPI extends TestCase{ /* Insert some custom properties into the container. */ customProperties.put("Key1", "Value1"); - customProperties.put("Schl�ssel2", "Wert2"); + customProperties.put("Schl\u00fcssel2", "Wert2"); customProperties.put("Sample Integer", new Integer(12345)); customProperties.put("Sample Boolean", new Boolean(true)); Date date=new Date(); @@ -325,8 +325,8 @@ public class TestMetaDataIPI extends TestCase{ /* Insert some custom properties into the container. */ String a1=(String) customProperties.get("Key1"); assertEquals("Key1","Value1",a1); - String a2=(String) customProperties.get("Schl�ssel2"); - assertEquals("Schl�ssel2","Wert2",a2); + String a2=(String) customProperties.get("Schl\u00fcssel2"); + assertEquals("Schl\u00fcssel2","Wert2",a2); Integer a3=(Integer) customProperties.get("Sample Integer"); assertEquals("Sample Number",new Integer(12345),a3); Boolean a4=(Boolean) customProperties.get("Sample Boolean"); @@ -431,7 +431,7 @@ public void testTwo(){ String a1=(String) customProperties.get(k1); assertEquals("Key1",p1,a1); String a2=(String) customProperties.get(k2); - assertEquals("Schl�ssel2",p2,a2); + assertEquals("Schl\u00fcssel2",p2,a2); Integer a3=(Integer) customProperties.get("Sample Number"); assertEquals("Sample Number",new Integer(12345),a3); Boolean a4=(Boolean) customProperties.get("Sample Boolean"); @@ -450,7 +450,7 @@ public void testTwo(){ */ public String strangize(String s){ StringBuffer sb=new StringBuffer(); - String[] umlaute= {"�","�","�","�","$","�","�","�","�","@","�","&"}; + String[] umlaute= {"\u00e4","\u00fc","\u00f6","\u00dc","$","\u00d6","\u00dc","\u00c9","\u00d6","@","\u00e7","&"}; char j=0; Random rand=new Random(); for (int i=0;i<5;i++){ @@ -544,7 +544,7 @@ public void testThree(){ String a1=(String) customProperties.get(k1); assertEquals("Key1",p1,a1); String a2=(String) customProperties.get(k2); - assertEquals("Schl�ssel2",p2,a2); + assertEquals("Schl\u00fcssel2",p2,a2); Integer a3=(Integer) customProperties.get("Sample Number"); assertEquals("Sample Number",new Integer(12345),a3); Boolean a4=(Boolean) customProperties.get("Sample Boolean"); @@ -577,7 +577,7 @@ public void testThree(){ public String strangizeU(String s){ StringBuffer sb=new StringBuffer(); - String[] umlaute= {"�","�","�","�","$","�","�","�","�","@","�","&"}; + String[] umlaute= {"\u00e4","\u00fc","\u00f6","\u00dc","$","\u00d6","\u00dc","\u00c9","\u00d6","@","\u00e7","&"}; char j=0; Random rand=new Random(); for (int i=0;i<5;i++){ @@ -592,7 +592,7 @@ public void testThree(){ sb.append(umlaute[rand.nextInt(umlaute.length)]); sb.append("<"); } - sb.append("���\uD840\uDC00"); + sb.append("\u00e4\u00f6\u00fc\uD840\uDC00"); return sb.toString(); } /** @@ -668,7 +668,7 @@ public void testThree(){ String a1=(String) customProperties.get(k1); assertEquals("Key1",p1,a1); String a2=(String) customProperties.get(k2); - assertEquals("Schl�ssel2",p2,a2); + assertEquals("Schl\u00fcssel2",p2,a2); Integer a3=(Integer) customProperties.get("Sample Number"); assertEquals("Sample Number",new Integer(12345),a3); Boolean a4=(Boolean) customProperties.get("Sample Boolean"); diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java b/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java index 8d22157a98..375cc904ef 100644 --- a/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java +++ b/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java @@ -120,7 +120,6 @@ public class TestWriteWellKnown extends TestCase for (int i = 0; i < docs.length; i++) { final File doc = docs[i]; - System.out.println("Reading file " + doc); /* Read a test document <em>doc</em> into a POI filesystem. */ final POIFSFileSystem poifs = new POIFSFileSystem(new FileInputStream(doc)); @@ -351,10 +350,10 @@ public class TestWriteWellKnown extends TestCase CustomProperties customProperties = dsi.getCustomProperties(); if (customProperties == null) customProperties = new CustomProperties(); - customProperties.put("Schl\u00fcssel �", "Wert �"); - customProperties.put("Schl\u00fcssel ��", "Wert ��"); - customProperties.put("Schl\u00fcssel ���", "Wert ���"); - customProperties.put("Schl\u00fcssel ����", "Wert ����"); + customProperties.put("Schl\u00fcssel \u00e4", "Wert \u00e4"); + customProperties.put("Schl\u00fcssel \u00e4\u00f6", "Wert \u00e4\u00f6"); + customProperties.put("Schl\u00fcssel \u00e4\u00f6\u00fc", "Wert \u00e4\u00f6\u00fc"); + customProperties.put("Schl\u00fcssel \u00e4\u00f6\u00fc\u00d6", "Wert \u00e4\u00f6\u00fc\u00d6"); customProperties.put("positive_Integer", POSITIVE_INTEGER); customProperties.put("positive_Long", POSITIVE_LONG); customProperties.put("positive_Double", POSITIVE_DOUBLE); @@ -440,10 +439,10 @@ public class TestWriteWellKnown extends TestCase final CustomProperties cps = dsi.getCustomProperties(); assertEquals(customProperties, cps); assertNull(cps.get("No value available")); - assertEquals("Wert �", cps.get("Schl\u00fcssel �")); - assertEquals("Wert ��", cps.get("Schl\u00fcssel ��")); - assertEquals("Wert ���", cps.get("Schl\u00fcssel ���")); - assertEquals("Wert ����", cps.get("Schl\u00fcssel ����")); + assertEquals("Wert \u00e4", cps.get("Schl\u00fcssel \u00e4")); + assertEquals("Wert \u00e4\u00f6", cps.get("Schl\u00fcssel \u00e4\u00f6")); + assertEquals("Wert \u00e4\u00f6\u00fc", cps.get("Schl\u00fcssel \u00e4\u00f6\u00fc")); + assertEquals("Wert \u00e4\u00f6\u00fc\u00d6", cps.get("Schl\u00fcssel \u00e4\u00f6\u00fc\u00d6")); assertEquals(POSITIVE_INTEGER, cps.get("positive_Integer")); assertEquals(POSITIVE_LONG, cps.get("positive_Long")); assertEquals(POSITIVE_DOUBLE, cps.get("positive_Double")); @@ -665,7 +664,7 @@ public class TestWriteWellKnown extends TestCase */ public void testCustomerProperties() { - final String KEY = "Schl\u00fcssel �"; + final String KEY = "Schl\u00fcssel \u00e4"; final String VALUE_1 = "Wert 1"; final String VALUE_2 = "Wert 2"; @@ -705,7 +704,7 @@ public class TestWriteWellKnown extends TestCase { final int ID_1 = 2; final int ID_2 = 3; - final String NAME_1 = "Schl\u00fcssel �"; + final String NAME_1 = "Schl\u00fcssel \u00e4"; final String VALUE_1 = "Wert 1"; final Map dictionary = new HashMap(); |