Skip to content

Commit 08d814c

Browse files
committed
✨ with-accepted-exit-codes
1 parent f1de45e commit 08d814c

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

grammar.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ module.exports = grammar({
172172
dune_action($, "run", seq($.file_name_dep, repeat($._atom_or_qs))),
173173
dune_action($, "setenv", seq($._atom_or_qs, $._atom_or_qs, $.action)),
174174
dune_action($, "system", $.shell_command),
175+
dune_action(
176+
$,
177+
"with-accepted-exit-codes",
178+
seq($._atom_or_qs, $.action),
179+
),
175180
dune_action($, "with-outputs-to", seq($.file_name_target, $.action)),
176181
dune_action($, "with-stderr-to", seq($.file_name_target, $.action)),
177182
dune_action($, "with-stdout-to", seq($.file_name_target, $.action)),

test/corpus/actions.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,3 +418,46 @@ cmp
418418
(file_name))
419419
(file_name_dep
420420
(file_name)))))
421+
422+
========================
423+
with-accepted-exit-codes
424+
========================
425+
426+
(rule
427+
(targets output.txt)
428+
(deps ./QCheck_ounit_test.exe)
429+
(enabled_if (= %{os_type} "Unix"))
430+
(action
431+
(with-accepted-exit-codes
432+
1
433+
(with-stdout-to
434+
%{targets}
435+
(run ./run_ounit.sh -runner=sequential -seed 1234)))))
436+
437+
---
438+
439+
(source_file
440+
(stanza
441+
(stanza_name)
442+
(field_name)
443+
(file_name_target
444+
(file_name))
445+
(field_name)
446+
(file_name)
447+
(field_name)
448+
(blang
449+
(blang_op)
450+
(blang)
451+
(blang
452+
(quoted_string)))
453+
(field_name)
454+
(action
455+
(action_name)
456+
(action
457+
(action_name)
458+
(file_name_target
459+
(file_name))
460+
(action
461+
(action_name)
462+
(file_name_dep
463+
(file_name)))))))

0 commit comments

Comments
 (0)