Issue #1038 - making testcase more OS independent
This commit is contained in:
parent
6e1994641b
commit
cdf447e34e
|
@ -19,7 +19,6 @@
|
||||||
package org.eclipse.jetty.quickstart;
|
package org.eclipse.jetty.quickstart;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertThat;
|
import static org.junit.Assert.assertThat;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -227,7 +226,7 @@ public class AttributeNormalizerTest
|
||||||
public void testNormalizeWarDeepAsFile()
|
public void testNormalizeWarDeepAsFile()
|
||||||
{
|
{
|
||||||
// Normalize WAR deep path as File
|
// Normalize WAR deep path as File
|
||||||
File testWarDeep = new File(new File(war), "deep/ref").getAbsoluteFile();
|
File testWarDeep = new File(new File(war), OS.separators("deep/ref")).getAbsoluteFile();
|
||||||
assertNormalize(testWarDeep, "${WAR.path}/deep/ref");
|
assertNormalize(testWarDeep, "${WAR.path}/deep/ref");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,16 +234,15 @@ public class AttributeNormalizerTest
|
||||||
public void testNormalizeWarDeepAsString()
|
public void testNormalizeWarDeepAsString()
|
||||||
{
|
{
|
||||||
// Normalize WAR deep path as String
|
// Normalize WAR deep path as String
|
||||||
File testWarDeep = new File(new File(war), "deep/ref").getAbsoluteFile();
|
File testWarDeep = new File(new File(war), OS.separators("deep/ref")).getAbsoluteFile();
|
||||||
assertNormalize(testWarDeep.toString(), testWarDeep.
|
assertNormalize(testWarDeep.toString(), testWarDeep.toString());
|
||||||
toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testNormalizeWarDeepAsURI()
|
public void testNormalizeWarDeepAsURI()
|
||||||
{
|
{
|
||||||
// Normalize WAR deep path as URI
|
// Normalize WAR deep path as URI
|
||||||
File testWarDeep = new File(new File(war), "deep/ref").getAbsoluteFile();
|
File testWarDeep = new File(new File(war), OS.separators("deep/ref")).getAbsoluteFile();
|
||||||
assertNormalize(testWarDeep.toURI(), "${WAR.uri}/deep/ref");
|
assertNormalize(testWarDeep.toURI(), "${WAR.uri}/deep/ref");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +250,7 @@ public class AttributeNormalizerTest
|
||||||
public void testExpandWarDeep()
|
public void testExpandWarDeep()
|
||||||
{
|
{
|
||||||
// Expand WAR deep path
|
// Expand WAR deep path
|
||||||
File testWarDeep = new File(new File(war), "deep/ref");
|
File testWarDeep = new File(new File(war), OS.separators("deep/ref"));
|
||||||
URI uri = URI.create("jar:" + testWarDeep.toURI().toASCIIString() + "!/other/file");
|
URI uri = URI.create("jar:" + testWarDeep.toURI().toASCIIString() + "!/other/file");
|
||||||
assertExpandURI("jar:${WAR.uri}/deep/ref!/other/file", uri);
|
assertExpandURI("jar:${WAR.uri}/deep/ref!/other/file", uri);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue