Skip to content

Commit

Permalink
Use with-accepted-exit-codes for failure tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tmattio committed Nov 16, 2020
1 parent b056a89 commit 892a4cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dune-project
@@ -1,3 +1,3 @@
(lang dune 2.0)
(lang dune 2.2)

(name mdx)
7 changes: 4 additions & 3 deletions test/bin/mdx-pp/gen_dune_rules.ml
Expand Up @@ -16,9 +16,10 @@ let pp_expect_action fmt dir =
let pp_failure_action fmt dir =
Fmt.pf fmt
{|
(with-outputs-to %%{target}
(chdir %s
(system "! ocaml-mdx pp %a%s")))|}
(with-accepted-exit-codes 1
(with-outputs-to %%{target}
(chdir %s
(run %%{bin:ocaml-mdx} test %a%s))))|}
dir.dir_name pp_options dir.options dir.test_file

let () = run { pp_expect_action; pp_failure_action }
7 changes: 4 additions & 3 deletions test/bin/mdx-test/gen_dune_rules.ml
Expand Up @@ -32,9 +32,10 @@ let pp_expect_action fmt dir =
let pp_failure_action fmt dir =
Fmt.pf fmt
{|
(with-outputs-to %%{target}
(chdir %s
(system "! ocaml-mdx test %a%s")))|}
(with-accepted-exit-codes 1
(with-outputs-to %%{target}
(chdir %s
(run %%{bin:ocaml-mdx} test %a%s))))|}
dir.dir_name pp_options dir.options dir.test_file

let () = run { pp_expect_action; pp_failure_action }

0 comments on commit 892a4cc

Please sign in to comment.