Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Sep 28, 2024
1 parent 5c99734 commit 0880e69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions amm/src/test/scala/ammonite/main/LineNumberTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object LineNumberTests extends TestSuite {

val sv = ammonite.compiler.CompilerBuilder.scalaVersion
val isScala2 = sv.startsWith("2.")
val isPre3_4 = sv.take(4) <= "3.3."
val isPre3_3_4 = sv < "3.3.4"

test("sourcecode") {
if (isScala2) {
Expand Down Expand Up @@ -133,7 +133,7 @@ object LineNumberTests extends TestSuite {
s"""$path:14: not found: value printnl
|val res_0 = printnl("OK")
| ^""".stripMargin
else if (isPre3_4) {
else if (isPre3_3_4) {
val sp = " "
s"""-- [E006] Not Found Error: $path:1:12$sp
|1 |val res_0 = printnl("OK")
Expand Down Expand Up @@ -162,7 +162,7 @@ object LineNumberTests extends TestSuite {
s"""$path:30: not found: value prinntl
|val res = prinntl("Ammonite")
| ^""".stripMargin
else if (isPre3_4) {
else if (isPre3_3_4) {
val sp = " "
s"""-- [E006] Not Found Error: $path:3:10$sp
|3 |val res = prinntl("Ammonite")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object LineNumberTests extends TestSuite {
"""compilationErrorInSecondBlock.sc:14: not found: value printnl
|val res_0 = printnl("OK")
| ^""".stripMargin
else if (scalaVersion.dropWhile(_ != '.') < ".4")
else if (scalaVersion < "3.3.4")
s"""-- [E006] Not Found Error: ${replStandaloneResources / path}:1:12$sp
|1 |val res_0 = printnl("OK")
| | ^^^^^^^
Expand Down

0 comments on commit 0880e69

Please sign in to comment.