From 2f54eb350038c48d0f0aadc6c8793ea0ef9ff80c Mon Sep 17 00:00:00 2001 From: Antoine Gourlay Date: Fri, 10 Oct 2014 10:18:00 +0200 Subject: SI-8711 ScalaVersion.unparse doesn't produce valid versions There is no dot between `major.minor.rev` and `-build` in a scala version, yet that's what unparse returns for ``` // was "2.11.3.-SNAPSHOT" ScalaVersion("2.11.3-SNAPSHOT").unparse ``` --- .../scala/tools/nsc/settings/ScalaVersionTest.scala | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala (limited to 'test') diff --git a/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala new file mode 100644 index 0000000000..77a2da828e --- /dev/null +++ b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala @@ -0,0 +1,18 @@ +package scala.tools.nsc +package settings + +import org.junit.Assert._ +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import scala.tools.testing.AssertUtil.assertThrows + +@RunWith(classOf[JUnit4]) +class ScalaVersionTest { + // SI-8711 + @Test def versionUnparse() { + val v = "2.11.3" + + assertEquals(ScalaVersion(v).unparse, v) + } +} -- cgit v1.2.3