Skip to content

Commit

Permalink
use System.lineSeparator() to make the tests passing on win
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Oct 4, 2024
1 parent f3f1b3f commit d04c1a8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ public void javaErrorThrown() {

@Test
public void stackProvider() {
String nl = System.lineSeparator();
Utils.assertWithAllOptimizationLevels(Undefined.instance, "Error.stack");
Utils.assertWithAllOptimizationLevels("\tat test.js:0\n", "new Error().stack");
Utils.assertWithAllOptimizationLevels("\tat test.js:0" + nl, "new Error().stack");
Utils.assertWithAllOptimizationLevels(Undefined.instance, "EvalError.stack");
Utils.assertWithAllOptimizationLevels("\tat test.js:0\n", "new EvalError('foo').stack");
Utils.assertWithAllOptimizationLevels("\tat test.js:0" + nl, "new EvalError('foo').stack");
}

private void testIt(final String script, final Consumer<Throwable> exception) {
Expand Down

0 comments on commit d04c1a8

Please sign in to comment.