Skip to content

Commit

Permalink
Merge pull request #151 from jsimone/fix-tests-on-windows
Browse files Browse the repository at this point in the history
Use platform specific path separators in tests
  • Loading branch information
jkutner committed Jul 23, 2019
2 parents 43a96a8 + c5f2a7d commit 78b128a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
public class TomcatBaseDirResolutionTest {

private static final Integer PORT = 1234;
private static final File BASE_DIR = new File(System.getProperty("user.dir") + "/target/tomcat." + PORT);
private static final File BASE_DIR = new File(System.getProperty("user.dir"), new File("target", "tomcat." + PORT).toString());

@BeforeMethod
@AfterTest
Expand Down Expand Up @@ -59,7 +59,7 @@ public void testBaseDirAlreadyExistsAsFile() throws Exception {
@Test
public void testSuggestBaseDir() throws IOException {

String suggest = System.getProperty("user.dir") + "/temp";
String suggest = System.getProperty("user.dir") + File.separator + "temp";
String tomcatBaseDir = Main.resolveTomcatBaseDir(PORT, suggest);

assertTrue(tomcatBaseDir.equals(suggest));
Expand Down

0 comments on commit 78b128a

Please sign in to comment.