Skip to content

Commit

Permalink
Test when wrap-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetiot committed Feb 28, 2022
1 parent 45dfa65 commit adbe120
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/passing/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5023,6 +5023,24 @@
(package ocamlformat)
(action (diff tests/use_file.mlt.err use_file.mlt.stderr)))

(rule
(deps tests/.ocamlformat )
(package ocamlformat)
(action
(with-stdout-to verbatim_comments-wrap.ml.stdout
(with-stderr-to verbatim_comments-wrap.ml.stderr
(run %{bin:ocamlformat} --margin-check --wrap-comments %{dep:tests/verbatim_comments.ml})))))

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

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

(rule
(deps tests/.ocamlformat )
(package ocamlformat)
Expand Down
1 change: 1 addition & 0 deletions test/passing/tests/verbatim_comments-wrap.ml.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--wrap-comments
23 changes: 23 additions & 0 deletions test/passing/tests/verbatim_comments-wrap.ml.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
(*= Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* [...]

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
[...] *)

let _ =
(*= Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* [...]

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
[...] *)
()

0 comments on commit adbe120

Please sign in to comment.