Changes in version 1.4.3 (2026-03-24) o tt.pr.color is now set to FALSE when the NO_COLOR environment variable is set. See https://no-color.org/ o expect_ now uses conditionMessage internally. This should increase compatibility with packages defining custom conditions. (thanks to Tim Taylor for suggesting and Etienne Bacher for reporting) o expect_match is now available when testing packages (thanks to Tim Taylor for the PR and Marcel Ramos for reporting) o fix in pattern matching for warnings (thanks for Matthijs Berends for the PR) o Fixed exit_if_not() that would always exit (thanks to Vincent Arel-Bundock for reporting) Changes in version 1.4.1 (2023-02-21) o expect_warning and expect_message gain argument 'strict'. This toggles between failing when an exception worse than the expected one is thrown. (Thanks to Joshua Ulrich for the suggestion) o New function 'expect_length' checks length of object (thanks to Marcel Ramos for suggesting). o New function 'exit_if': conditionally exit a test file, akin to stopifnot. (Thanks to Grant McDermott for triggering this). o New function 'expect_match' to test whether string output(s) match a regular expression (Thanks to Aaron Jacobs for the suggestion). o package has no logo now, thanks to Reto Stauffer! o 'build_install_test' gains 'color' argument (thanks to Tim Taylor for suggesting) o 'run_test_file' and 'build_install_test' gain 'encoding' argument that is passed to 'parse' for reading test files (thanks to Vincent Goulet for suggesting). o exit_file() is now safeguarded against non-character argument. o Fixed reporting issue for class labels on conditions. (thanks to dherz for reporting) o Fixed bug: multiple extension packages are now possible (thanks to Vincent Arel-Bundock for the PR) Changes in version 1.3.1 (2021-07-06) o expect_error, _warning, _message, _stdout now accept ... arguments that are passed as extra arguments to 'grepl', when a pattern is provided (Thanks to Bart-Jan van Rossum for the GH issue). o Package now also resets locale settings after each file run, and 'report_side_effects' also tracks changes in locale settings. o Run test directories via RStudio addin. (Thanks to Matthijs Berends for PR #83) o tinytest used to implicitly depend on R >= 3.2.0 because of using 'trimws' and 'dir.exists'. (Thanks to Sebastian Meyer for figuring this out and thanks to Matthijs Berends for PR #84 solving this) o 'tinytest' objects now store the stack trace as a list of calls. When needed, the relevant part of the trace is printed, but only when printing the long form. (thanks to Jonas Kristoffer Lindeloef for suggesting) o Improved printing while running tests o Graphics produced in tests are now written to nullfile() (Thanks to Henrik Bengtsson for the suggestion). (nullfile() is defined in-package when built on R < 3.6.0). o Fixed time measurement when directory (or pkg) is tested and tests take more than an minute. o Fix: set_env variables would not be unset in all cases (Thanks to Henrik Bengtsson for the PR) o Fix in 'expect_equal': reporting in case of differing attributes (Thanks to Ott Toomet for reporting #80). o Fix in build_install_test: better reading of DESCRIPTION file (Thanks to Christof Stepper for PR #87) Changes in version 1.2.4 (2020-12-17) o 'test_package' gains 'lib.loc' argument. o New function 'expect_inherits' to check the class of an object (thanks to Sebastian Meyer for suggesting). o Printing of file exit message is now shorter and on same line as test report (thanks for Dirk Eddelbuettel for suggesting). o Duration per file is now reported, total duration is stored (thanks to Dirk Eddelbuettel for suggesting) o Small improvements in difference reporting. o Fix: avoid truncated printing in case of long diff reporting (thanks to Sebastian Meyer for the PR) o Fix: default pattern for test files was "^test_", is now "^test" as documented. (Thanks to Sebastian Meyer for the PR). o Fix: it is now easier to put tests that you do not want to install under /tests/somedir. o Internal: updated tinytest.format method to conform to new R CMD check demand. (Thanks to Brian Ripley for the warning). Changes in version 1.2.3 (2020-10-07) o Added example to using tinytest vignette on mocking databases (Thanks to Thomas Fuchs for working this out). o 'expect_stdout' now handles multi-line output. (Thanks to John Blischak for reporting). o A message is issued when a test file uses 'tinytest::expect': such tests are not registered (thanks to James Thompson for issuing a ticket on this). Changes in version 1.2.2 (2020-06-18) o Improved diff reporting in expect_true, and expect_false. o 'build_install_test' gains arguments 'lc_collate' and 'pattern', which are now passed to 'run_test_dir'. (Thanks to Patrick Breheny for reporting). Changes in version 1.2.1 (2020-05-18) o expect_message() now also detects occurrence of any message, and not just the first. Detecting only the first was introduced in 1.2.0 and reported at GH issue #51 (Thanks to Jozef Hajnala and Ralf Herold). o Better 'diff' information for expect_warning() and expect_message(). Changes in version 1.2.0 (2020-05-06) o 'run_test_file' gains argument 'set_env'. Set environment variables during a test run. o New functions 'expect_equal_to_reference' and 'expect_equivalent_to_reference' comparing/storing an object with/to an RDS file (Thanks to Jon Clayden for suggesting). o New function 'expect_stdout' compares output of e.g. 'print' and 'cat' statements to a user-defined pattern. (Thanks to Michel Lang for suggesting). o New function get_call_wd() returns working directory, active when tests were invoked. (Thanks to Maja Zaloznik for the idea) o Functions 'expect_error', 'expect_warning', and 'expect_message' gain 'class' argument, that can be used to check whether a signaling condition inherits from a certain class. (thanks to Michel Lang for suggesting) o Argument 'tol' now renamed 'tolerance'. Also removed internal reliance on partial argument matching (Thanks to Michel Lang). o Updated documentation on how to extend tinytest with new recommendation. o Using tinytest vignette gains section on testing internal functions. o Breaking: function 'expect_message' no longer intercepts messages sent to stdout (e.g. via 'print' or 'cat'), but only messages send as a 'message' condition (Thanks to Michel Lang for pointing this out). o Fix: 'test_package' would return NULL when called interactively and the package contained a failing test. Changes in version 1.1.0 (2019-09-26) o Tests are now run with 'pdf(file=tempfile())' as graphics device. This avoids writing 'Rplots.pdf' under the library directory when R CMD check is run. o Side-effects tracking now includes file operations in the test directory or subdirectories thereof. o build_install_test now accepts arguments 'side_effects', 'remove_side_effects' o expect_* functions gain argument 'info': a user-defined message that is printed in long output format. o 'run_test_dir' now selects files with "^test.*\\.[rR]$", not "^test.*\\.[rR]" (thanks to Dirk Eddelbuettel). o Fixed 'diff' message for scalar comparisons in expect_equivalent, expect_equal, expect_identical: 'target' and 'current' were switched in message (thanks to GH user Billy34). o 'setup_tinytest' now keeps formatting for DESCRIPTION files (thanks to Bart-Jan van Rossum). o Fixed crash of 'build_install_test' when pkg was developed under directory with spaces (thanks to Bart-Jan van Rossum). o Fixed issue where R CMD check would hang when packages use paralellization (GH #36) or certain Rcpp features (GH #37). Thanks to George G Vega Yon and Dirk Eddelbuettel. Changes in version 1.0.0 (2019-08-23) o New argument 'side_effects' for test runners: monitor side effects while running tests. o New function 'report_side_effects': toggle monitoring side-effects within test files. o Run test files in parallel, for example: test_package("pkg", ncpu=2). (Thanks to Dirk Eddelbuettel for the suggestion). o New function 'exit_file': stop running a test file with an optional message. o Other packages can now extend the package, see '?register_tinytest_extension' for the API (Thanks to Michel Lang for the suggestion) o New function 'using' loads tinytest extension package. o New function 'expect_null' o Improved reporting for 'expect_true', 'expect_false' o Improved reporting for expect_identical, expect_true, expect_equivalent in the case of scalar values. o Added second vignette with real-life examples of tinytest tests. o build_install_test gains argument 'color' and 'verbose' o test_package returns result visibly in interactive sessions. o Fixed path issue for build_install_test on Windows (thanks to Jan Wijffels) Changes in version 0.9.6 (2019-06-28) o Fixed error caught on CRAN Changes in version 0.9.5 o New function 'expect_message'. o New functions 'all_pass', 'all_fail', 'any_pass', 'any_fail' for investigating 'tinytests' objects. o When `interactive()`, 'test_package' will not throw an error upon a failing test. Still throws an error when not `interactive()`. This makes it more usefull for interactive testing of installed packages. o 'test_package()' now returns a 'tinytests' object. o Better 'verbosity' while running test files (thanks to Dirk Eddelbuettel for discussions and feedback) o Added 'test_silent'. Check for lack of errors or warnings (Thanks to Bryan Hanson for the suggestion, #14) o Colored output is turned off automatically when the pkg is loaded in a "dumb" terminal. (Thanks to Dirk Eddelbeutel for the suggestion, #12). o Improved documentation, including on how to skip tests on CRAN. o Improved vignette layout (thanks to Dirk Eddelbuettel's suggestions and initial PR #15 for geometry settings) o Improved behavior of 'setup_tinytest()' when a 'Suggests' field is already present in DESCRIPTION o Fix: toleracence was not passed to 'all.equal' by 'expect_equal' and 'expect_equivalent' (Thanks to An Chu #17) o Fix 'expect_warning' and 'expect_error' would crash when run on the CLI. (Thanks to Bryan Hanson #13) o Fix: method dispatch in packages defining S4 methods now works. o Fix: 'setup' now adds 'tinytest' to 'Suggests:' rather then adding an extra 'Suggests' field in DESCRIPTION. o Corrections in README and vignette, thanks to GH user 'salim-b' PR #18, #19 o Internal: simplified code for 'expect_warning' and 'expect_error' (thanks to Lionel Henry for suggestions). Changes in version 0.9.4 (2019-06-05) o New function 'setup_tinytest' that adds 'tinytest' infrastructure to a package source directory. o Global settings set by 'options' and 'Sys.setenv' in a test file are automatically removed after running a test file. This improves independence between test files. This default can be overwritten, see Chapter 3 of the 'Using tinytest' vignette. o Test file sorting order can be controlled with 'lc_collate' option in test runners or by setting options(tt.collate) globally. o More control over testing packages in 'R CMD check' with extra arguments to 'test_packages'. o Improved call reporting in case of multiline test expressions (for example when many test expressions depend on an 'if' condition). o Fix in 'expect_warning' and 'expect_error'. In some circumstances evaluation argument 'current' evaluated in the wrong scope, resulting in unfound variables. Changes in version 0.9.3 (2019-05-10) o New function 'expect_identical' o All functions of the form 'expect_lol' can now also be called as 'checkLol' (similar to, but not the same as 'RUnit' syntax) o Expect_* functions now have first argument 'current' and second argument 'target' o Added 'summary' method for objects of class 'tinytests' o Default test directory is now 'inst/tinytest' o Fix: 'as.data.frame' crashed on tinytests object with all tests passing. Changes in version 0.9.2 (2019-04-25) o Processed review by CRAN team member. o Output coloring is now optional. o Fixed issue so package works correctly with r-oldrel. Changes in version 0.9.1 o Fixed a few CRAN warnings. Changes in version 0.9.0 o Initial release.