summaryrefslogtreecommitdiff
path: root/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2015-07-02 15:38:15 -0700
committerSom Snytt <som.snytt@gmail.com>2015-07-02 15:38:15 -0700
commitf187bde1fde0e48960b39242db0d42573f1e363b (patch)
treeef2205c124d74f681af384a97206808ebd53c4f8 /test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala
parent5330319b1eacbc4da2ba4920ceace708a836df3b (diff)
downloadscala-f187bde1fde0e48960b39242db0d42573f1e363b.tar.gz
scala-f187bde1fde0e48960b39242db0d42573f1e363b.tar.bz2
scala-f187bde1fde0e48960b39242db0d42573f1e363b.zip
SI-9377 ScalaVersion init no longer fails if versionless
If the version string was empty, ScalaVersion would indignantly refuse to initialize. Now it takes a missing property as "none".
Diffstat (limited to 'test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala')
-rw-r--r--test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala
index acbf39fe23..a10e395011 100644
--- a/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala
+++ b/test/junit/scala/tools/nsc/settings/ScalaVersionTest.scala
@@ -57,4 +57,9 @@ class ScalaVersionTest {
assertThrows[NumberFormatException] { ScalaVersion("2-.") } // scalacheck territory
assertThrows[NumberFormatException] { ScalaVersion("any.7") }
}
+
+ // SI-9377
+ @Test def `missing version is as good as none`() {
+ assertEquals(NoScalaVersion, ScalaVersion(""))
+ }
}