diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index eb7528dd0..a9ff4aa18 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -46,7 +46,11 @@ tasks: test_rules_scala_win: name: "./test_rules_scala" platform: windows - shell_commands: + environment: + MSYS2_ARG_CONV_EXCL: "*" + batch_commands: + - "set PATH=/usr/bin;%PATH%" #Make sure bash uses msys commands over windows commands. (i.e. find). + - "bash -lc \"pacman --noconfirm --needed -S libxml2\"" #tests require xmllint - "bash test_rules_scala.sh" test_coverage_linux_6_5_0: name: "./test_coverage" diff --git a/test/src/main/scala/scalarules/test/duplicated_resources/child/ScalaLibResourcesDuplicatedTest.scala b/test/src/main/scala/scalarules/test/duplicated_resources/child/ScalaLibResourcesDuplicatedTest.scala index 7af8791af..22b04dae0 100644 --- a/test/src/main/scala/scalarules/test/duplicated_resources/child/ScalaLibResourcesDuplicatedTest.scala +++ b/test/src/main/scala/scalarules/test/duplicated_resources/child/ScalaLibResourcesDuplicatedTest.scala @@ -5,8 +5,8 @@ import org.scalatest.funsuite._ class ScalaLibResourcesDuplicatedTest extends AnyFunSuite { test("Scala library depends on resource + deps that contains same name resources, have higher priority on this target's resource.") { - //Using platform dependent newline (%n) - assert(get("/resource.txt") === String.format("I am a text resource from child!%n")) + + assert(get("/resource.txt") === String.format("I am a text resource from child!\n")) } private def get(s: String): String = diff --git a/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalDepTest.scala b/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalDepTest.scala index 088ec71a3..0097d99f9 100644 --- a/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalDepTest.scala +++ b/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalDepTest.scala @@ -7,7 +7,7 @@ class ScalaLibResourcesFromExternalDepTest extends SpecWithJUnit { "Scala library depending on resources from external resource-only jar" >> { "allow to load resources" >> { - val expectedString = String.format("A resource%n"); //Using platform dependent newline (%n) + val expectedString = String.format("A resource\n"); get("/resource.txt") must beEqualTo(expectedString) } diff --git a/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalScalaTest.scala b/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalScalaTest.scala index 599ca7edf..9949115d4 100644 --- a/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalScalaTest.scala +++ b/test/src/main/scala/scalarules/test/resources/ScalaLibResourcesFromExternalScalaTest.scala @@ -5,7 +5,7 @@ import org.scalatest.funsuite._ class ScalaLibResourcesFromExternalScalaTest extends AnyFunSuite { test("Scala library depending on resources from external resource-only jar should allow to load resources") { - val expectedString = String.format("A resource%n"); //Using platform dependent newline (%n) + val expectedString = String.format("A resource\n"); assert(get("/resource.txt") === expectedString) }