summaryrefslogtreecommitdiff
path: root/test/files/run/t5905b-features.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2014-02-28 05:25:08 -0800
committerSom Snytt <som.snytt@gmail.com>2014-02-28 09:04:42 -0800
commita40af3e42fdfff62901dbc807ed3d899272d2b37 (patch)
tree528339320e7b7c5c9fc43883ecc9713e93a2ee19 /test/files/run/t5905b-features.scala
parentec4479aa7d0279daa701481fb7d77c1f43617190 (diff)
downloadscala-a40af3e42fdfff62901dbc807ed3d899272d2b37.tar.gz
scala-a40af3e42fdfff62901dbc807ed3d899272d2b37.tar.bz2
scala-a40af3e42fdfff62901dbc807ed3d899272d2b37.zip
SI-5905 Sanity check -language options
The option names are hardcoded, but checked by a test. There are no hooks to verify options after the compiler is constructed. Introduced a `MultiChoiceSetting` required for the setting creation framework.
Diffstat (limited to 'test/files/run/t5905b-features.scala')
-rw-r--r--test/files/run/t5905b-features.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t5905b-features.scala b/test/files/run/t5905b-features.scala
new file mode 100644
index 0000000000..627df8334b
--- /dev/null
+++ b/test/files/run/t5905b-features.scala
@@ -0,0 +1,15 @@
+
+import tools.partest.DirectTest
+
+// verify that only languageFeature names are accepted by -language
+object Test extends DirectTest {
+ override def code = "class Code"
+
+ override def extraSettings = s"-usejavacp -d ${testOutput.path}"
+
+ override def show() = {
+ //compile("-language", "--") // no error
+ compile(s"-language:noob")
+ }
+}
+