All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Please make sure to add your changes to the appropriate categories:
Added: for new functionalityChanged: for changes in existing functionalityDeprecated: for soon-to-be removed functionalityRemoved: for removed functionalityFixed: for fixed bugsPerformance: for performance-relevant changesSecurity: for security-relevant changesOther: for everything else
- n/a
- Bumped MSRV from “1.88.0” to “1.91.0”.
- Updated dependencies:
cargo_tomlfrom0.22.0to1.0.0
- n/a
- n/a
- n/a
- n/a
- n/a
- n/a
- Added
filter_stdout()andfilter_stderr()methods for regex-based output filtering
- Bumped MSRV from
1.86.0to1.88.0.
- Updated dependencies:
cargo_metadatafrom0.22.0to0.23.0
- Updated dependencies:
cargo_metadatafrom0.20.0to0.22.0
- Bumped MSRV from
1.82.0to1.86.0.
- Updated dependencies:
cargo_metadatafrom0.19.2to0.20.0
- Bumped MSRV from
1.78.0to1.82.0.
- Added support for Rust edition "2024"
- Updated dependencies:
thiserrorfrom1.0.58to2.0.0cargo_metadatafrom0.18.1to0.19.2cargo_tomlfrom0.20.0to0.22.0
- Re-introduced overriding of
CARGO_TARGET_DIR, but using parent crate'sCARGO_TARGET_DIR.
- Fixed a bug (by no longer passing
--teststocargo check) that would sometimes cause errors of individual files to get wrongly reported all bundled together.
- Reversed the minor performance regression introduced in
0.9.1.
- Added
TRYEXPAND_DEBUG_LOGCLI option for turning on debug logging (use with-- --nocapturefor optimal results).
- Stopped overriding
CARGO_TARGET_DIR(you can still opt-in via.env("CARGO_TARGET_DIR", "…")) (see ###Fixed).
- n/a
- n/a
- Fixed a bug (by no longer overriding
CARGO_TARGET_DIR) that would sometimes cause errors of individual files to get wrongly reported all bundled together.
- Due to no longer using the same
CARGO_TARGET_DIRfor all tests (even across test groups) there may be some (hopefully minor) performance regressions for some projects.
- Added
struct BuildTestSuite. - Added
struct ExpandTestSuite. - Added
fn check(…) -> BuildTestSuitecrate-level function. - Added
fn run(…) -> BuildTestSuitecrate-level function. - Added
fn run_tests(…) -> BuildTestSuitecrate-level function.
- Changed return type of
fn expand(…)crate-level function from-> TestSuiteto-> ExpandTestSuite. - Updated dependencies:
regexfrom1.10.3to1.11.1
- Removed
struct TestSuite(by marking it aspub(crate)).
- Added
TRYEXPAND_TRUNCATE_OUTPUTCLI option for turning off truncation of console output.
- Have
cargo check/run/testalways run without terminal colors (i.e.--color "never").
- Fixed bug that would write stdout's output to snapshot file with '.err.txt' extension instead of '.out.txt'.
- Updated dependencies:
cargo_tomlfrom0.19.2to0.20.0
- Changed location of generated test project's cargo config file from './.cargo/config' to './.cargo/config.toml'.
- Updated dependencies:
yansifrom0.5.1to1.0.1cargo_tomlfrom0.19.1to0.19.2thiserrorfrom1.0.57to1.0.58
- Updated dependencies:
cargo_tomlfrom0.18.0to0.19.1serdefrom1.0.195to1.0.197thiserrorfrom1.0.56to1.0.57
- Bumped MSRV from
1.70.0to1.74.0.
- Fixed redundant logging of expanded code as both, "EXPANDED:" and "OUTPUT:".
- Restricted logging of snapshot blocks to 100 lines per block.
- Fixed bug where unexpected failure was getting reported, but no actual error included in the log.
- Added support for running test files (i.e.
cargo run). - Added support for testing test files (i.e.
cargo test). - Added
struct TestSuite- with
.arg()/.args()builder-style methods for providing args. - with
.env()/.envs()builder-style methods for providing envs. - with
.skip_overwrite()builder-style method for suppressing snapshot writing. - with
.and_check()builder-style method for runningcargo checkfor successful expansions. - with
.and_run_tests()builder-style method for runningcargo testfor successful expansions. - with
.and_run()builder-style method for runningcargo runfor successful expansions. - with
.expect_pass()/.expect_fail()builder-style methods for asserting passes/failures.
- with
- Changed visibility of
crate::Optionstopub(crate)
fn expand_fail()fn expand_opts()fn expand_opts_fail()fn expand_checking_fail()fn expand_opts_checking()fn expand_opts_checking_fail()
- Added support for checking (i.e.
cargo check) successful expansions viaexpand_checking()andexpand_opts_checking(). - Added field
skip_overwrite: booltoOptionsfor selectively suppressing snapshots.
- Updated dependencies:
serdefrom1.0.105to1.0.194
- Changed file extensions:
- from
.expand.out.rsto.out.rs - from
.expand.err.txtto.err.txt
- from
- External dependencies of the crate are now properly mirrored by the test projects.
- Features of the crate are now properly mirrored by the test projects.
- Passing no file patterns is now considered a failure:
- Calling
expand()with an empty list of file patterns will fail. - Calling
expand_opts()with an empty list of file patterns will fail. - Calling
expand_fail()with an empty list of file patterns will fail. - Calling
expand_opts_fail()with an empty list of file patterns will fail.
- Calling
- Passing file patterns that match no files is now considered a failure:
- Calling
expand()with a file pattern that matches no files will fail. - Calling
expand_opts()with a file pattern that matches no files will fail. - Calling
expand_fail()with a file pattern that matches no files will fail. - Calling
expand_opts_fail()with a file pattern that matches no files will fail.
- Calling
- Added
cargo_metadata = "0.18.1"crate dependency. - Added support for (virtual/non-virtual) workspaces.
- Changed file extension from
.expanded.rsto.expand.out.rs(to match theexpandcommand, so we can add others in the future). - Cargo metadata now gets read via
cargo_metadatawhich is more robust thancargo_toml.
- Improved error messages.
- Added
Optionstype. - Added
expand_opts()&expand_opts_fail()(replacingexpand_args()&expand_args_fail()).
- Removed
expand_args()&expand_args_fail()(in favor ofexpand_opts()&expand_opts_fail()).
- Named errors (i.e.
error[E…]: …) are now properly detected and included in error snapshots. - Generated
.extended.rsfiles obtained from failures no longer include Rust prelude, etc. - No longer crashes when encountering an unexpectedly empty stdout/stderr, but reports an error instead.
- No longer reports updated snapshots for snapshots that were overwritten, but actually unchanged.
- Tests now properly share a single target directory, speeding up compilation times.
- On failure two snapshots are now getting generated:
- the output from
stdoutgets saved to a.expanded.rsfile - the output from
stderrgets saved to a.error.txtfile
- the output from
- Removed
scopeguardcrate from project's dependencies - Removed
serde_jsoncrate from project's dependencies
Initial release.