Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions test/blackbox-tests/test-cases/melange/preprocess.t
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ Reason dialect preprocessor to the PPX driver.

$ cat > ppx/reason_ppx.ml <<'EOF'
> let () =
> Array.iter
> (fun arg ->
> let rec loop = function
> | [] -> ()
> | "-loc-filename" :: _ :: rest -> loop rest
> | arg :: rest ->
> if Filename.check_suffix arg ".re" || Filename.check_suffix arg ".rei"
> then (
> Printf.eprintf "ppx saw Reason source: %s\n" arg;
> exit 1))
> Sys.argv
> exit 1)
> else loop rest
> in
> loop (Array.to_list Sys.argv)
> ;;
> let () = Ppxlib.Driver.register_transformation "reason_ppx"
> EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ stub-driver pattern in `ppx-runtime-libraries.t`).
> ; ("--impl", Arg.Set_string (ref ""), "")
> ; ("--as-ppx", Arg.Set (ref false), "")
> ; ("--cookie", Arg.Set (ref false), "")
> ; ("-loc-filename", Arg.String ignore, "")
> ]
> in
> let anon _ = () in
Expand All @@ -52,7 +53,10 @@ The melange.emit preprocesses with `hello_ppx`:

$ mkdir me
$ cat > me/dune <<EOF
> (melange.emit (target output) (preprocess (pps hello_ppx)))
> (melange.emit
> (target output)
> (emit_stdlib false)
> (preprocess (pps hello_ppx)))
> EOF
$ cat > me/foo.ml <<EOF
> let _ = ()
Expand Down
Loading