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

ScriptRunnerTest fails on Windows OS #1230

Closed
kazuki43zoo opened this issue Mar 25, 2018 · 2 comments · Fixed by #1232
Closed

ScriptRunnerTest fails on Windows OS #1230

kazuki43zoo opened this issue Mar 25, 2018 · 2 comments · Fixed by #1232
Assignees
Labels
enhancement Improve a feature or add a new feature

Comments

@kazuki43zoo
Copy link
Member

kazuki43zoo commented Mar 25, 2018

The ScriptRunner has code that depends on OS.

private static final String LINE_SEPARATOR = System.getProperty("line.separator", "\n");

But test case does not consider it.

Error Details

Results :

Failed tests:
  ScriptRunnerTest.shouldAcceptDelimiterVariations:267
Argument(s) are different! Wanted:
statement.execute(
    "line 1;
line 2;

"
);
-> at org.apache.ibatis.jdbc.ScriptRunnerTest.shouldAcceptDelimiterVariations(ScriptRunnerTest.java:267)
Actual invocation has different arguments:
statement.execute(
    "line 1;
line 2;

"
);
-> at org.apache.ibatis.jdbc.ScriptRunner.executeStatement(ScriptRunner.java:247)

  ScriptRunnerTest.shouldAcceptMultiCharDelimiter:301
Argument(s) are different! Wanted:
statement.execute(
    "line 1;
line 2;

"
);
-> at org.apache.ibatis.jdbc.ScriptRunnerTest.shouldAcceptMultiCharDelimiter(ScriptRunnerTest.java:301)
Actual invocation has different arguments:
statement.execute(
    "line 1;
line 2;

"
);
-> at org.apache.ibatis.jdbc.ScriptRunner.executeStatement(ScriptRunner.java:247)
kazuki43zoo added a commit to kazuki43zoo/mybatis-3 that referenced this issue Mar 25, 2018
kazuki43zoo added a commit to kazuki43zoo/mybatis-3 that referenced this issue Mar 25, 2018
kazuki43zoo added a commit that referenced this issue Mar 25, 2018
Fix to refer the line separator from system property on ScriptRunnerTest #1230
kazuki43zoo added a commit that referenced this issue Mar 25, 2018
…t-on-3.4.x

Fix to refer the line separator from system property on ScriptRunnerTest #1230
@kazuki43zoo
Copy link
Member Author

@hazendaz I've fixed this on master and 3.4.x. Thanks for your reporting!

@kazuki43zoo kazuki43zoo added the enhancement Improve a feature or add a new feature label Mar 25, 2018
@hazendaz
Copy link
Member

hazendaz commented Mar 25, 2018 via email

@kazuki43zoo kazuki43zoo self-assigned this Sep 27, 2018
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
…nnerTest

Fix to refer the line separator from system property on ScriptRunnerTest mybatis#1230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve a feature or add a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants