open Printf
+(* Ensures that Whentools module is linked to the program. *)
+let _ = Whentools.set_variable
+
(* This program is passed a single argument, which is the .cmo file to
* dynamically load.
*)
Sys.argv.(1)
let () =
- Whenfile.init ();
+ Whenfile.init Whenstate.empty;
(try
Dynlink.loadfile file
exit 1
);
- let jobs = Whenfile.get_jobs () in
- printf "test_load: %s: %d jobs parsed from file\n" file (List.length jobs)
+ let state = Whenfile.get_state () in
+ printf "test_load: %s: %d jobs parsed from file\n"
+ file (Whenstate.nr_jobs state)