Skip to content

Commit 4fd49e6

Browse files
committed
test: Add pre42_syntax.ml
1 parent 483f48f commit 4fd49e6

File tree

6 files changed

+31
-0
lines changed

6 files changed

+31
-0
lines changed

test/passing/gen/dune.inc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3712,6 +3712,21 @@
37123712
(alias runtest)
37133713
(action (diff polytypes.ml.err polytypes.ml.stderr)))
37143714

3715+
(rule
3716+
(deps .ocamlformat dune-project)
3717+
(action
3718+
(with-stdout-to pre42_syntax.ml.stdout
3719+
(with-stderr-to pre42_syntax.ml.stderr
3720+
(run %{bin:ocamlformat} --name pre42_syntax.ml --margin-check --ocaml-version=4.1 %{dep:../tests/pre42_syntax.ml})))))
3721+
3722+
(rule
3723+
(alias runtest)
3724+
(action (diff pre42_syntax.ml.ref pre42_syntax.ml.stdout)))
3725+
3726+
(rule
3727+
(alias runtest)
3728+
(action (diff pre42_syntax.ml.err pre42_syntax.ml.stderr)))
3729+
37153730
(rule
37163731
(deps .ocamlformat dune-project)
37173732
(action
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type nonrec = nonrec
2+
(** The [nonrec] keyword has been added in OCaml 4.2. *)
3+
4+
let nonrec nonrec : nonrec = nonrec
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(** The [nonrec] keyword has been added in OCaml 4.2. *)
2+
type nonrec = nonrec
3+
4+
let nonrec nonrec : nonrec = nonrec
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
(** The [nonrec] keyword has been added in OCaml 4.2. *)
2+
type nonrec = nonrec
3+
4+
let nonrec nonrec : nonrec = nonrec

test/passing/tests/pre42_syntax.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(** The [nonrec] keyword has been added in OCaml 4.2. *)
2+
type nonrec = nonrec
3+
let nonrec nonrec : nonrec = nonrec
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ocaml-version=4.1

0 commit comments

Comments
 (0)