Skip to content

Commit df834cb

Browse files
authored
test: check cram disable doesn't fail silently for cram stanza (#7007)
Signed-off-by: Ali Caglayan <alizter@gmail.com>
1 parent 3076e67 commit df834cb

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

test/blackbox-tests/test-cases/cram/cram-setting-in-dune-project.t

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,27 @@ executed:
3737
File "run.t", line 1, characters 0-0:
3838
Error: Files _build/default/run.t and _build/default/run.t.corrected differ.
3939
[1]
40+
41+
With Dune 3.0 and later, we don't get an error since cram tests are enabled by
42+
default:
43+
44+
$ cat >dune-project<<EOF
45+
> (lang dune 3.0)
46+
> EOF
47+
48+
$ dune runtest
49+
File "run.t", line 1, characters 0-0:
50+
Error: Files _build/default/run.t and _build/default/run.t.corrected differ.
51+
[1]
52+
53+
And if we disable them on purpose, we get an error message:
54+
55+
$ echo "(cram disable)" >> dune-project
56+
$ dune runtest
57+
File "dune", line 1, characters 0-6:
58+
1 | (cram)
59+
^^^^^^
60+
Error: Cram tests are not enabled in this project.
61+
Hint: You can enable cram tests by adding (cram enable) to your dune-project
62+
file.
63+
[1]

0 commit comments

Comments
 (0)