forked from cb372/sbt-explicit-dependencies
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for semver metadata in version string
This test checks whether the plugin correctly handles dependencies where the version contains a + character. The character is commonly used in semver version strings to add build metadata to the version. Per https://semver.org/ Currently this test fails as the plugin is comparing the following version strings that do not match: 7.2.27+33-04a1ea9e-SNAPSHOT 7.2.27%2B33-04a1ea9e-SNAPSHOT Reproduces: cb372#110
- Loading branch information
Showing
4 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
scalaVersion := sys.props("scala.version") | ||
resolvers ++= Seq("Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots") | ||
libraryDependencies ++= Seq( | ||
"org.scalaz" %% "scalaz-core" % "7.2.27+33-04a1ea9e-SNAPSHOT" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % sys.props("plugin.version")) |
10 changes: 10 additions & 0 deletions
10
src/sbt-test/basic/semver-metadata/src/main/scala/Main.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import scalaz._ | ||
import scalaz.std.anyVal._ | ||
import scalaz.std.list._ | ||
import scalaz.std.option._ | ||
import scalaz.syntax.equal._ | ||
|
||
object Main { | ||
val list1: List[Option[Int]] = List(Some(1), Some(2), Some(3), Some(4)) | ||
assert(Traverse[List].sequence(list1) === Some(List(1,2,3,4))) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
> unusedCompileDependenciesTest | ||
> undeclaredCompileDependenciesTest |