Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify expect tests #470

Merged
merged 5 commits into from
Feb 8, 2024
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
22 changes: 1 addition & 21 deletions test/base/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
(rule
(alias runtest)
(enabled_if
(and
(>= %{ocaml_version} "4.09.0")
(< %{ocaml_version} "5.1.0")))
(>= %{ocaml_version} "4.09.0"))
(deps
(:test test.ml)
(package ppxlib))
Expand All @@ -13,21 +11,3 @@
(progn
(run expect-test %{test})
(diff? %{test} %{test}.corrected)))))

(rule
(alias runtest)
(enabled_if
(>= %{ocaml_version} "5.1.0"))
(deps
(:test test.ml)
(:t test_510.ml)
(package ppxlib))
(action
(chdir
%{project_root}
(progn
(run mv %{t} %{t}.old)
(run cp %{test} %{t})
(run expect-test %{t})
(run mv %{t}.old %{t})
(diff? %{t} %{t}.corrected)))))
180 changes: 0 additions & 180 deletions test/base/test_510.ml

This file was deleted.

22 changes: 1 addition & 21 deletions test/deriving/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
(rule
(alias runtest)
(enabled_if
(and
(>= %{ocaml_version} "4.10.0")
(< %{ocaml_version} "5.1.0")))
(>= %{ocaml_version} "4.10.0"))
(deps
(:test test.ml)
(package ppxlib))
Expand All @@ -13,21 +11,3 @@
(progn
(run expect-test %{test})
(diff? %{test} %{test}.corrected)))))

(rule
(alias runtest)
(enabled_if
(>= %{ocaml_version} "5.1.0"))
(deps
(:test test.ml)
(:t test_510.ml)
(package ppxlib))
(action
(chdir
%{project_root}
(progn
(run mv %{t} %{t}.old)
(run cp %{test} %{t})
(run expect-test %{t})
(run mv %{t}.old %{t})
(diff? %{t} %{t}.corrected)))))
14 changes: 2 additions & 12 deletions test/deriving/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,11 @@ val foo : int = 42
val bar : int = 43
|}]

module Foo_sig : sig
module type Foo_sig = sig
type t [@@deriving foo]
end = struct
type t
end
[%%expect{|
Line _, characters 6-25:
Error: Signature mismatch:
Modules do not match:
sig type t end
is not included in
sig type t val foo : int end
The value `foo' is required but not provided
File "test/deriving/test.ml", line 3, characters 2-25:
Expected declaration
module type Foo_sig = sig type t val foo : int end
|}]

module type X = sig end [@@deriving mtd]
Expand Down
90 changes: 0 additions & 90 deletions test/deriving/test_510.ml

This file was deleted.

22 changes: 1 addition & 21 deletions test/driver/attributes/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
(rule
(alias runtest)
(enabled_if
(and
(>= %{ocaml_version} "4.08.0")
(< %{ocaml_version} "5.1.0")))
(>= %{ocaml_version} "4.08.0"))
(deps
(:test test.ml)
(package ppxlib))
Expand All @@ -13,21 +11,3 @@
(progn
(run expect-test %{test})
(diff? %{test} %{test}.corrected)))))

(rule
(alias runtest)
(enabled_if
(>= %{ocaml_version} "5.1.0"))
(deps
(:test test.ml)
(:t test_510.ml)
(package ppxlib))
(action
(chdir
%{project_root}
(progn
(run mv %{t} %{t}.old)
(run cp %{test} %{t})
(run expect-test %{t})
(run mv %{t}.old %{t})
(diff? %{t} %{t}.corrected)))))
Loading
Loading