Skip to content

Commit 15a3a39

Browse files
committed
debug
1 parent fc87b24 commit 15a3a39

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

tests/docstrings_examples/DocTest.res

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ let compileTest = async (~id, ~code) => {
131131
~args=["-w", "-3-109-44", "-e", code],
132132
)
133133

134+
switch Null.toOption(code) {
135+
| Some(v) if v != 0.0 => panic(id)
136+
| None => panic(`${id} exit code is None`)
137+
| _ => ()
138+
}
139+
134140
Console.log({
135141
"id": id,
136142
"code": code,

tests/docstrings_examples/DocTest.res.mjs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,20 @@ async function compileTest(id, code) {
102102
"-e",
103103
code
104104
], undefined);
105+
let code$1 = match.code;
105106
let stderr = match.stderr;
106107
let stdout = match.stdout;
108+
if (code$1 !== null) {
109+
if (code$1 !== 0.0) {
110+
Pervasives.panic(id);
111+
}
112+
113+
} else {
114+
Pervasives.panic(id + " exit code is None");
115+
}
107116
console.log({
108117
id: id,
109-
code: match.code,
118+
code: code$1,
110119
signal: match.signal,
111120
stderr: stderr.map(e => e.toString()).join(""),
112121
stdout: stdout.map(e => e.toString()).join("")
@@ -202,7 +211,7 @@ function extractDocFromFile(file) {
202211
RE_EXN_ID: "Assert_failure",
203212
_1: [
204213
"DocTest.res",
205-
219,
214+
225,
206215
9
207216
],
208217
Error: new Error()

0 commit comments

Comments
 (0)