The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add enum flag to test_shell

authored by

Brian Ward and committed by
Daniel Bünzli
35066678 2860e704

+6 -2
+6 -2
vendor/opam/cmdliner/test/test_shell.ml
··· 5 5 6 6 (* Use to test for completion interactively. *) 7 7 8 - let tool ~file ~dir ~path = 8 + let tool ~file ~dir ~path ~choice = 9 9 print_endline "Happy?"; 10 10 Cmdliner.Cmd.Exit.ok 11 11 ··· 23 23 and+ path = 24 24 let doc = "Use me to test for path completion." in 25 25 Arg.(value & opt (some path) None & info ["path"] ~doc) 26 + and+ choice = 27 + let doc = "Use me to test for enum completion for short and long options." in 28 + Arg.(value & opt (enum ["one", `One; "two", `Two; "three", `Three]) `One 29 + & info ["choice"; "c"] ~doc) 26 30 in 27 - tool ~file ~dir ~path 31 + tool ~file ~dir ~path ~choice 28 32 29 33 let main () = Cmd.eval' cmd 30 34 let () = if !Sys.interactive then () else exit (main ())