You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Sebastian Nagel (Jira)" <ji...@apache.org> on 2023/01/08 19:23:00 UTC

[jira] [Closed] (NUTCH-1813) Use \u.... escapes for non-ASCII chars in TestURLUtil

     [ https://issues.apache.org/jira/browse/NUTCH-1813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Nagel closed NUTCH-1813.
----------------------------------

> Use \u.... escapes for non-ASCII chars in TestURLUtil
> -----------------------------------------------------
>
>                 Key: NUTCH-1813
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1813
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: java version "1.7.0_51"
> Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
> Mac OSX 10.9.4, MacBookPro 64 Bit.
>            Reporter: Valerio Schiavoni
>            Priority: Major
>         Attachments: NUTCH-1813-2x-v1.patch, NUTCH-1813-trunk-v1.patch
>
>
> To reproduce, git clone the latest 2.x branch and execute the TestURLUtil tests.
> There are 4 test failures and 1 error.
> Failing tests:
> testToUNICODE:org.junit.ComparisonFailure: expected:<http://www.[��]evir.com> but was:<http://www.[ç]evir.com>
> 	at org.junit.Assert.assertEquals(Assert.java:115)
> 	at org.junit.Assert.assertEquals(Assert.java:144)
> 	at org.apache.nutch.util.TestURLUtil.testToUNICODE(TestURLUtil.java:263)
> testChooseRepr:org.junit.ComparisonFailure: expected:<http://www.[b].com> but was:<http://www.[a].com>
> 	at org.junit.Assert.assertEquals(Assert.java:115)
> 	at org.junit.Assert.assertEquals(Assert.java:144)
> 	at org.apache.nutch.util.TestURLUtil.testChooseRepr(TestURLUtil.java:179)
> testGetDomainName:
> org.junit.ComparisonFailure: expected:<[apache.]org> but was:<[]org>
> 	at org.junit.Assert.assertEquals(Assert.java:115)
> 	at org.junit.Assert.assertEquals(Assert.java:144)
> 	at org.apache.nutch.util.TestURLUtil.testGetDomainName(TestURLUtil.java:35)
> testToASCII:
> java.lang.AssertionError: expected:<http://www.xn--evir-zoa.com> but was:<null>
> 	at org.junit.Assert.fail(Assert.java:88)
> 	at org.junit.Assert.failNotEquals(Assert.java:743)
> 	at org.junit.Assert.assertEquals(Assert.java:118)
> 	at org.junit.Assert.assertEquals(Assert.java:144)
> 	at org.apache.nutch.util.TestURLUtil.testToASCII(TestURLUtil.java:273)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)