@@ -95,4 +95,34 @@ class RunTestsDefault extends RunTestDefinitions
95
95
.call(cwd = root)
96
96
}
97
97
}
98
+
99
+ test(" meaningful commas dont have to be escaped in using directive values" ) {
100
+ val inputPath = os.rel / " example.scala"
101
+ TestInputs (inputPath ->
102
+ """ //> using dep tabby:tabby:0.2.3,url=https://github.com/bjornregnell/tabby/releases/download/v0.2.3/tabby_3-0.2.3.jar
103
+ |import tabby.Grid
104
+ |@main def main = println(Grid("a", "b", "c")(1, 2, 3))
105
+ |""" .stripMargin).fromRoot { root =>
106
+ val res = os.proc(TestUtil .cli, " run" , extraOptions, inputPath)
107
+ .call(cwd = root)
108
+ val out = res.out.trim()
109
+ expect(out.contains(" a, b, c" ))
110
+ }
111
+ }
112
+
113
+ test(
114
+ " using directives using commas with space as separators should produce a deprecation warning."
115
+ ) {
116
+ val inputPath = os.rel / " example.sc"
117
+ TestInputs (inputPath ->
118
+ """ //> using options -Werror, -Wconf:cat=deprecation:e
119
+ |println("Deprecation warnings should have been printed")
120
+ |""" .stripMargin)
121
+ .fromRoot { root =>
122
+ val res = os.proc(TestUtil .cli, " run" , extraOptions, inputPath)
123
+ .call(cwd = root, stderr = os.Pipe )
124
+ val err = res.err.trim()
125
+ expect(err.contains(" Use of commas as separators is deprecated" ))
126
+ }
127
+ }
98
128
}
0 commit comments