File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
scalac-scoverage-plugin/src Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1212
1313jobs :
1414 test :
15- runs-on : ubuntu-latest
15+ runs-on : ${{ matrix.os }}
1616 strategy :
1717 fail-fast : false
1818 matrix :
19+ os : [ 'ubuntu-latest', 'windows-latest' ]
1920 java : [ '8', '11' ]
2021 scala : [
2122 { version: '2.11.12' },
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ object Serializer {
5050 |# - description (can be multi-line)
5151 |# '\f' sign
5252 |# ------------------------------------------
53- | """ .stripMargin)
53+ | """ .stripMargin.replaceAll( " ( \r\n )| \n | \r " , " \n " ) )
5454 }
5555
5656 def writeStatement (stmt : Statement , writer : Writer ): Unit = {
@@ -71,7 +71,7 @@ object Serializer {
7171 | ${stmt.ignored}
7272 | ${stmt.desc}
7373 |\f
74- | """ .stripMargin)
74+ | """ .stripMargin.replaceAll( " ( \r\n )| \n | \r " , " \n " ) )
7575 }
7676
7777 writeHeader(writer)
Original file line number Diff line number Diff line change @@ -83,9 +83,12 @@ object ScoverageCompiler {
8383 version : String
8484 ): Option [File ] = {
8585 val userHome = System .getProperty(" user.home" )
86- val jarPaths = Seq (
87- s " $userHome/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/ $artifactId/ $version/ $artifactId- $version.jar " ,
88- s " $userHome/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/ $artifactId/ $version/ $artifactId- $version.jar "
86+ val jarPaths = Iterator (
87+ " .cache/coursier" , // Linux
88+ " Library/Caches/Coursier" , // MacOSX
89+ " AppData/Local/Coursier/cache" // Windows
90+ ).map(loc =>
91+ s " $userHome/ $loc/v1/https/repo1.maven.org/maven2/org/scala-lang/ $artifactId/ $version/ $artifactId- $version.jar "
8992 )
9093 jarPaths.map(new File (_)).find(_.exists())
9194 }
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class SerializerTest extends AnyFunSuite with OneInstancePerTest {
6767 |false
6868 |def test : String
6969 |\f
70- | """ .stripMargin
70+ | """ .stripMargin.replaceAll( " ( \r\n )| \n | \r " , " \n " )
7171 val writer = new StringWriter () // TODO-use UTF-8
7272 val actual = Serializer .serialize(coverage, writer)
7373 assert(expected === writer.toString)
@@ -111,7 +111,7 @@ class SerializerTest extends AnyFunSuite with OneInstancePerTest {
111111 |false
112112 |def test : String
113113 |\f
114- | """ .stripMargin.split(" \n " ).iterator
114+ | """ .stripMargin.split(" ( \r\n )| \n | \r " ).iterator
115115 val statements = List (
116116 Statement (
117117 Location (
You can’t perform that action at this time.
0 commit comments