Skip to content

Commit

Permalink
v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
qexk committed Jan 29, 2016
1 parent 2a0894b commit 6a8deae
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Build/Tests/TestCases/TestCases.fs
Original file line number Diff line number Diff line change
Expand Up @@ -722,12 +722,12 @@ options: --loglevel=N
* Usage-section syntax
*)

Assert.Seq("", """
Assert.Seq("Basic usage", """
usage:prog --foo""",
"--foo" ->= [("--foo", Flag)]
)

Assert.Seq("", """
Assert.Seq("Words before `usage:`", """
PROGRAM USAGE: prog --foo""",
"--foo" ->= [("--foo", Flag)]
)
Expand Down Expand Up @@ -757,11 +757,11 @@ NOT PART OF SECTION""",
)

(*
//
// Options-section syntax
//
* Options-section syntax
*)

let doc = Docopt("""Usage: prog [options]
Assert.Seq("Options-section syntax", """
Usage: prog [options]
global options: --foo
local options: --baz
Expand All @@ -771,11 +771,9 @@ other options:
--spam
-not-an-option-
""")
$ prog --baz --egg
{"--foo": false, "--baz": true, "--bar": false, "--egg": true, "--spam": false}
*)
""",
"--baz --egg" ->= [("--baz", Flag);("--egg", Flag)]
)

stopwatch.Stop()
printfn "\n>>> %i Docopt calls in %A\nless than %fms per call" count stopwatch.Elapsed (float stopwatch.ElapsedMilliseconds / float count)

0 comments on commit 6a8deae

Please sign in to comment.