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("é")); } + } + }