Releases: mirage/alcotest
1.8.0
CHANGES:
-
Add
match_raises
, a generalized version ofcheck_raises
(#88, #386, @JoanThibault) -
Update JaneStreet core and async to v0.16 (#390 @tmcgilchrist)
-
Fix division by zero when size of the terminal is incorrectly
reported as zero. (fix #356, #381, @MisterDA) -
Enable terminal size reporting on macOS and Windows. Also report the
terminal size even when the test is run buffered by Dune.
(#381, #396, @MisterDA) -
Allow overriding the number of columns with
ALCOTEST_COLUMNS
env
var. (#322, #381, @MisterDA) -
Be able to allocate and use user's formatters for stdout/stderr
(#399, @dinosaure) -
Stop detecting ocamlci specifically, since there's nothing specific
about it. Simply use theCI
env var to detect CIs. Improve CI
detection.
(#397, @MisterDA)
1.7.0
CHANGES:
-
compile with MSVC (#369, @jonahbeckfordm review by @TheLortex
and @MisterDA) -
Allow skipping a test case from inside the test case (#368, @apeschar)
-
Get
alcotest_stubs.c
to compile with MSVC (#369, @jonahbeckford) -
Try automatically reporting the location of calls to Alcotest.check.
(#366, @MisterDA, review by @TheLortex) -
Detect that Alcotest is running in CI and change output accordingly.
(#364, @MisterDA)
1.6.0
1.5.0
CHANGES:
-
Make Alcotest compatible with
js_of_ocaml.3.11.0
. Users can depend on the
new virtualalcotest-js
Opam library to pick up the rightjs_of_ocaml
version automatically. (#326 #328, @hhugo @smorimoto) -
Record exception backtraces during test suite runs by default. This behaviour
can be disabled by passing~record_backtrace:false
toAlcotest.run
. (#317,
@craigfe) -
Generate shorter unique identifiers for test runs (8-character alphanumeric,
rather than a full 128-bit UUID). (#304, @craigfe) -
Change
Alcotest.{char,string}
pretty-printers to use OCaml syntax on
assertion failures (i.e. wrap with quotes and escape control characters).
(#318, @craigfe) -
Fix process for getting the width of attached terminals on MacOS.
Previously, a terminal width of 80 columns was assumed. (#325, @craigfe) -
Fix parsing of test filter ranges to allow '-' separators (e.g.
test alpha 1-4
), as advertised in the manpage. The previously-used '..' separator is
also supported. (#312, @craigfe) -
Introduce an
Alcotest.V1
module that aliases the existingAlcotest
API and
provides a stability guarantee over major version changes. Similar versioned
aliases also exist for the backends:Alcotest_{async,lwt}.V1
. (#306,
@craigfe) -
Change the
~filter
argument toAlcotest.run
to be a predicate over tests.
(#305, @craigfe) -
Renamed / removed some less frequently used modules used by the test backends:
-
Avoid exporting
list_tests
in the main test APIs (Alcotest{,_lwt,_async}
).
UseAlcotest_engine
directly if you want this function. (#310, @craigfe)
1.4.0
CHANGES:
-
Add
?here
and?pos
arguments to the test assertion functions. These can be
used to pass information about the location of the call-site, which is
displayed in failing test output. (#291, @craigfe) -
Add a pretty-printer for the exception raised by
Alcotest.check
and related
functions. This allows them to be used outside of an Alcotest test runner for
making general assertions. (#296, @craigfe) -
Add
--bail
option (and correspondingALCOTEST_BAIL
environment variable),
which causes Alcotest to terminate after the first test failure. (#298,
@craigfe)
1.3.0
CHANGES:
1.2.3
1.2.2
1.2.1
1.2.0
CHANGES:
-
Add an
alcotest-mirage
package, allowing the construction of MirageOS
unikernels that run Alcotest test suites. (#238, @hannesm @linse) -
Add
Alcotest.check'
, a variant ofAlcotest.check
with labeled arguments.
(#239, @hartmut27) -
Many assorted improvements to Alcotest output formatting. (#246, @craigfe)
-
Default to
--color=always
when running inside Dune (#242, @craigfe). The
value can be overridden by setting theALCOTEST_COLOR
variable in adune
file, for example:
(env
(_
(env-vars
(ALCOTEST_COLOR auto))))
-
Support all UTF-8 characters in test names and suite names, by normalising
them for file-system interactions. (#249, @gs0510; #246, @craigfe) -
Fix various crashes when using non-filesystem-safe characters in test suite
names (these break Alcotest when attempting to generate a corresponding log
file). (#241, @mefyl; #246 @craigfe)