Sha256: db02b2c89ced2f698daf5743c95438664ef81c86324e05f8dcdbc14ded2bf8bc

Contents?: true

Size: 1.13 KB

Versions: 47

Compression:

Stored size: 1.13 KB

Contents

open Core.Std

let is_directory =
  Command.Spec.Arg_type.create
    (fun n ->
       match Sys.is_directory n with
       | `Yes -> n
       | `No | `Unknown ->
         eprintf "'%s' is not a regular folder.\n%!" n;
         exit 1
    )

let home_dir = Option.value_exn (Sys.getenv "HOME")

let command =
  Command.basic
    ~summary:"Generates test code from canonical data."
    Command.Spec.(
      empty
      +> flag "-t" (optional_with_default "./templates" is_directory) ~doc:"string Directory containing templates."
      +> flag "-c" (optional_with_default "../../../x-common/exercises" is_directory) ~doc:"string Directory containing canonical data."
      +> flag "-o" (optional_with_default "../../exercises" is_directory) ~doc:"string Directory to output generated tests."
      +> flag "-g" (optional_with_default (home_dir ^ "/.xocaml-generated") is_directory) ~doc:"string Directory to backup generated tests."
    )
    (fun templates_folder canonical_data_folder output_folder generated_folder () -> Controller.run templates_folder canonical_data_folder output_folder generated_folder)

let () =
  Command.run ~version:"0.1" command

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
trackler-2.0.8.22 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.21 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.20 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.19 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.18 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.17 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.16 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.15 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.14 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.13 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.12 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.11 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.10 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.9 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.8 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.7 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.6 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.5 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.4 tracks/ocaml/tools/test-generator/src/test_gen.ml
trackler-2.0.8.3 tracks/ocaml/tools/test-generator/src/test_gen.ml