Making test more reliable on non-US machines
This commit is contained in:
parent
916097f787
commit
62ebbbac3c
|
@ -20,6 +20,8 @@ package org.eclipse.jetty.util;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
|
@ -62,8 +64,9 @@ public class URITest
|
|||
assertEquals("f\u0629\u0629%23;,:=b a r",URIUtil.decodePath("f%d8%a9%d8%a9%2523%3b%2c:%3db%20a%20r"));
|
||||
|
||||
// Test for null character (real world ugly test case)
|
||||
byte odd[] = { '/', 0x00, '/' };
|
||||
assertEquals(new String(odd),URIUtil.decodePath("/%00/"));
|
||||
byte oddBytes[] = { '/', 0x00, '/' };
|
||||
String odd = new String(oddBytes, Charset.forName("ISO-8859-1"));
|
||||
assertEquals(odd,URIUtil.decodePath("/%00/"));
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
Loading…
Reference in New Issue