Add actual test suite for configurator
This commit is contained in:
parent
e832b7230d
commit
ab9b278304
|
@ -459,3 +459,13 @@
|
|||
(progn
|
||||
(run ${exe:cram.exe} run.t)
|
||||
(diff? run.t run.t.corrected))))))
|
||||
|
||||
(alias
|
||||
((name runtest)
|
||||
(deps ((package jbuilder)
|
||||
(files_recursively_in test-cases/configurator)))
|
||||
(action
|
||||
(chdir test-cases/configurator
|
||||
(progn
|
||||
(run ${exe:cram.exe} run.t)
|
||||
(diff? run.t run.t.corrected))))))
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
(jbuild_version 1)
|
||||
|
||||
(executable
|
||||
((name run)
|
||||
(libraries (jbuilder.configurator))))
|
|
@ -0,0 +1,6 @@
|
|||
let () =
|
||||
Configurator.main ~name:"config" (fun t ->
|
||||
match Configurator.ocaml_config_var t "version" with
|
||||
| None -> failwith "version is absent"
|
||||
| Some _ -> print_endline "version is present"
|
||||
)
|
|
@ -0,0 +1,2 @@
|
|||
$ jbuilder exec config/run.exe
|
||||
version is present
|
Loading…
Reference in New Issue