Skip to content

Releases: mirage/alcotest

1.7.0

24 Feb 18:00
927088f
Compare
Choose a tag to compare

CHANGES:

1.6.0

24 Jun 10:26
Compare
Choose a tag to compare

CHANGES:

  • Fix a bug when running test concurently. Alcotest could fail to
    output the content of the log file. (#353, @hhugo)

  • Require Cmdliner.1.1.0. (#339, @MisterDA)

  • Upgrade to async>=v0.15.0 (#352, @crackcomm)

1.5.0

09 Oct 18:11
Compare
Choose a tag to compare

CHANGES:

  • Make Alcotest compatible with js_of_ocaml.3.11.0. Users can depend on the
    new virtual alcotest-js Opam library to pick up the right js_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 to Alcotest.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 existing Alcotest 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 to Alcotest.run to be a predicate over tests.
    (#305, @craigfe)

  • Renamed / removed some less frequently used modules used by the test backends:

    • Alcotest.Unix -> Alcotest.Unix_platform
    • Alcotest_engine.{Cli,Core,Test} -> Alcotest_engine.V1.{Cli,Core,Test}
    • Alcotest.{Cli,Core} are now gone. Use Alcotest_engine.V1.{Cli,Core}.Make (Alcotest.Unix_platform) instead.
      (#306 #309, @craigfe)
  • Avoid exporting list_tests in the main test APIs (Alcotest{,_lwt,_async}).
    Use Alcotest_engine directly if you want this function. (#310, @craigfe)

1.4.0

15 Apr 09:22
Compare
Choose a tag to compare

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 corresponding ALCOTEST_BAIL environment variable),
    which causes Alcotest to terminate after the first test failure. (#298,
    @craigfe)

1.3.0

16 Feb 21:37
Compare
Choose a tag to compare

CHANGES:

  • Add Alcotest.triple for testing 3-tuples. (#288, @sheepduke)

  • Correctly report test suite duration with millisecond precision. (#286,
    @craigfe)

  • Improve pretty-printing of results to consider the terminal width, fixing
    several display issues due to line wrapping in small terminals. (#282,
    @craigfe)

1.2.3

07 Sep 20:51
Compare
Choose a tag to compare

CHANGES:

  • Require Dune 2.2. (#274, @craigfe)

  • Fix a bug in the handling of the ~and_exit:false option when the test suite
    fails. (#271, @craigfe)

1.2.2

26 Aug 16:05
b16d4f5
Compare
Choose a tag to compare

CHANGES:

  • Fail gracefully when the user supplies an empty suite name. (#265, @craigfe)

  • Fix compatibility with fmt.0.8.8+dune by adding a missing fmt dependency
    in alcotest's dune file (#266, @NathanReb)

  • Only show "in progress" lines when writing to a TTY. (#267, @craigfe)

1.2.1

15 Jul 07:36
Compare
Choose a tag to compare

CHANGES:

  • Surround pretty-printed diffs with quotes to make trailing whitespace more
    obvious. (#261, @craigfe)

  • Allow . characters to appear unescaped in symlinks and test directories.
    (#259, @craigfe)

1.2.0

13 Jul 07:22
Compare
Choose a tag to compare

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 of Alcotest.check with labeled arguments.
    (#239, @hartmut27)

  • Add a testable for the bytes type. (#253, @mefyl)

  • 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 the ALCOTEST_COLOR variable in a dune
    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)

1.1.0

03 Apr 11:48
Compare
Choose a tag to compare

CHANGES:

  • Fix handling of CLI options for Alcotest_{async,lwt}.run. (#222, @craigfe)
  • Fix interleaving of ASSERT outputs with the other test code, and ensure that
    it is correctly captured in log files. (#215 #228, @icristescu @craigfe)
  • Don't raise Test_exception on Cmdliner parse failure (#234, @craigfe)