From b76c6d19db6b6886fbf5ea5fd63b6271c312b0f7 Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Mon, 3 Mar 2025 12:57:55 +0100 Subject: [PATCH 1/2] Fix escaping quotes --- compiler/test/dotty/tools/scripting/BashExitCodeTests.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala b/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala index 778dd1ea18da..7f99efe7404b 100644 --- a/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala +++ b/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala @@ -74,9 +74,7 @@ class BashExitCodeTests: @Test def vPhases = scala("-Vphases")(0) @Test def replEval = - // Do not run this test on Windows since it is wrongly escaped (#22689) - assumeFalse(System.getProperty("os.name").startsWith("Windows")); - repl("--repl-quit-after-init", "--repl-init-script", "\'println(\"Hello from init script!\"); val i = 2 * 2\'")(0) + repl("--repl-quit-after-init", "--repl-init-script", "\"println(\\\"Hello from init script!\\\"); val i = 2 * 2\"")(0) /** A utility for running two commands in a row, like you do in bash. */ extension (inline u1: Unit) inline def & (inline u2: Unit): Unit = { u1; u2 } From 02c67bc80411d9e1ac36a102b920d72fc103f85c Mon Sep 17 00:00:00 2001 From: noti0na1 Date: Mon, 3 Mar 2025 16:24:36 +0100 Subject: [PATCH 2/2] Try simple argument --- compiler/test/dotty/tools/scripting/BashExitCodeTests.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala b/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala index 7f99efe7404b..0449113c0d62 100644 --- a/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala +++ b/compiler/test/dotty/tools/scripting/BashExitCodeTests.scala @@ -74,7 +74,7 @@ class BashExitCodeTests: @Test def vPhases = scala("-Vphases")(0) @Test def replEval = - repl("--repl-quit-after-init", "--repl-init-script", "\"println(\\\"Hello from init script!\\\"); val i = 2 * 2\"")(0) + repl("--repl-quit-after-init", "--repl-init-script", "'val i = 2 * 2; val j = i + 2'")(0) /** A utility for running two commands in a row, like you do in bash. */ extension (inline u1: Unit) inline def & (inline u2: Unit): Unit = { u1; u2 }