diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-21 22:25:40 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-21 22:25:40 +0000 |
commit | 455ee619fbfde17c8a9208d3e2ebf7d867cbd560 (patch) | |
tree | 686ccedbf5004eeb1507bbedc3b8c0d4b8d273fd /test | |
parent | 7946facede9482d8a363b6474b163c11ab3a662c (diff) | |
download | scala-455ee619fbfde17c8a9208d3e2ebf7d867cbd560.tar.gz scala-455ee619fbfde17c8a9208d3e2ebf7d867cbd560.tar.bz2 scala-455ee619fbfde17c8a9208d3e2ebf7d867cbd560.zip |
[I'm laptop only so there's some chance this wi...
[I'm laptop only so there's some chance this will incur temporary
breakage, but it needs committing.]
Heading off gratuitous complications which haven't yet shipped, I
eliminated the -jar startup option in favor of doing what we already do,
figuring it out. So now all these things work.
scala foo/bar.scala // if file is a script or has one main method
scala foo.Bar // if it has a legal main method scala foo.jar // if it
has a legal MainClass attribute
Also changed "-savecompiled" to "-save" and given scala source called
foo.scala, generate foo.jar rather than foo.scala.jar. Cleaned up a
bunch of related code and further polished the scala startup message.
And unbroke choice settings and improved that error too, which closes
#3849.
While trying to write a test for the choice setting, was reminded that
partest just discards invalid flags files. Made it fail instead, which
closes #3712. Fixed the new failures that revealed. No review.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/choices.check | 2 | ||||
-rw-r--r-- | test/files/neg/choices.flags | 1 | ||||
-rw-r--r-- | test/files/neg/choices.scala | 5 | ||||
-rw-r--r-- | test/files/pos/switchUnbox-pos.log | 2 | ||||
-rw-r--r-- | test/files/pos/switchUnbox.flags | 1 | ||||
-rw-r--r-- | test/files/pos/switchUnbox.scala | 3 |
6 files changed, 10 insertions, 4 deletions
diff --git a/test/files/neg/choices.check b/test/files/neg/choices.check new file mode 100644 index 0000000000..3e63f9999d --- /dev/null +++ b/test/files/neg/choices.check @@ -0,0 +1,2 @@ +partest error: bad flags: -Ylinearizer +one error found diff --git a/test/files/neg/choices.flags b/test/files/neg/choices.flags new file mode 100644 index 0000000000..5464a18c5d --- /dev/null +++ b/test/files/neg/choices.flags @@ -0,0 +1 @@ +-Ylinearizer
\ No newline at end of file diff --git a/test/files/neg/choices.scala b/test/files/neg/choices.scala new file mode 100644 index 0000000000..8827494874 --- /dev/null +++ b/test/files/neg/choices.scala @@ -0,0 +1,5 @@ +object Test { + def main(args: Array[String]): Unit = { + + } +} diff --git a/test/files/pos/switchUnbox-pos.log b/test/files/pos/switchUnbox-pos.log new file mode 100644 index 0000000000..9c146726d7 --- /dev/null +++ b/test/files/pos/switchUnbox-pos.log @@ -0,0 +1,2 @@ +partest error: bad flags: -Ysqueeze:on +one error found diff --git a/test/files/pos/switchUnbox.flags b/test/files/pos/switchUnbox.flags deleted file mode 100644 index cdf5f84ede..0000000000 --- a/test/files/pos/switchUnbox.flags +++ /dev/null @@ -1 +0,0 @@ --Ysqueeze:on diff --git a/test/files/pos/switchUnbox.scala b/test/files/pos/switchUnbox.scala index 4f5467de29..1d4b742ff9 100644 --- a/test/files/pos/switchUnbox.scala +++ b/test/files/pos/switchUnbox.scala @@ -1,6 +1,3 @@ -// this test has accompanying .flags file -// that contains -Xsqueeze:on -// object Foo { var xyz: (Int, String) = (1, "abc") xyz._1 match { |