diff --git a/src/pform.ml b/src/pform.ml index ee45dcd5..9efc9fbc 100644 --- a/src/pform.ml +++ b/src/pform.ml @@ -124,7 +124,7 @@ module Map = struct ; "pa_cpp" , strings (context.c_compiler :: cflags @ ["-undef"; "-traditional"; "-x"; "c"; "-E"]) - ; "ocaml_bin" , path context.ocaml_bin + ; "ocaml_bin" , values [Dir context.ocaml_bin] ; "ocaml_version" , string context.version_string ; "ocaml_where" , string (Path.to_string context.stdlib_dir) ; "null" , string (Path.to_string Config.dev_null) diff --git a/test/blackbox-tests/test-cases/misc/dune b/test/blackbox-tests/test-cases/misc/dune index e20ad426..81022043 100644 --- a/test/blackbox-tests/test-cases/misc/dune +++ b/test/blackbox-tests/test-cases/misc/dune @@ -42,3 +42,9 @@ (alias (name runtest) (deps (glob_files dir-that-doesnt-exist/*))) + +;; Check that %{ocaml_bin} expands to a directory and not a path + +(alias + (name runtest) + (action (ignore-stdout (echo %{ocaml_bin})))) \ No newline at end of file