Skip to content

Commit

Permalink
Add regression test for #224 (#255)
Browse files Browse the repository at this point in the history
* Use dune 2.7

This lets us use dune's built in cram testing, instead of the bespoke
cram-style testing that used for the spec. I think it makes sense to
support the current finicky testing setup for the spec, because it lets
us use the commonmark spec as a raw source of truth, but for further
tests we add I think we'll benefit from a more lightweight set up.

Since we are already using dune, it seems sensible to use this testing
framework we get access to with a two line change.

We might consider reworking the spec testing setup to generate
dune-supported cram tests in the future tool, as it would eliminate a
good chunk of code.

* Add regression test for #224
  • Loading branch information
shonfeder authored Oct 3, 2021
1 parent 963dc01 commit 39ccd93
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
(lang dune 2.0)

(lang dune 2.7)
(name omd)
(version 2.0.0~alpha1)

(cram enable)

(generate_opam_files)

(license ISC)
Expand Down
2 changes: 2 additions & 0 deletions tests/blackbox/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(cram
(deps %{bin:omd}))
11 changes: 11 additions & 0 deletions tests/blackbox/regression-224.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Regression test for https://github.com/ocaml/omd/issues/224

$ omd << "MD"
> hello_world:
> ```
> is_this_code_
> ```
> MD
<p>hello_world:</p>
<pre><code>is_this_code_
</code></pre>

0 comments on commit 39ccd93

Please sign in to comment.