Skip to content

Commit

Permalink
Fix contains
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Dec 26, 2024
1 parent 7c1f840 commit dd532cf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-buildinfo/caseclassrenderer/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ lazy val root = (project in file("."))
""" val get = apply()""" ::
""" val value = apply()""" ::
"""}""" ::
"""// $COVERAGE-ON$""" :: Nil if (targetInfo contains "target = new java.io.File(") &&
"""// $COVERAGE-ON$""" :: Nil if (targetInfo.contains("target = new java.io.File(")) &&
(apiMappingsDecl.contains("apiMappings")) =>
case _ => sys.error("unexpected output: \n" + lines.mkString("\n"))
}
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-buildinfo/constantvalue/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ lazy val root = (project in file(".")).
""" )""" ::
""" }""" ::
"""}""" ::
"""// $COVERAGE-ON$""" :: Nil if (targetInfo contains "target: java.io.File = new java.io.File(") &&
(scalaVersionInfo.trim == s"""final val scalaVersion = "$sv"""") => ()
"""// $COVERAGE-ON$""" :: Nil if targetInfo.contains("target = new java.io.File(") &&
(scalaVersionInfo.trim == s"""final val scalaVersion = "$sv"""") => ()
case _ => sys.error("unexpected output: \n" + lines.mkString("\n"))
}
()
Expand Down
3 changes: 2 additions & 1 deletion src/sbt-test/sbt-buildinfo/javasingletonrenderer/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ lazy val root = (project in file("."))
"""""" ::
""" public final String toJson = toJsonValue(toMap());""" ::
"""}""" ::
"""// $COVERAGE-ON$""" :: Nil if ((targetInfo contains "public final java.io.File target = new java.io.File(") && (targetInfoComment contains "/** The value is new java.io.File(")) =>
"""// $COVERAGE-ON$""" :: Nil if (targetInfo.contains("target = new java.io.File(") &&
targetInfoComment.contains("/** The value is new java.io.File(") => ()
case _ => sys.error("unexpected output: \n" + lines.mkString("\n"))
}
()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ lazy val root = (project in file("."))
"""""" ::
""" public static final String makeJson = toJsonValue(makeMap());""" ::
"""}""" ::
"""// $COVERAGE-ON$""" :: Nil if ((targetInfo contains "public static final java.io.File target = new java.io.File(") && (targetInfoComment contains "/** The value is new java.io.File(")) =>
"""// $COVERAGE-ON$""" :: Nil if targetInfo.contains("target = new java.io.File(") &&
targetInfoComment.contains("/** The value is new java.io.File(") => ()
case _ => sys.error("unexpected output: \n" + lines.mkString("\n"))
}
()
Expand Down
8 changes: 4 additions & 4 deletions src/sbt-test/sbt-buildinfo/simple/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ lazy val root = (project in file("."))
""" )""" ::
""" }""" ::
"""}""" ::
"""// $COVERAGE-ON$""" :: Nil if (targetInfo contains "val target: java.io.File = new java.io.File(") &&
(scalaVersionInfo.trim == s"""val scalaVersion: String = "$sv"""") &&
(someCpInfo.contains("/tmp/f.txt")) &&
(projectVer.contains("val projectVersion")) => ()
"""// $COVERAGE-ON$""" :: Nil if targetInfo.contains("target = new java.io.File(") &&
(scalaVersionInfo.trim == s"""val scalaVersion: String = "$sv"""") &&
(someCpInfo.contains("/tmp/f.txt")) &&
(projectVer.contains("val projectVersion")) => ()
case _ => sys.error("unexpected output: \n" + lines.mkString("\n"))
}
()
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-buildinfo/skipimportscaseclass/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ lazy val root = (project in file("."))
""" val get = apply()""" ::
""" val value = apply()""" ::
"""}""" ::
"""// $COVERAGE-ON$""" :: Nil if (targetInfo contains "target = new java.io.File(") =>
"""// $COVERAGE-ON$""" :: Nil if targetInfo.contains("target = new java.io.File(") => ()
case _ => sys.error("unexpected output: \n" + lines.mkString("\n"))
}
()
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-buildinfo/usepackageaspath/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ lazy val root = (project in file("."))
""" )""" ::
""" }""" ::
"""}""" ::
"""// $COVERAGE-ON$""" :: Nil if (targetInfo contains "val target: java.io.File = new java.io.File(") =>
"""// $COVERAGE-ON$""" :: Nil if targetInfo.contains("target = new java.io.File(") => ()
case _ => sys.error("unexpected output: \n" + lines.mkString("\n"))
}
()
Expand Down

0 comments on commit dd532cf

Please sign in to comment.