1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
diff -Nur commons-codec-1.3-src/src/test/org/apache/commons/codec/language/SoundexTest.java commons-codec-1.3-src_patched/src/test/org/apache/commons/codec/language/SoundexTest.java
--- commons-codec-1.3-src/src/test/org/apache/commons/codec/language/SoundexTest.java 2004-06-02 03:55:38.000000000 +0300
+++ commons-codec-1.3-src_patched/src/test/org/apache/commons/codec/language/SoundexTest.java 2008-09-26 00:00:42.000000000 +0300
@@ -1,9 +1,10 @@
/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -19,6 +20,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+
import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.StringEncoder;
import org.apache.commons.codec.StringEncoderAbstractTest;
@@ -340,30 +342,39 @@
/**
* Fancy characters are not mapped by the default US mapping.
*
- * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29080
+ * http://issues.apache.org/bugzilla/show_bug.cgi?id=29080
*/
public void testUsMappingOWithDiaeresis() {
assertEquals("O000", this.getEncoder().encode("o"));
+ if ( Character.isLetter('�') ) {
try {
assertEquals("�000", this.getEncoder().encode("�"));
fail("Expected IllegalArgumentException not thrown");
} catch (IllegalArgumentException e) {
// expected
}
+ } else {
+ assertEquals("", this.getEncoder().encode("�"));
+ }
}
/**
* Fancy characters are not mapped by the default US mapping.
*
- * http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29080
+ * http://issues.apache.org/bugzilla/show_bug.cgi?id=29080
*/
public void testUsMappingEWithAcute() {
assertEquals("E000", this.getEncoder().encode("e"));
+ if ( Character.isLetter('�') ) {
try {
assertEquals("�000", this.getEncoder().encode("�"));
fail("Expected IllegalArgumentException not thrown");
} catch (IllegalArgumentException e) {
// expected
}
+ } else {
+ assertEquals("", this.getEncoder().encode("�"));
}
+ }
+
}
|