Skip to content

Commit d302c83

Browse files
committed
test: use run.sh helper for intf.t
1 parent 3b5393e commit d302c83

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

ppx/test/intf.t

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11

2-
$ echo "type ('a, 'b) either [@@deriving json]" | ../browser/ppx_deriving_json_js_test.exe -intf -
3-
type ('a, 'b) either[@@deriving json]
4-
include
2+
$ echo "module type S = sig type ('a, 'b) either [@@deriving json] end" | ./run.sh
3+
=== ppx output:native ===
4+
module type S =
55
sig
6-
[@@@ocaml.warning "-32"]
7-
val either_of_json :
8-
(Js.Json.t -> 'a) -> (Js.Json.t -> 'b) -> Js.Json.t -> ('a, 'b) either
9-
val either_to_json :
10-
('a -> Js.Json.t) -> ('b -> Js.Json.t) -> ('a, 'b) either -> Js.Json.t
11-
end[@@ocaml.doc "@inline"][@@merlin.hide ]
12-
13-
$ echo "type ('a, 'b) either [@@deriving json]" | ../native/ppx_deriving_json_native_test.exe -intf -
14-
type ('a, 'b) either[@@deriving json]
15-
include
6+
type ('a, 'b) either[@@deriving json]
7+
include
8+
sig
9+
[@@@ocaml.warning "-32"]
10+
val either_of_json :
11+
(Yojson.Basic.t -> 'a) ->
12+
(Yojson.Basic.t -> 'b) -> Yojson.Basic.t -> ('a, 'b) either
13+
val either_to_json :
14+
('a -> Yojson.Basic.t) ->
15+
('b -> Yojson.Basic.t) -> ('a, 'b) either -> Yojson.Basic.t
16+
end[@@ocaml.doc "@inline"][@@merlin.hide ]
17+
end
18+
=== ppx output:browser ===
19+
module type S =
1620
sig
17-
[@@@ocaml.warning "-32"]
18-
val either_of_json :
19-
(Yojson.Basic.t -> 'a) ->
20-
(Yojson.Basic.t -> 'b) -> Yojson.Basic.t -> ('a, 'b) either
21-
val either_to_json :
22-
('a -> Yojson.Basic.t) ->
23-
('b -> Yojson.Basic.t) -> ('a, 'b) either -> Yojson.Basic.t
24-
end[@@ocaml.doc "@inline"][@@merlin.hide ]
21+
type ('a, 'b) either[@@deriving json]
22+
include
23+
sig
24+
[@@@ocaml.warning "-32"]
25+
val either_of_json :
26+
(Js.Json.t -> 'a) ->
27+
(Js.Json.t -> 'b) -> Js.Json.t -> ('a, 'b) either
28+
val either_to_json :
29+
('a -> Js.Json.t) ->
30+
('b -> Js.Json.t) -> ('a, 'b) either -> Js.Json.t
31+
end[@@ocaml.doc "@inline"][@@merlin.hide ]
32+
end
33+
=== stdout:native ===
34+
=== stdout:js ===

0 commit comments

Comments
 (0)