aboutsummaryrefslogtreecommitdiff
path: root/test/test.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.scala')
-rw-r--r--test/test.scala29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/test.scala b/test/test.scala
index 55ce205..9cb7fd9 100644
--- a/test/test.scala
+++ b/test/test.scala
@@ -242,6 +242,35 @@ object Main{
ScaffoldTest.main(Array())
+ Seq(
+ "1.0" -> "1.0",
+ "1.0-M1" -> "1.0-M1",
+ "1.0.0" -> "1.0.0",
+ "[1.0.0]" -> "1.0.0",
+ "[1.0.0)" -> "1.0.0",
+ "(1.0.0]" -> "1.0.0",
+ "(1.0.0)" -> "1.0.0",
+ "(,1.0.0]" -> "1.0.0",
+ "[,1.0.0]" -> "1.0.0",
+ "[,1.0.0)" -> "1.0.0",
+ "(,1.0.0)" -> "1.0.0",
+ "(1.0.0,]" -> "1.0.0",
+ "[1.0.0,]" -> "1.0.0",
+ "[1.0.0,)" -> "1.0.0",
+ "(1.0.0,)" -> "1.0.0",
+ "(1.0.0,1.0.1]" -> "1.0.0",
+ "[1.0.0,1.0.1]" -> "1.0.0",
+ "[1.0.0,1.0.1)" -> "1.0.0",
+ "(1.0.0,1.0.1)" -> "1.0.0"
+ ).foreach{
+ case (input, expected) =>
+ val actual = BoundMavenDependency.extractVersion(input)
+ assert(
+ expected === actual,
+ s"for $input expected $expected got $actual"
+ )
+ }
+
usage("nothing")
compile("nothing")
//clean("nothing")