[BUG 283172] fix build on windows

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@542 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Jesse McConnell 2009-07-10 20:54:31 +00:00
parent d5e524bca9
commit b8d470dedb
1 changed files with 11 additions and 1 deletions

View File

@ -34,13 +34,14 @@ public class TestPolicyContext
{
public static final String __PRINCIPAL = "javax.security.auth.x500.X500Principal \"CN=Jetty Policy,OU=Artifact,O=Jetty Project,L=Earth,ST=Internet,C=US\"";
private boolean _runningOnWindows;
@Override
protected void setUp()
throws Exception
{
_runningOnWindows = System.getProperty( "os.name" ).startsWith( "Windows" );
System.setProperty( "basedir", getWorkingDirectory() );
@ -59,6 +60,9 @@ public class TestPolicyContext
loader.scanStream( new InputStreamReader( new FileInputStream( policyFile ) ), grantEntries, keystoreEntries );
if ( !_runningOnWindows ) //temporary, create alternate file to load for windows
{
for ( Iterator<KeystoreEntry> i = keystoreEntries.iterator(); i.hasNext();)
{
KeystoreEntry node = i.next();
@ -72,7 +76,9 @@ public class TestPolicyContext
Permission perm = grant.getPermissions().elements().nextElement();
assertEquals( __PRINCIPAL, perm.getName() );
}
}
public void testAliasPropertyExpansion() throws Exception
@ -87,6 +93,9 @@ public class TestPolicyContext
loader.scanStream( new InputStreamReader( new FileInputStream( policyFile ) ), grantEntries, keystoreEntries );
if ( !_runningOnWindows ) //temporary, create alternate file to load for windows
{
for ( Iterator<KeystoreEntry> i = keystoreEntries.iterator(); i.hasNext();)
{
KeystoreEntry node = i.next();
@ -101,6 +110,7 @@ public class TestPolicyContext
Permission perm = grant.getPermissions().elements().nextElement();
assertEquals( __PRINCIPAL, perm.getName() );
}
}
public void testFileSeparatorExpansion() throws Exception