Skip to content

Commit

Permalink
Merge pull request #65 from trivago/hotfix/wrong-unicode-encoding
Browse files Browse the repository at this point in the history
added fix for source feature file path comments
  • Loading branch information
Benjamin Bischoff authored May 8, 2018
2 parents 9311b56 + 8d18e6e commit cfaadd7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

Back to [Readme](README.md).

## [0.1.11] - 2018-05-08

- Fix for wrong unicode detection of source feature path in runner comments

## [0.1.10] - 2018-05-08

- Runner comments containing "\u" were wrongly considered unicode
Expand Down Expand Up @@ -135,6 +139,7 @@ Back to [Readme](README.md).

Initial project version on GitHub and Maven Central.

[0.1.11]: https://github.com/trivago/cucable-plugin/compare/0.1.10...0.1.11
[0.1.10]: https://github.com/trivago/cucable-plugin/compare/0.1.9...0.1.10
[0.1.9]: https://github.com/trivago/cucable-plugin/compare/0.1.8...0.1.9
[0.1.8]: https://github.com/trivago/cucable-plugin/compare/0.1.7...0.1.8
Expand Down
2 changes: 1 addition & 1 deletion example-project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.benjamin-bischoff</groupId>
<artifactId>cucable-test-project</artifactId>
<version>0.1.10</version>
<version>0.1.11</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion plugin-code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.trivago.rta</groupId>
<artifactId>cucable-plugin</artifactId>
<version>0.1.10</version>
<version>0.1.11</version>
<url>https://github.com/trivago/cucable-plugin</url>

<name>Cucable Maven Plugin</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private String addScenarioInfo(
.concat(System.lineSeparator())
.concat(System.lineSeparator())
.concat("// Source Feature: ")
.concat(singleScenario.getFeatureFilePath())
.concat(singleScenario.getFeatureFilePath().replace("\\", "/"))
.concat(System.lineSeparator())
.concat("// Generated by Cucable from ")
.concat(runnerTemplatePath.replace("\\", "/"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ public void getRenderedFeatureFileContentReplaceBackslashInCommentTest() throws
"}\n" +
"\n" +
"\n" +
"// Source Feature: \n" +
"// Source Feature: c:/unknown/path2\n" +
"// Generated by Cucable from c:/unknown/path\n";

SingleScenarioRunner singleScenarioRunner = new SingleScenarioRunner(
"c:\\unknown\\path",
"featureFileName"
);

SingleScenario singleScenario = new SingleScenario("", "", "", "", "", "", null, null);
SingleScenario singleScenario = new SingleScenario("", "c:\\unknown\\path2", "", "", "", "", null, null);
String renderedRunnerFileContent = runnerFileContentRenderer.getRenderedRunnerFileContent(singleScenarioRunner, singleScenario);

assertThat(renderedRunnerFileContent, is(expectedOutput));
Expand Down

0 comments on commit cfaadd7

Please sign in to comment.