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

Use uri instead of path in CucumberFeature #562

Closed
wants to merge 1 commit into from

Conversation

brasmusson
Copy link
Contributor

When looking at the JSONPrettyFormatter failure on Windows, I originally thought; "Since Cucumber-JVM both on Windows and *nix support '/' in feature path arguments on the command line and Cucumber.Options, why not use '/' in the URI sent to formatters on all platforms?"
Reading up on URI:s revealed that URI:s always use '/' on all platforms, it is only file paths that on Windows use '' (http://stackoverflow.com/questions/1589930/so-what-is-the-right-direction-of-the-paths-slash-or-under-windows, http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx)
Therefore make sure to the featureURI argument sent to the Gherkin parser when creating CucumberFeature is an URI using '/' and not a file path (which on Windows uses '').
This PR has been tested successfully (mvn clean package) on both:
Windows XP
Ubuntu 13.04

On Windows paths use '\' as separator, but uri:s use '/'. On other
platforms both paths and uri:s use '/' as separator. Make sure that
paths are converted to uri:s when CucumberFeatures are created.
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant