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.

test_shell: add restart completion test

+15 -3
+15 -3
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 ~choice = 8 + let tool ~file ~dir ~path ~choice ~cmd = 9 9 print_endline "Happy?"; 10 10 Cmdliner.Cmd.Exit.ok 11 11 ··· 24 24 let doc = "Use me to test for path completion." in 25 25 Arg.(value & opt (some path) None & info ["path"] ~doc) 26 26 and+ choice = 27 - let doc = "Use me to test for enum completion for short and long options." in 27 + let doc = 28 + "Use me to test for enum completion for short and long options." 29 + in 28 30 Arg.(value & opt (enum ["one", `One; "two", `Two; "three", `Three]) `One 29 31 & info ["choice"; "c"] ~doc) 32 + and+ cmd = 33 + let arg_conv = 34 + let completion = Arg.Completion.complete_restart in 35 + Arg.Conv.of_conv ~completion Arg.string 36 + in 37 + let doc = 38 + "Use me to test for completion restart of other tools after \ 39 + the $(b,--) token" 40 + in 41 + Arg.(value & pos_all arg_conv [] & info [] ~doc ~docv:"ARG") 30 42 in 31 - tool ~file ~dir ~path ~choice 43 + tool ~file ~dir ~path ~choice ~cmd 32 44 33 45 let main () = Cmd.eval' cmd 34 46 let () = if !Sys.interactive then () else exit (main ())