File: test_pos_left.ml

package info (click to toggle)
cmdliner 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 512 kB
  • sloc: ml: 3,659; makefile: 59
file content (11 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
open Cmdliner

let pos l =
  print_endline (String.concat "\n" l)

let test_pos_left =
  let l = Arg.(value & pos_left 2 string [] & info [] ~docv:"LEFT") in
  let info = Cmd.info "test_pos" ~doc:"Test pos left" in
  Cmd.v info Term.(const pos $ l)

let () = exit (Cmd.eval test_pos_left)