diff --git a/modules/integration/src/test/scala/scala/cli/integration/CompileScalacCompatTestDefinitions.scala b/modules/integration/src/test/scala/scala/cli/integration/CompileScalacCompatTestDefinitions.scala index a862818e58..848dadcab3 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/CompileScalacCompatTestDefinitions.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/CompileScalacCompatTestDefinitions.scala @@ -54,11 +54,11 @@ trait CompileScalacCompatTestDefinitions { _: CompileTestDefinitions => ), Seq( Seq(s"${dashPrefix}color:never"), - Seq(s"\"${dashPrefix}language:noAutoTupling,strictEquality\"") + Seq(s"${dashPrefix}language:noAutoTupling,strictEquality") ), Seq( Seq(s"${dashPrefix}color", "never"), - Seq(s"${dashPrefix}language", "\"noAutoTupling,strictEquality\"") + Seq(s"${dashPrefix}language", "noAutoTupling,strictEquality") ) ) (cliOpts, directiveOpts) = { diff --git a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala index eedcf98c12..68d0663f27 100644 --- a/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala +++ b/modules/integration/src/test/scala/scala/cli/integration/RunTestsDefault.scala @@ -95,4 +95,34 @@ class RunTestsDefault extends RunTestDefinitions .call(cwd = root) } } + + test("meaningful commas dont have to be escaped in using directive values") { + val inputPath = os.rel / "example.scala" + TestInputs(inputPath -> + """//> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar + |import tabby.Grid + |@main def main = println(Grid("a", "b", "c")(1, 2, 3)) + |""".stripMargin).fromRoot { root => + val res = os.proc(TestUtil.cli, "run", extraOptions, inputPath) + .call(cwd = root) + val out = res.out.trim() + expect(out.contains("a, b, c")) + } + } + + test( + "using directives using commas with space as separators should produce a deprecation warning." + ) { + val inputPath = os.rel / "example.sc" + TestInputs(inputPath -> + """//> using options -Werror, -Wconf:cat=deprecation:e + |println("Deprecation warnings should have been printed") + |""".stripMargin) + .fromRoot { root => + val res = os.proc(TestUtil.cli, "run", extraOptions, inputPath) + .call(cwd = root, stderr = os.Pipe) + val err = res.err.trim() + expect(err.contains("Use of commas as separators is deprecated")) + } + } }