|
20 | 20 | import org.apache.commons.codec.EncoderException; |
21 | 21 | import org.apache.commons.codec.StringEncoderAbstractTest; |
22 | 22 | import org.junit.Assert; |
| 23 | +import org.junit.Ignore; |
23 | 24 | import org.junit.Test; |
24 | 25 |
|
25 | 26 | /** |
@@ -133,20 +134,35 @@ public void testHyphen() throws EncoderException { |
133 | 134 |
|
134 | 135 | @Test |
135 | 136 | public void testIsEncodeEquals() { |
| 137 | + //@formatter:off |
136 | 138 | final String[][] data = { |
137 | | - {"Meyer", "M\u00fcller"}, // Müller |
138 | 139 | {"Meyer", "Mayr"}, |
139 | 140 | {"house", "house"}, |
140 | 141 | {"House", "house"}, |
141 | 142 | {"Haus", "house"}, |
142 | 143 | {"ganz", "Gans"}, |
143 | 144 | {"ganz", "G\u00e4nse"}, // Gänse |
144 | 145 | {"Miyagi", "Miyako"}}; |
| 146 | + //@formatter:on |
| 147 | + for (final String[] element : data) { |
| 148 | + final boolean encodeEqual = this.getStringEncoder().isEncodeEqual(element[1], element[0]); |
| 149 | + Assert.assertTrue(element[1] + " != " + element[0], encodeEqual); |
| 150 | + } |
| 151 | + } |
| 152 | + |
| 153 | + @Test |
| 154 | + @Ignore("https://issues.apache.org/jira/browse/CODEC-246") |
| 155 | + public void testIsEncodeEqualsCodec246() { |
| 156 | + //@formatter:off |
| 157 | + final String[][] data = { |
| 158 | + {"Meyer", "M\u00fcller"}, // Müller |
| 159 | + }; |
| 160 | + //@formatter:on |
145 | 161 | for (final String[] element : data) { |
146 | 162 | // This just compares and only shows we do not blow up |
147 | 163 | final boolean encodeEqual = this.getStringEncoder().isEncodeEqual(element[1], element[0]); |
148 | 164 | // Fails for https://issues.apache.org/jira/browse/CODEC-246 |
149 | | - // Assert.assertTrue(element[1] + " != " + element[0], encodeEqual); |
| 165 | + Assert.assertTrue(element[1] + " != " + element[0], encodeEqual); |
150 | 166 | } |
151 | 167 | } |
152 | 168 |
|
|
0 commit comments