-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests on Windows CI #512
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* eol=lf | ||
*.png eol=autocrlf |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package tests.imports | |
|
||
import tests.markdown.BaseMarkdownSuite | ||
import tests.markdown.Compat | ||
import scala.util.Properties | ||
|
||
class DependencySuite extends BaseMarkdownSuite { | ||
val userHome = System.getProperty("user.home") | ||
|
@@ -79,23 +80,42 @@ class DependencySuite extends BaseMarkdownSuite { | |
|import $dep.`org.scalameta::munit:0.7.5` // resolves OK | ||
|println(42) | ||
|``` | ||
| """.stripMargin, | ||
"""|error: dep-error.md:3:49: Error downloading org.scalameta:foobar:1.2.1 | ||
|<redacted user.home> | ||
| 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.6:2.3.4 | ||
|<redacted user.home> | ||
| not found: https://repo1.maven.org/maven2/org/scalameta/not-exists_2.13.6/2.3.4/not-exists_2.13.6-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` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|""".stripMargin | ||
| """.stripMargin, { | ||
if (Properties.isWin) | ||
"""|error: dep-error.md:4:13: Error downloading org.scalameta:not-exists_2.13.5:2.3.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Had a lot of issues with this test, seems that on each version/platform the order is different, but it should fine now. We might split it into different tests in the future to avoid issues. |
||
|<redacted user.home> | ||
| not found: https://repo1.maven.org/maven2/org/scalameta/not-exists_2.13.5/2.3.4/not-exists_2.13.5-2.3.4.pom | ||
|import $dep.`org.scalameta:::not-exists:2.3.4` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|error: dep-error.md:3:49: Error downloading org.scalameta:foobar:1.2.1 | ||
|<redacted user.home> | ||
| 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: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` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|""".stripMargin | ||
else | ||
"""|error: dep-error.md:3:49: Error downloading org.scalameta:foobar:1.2.1 | ||
|<redacted user.home> | ||
| 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.6:2.3.4 | ||
|<redacted user.home> | ||
| not found: https://repo1.maven.org/maven2/org/scalameta/not-exists_2.13.6/2.3.4/not-exists_2.13.6-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` | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|""".stripMargin | ||
} | ||
) | ||
|
||
checkError( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ class ErrorSuite extends BaseMarkdownSuite { | |
line.startsWith("did you mean") || | ||
line.contains("(crash.md") | ||
} | ||
// Predef lines change between versions and platforms | ||
.map(line => line.replaceAll("Predef\\.scala:\\d\\d\\d", "Predef.scala:???")) | ||
.mkString("\n") | ||
} | ||
) | ||
|
@@ -32,25 +34,8 @@ class ErrorSuite extends BaseMarkdownSuite { | |
|x + y + z | ||
|^^^^^^^^^ | ||
|scala.NotImplementedError: an implementation is missing | ||
| at scala.Predef$.$qmark$qmark$qmark(Predef.scala:288) | ||
|""".stripMargin, | ||
compat = Map( | ||
Compat.Scala213 -> | ||
"""|error: crash.md:10:1: an implementation is missing | ||
|x + y + z | ||
|^^^^^^^^^ | ||
|scala.NotImplementedError: an implementation is missing | ||
|<TAB>at scala.Predef$.$qmark$qmark$qmark(Predef.scala:344) | ||
|""".stripMargin.replace("<TAB>", tab), | ||
Compat.Scala3 -> | ||
// Anton: for some reason, the compiler(?) returns tab in this particular place | ||
"""|error: crash.md:10:1: an implementation is missing | ||
|x + y + z | ||
|^^^^^^^^^ | ||
|scala.NotImplementedError: an implementation is missing | ||
|<TAB>at scala.Predef$.$qmark$qmark$qmark(Predef.scala:345) | ||
""".stripMargin.replace("<TAB>", tab) | ||
) | ||
| at scala.Predef$.$qmark$qmark$qmark(Predef.scala:???) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems this was a TAB in each version. I also changed Predef lines to |
||
|""".stripMargin | ||
) | ||
|
||
checkError( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root
might be onC:
while working dir onD: