X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=tests%2Fparsing%2Ftest_load.ml;h=5d4c47a4985114011f9ee30067856137aff32e53;hp=6cb9f9e5915dc2bd3ff8386ad43cc280eee2d13c;hb=efddbf83a5287c5d668cc04a0c7328cf5ca3e648;hpb=61cad7bbaf63389b520b695eefdd735bc11a8aa6 diff --git a/tests/parsing/test_load.ml b/tests/parsing/test_load.ml index 6cb9f9e..5d4c47a 100644 --- a/tests/parsing/test_load.ml +++ b/tests/parsing/test_load.ml @@ -18,6 +18,9 @@ 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. *) @@ -29,7 +32,7 @@ let file = Sys.argv.(1) let () = - Whenfile.init (); + Whenfile.init Whenstate.empty; (try Dynlink.loadfile file @@ -39,5 +42,6 @@ let () = 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)