-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Recent change to junit.rb breaks on Windows #81
Comments
Sorry "Windows XML" should have been "Windows XP and Win 7" |
I have no idea how to use Git but I think I've made the change here ... |
Sorry didn't mean to close it - see [email protected]:Johnlon/cucumber.git |
I'm experiencing this too on Windows Server 2008 |
I also have this problem on Windows 7 and the latest cucumber 1.0.0. Sadly it breaks bamboo integration in our continuous integration environment. |
I'll gladly apply a fix if I get a patch or pull request. It's a little too much work for me to figure out what @Johnlon changed. Github is full of tutorials about how to use git. |
Aha - I read this again, I shoud be able to fix this with the suggestion at the top here. |
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. |
The recent update to the junit formatter only works on Unix.
The change hard coded / as the path separator.
On windows its \
Result is that junit.rb fails to find the relative path of the feature files relative to the features/ directory.
And it also fails to substitute all remaining path separators for underscore.
This in turn causes it to fail to create output XML file on Windows XML.
At least one fix is this ...
def basename(feature_file)
ext_length = File.extname(feature_file).length
# get the path rel to the features/ dir
rel_path = Pathname.new(feature_file).relative_path_from(Pathname.new("features"))
# substitute all remaining path separators (windows and *nix) for underscore
(""+rel_path).gsub(/[\/]/, '_')[0...-ext_length]
end
The text was updated successfully, but these errors were encountered: