@@ -44,10 +44,10 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
4444 )
4545 )
4646
47- test(" resolving position of lib directive" ) {
47+ test(" resolving position of dep directive" ) {
4848 val testInputs = TestInputs (
4949 os.rel / " simple.sc" ->
50- """ //> using dep " com.lihaoyi::utest:0.7.10"
50+ """ //> using dep com.lihaoyi::utest:0.7.10
5151 |""" .stripMargin
5252 )
5353 testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
@@ -64,15 +64,15 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
6464 case _ => sys.error(" cannot happen" )
6565 }
6666
67- expect(startPos == (0 , 15 ))
68- expect(endPos == (0 , 40 ))
67+ expect(startPos == (0 , 14 ))
68+ expect(endPos == (0 , 39 ))
6969 }
7070 }
7171
7272 test(" should parse javac options" ) {
7373 val testInputs = TestInputs (
7474 os.rel / " simple.sc" ->
75- """ //> using javacOpt " source", " 1.8", " target", " 1.8"
75+ """ //> using javacOpt source 1.8 target 1.8
7676 |""" .stripMargin
7777 )
7878 testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
@@ -90,7 +90,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
9090 Seq (" --no-fallback" , " --enable-url-protocols=http,https" )
9191 TestInputs (
9292 os.rel / " simple.sc" ->
93- s """ //> using packaging.graalvmArgs " $noFallback", " $enableUrl"
93+ s """ //> using packaging.graalvmArgs $noFallback $enableUrl
9494 | """ .stripMargin
9595 ).withBuild(baseOptions, buildThreads, bloopConfigOpt) {
9696 (_, _, maybeBuild) =>
@@ -155,8 +155,8 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
155155 }
156156
157157 test(s " resolve test scope dependencies correctly when building for ${scope.name} scope " ) {
158- withProjectFile(projectFileContent = """ //> using dep " com.lihaoyi::os-lib:0.9.1"
159- |//> using test.dep " org.scalameta::munit::0.7.29"
158+ withProjectFile(projectFileContent = """ //> using dep com.lihaoyi::os-lib:0.9.1
159+ |//> using test.dep org.scalameta::munit::0.7.29
160160 |""" .stripMargin) { (build, isTestScope) =>
161161 val deps = build.options.classPathOptions.extraDependencies.toSeq.map(_.value)
162162 expect(deps.nonEmpty)
@@ -172,9 +172,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
172172 }
173173 test(s " resolve test scope javacOpts correctly when building for ${scope.name} scope " ) {
174174 withProjectFile(projectFileContent =
175- """ //> using javacOpt " source", " 1.8"
176- |//> using test.javacOpt " target", " 1.8"
177- |//> using test.dep " org.scalameta::munit::0.7.29"
175+ """ //> using javacOpt source 1.8
176+ |//> using test.javacOpt target 1.8
177+ |//> using test.dep org.scalameta::munit::0.7.29
178178 |""" .stripMargin
179179 ) { (build, isTestScope) =>
180180 val javacOpts = build.options.javaOptions.javacOptions.map(_.value)
@@ -185,9 +185,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
185185 }
186186 test(s " resolve test scope scalac opts correctly when building for ${scope.name} scope " ) {
187187 withProjectFile(projectFileContent =
188- """ //> using option " --explain"
189- |//> using test.option " -deprecation"
190- |//> using test.dep " org.scalameta::munit::0.7.29"
188+ """ //> using option --explain
189+ |//> using test.option -deprecation
190+ |//> using test.dep org.scalameta::munit::0.7.29
191191 |""" .stripMargin
192192 ) { (build, isTestScope) =>
193193 val scalacOpts = build.options.scalaOptions.scalacOptions.toSeq.map(_.value.value)
@@ -198,9 +198,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
198198 }
199199 test(s " resolve test scope javaOpts correctly when building for ${scope.name} scope " ) {
200200 withProjectFile(projectFileContent =
201- """ //> using javaOpt " -Xmx2g"
202- |//> using test.javaOpt " -Dsomething=a"
203- |//> using test.dep " org.scalameta::munit::0.7.29"
201+ """ //> using javaOpt -Xmx2g
202+ |//> using test.javaOpt -Dsomething=a
203+ |//> using test.dep org.scalameta::munit::0.7.29
204204 |""" .stripMargin
205205 ) { (build, isTestScope) =>
206206 val javaOpts = build.options.javaOptions.javaOpts.toSeq.map(_.value.value)
@@ -211,9 +211,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
211211 }
212212 test(s " resolve test scope javaProps correctly when building for ${scope.name} scope " ) {
213213 withProjectFile(projectFileContent =
214- """ //> using javaProp " foo=1"
215- |//> using test.javaProp " bar=2"
216- |//> using test.dep " org.scalameta::munit::0.7.29"
214+ """ //> using javaProp foo=1
215+ |//> using test.javaProp bar=2
216+ |//> using test.dep org.scalameta::munit::0.7.29
217217 |""" .stripMargin
218218 ) { (build, isTestScope) =>
219219 val javaProps = build.options.javaOptions.javaOpts.toSeq.map(_.value.value)
@@ -224,9 +224,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
224224 }
225225 test(s " resolve test scope resourceDir correctly when building for ${scope.name} scope " ) {
226226 withProjectFile(projectFileContent =
227- """ //> using resourceDir " ./mainResources"
228- |//> using test.resourceDir " ./testResources"
229- |//> using test.dep " org.scalameta::munit::0.7.29"
227+ """ //> using resourceDir ./mainResources
228+ |//> using test.resourceDir ./testResources
229+ |//> using test.dep org.scalameta::munit::0.7.29
230230 |""" .stripMargin
231231 ) { (build, isTestScope) =>
232232 val resourcesDirs = build.options.classPathOptions.resourcesDir
@@ -265,7 +265,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
265265 val filePath = os.rel / " src" / " simple.scala"
266266 val testInputs = TestInputs (
267267 os.rel / filePath ->
268- """ //> using options " -coverage-out:${.}" """
268+ """ //> using options -coverage-out:${.}"""
269269 )
270270 testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
271271 (root, _, maybeBuild) =>
@@ -284,7 +284,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
284284 val filePath = os.rel / " src" / " simple.scala"
285285 val testInputs = TestInputs (
286286 os.rel / filePath ->
287- """ //> using options " -coverage-out:$$${.}" """
287+ """ //> using options -coverage-out:$$${.}"""
288288 )
289289 testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
290290 (root, _, maybeBuild) =>
@@ -303,7 +303,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
303303 val filePath = os.rel / " src" / " simple.scala"
304304 val testInputs = TestInputs (
305305 os.rel / filePath ->
306- """ //> using options " -coverage-out:$${.}" """
306+ """ //> using options -coverage-out:$${.}"""
307307 )
308308 testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
309309 (_, _, maybeBuild) =>
0 commit comments