diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2013-07-30 18:49:41 +0200 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2013-07-30 18:49:41 +0200 |
commit | aa5099e3f61bed00cc340b1c4dc84d9031ed5e00 (patch) | |
tree | 6f3106743dbff3d95962477969ff1a6ab6ba66cf /src/compiler/scala/tools/cmd/CommandLine.scala | |
parent | 59e21f37cb80215ada0db60363fb9f30adf6a0cd (diff) | |
download | scala-aa5099e3f61bed00cc340b1c4dc84d9031ed5e00.tar.gz scala-aa5099e3f61bed00cc340b1c4dc84d9031ed5e00.tar.bz2 scala-aa5099e3f61bed00cc340b1c4dc84d9031ed5e00.zip |
SI-7704 Fix partest's test category selection
My recent changes to command line parsing in 6090709 broke partest's
functionality of picking test categories (e. g. --pos or --run).
The breakage was caused because scala.tools.cmd._ stored the command
line options with the `--` prefix, but TestKinds.standardKinds did not.
Diffstat (limited to 'src/compiler/scala/tools/cmd/CommandLine.scala')
-rw-r--r-- | src/compiler/scala/tools/cmd/CommandLine.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/cmd/CommandLine.scala b/src/compiler/scala/tools/cmd/CommandLine.scala index e44752eb6e..8d76807d7d 100644 --- a/src/compiler/scala/tools/cmd/CommandLine.scala +++ b/src/compiler/scala/tools/cmd/CommandLine.scala @@ -24,7 +24,7 @@ class CommandLine(val spec: Reference, val originalArgs: List[String]) extends C val Terminator = "--" val ValueForUnaryOption = "true" // so if --opt is given, x(--opt) = true - def mapForUnary(opt: String) = Map(opt -> ValueForUnaryOption) + def mapForUnary(opt: String) = Map(fromOpt(opt) -> ValueForUnaryOption) def errorFn(msg: String) = println(msg) /** argMap is option -> argument (or "" if it is a unary argument) @@ -72,7 +72,7 @@ class CommandLine(val spec: Reference, val originalArgs: List[String]) extends C if (x2 == Terminator) mapForUnary(x1) ++ residual(xs) else if (isUnaryOption(x1)) mapForUnary(x1) ++ loop(args.tail) - else if (isBinaryOption(x1)) Map(x1 -> x2) ++ loop(xs) + else if (isBinaryOption(x1)) Map(fromOpt(x1) -> x2) ++ loop(xs) else if (isUnknown(x1)) loop(args.tail) else residual(List(x1)) ++ loop(args.tail) } |