@@ -44,10 +44,10 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
44
44
)
45
45
)
46
46
47
- test(" resolving position of lib directive" ) {
47
+ test(" resolving position of dep directive" ) {
48
48
val testInputs = TestInputs (
49
49
os.rel / " simple.sc" ->
50
- """ //> using dep " com.lihaoyi::utest:0.7.10"
50
+ """ //> using dep com.lihaoyi::utest:0.7.10
51
51
|""" .stripMargin
52
52
)
53
53
testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
@@ -64,15 +64,15 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
64
64
case _ => sys.error(" cannot happen" )
65
65
}
66
66
67
- expect(startPos == (0 , 15 ))
68
- expect(endPos == (0 , 40 ))
67
+ expect(startPos == (0 , 14 ))
68
+ expect(endPos == (0 , 39 ))
69
69
}
70
70
}
71
71
72
72
test(" should parse javac options" ) {
73
73
val testInputs = TestInputs (
74
74
os.rel / " simple.sc" ->
75
- """ //> using javacOpt " source", " 1.8", " target", " 1.8"
75
+ """ //> using javacOpt source 1.8 target 1.8
76
76
|""" .stripMargin
77
77
)
78
78
testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
@@ -90,7 +90,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
90
90
Seq (" --no-fallback" , " --enable-url-protocols=http,https" )
91
91
TestInputs (
92
92
os.rel / " simple.sc" ->
93
- s """ //> using packaging.graalvmArgs " $noFallback", " $enableUrl"
93
+ s """ //> using packaging.graalvmArgs $noFallback $enableUrl
94
94
| """ .stripMargin
95
95
).withBuild(baseOptions, buildThreads, bloopConfigOpt) {
96
96
(_, _, maybeBuild) =>
@@ -155,8 +155,8 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
155
155
}
156
156
157
157
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
160
160
|""" .stripMargin) { (build, isTestScope) =>
161
161
val deps = build.options.classPathOptions.extraDependencies.toSeq.map(_.value)
162
162
expect(deps.nonEmpty)
@@ -172,9 +172,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
172
172
}
173
173
test(s " resolve test scope javacOpts correctly when building for ${scope.name} scope " ) {
174
174
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
178
178
|""" .stripMargin
179
179
) { (build, isTestScope) =>
180
180
val javacOpts = build.options.javaOptions.javacOptions.map(_.value)
@@ -185,9 +185,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
185
185
}
186
186
test(s " resolve test scope scalac opts correctly when building for ${scope.name} scope " ) {
187
187
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
191
191
|""" .stripMargin
192
192
) { (build, isTestScope) =>
193
193
val scalacOpts = build.options.scalaOptions.scalacOptions.toSeq.map(_.value.value)
@@ -198,9 +198,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
198
198
}
199
199
test(s " resolve test scope javaOpts correctly when building for ${scope.name} scope " ) {
200
200
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
204
204
|""" .stripMargin
205
205
) { (build, isTestScope) =>
206
206
val javaOpts = build.options.javaOptions.javaOpts.toSeq.map(_.value.value)
@@ -211,9 +211,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
211
211
}
212
212
test(s " resolve test scope javaProps correctly when building for ${scope.name} scope " ) {
213
213
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
217
217
|""" .stripMargin
218
218
) { (build, isTestScope) =>
219
219
val javaProps = build.options.javaOptions.javaOpts.toSeq.map(_.value.value)
@@ -224,9 +224,9 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
224
224
}
225
225
test(s " resolve test scope resourceDir correctly when building for ${scope.name} scope " ) {
226
226
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
230
230
|""" .stripMargin
231
231
) { (build, isTestScope) =>
232
232
val resourcesDirs = build.options.classPathOptions.resourcesDir
@@ -265,7 +265,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
265
265
val filePath = os.rel / " src" / " simple.scala"
266
266
val testInputs = TestInputs (
267
267
os.rel / filePath ->
268
- """ //> using options " -coverage-out:${.}" """
268
+ """ //> using options -coverage-out:${.}"""
269
269
)
270
270
testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
271
271
(root, _, maybeBuild) =>
@@ -284,7 +284,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
284
284
val filePath = os.rel / " src" / " simple.scala"
285
285
val testInputs = TestInputs (
286
286
os.rel / filePath ->
287
- """ //> using options " -coverage-out:$$${.}" """
287
+ """ //> using options -coverage-out:$$${.}"""
288
288
)
289
289
testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
290
290
(root, _, maybeBuild) =>
@@ -303,7 +303,7 @@ class DirectiveTests extends TestUtil.ScalaCliBuildSuite {
303
303
val filePath = os.rel / " src" / " simple.scala"
304
304
val testInputs = TestInputs (
305
305
os.rel / filePath ->
306
- """ //> using options " -coverage-out:$${.}" """
306
+ """ //> using options -coverage-out:$${.}"""
307
307
)
308
308
testInputs.withBuild(baseOptions, buildThreads, bloopConfigOpt) {
309
309
(_, _, maybeBuild) =>
0 commit comments