Skip to content

Commit 3a28320

Browse files
committed
Improve cram tests to prevent dune errors
1 parent b156006 commit 3a28320

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

plugins/dune-rules/test/test.t

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,17 @@ Specifying a timeout causes ORTAC_QCHECK_STM_TIMEOUT to be set before running th
171171
(libraries ortac-runtime my_lib)
172172
(package my_package))
173173

174-
$ ortac dune wrapper my_lib.mli --package=my_package --output=named_wrapper.ml
174+
The following test not only generates the Dune rules for the wrapper plugin,
175+
but also prevents cyclic dependencies or general Dune errors.
176+
$ cat > dune-project <<EOF
177+
> (lang dune 3.8)
178+
> (package (name my_package))
179+
> EOF
180+
181+
$ echo '' > my_lib.mli
182+
183+
$ ortac dune wrapper my_lib.mli --package=my_package --output=named_wrapper.ml >> dune
184+
$ cat dune
175185
; This file is generated by ortac dune wrapper
176186
; It contains the rules for generating a wrapper for my_lib.mli
177187

@@ -207,3 +217,5 @@ Specifying a timeout causes ORTAC_QCHECK_STM_TIMEOUT to be set before running th
207217
(modules named_wrapper)
208218
(libraries ortac-runtime my_lib)
209219
(package my_package))
220+
221+
$ dune runtest

0 commit comments

Comments
 (0)