@@ -383,7 +383,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
383
383
test(" invalid diagnostics at startup" ) {
384
384
val inputs = TestInputs (
385
385
os.rel / " A.scala" ->
386
- s """ //> using resource " ./resources"
386
+ s """ //> using resource ./resources
387
387
|
388
388
|object A {}
389
389
| """ .stripMargin
@@ -402,9 +402,9 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
402
402
expectedMessage = " Unrecognized directive: resource with values: ./resources" ,
403
403
expectedSeverity = b.DiagnosticSeverity .ERROR ,
404
404
expectedStartLine = 0 ,
405
- expectedStartCharacter = 20 ,
405
+ expectedStartCharacter = 19 ,
406
406
expectedEndLine = 0 ,
407
- expectedEndCharacter = 31 ,
407
+ expectedEndCharacter = 30 ,
408
408
strictlyCheckMessage = false
409
409
)
410
410
}
@@ -414,7 +414,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
414
414
test(" directive diagnostics" ) {
415
415
val inputs = TestInputs (
416
416
os.rel / " Test.scala" ->
417
- s """ //> using dep " com.lihaoyi::pprint:0.0.0.0.0.1"
417
+ s """ //> using dep com.lihaoyi::pprint:0.0.0.0.0.1
418
418
|
419
419
|object Test {
420
420
| val msg = "Hello"
@@ -442,9 +442,9 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
442
442
expectedMessage = expectedMessage,
443
443
expectedSeverity = b.DiagnosticSeverity .ERROR ,
444
444
expectedStartLine = 0 ,
445
- expectedStartCharacter = 15 ,
445
+ expectedStartCharacter = 14 ,
446
446
expectedEndLine = 0 ,
447
- expectedEndCharacter = 46 ,
447
+ expectedEndCharacter = 45 ,
448
448
strictlyCheckMessage = false
449
449
)
450
450
}
@@ -454,14 +454,14 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
454
454
test(" directives in multiple files diagnostics" ) {
455
455
val inputs = TestInputs (
456
456
os.rel / " Foo.scala" ->
457
- s """ //> using scala " 3.3.0"
457
+ s """ //> using scala 3.3.0
458
458
|
459
459
|object Foo extends App {
460
460
| println("Foo")
461
461
|}
462
462
| """ .stripMargin,
463
463
os.rel / " Bar.scala" -> " " ,
464
- os.rel / " Hello.java" -> " //> using jvm \" 11 \" "
464
+ os.rel / " Hello.java" -> " //> using jvm 11 "
465
465
)
466
466
467
467
withBsp(inputs, Seq (" ." )) { (root, localClient, remoteServer) =>
@@ -516,8 +516,8 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
516
516
)
517
517
}
518
518
519
- checkDirectivesInMultipleFilesWarnings(" Foo.scala" , 0 , 0 , 0 , 23 )
520
- checkDirectivesInMultipleFilesWarnings(" Hello.java" , 0 , 0 , 0 , 18 )
519
+ checkDirectivesInMultipleFilesWarnings(" Foo.scala" , 0 , 0 , 0 , 21 )
520
+ checkDirectivesInMultipleFilesWarnings(" Hello.java" , 0 , 0 , 0 , 16 )
521
521
}
522
522
}
523
523
}
@@ -581,7 +581,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
581
581
582
582
val didChangeParamsFuture = localClient.buildTargetDidChange()
583
583
val updatedContent =
584
- """ //> using dep " com.lihaoyi::pprint:0.6.6"
584
+ """ //> using dep com.lihaoyi::pprint:0.6.6
585
585
|val msg = "Hello"
586
586
|pprint.log(msg)
587
587
|""" .stripMargin
@@ -729,13 +729,13 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
729
729
test(" test workspace update after adding file to main scope" ) {
730
730
val inputs = TestInputs (
731
731
os.rel / " Messages.scala" ->
732
- """ //> using dep " com.lihaoyi::os-lib:0.7.8"
732
+ """ //> using dep com.lihaoyi::os-lib:0.7.8
733
733
|object Messages {
734
734
| def msg = "Hello"
735
735
|}
736
736
|""" .stripMargin,
737
737
os.rel / " MyTests.test.scala" ->
738
- """ //> using dep " com.lihaoyi::utest::0.7.10"
738
+ """ //> using dep com.lihaoyi::utest::0.7.10
739
739
|import utest._
740
740
|
741
741
|object MyTests extends TestSuite {
@@ -950,7 +950,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
950
950
val depName = " os-lib"
951
951
val depVersion = " 0.8.1"
952
952
val updatedSourceFile =
953
- s """ //> using dep " com.lihaoyi:: $depName: $depVersion"
953
+ s """ //> using dep com.lihaoyi:: $depName: $depVersion
954
954
|
955
955
|object ReloadTest {
956
956
| println(os.pwd)
@@ -1058,7 +1058,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1058
1058
val utilsFileName = " Utils.scala"
1059
1059
val inputs = TestInputs (
1060
1060
os.rel / " Hello.scala" ->
1061
- s """ |//> using file " Utils.scala"
1061
+ s """ |//> using file Utils.scala
1062
1062
|
1063
1063
|object Hello extends App {
1064
1064
| println("Hello World")
@@ -1350,7 +1350,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1350
1350
val directiveValue = " value"
1351
1351
val inputs = TestInputs (
1352
1352
os.rel / sourceFileName ->
1353
- s """ //> using $directiveKey " $directiveValue"
1353
+ s """ //> using $directiveKey $directiveValue
1354
1354
|
1355
1355
|object UnrecognisedUsingDirective extends App {
1356
1356
| println("Hello")
@@ -1374,9 +1374,9 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1374
1374
s " Unrecognized directive: $directiveKey with values: $directiveValue" ,
1375
1375
expectedSeverity = b.DiagnosticSeverity .ERROR ,
1376
1376
expectedStartLine = 0 ,
1377
- expectedStartCharacter = 34 ,
1377
+ expectedStartCharacter = 33 ,
1378
1378
expectedEndLine = 0 ,
1379
- expectedEndCharacter = 39
1379
+ expectedEndCharacter = 38
1380
1380
)
1381
1381
}
1382
1382
}
@@ -1385,7 +1385,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1385
1385
test(" bloop projects are initialised properly for a directive for an unfetchable dependency" ) {
1386
1386
val inputs = TestInputs (
1387
1387
os.rel / " InvalidUsingDirective.scala" ->
1388
- s """ //> using dep " no::lib:123"
1388
+ s """ //> using dep no::lib:123
1389
1389
|
1390
1390
|object InvalidUsingDirective extends App {
1391
1391
| println("Hello")
@@ -1408,9 +1408,9 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1408
1408
expectedMessage = " Error downloading no:lib" ,
1409
1409
expectedSeverity = b.DiagnosticSeverity .ERROR ,
1410
1410
expectedStartLine = 0 ,
1411
- expectedStartCharacter = 15 ,
1411
+ expectedStartCharacter = 14 ,
1412
1412
expectedEndLine = 0 ,
1413
- expectedEndCharacter = 26 ,
1413
+ expectedEndCharacter = 25 ,
1414
1414
strictlyCheckMessage = false
1415
1415
)
1416
1416
}
@@ -1458,7 +1458,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1458
1458
val fileName = " Hello.scala"
1459
1459
val inputs = TestInputs (
1460
1460
os.rel / fileName ->
1461
- s """ //> using dep " com.lihaoyi::os-lib:0.7.8"
1461
+ s """ //> using dep com.lihaoyi::os-lib:0.7.8
1462
1462
|
1463
1463
|object Hello extends App {
1464
1464
| println("Hello")
@@ -1486,9 +1486,9 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1486
1486
expectedMessage = " os-lib is outdated" ,
1487
1487
expectedSeverity = b.DiagnosticSeverity .HINT ,
1488
1488
expectedStartLine = 0 ,
1489
- expectedStartCharacter = 15 ,
1489
+ expectedStartCharacter = 14 ,
1490
1490
expectedEndLine = 0 ,
1491
- expectedEndCharacter = 40 ,
1491
+ expectedEndCharacter = 39 ,
1492
1492
expectedSource = Some (" scala-cli" ),
1493
1493
strictlyCheckMessage = false
1494
1494
)
@@ -1506,9 +1506,9 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1506
1506
1507
1507
expect(textEdit.getNewText.contains(" com.lihaoyi::os-lib:" ))
1508
1508
expect(textEdit.getRange.getStart.getLine == 0 )
1509
- expect(textEdit.getRange.getStart.getCharacter == 15 )
1509
+ expect(textEdit.getRange.getStart.getCharacter == 14 )
1510
1510
expect(textEdit.getRange.getEnd.getLine == 0 )
1511
- expect(textEdit.getRange.getEnd.getCharacter == 40 )
1511
+ expect(textEdit.getRange.getEnd.getCharacter == 39 )
1512
1512
}
1513
1513
}
1514
1514
}
@@ -1586,7 +1586,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1586
1586
test(" bsp should support jvmRunEnvironment request" ) {
1587
1587
val inputs = TestInputs (
1588
1588
os.rel / " Hello.scala" ->
1589
- s """ //> using dep " com.lihaoyi::os-lib:0.7.8"
1589
+ s """ //> using dep com.lihaoyi::os-lib:0.7.8
1590
1590
|
1591
1591
|object Hello extends App {
1592
1592
| println("Hello")
@@ -1781,7 +1781,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1781
1781
val inputs = TestInputs (
1782
1782
os.rel / " test.sc" ->
1783
1783
""" //> using toolkit latest
1784
- |//> using test.toolkit " typelevel:latest"
1784
+ |//> using test.toolkit typelevel:latest
1785
1785
|
1786
1786
|//> using lib org.typelevel::cats-core:2.6.1
1787
1787
|
@@ -1862,7 +1862,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1862
1862
expectedStartLine = 1 ,
1863
1863
expectedStartCharacter = 10 ,
1864
1864
expectedEndLine = 1 ,
1865
- expectedEndCharacter = 41
1865
+ expectedEndCharacter = 39
1866
1866
)
1867
1867
1868
1868
checkScalaAction(
@@ -1873,7 +1873,7 @@ abstract class BspTestDefinitions extends ScalaCliSuite with TestScalaVersionArg
1873
1873
expectedStartLine = 1 ,
1874
1874
expectedStartCharacter = 10 ,
1875
1875
expectedEndLine = 1 ,
1876
- expectedEndCharacter = 41 ,
1876
+ expectedEndCharacter = 39 ,
1877
1877
expectedNewText = " test.toolkit typelevel:default"
1878
1878
)
1879
1879
}
0 commit comments