Skip to content

Commit

Permalink
Merge pull request #426 from ckipp01/2134
Browse files Browse the repository at this point in the history
  • Loading branch information
ckipp01 authored Nov 29, 2020
2 parents f5c223b + dbb1f7e commit b95d7be
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
java: [adopt@1.8, adopt@1.11]
command:
- "'++2.11.12 test'"
- "'++2.12.11 test' scripted"
- "'++2.13.2 test'"
- "'++2.12.12 test' scripted"
- "'++2.13.4 test'"
- "'++3.0.0-M2 test'"
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import scala.collection.mutable

def scala212 = "2.12.12"
def scala211 = "2.11.12"
def scala213 = "2.13.3"
def scala213 = "2.13.4"
def scala3 = List("3.0.0-M2")

def scalajs = "1.3.0"
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/src/test/scala/tests/imports/DependencySuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ class DependencySuite extends BaseMarkdownSuite {
| not found: https://repo1.maven.org/maven2/org/scalameta/foobar/1.2.1/foobar-1.2.1.pom
|import $dep.`org.scalameta::mmunit:2.3.4`, $dep.`org.scalameta:foobar:1.2.1`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|error: dep-error.md:4:13: Error downloading org.scalameta:not-exists_2.13.2:2.3.4
|<redacted user.home>
| not found: https://repo1.maven.org/maven2/org/scalameta/not-exists_2.13.2/2.3.4/not-exists_2.13.2-2.3.4.pom
|import $dep.`org.scalameta:::not-exists:2.3.4`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|error: dep-error.md:3:13: Error downloading org.scalameta:mmunit_2.13:2.3.4
|<redacted user.home>
| not found: https://repo1.maven.org/maven2/org/scalameta/mmunit_2.13/2.3.4/mmunit_2.13-2.3.4.pom
|import $dep.`org.scalameta::mmunit:2.3.4`, $dep.`org.scalameta:foobar:1.2.1`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|error: dep-error.md:4:13: Error downloading org.scalameta:not-exists_2.13.4:2.3.4
|<redacted user.home>
| not found: https://repo1.maven.org/maven2/org/scalameta/not-exists_2.13.4/2.3.4/not-exists_2.13.4-2.3.4.pom
|import $dep.`org.scalameta:::not-exists:2.3.4`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|""".stripMargin
)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/src/test/scala/tests/markdown/AsyncSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AsyncSuite extends BaseMarkdownSuite {
|java.util.concurrent.TimeoutException: Futures timed out after [10 milliseconds]
| at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:259)
| at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:263)
| at scala.concurrent.Await$.$anonfun$result$1(package.scala:220)
| at scala.concurrent.Await$.$anonfun$result$1(package.scala:223)
| at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:57)
| at scala.concurrent.Await$.result(package.scala:146)
| at repl.MdocSession$App.<init>(timeout.md:11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ abstract class BaseMarkdownSuite extends tests.BaseSuite {
settings,
obtained => {
assertNoDiff(
Compat(obtained, Map.empty, postProcessObtained),
Compat(obtained, compat, postProcessObtained),
Compat(expected, compat, postProcessExpected)
)
}
Expand Down
23 changes: 23 additions & 0 deletions tests/unit/src/test/scala/tests/markdown/CrashSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ class CrashSuite extends BaseMarkdownSuite {
|// at repl.MdocSession$App$$anonfun$3.apply(basic.md:14)
|// at repl.MdocSession$App$$anonfun$3.apply(basic.md:14)
|```
""".stripMargin,
compat = Map(
"2.13" ->
"""|```scala
|val x = 1
|???
|// scala.NotImplementedError: an implementation is missing
|// at scala.Predef$.$qmark$qmark$qmark(Predef.scala:347)
|// at repl.MdocSession$App$$anonfun$3.apply(basic.md:14)
|// at repl.MdocSession$App$$anonfun$3.apply(basic.md:14)
|```
""".stripMargin
)
)

checkError(
Expand Down Expand Up @@ -81,7 +93,18 @@ class CrashSuite extends BaseMarkdownSuite {
|// at repl.MdocSession$App$$anonfun$1.apply(relative.md:9)
|// at repl.MdocSession$App$$anonfun$1.apply(relative.md:9)
|```
""".stripMargin,
compat = Map(
"2.13" ->
"""|```scala
|???
|// scala.NotImplementedError: an implementation is missing
|// at scala.Predef$.$qmark$qmark$qmark(Predef.scala:347)
|// at repl.MdocSession$App$$anonfun$1.apply(relative.md:9)
|// at repl.MdocSession$App$$anonfun$1.apply(relative.md:9)
|```
""".stripMargin
)
)

check(
Expand Down
11 changes: 10 additions & 1 deletion tests/unit/src/test/scala/tests/markdown/ErrorSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ class ErrorSuite extends BaseMarkdownSuite {
|^^^^^^^^^
|scala.NotImplementedError: an implementation is missing
| at scala.Predef$.$qmark$qmark$qmark(Predef.scala:288)
|""".stripMargin
|""".stripMargin,
compat = Map(
"2.13" ->
"""|error: crash.md:10:1: an implementation is missing
|x + y + z
|^^^^^^^^^
|scala.NotImplementedError: an implementation is missing
| at scala.Predef$.$qmark$qmark$qmark(Predef.scala:347)
|""".stripMargin
)
)

checkError(
Expand Down

0 comments on commit b95d7be

Please sign in to comment.