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

tests: Add source-conventional.ml.ref #2575

Merged
merged 1 commit into from
Sep 5, 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
18 changes: 18 additions & 0 deletions test/passing/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5020,6 +5020,24 @@
(package ocamlformat)
(action (diff tests/skip.ml.err skip.ml.stderr)))

(rule
(deps tests/.ocamlformat )
(package ocamlformat)
(action
(with-stdout-to source-conventional.ml.stdout
(with-stderr-to source-conventional.ml.stderr
(run %{bin:ocamlformat} --margin-check --profile=default --max-iters=3 %{dep:tests/source.ml})))))

(rule
(alias runtest)
(package ocamlformat)
(action (diff tests/source-conventional.ml.ref source-conventional.ml.stdout)))

(rule
(alias runtest)
(package ocamlformat)
(action (diff tests/source-conventional.ml.err source-conventional.ml.stderr)))

(rule
(deps tests/.ocamlformat )
(package ocamlformat)
Expand Down
6 changes: 6 additions & 0 deletions test/passing/tests/source-conventional.ml.err
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Warning: tests/source.ml:927 exceeds the margin
Warning: tests/source.ml:1002 exceeds the margin
Warning: tests/source.ml:1225 exceeds the margin
Warning: tests/source.ml:1342 exceeds the margin
Warning: tests/source.ml:6617 exceeds the margin
Warning: tests/source.ml:7075 exceeds the margin
1 change: 1 addition & 0 deletions test/passing/tests/source-conventional.ml.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--profile=default --max-iters=3
Loading
Loading