[BUG 283172] fix build on windows in short term

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@544 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Jesse McConnell 2009-07-10 22:41:19 +00:00
parent ebb3c4966c
commit 8ae34f3621
1 changed files with 13 additions and 1 deletions

View File

@ -30,9 +30,15 @@ public class TestJettyPolicyRuntime extends TestCase
{
HashMap evaluator = new HashMap();
private boolean _runningOnWindows;
@Override
protected void setUp() throws Exception
{
_runningOnWindows = System.getProperty( "os.name" ).startsWith( "Windows" );
super.setUp();
evaluator.put( "jetty.home", getWorkingDirectory() );
@ -53,6 +59,7 @@ public class TestJettyPolicyRuntime extends TestCase
public void testSimplePolicyReplacement() throws Exception
{
JettyPolicy ap =
new JettyPolicy( Collections.singleton( getWorkingDirectory() + "/src/test/resources/global-all-permission.policy" ), evaluator );
@ -151,6 +158,8 @@ public class TestJettyPolicyRuntime extends TestCase
public void testCertificateLoader()
throws Exception
{
if ( !_runningOnWindows ) //temporary, create alternate file to load for windows
{
JettyPolicy ap =
new JettyPolicy( Collections.singleton( getWorkingDirectory()
+ "/src/test/resources/jetty-certificate.policy" ), evaluator );
@ -208,6 +217,7 @@ public class TestJettyPolicyRuntime extends TestCase
e.printStackTrace();
assertFalse( "should not have got here", true );
}
}
}
@ -215,6 +225,8 @@ public class TestJettyPolicyRuntime extends TestCase
public void testBadCertificateLoader()
throws Exception
{
if ( !_runningOnWindows ) //temporary, create alternate file to load for windows
{
JettyPolicy ap =
new JettyPolicy( Collections.singleton( getWorkingDirectory()
+ "/src/test/resources/jetty-bad-certificate.policy" ), evaluator );
@ -276,7 +288,7 @@ public class TestJettyPolicyRuntime extends TestCase
}
assertTrue( "checking that we through a security exception", excepted );
}
}