Created
May 25, 2018 03:14
-
-
Save Rogach/6e41d137c0a5ecbb29a1363c5760ce66 to your computer and use it in GitHub Desktop.
scallop-bug-161 test code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalaVersion := "2.11.8" | |
libraryDependencies += "org.rogach" %% "scallop" % "3.1.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] Loading settings from global-plugins.sbt,idea.sbt ... | |
[info] Loading global plugins from /home/platon/.sbt/1.0/plugins | |
[info] Loading project definition from /home/platon/tor/scallop-bug-161/project | |
[info] Loading settings from build.sbt ... | |
[info] Set current project to scallop-bug-161 (in build file:/home/platon/tor/scallop-bug-161/) | |
[info] Updating ... | |
[info] Done updating. | |
[info] Compiling 1 Scala source to /home/platon/tor/scallop-bug-161/target/scala-2.11/classes ... | |
[info] Done compiling. | |
[info] Packaging /home/platon/tor/scallop-bug-161/target/scala-2.11/scallop-bug-161_2.11-0.1.0-SNAPSHOT.jar ... | |
[info] Done packaging. | |
[info] Running Test | |
[success] Total time: 6 s, completed May 25, 2018 6:11:59 AM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Test { | |
def main(args: Array[String]) { | |
val conf = new TestClass(args) | |
} | |
} | |
import org.rogach.scallop.{ScallopConf, ScallopOption, Serialization, ValueConverter, singleArgConverter} | |
class TestClass(args: Seq[String]) extends ScallopConf(args) with Serialization { | |
val testInput: ScallopOption[String] = | |
opt[String]( | |
name = "test.input", | |
descr = "test", | |
required = false, | |
default = Option("testPath") | |
) | |
verify() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment