| 1 |
Dune should know about the fact that mdx reads the MDX_RUN_NON_DETERMINISTIC |
| 2 |
variable. When using the stanza 0.2, it is the mdx driver that reads that |
| 3 |
variable. This is only the case since mdx 2.1.0. |
| 4 |
|
| 5 |
$ cat > dune-project << EOF |
| 6 |
> (lang dune 3.0) |
| 7 |
> (using mdx 0.2) |
| 8 |
> EOF |
| 9 |
|
| 10 |
$ cat > dune << EOF |
| 11 |
> (mdx (files README.md)) |
| 12 |
> EOF |
| 13 |
|
| 14 |
$ cat > README.md << 'EOF' |
| 15 |
> ```ocaml |
| 16 |
> # "a";; |
| 17 |
> ``` |
| 18 |
> |
| 19 |
> ```ocaml non-deterministic |
| 20 |
> # "b";; |
| 21 |
> ``` |
| 22 |
> EOF |
| 23 |
|
| 24 |
$ dune runtest --auto-promote |
| 25 |
File "README.md", line 1, characters 0-0: |
| 26 |
--- README.md |
| 27 |
+++ .mdx/README.md.corrected |
| 28 |
@@ -1,5 +1,6 @@ |
| 29 |
```ocaml |
| 30 |
# "a";; |
| 31 |
+- : string = "a" |
| 32 |
``` |
| 33 |
|
| 34 |
```ocaml non-deterministic |
| 35 |
Promoting _build/default/.mdx/README.md.corrected to README.md. |
| 36 |
[1] |
| 37 |
|
| 38 |
$ cat README.md |
| 39 |
```ocaml |
| 40 |
# "a";; |
| 41 |
- : string = "a" |
| 42 |
``` |
| 43 |
|
| 44 |
```ocaml non-deterministic |
| 45 |
# "b";; |
| 46 |
``` |
| 47 |
|
| 48 |
$ dune runtest |
| 49 |
|
| 50 |
$ MDX_RUN_NON_DETERMINISTIC=1 dune runtest --auto-promote |
| 51 |
File "README.md", line 1, characters 0-0: |
| 52 |
--- README.md |
| 53 |
+++ .mdx/README.md.corrected |
| 54 |
@@ -5,4 +5,5 @@ |
| 55 |
|
| 56 |
```ocaml non-deterministic |
| 57 |
# "b";; |
| 58 |
+- : string = "b" |
| 59 |
``` |
| 60 |
Promoting _build/default/.mdx/README.md.corrected to README.md. |
| 61 |
[1] |
| 62 |
|
| 63 |
$ cat README.md |
| 64 |
```ocaml |
| 65 |
# "a";; |
| 66 |
- : string = "a" |
| 67 |
``` |
| 68 |
|
| 69 |
```ocaml non-deterministic |
| 70 |
# "b";; |
| 71 |
- : string = "b" |
| 72 |
``` |