Skip to content

Commit 7581637

Browse files
authored
Cram stanza that applies to nothing (#12814)
* test: demonstrate that the cram stanza can apply to nothing Signed-off-by: Rudi Grinberg <[email protected]>
1 parent 011e69d commit 7581637

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
A cram stanza may not match any tests:
2+
3+
$ cat >dune-project <<EOF
4+
> (lang dune 3.21)
5+
> EOF
6+
7+
This stanza does not apply to anything:
8+
9+
$ cat >dune <<EOF
10+
> (cram
11+
> (applies_to foobar.t)
12+
> (deps x))
13+
> EOF
14+
15+
The user likely meant to write foobar rather than foobar.t
16+
17+
$ cat >foobar.t <<EOF
18+
> $ echo foo
19+
> EOF
20+
21+
Demonstrate that the stanza doesn't apply to anything because this test
22+
shouldn't even run if it depends on a file x.
23+
24+
$ dune runtest foobar.t
25+
File "foobar.t", line 1, characters 0-0:
26+
Error: Files _build/default/foobar.t and _build/default/foobar.t.corrected
27+
differ.
28+
[1]

0 commit comments

Comments
 (0)