diff --git a/test/expect-tests/import_dot_map.mlt b/test/expect-tests/import_dot_map.mlt new file mode 100644 index 00000000..090578ae --- /dev/null +++ b/test/expect-tests/import_dot_map.mlt @@ -0,0 +1,20 @@ +(* -*- tuareg -*- *) + +#warnings "-40";; + +open Jbuilder;; +open Import;; + +(* Check that [of_alist_multi] groups elements in the right order *) +String_map.of_alist_multi + [ "a", 1 + ; "b", 1 + ; "a", 2 + ; "a", 3 + ; "b", 2 + ] +|> String_map.bindings;; +[%%expect{| +- : (Jbuilder.Import.String_map.key * int list) list = +[("a", [1; 2; 3]); ("b", [1; 2])] +|}] diff --git a/test/expect-tests/jbuild b/test/expect-tests/jbuild index 908ec100..d77f5b37 100644 --- a/test/expect-tests/jbuild +++ b/test/expect-tests/jbuild @@ -22,3 +22,10 @@ (glob_files ${ROOT}/src/*.cmi) (glob_files ${ROOT}/vendor/re/*.cmi))) (action (chdir ${ROOT} (run ${exe:expect_test.bc} ${<}))))) + +(alias + ((name runtest) + (deps (import_dot_map.mlt + (glob_files ${ROOT}/src/*.cmi) + (glob_files ${ROOT}/vendor/re/*.cmi))) + (action (chdir ${ROOT} (run ${exe:expect_test.bc} ${<})))))