|
[
Permlink
| « Hide
]
Henri Yandell added a comment - 14/Jul/06 12:29 PM
Unit tests should pass or not be included for a release (imo). Marking as a fix for 1.4.
Henri Yandell made changes - 14/Jul/06 12:29 PM
Tests pass for me with SVN sources and Ant 1.6.5 on Windows XP SP2+patches with:
Henri Yandell made changes - 31/Oct/06 01:38 AM
I'll try it out on a few other platforms. OS X and FreeBSD at least.
I've checked in a change (469593) that makes the jar fail to build if the tests fail.
On OS X both the Maven and Ant pass for 1.5. They both fail for 1.4. I used a different Linux box. This time it's Debian, last time it was Red Hat. On Debian I'm running 1.5.0_07 and 1.4.2_05. I'll upgrade both and test again. Debian Linux JDK 1.5.0_09 fails for both Ant and Maven.
Debian Linux JDK 1.4.2_12 fails for both Ant and Maven. Debian Linux JDK 1.6.0-rc-b90 fails for both Ant and Maven.
Henri Yandell made changes - 31/Oct/06 06:58 PM
And for the hell of it:
Solaris 5.8 - JDK 1.5.0_09, Ant and Maven both fail. Given that this is locale specific stuff; these machines are all US installs, so it might be down to that, though the passing under JDK 1.5 on OS X is curious. Fails on the nightly build as well - that's another US locale though.
On OS X JVM 1.4, only the ODiaresis variant fails.
It seems like it comes down to whether Character.isLetter consider a character to be a letter or not. If it doesn't, then the string gets fully cleaned and returns early. Thus an empty string comes back rather than the expected IllegalArgumentException.
Confirmed:
public class LetterTest { public static void main(String[] args) throws Exception { test('ö'); test('é'); } public static void test(char ch) { System.err.println(ch + " is a letter: " + Character.isLetter(ch) ); } } On OS X, the o is false under JVM 1.4 and true under JVM 1.5. Confirmed. Under 1.2 and 1.6, both letters return as true.
svn ci -m "Modified the test to expect an empty string if the 'fancy' character passed in is not considered a letter by the JVM. See Issue
Sending src/test/org/apache/commons/codec/language/SoundexTest.java Is the fix above to the unit test okay, or should we be moving the map(..) check before the clean so it throws an IllegalArgumentException more aggressively?
Henri Yandell made changes - 08/Mar/08 07:28 AM
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||