Skip to content

Commit

Permalink
Fix V3.declare_with_path_arg tests
Browse files Browse the repository at this point in the history
Signed-off-by: ELLIOTTCABLE <[email protected]>
  • Loading branch information
ELLIOTTCABLE committed Jun 22, 2023
1 parent dbdd9f3 commit 2eefd8f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/driver/transformations/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ let _ = Caml.Printf.sprintf "%s\n" [%plop.Truc.Bidule]
|}]


(* Extension with a path argument and cxtx *)
(* Extension with a path argument and ctxt *)

let () =
Driver.register_transformation "plop"
Driver.register_transformation "plop_ctxt"
~rules:[Context_free.Rule.extension
(Extension.V3.declare_with_path_arg "plop"
(Extension.V3.declare_with_path_arg "plop_ctxt"
Expression
Ast_pattern.(pstr nil)
(fun ~ctxt ~arg ->
Expand All @@ -89,17 +89,18 @@ let () =
[%%expect{|
|}]

let _ = Caml.Printf.sprintf "%s\n" [%plop]
let _ = Caml.Printf.sprintf "%s\n" [%plop_ctxt]
[%%expect{|
[%%expect{|
- : string = "-\n"
|}]

let _ = Caml.Printf.sprintf "%s\n" [%plop.Truc]
let _ = Caml.Printf.sprintf "%s\n" [%plop_ctxt.Truc]
[%%expect{|
- : string = "Truc\n"
|}]

let _ = Caml.Printf.sprintf "%s\n" [%plop.Truc.Bidule]
let _ = Caml.Printf.sprintf "%s\n" [%plop_ctxt.Truc.Bidule]
[%%expect{|
- : string = "Truc.Bidule\n"
|}]

0 comments on commit 2eefd8f

Please sign in to comment.