Skip to content

Instantly share code, notes, and snippets.

@Rogach
Created May 25, 2018 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rogach/6e41d137c0a5ecbb29a1363c5760ce66 to your computer and use it in GitHub Desktop.
Save Rogach/6e41d137c0a5ecbb29a1363c5760ce66 to your computer and use it in GitHub Desktop.
scallop-bug-161 test code
scalaVersion := "2.11.8"
libraryDependencies += "org.rogach" %% "scallop" % "3.1.2"
[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
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