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
- n/a
- n/a
- n/a
- n/a
- n/a
- n/a
- n/a
- Re-introduced overriding of
CARGO_TARGET_DIR
, but using parent crate'sCARGO_TARGET_DIR
.
- Fixed a bug (by no longer passing
--tests
tocargo 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_LOG
CLI option for turning on debug logging (use with-- --nocapture
for 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_DIR
for 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(…) -> BuildTestSuite
crate-level function. - Added
fn run(…) -> BuildTestSuite
crate-level function. - Added
fn run_tests(…) -> BuildTestSuite
crate-level function.
- Changed return type of
fn expand(…)
crate-level function from-> TestSuite
to-> ExpandTestSuite
. - Updated dependencies:
regex
from1.10.3
to1.11.1
- Removed
struct TestSuite
(by marking it aspub(crate)
).
- Added
TRYEXPAND_TRUNCATE_OUTPUT
CLI option for turning off truncation of console output.
- Have
cargo check/run/test
always 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_toml
from0.19.2
to0.20.0
- Changed location of generated test project's cargo config file from './.cargo/config' to './.cargo/config.toml'.
- Updated dependencies:
yansi
from0.5.1
to1.0.1
cargo_toml
from0.19.1
to0.19.2
thiserror
from1.0.57
to1.0.58
- Updated dependencies:
cargo_toml
from0.18.0
to0.19.1
serde
from1.0.195
to1.0.197
thiserror
from1.0.56
to1.0.57
- Bumped MSRV from
0.70.0
to0.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 check
for successful expansions. - with
.and_run_tests()
builder-style method for runningcargo test
for successful expansions. - with
.and_run()
builder-style method for runningcargo run
for successful expansions. - with
.expect_pass()
/.expect_fail()
builder-style methods for asserting passes/failures.
- with
- Changed visibility of
crate::Options
topub(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: bool
toOptions
for selectively suppressing snapshots.
- Updated dependencies:
serde
from1.0.105
to1.0.194
- Changed file extensions:
- from
.expand.out.rs
to.out.rs
- from
.expand.err.txt
to.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.rs
to.expand.out.rs
(to match theexpand
command, so we can add others in the future). - Cargo metadata now gets read via
cargo_metadata
which is more robust thancargo_toml
.
- Improved error messages.
- Added
Options
type. - 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.rs
files 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
stdout
gets saved to a.expanded.rs
file - the output from
stderr
gets saved to a.error.txt
file
- the output from
- Removed
scopeguard
crate from project's dependencies - Removed
serde_json
crate from project's dependencies
Initial release.