Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change filePath test to be platform independent #897

Merged
merged 1 commit into from
May 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/src/test/java/cucumber/runtime/io/HelpersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ protected URLConnection openConnection(URL u) throws IOException {
@Test
public void computes_file_path_for_file_url() throws UnsupportedEncodingException, MalformedURLException {
URL url = new URL("file:/Users/First%20Last/.m2/repository/info/cukes/cucumber-java/1.2.2/cucumber-java-1.2.2.jar");
assertEquals(new File("/Users/First Last/.m2/repository/info/cukes/cucumber-java/1.2.2/cucumber-java-1.2.2.jar").getAbsolutePath(), filePath(url));
File fileFromFilePath = new File(filePath(url));
File expectedFile = new File("/Users/First Last/.m2/repository/info/cukes/cucumber-java/1.2.2/cucumber-java-1.2.2.jar");
assertEquals(expectedFile, fileFromFilePath);
}

@Test
Expand Down