diff options
author | Antoine Gourlay <antoine@gourlay.fr> | 2014-10-10 10:18:00 +0200 |
---|---|---|
committer | Antoine Gourlay <antoine@gourlay.fr> | 2014-10-13 10:37:18 +0200 |
commit | 2f54eb350038c48d0f0aadc6c8793ea0ef9ff80c (patch) | |
tree | c89dcd733c8e4224205aa07da6af8d8421457122 /test/junit/scala | |
parent | 2b5df373638d08204b71258928289f6b39e25d5f (diff) | |
download | scala-2f54eb350038c48d0f0aadc6c8793ea0ef9ff80c.tar.gz scala-2f54eb350038c48d0f0aadc6c8793ea0ef9ff80c.tar.bz2 scala-2f54eb350038c48d0f0aadc6c8793ea0ef9ff80c.zip |
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
```
Diffstat (limited to 'test/junit/scala')
-rw-r--r-- | test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala | 18 |
1 files changed, 18 insertions, 0 deletions
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) + } +} |