Skip to content

Commit

Permalink
Add test case for outputJSON
Browse files Browse the repository at this point in the history
Fixes #856
  • Loading branch information
cyderize committed Oct 29, 2024
1 parent 7fa300e commit b527d89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ https://github.com/MiniZinc/libminizinc/issues.

Changes:
^^^^^^^^
- Add support for `elseif` in `if then elseif endif` expressions without an
- Add support for ``elseif`` in ``if then elseif endif`` expressions without an
`else` branch.

Bug fixes:
^^^^^^^^^^
- Fix boolean context when flattening tuple or record literals containing
booleans.
- Fix memory leak in overflow handler.
- Fix crash when calling ``outputJSON`` (:bugref:`856`).

.. _v2.8.7:

Expand Down
10 changes: 10 additions & 0 deletions tests/spec/unit/regression/github_856.mzn
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/***
!Test
solvers: [gecode]
expected: !Result
solution: !Solution
_output_item: "{\n \"x\" : 1\n}\n"
***/

var 1..1: x;
output outputJSON();

0 comments on commit b527d89

Please sign in to comment.