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.
Unreleased - ReleaseDate
0.6.17 - 2024-08-14
- Take redactions into account when finding the end of an elided structured array
0.6.16 - 2024-07-25
0.6.15 - 2024-07-24
- Provide
Assert::redactions
0.6.14 - 2024-07-23
- Deprecated
IntoData::json
in favor ofIntoData::is_json
- Deprecated
IntoData::json_lines
in favor ofIntoData::is_jsonlines
- Deprecated
IntoData::term_svg
in favor ofIntoData::is_termsvg
- Added
IntoData::against
, with shortcuts forjson
andjsonlines
, for differentactual
andexpected
formats
0.6.13 - 2024-07-12
0.6.12 - 2024-07-10
0.6.11 - 2024-07-10
str![]
: fail, rather than panic, on divergent overlapping overwrites
0.6.10 - 2024-06-10
- Expose
Assert::normalize
0.6.9 - 2024-06-07
- Allow overwriting if
Data::is
fails
0.6.8 - 2024-06-07
- Add data format helpers to
IntoData
0.6.7 - 2024-05-29
- Allow
_
in redaction placeholder
0.6.6 - 2024-05-29
- Don't stop redacting on first mismatch
0.6.5 - 2024-05-27
- Don't stop
.term.svg
redactions just because the document widths are different
0.6.4 - 2024-05-25
data.unordered()
should be additive and not clear other filters
0.6.3 - 2024-05-24
- Make diff headers consistent line str's showing relative paths like file-backed expected
0.6.2 - 2024-05-24
- Deprecated
Assert::substitutions
in favor ofAssert::redact_with
0.6.1 - 2024-05-24
- Apply redactions to
.term.svg
files
0.6.0 - 2024-05-23
Breaking
- Removed deprecated functionality
- Removed
str![[]]
indent support - Added trailing newline to
str![[]]
- Made
DataFormat
future-proof ...
/[..]
processing has been tweaked- Redactions no longer normalize the value (except the new
Path
redactions) - Change
FilterRedactions
intoNormalizedToExpected
Other
- Deprecate
eq_
fn's in favor ofeq
- jsonlines support
- Regex redactions
Path
redactions- Json "all keys" wildcard support
- Unordered lines / json array support
- Handle more cases with
...
- Be smarter about which redactions are processed first
- Redact json values on mismatch
- Filter and redact json keys
0.5.14 - 2024-05-23
- Deprecated
filter::NormalizePaths
in favor offilter::FilterPaths
- Deprecated
filter::NormalizeNewlines
in favor offilter::FilterNewlines
0.5.13 - 2024-05-21
- Fix deprecation message
0.5.12 - 2024-05-17
- Deprecated
Harness
in favor of thetryfn
crate
0.5.11 - 2024-05-17
- Deprecated
Assert::eq(expected, actual)
in favor ofAssert::eq_(actual, expected.raw())
- Deprecated
Assert::matches(expected, actual)
in favor ofAssert::eq_(actual, expected)
- Deprecated
OutputAssert::stdout_eq(expected, actual)
in favor ofOutputAssert::stdout_eq_(actual, expected.raw())
- Deprecated
OutputAssert::stdout_matches(expected, actual)
in favor ofOutputAssert::stdout_eq_(actual, expected)
- Deprecated
OutputAssert::stderr_eq(expected, actual)
in favor ofOutputAssert::stderr_eq_(actual, expected.raw())
- Deprecated
OutputAssert::stderr_matches(expected, actual)
in favor ofOutputAssert::stderr_eq_(actual, expected)
- Deprecated
data::Data::normalize
in favor offilter::Filter::filter
- Deprecated
data::Normalize::normalize
in favor offilter::Filter::filter
- Deprecated
data::NormalizeNewlines
in favor offilter::NormalizeNewlines
- Deprecated
data::NormalizePaths
in favor offilter::NormalizePaths
- Deprecated
data::NormalizeMatches
in favor offilter::FilterRedactions
- Deprecated
data::Substitutions
in favor offilter::Redactions
- Deprecated
path
feature / mod in favor ofdir
feature / mod - Deprecated
path::PathFixture
in favor ofdir::DirRoot
- Deprecated
Error
in favor ofassert::Error
- Deprecated
Result
in favor ofassert::Result
- Deprecated
Action
in favor ofassert::Action
- Deprecated
DEFAULT_ACTION_ENV
in favor ofassert::DEFAULT_ACTION_ENV
- Deprecated
utils::normalize_lines
in favor offilter::normalize_lines
- Deprecated
utils::normalize_paths
in favor offilter::normalize_paths
- Deprecated
utils::normalize_text
- Add
Assert::eq_(actual, expected)
- Add
OutputAssert::stdout_eq_(actual, expected)
- Add
OutputAssert::stderr_eq_(actual, expected)
- Add
assert_data_eq!(actual, expected)
- Add
prelude
for easier access toIntoData
,IntoJson
, andToDebug
- Add
IntoData
for easier data conversions - Add
IntoJson
for easier data conversions - Add
Data::raw
to disable filters on expected values - Add
Harness::with_assert
for greater customization - Add
Assert::try_eq
for non-panicking asserts - Add
Assert::selected_action
to see whats chosen
0.5.10 - 2024-05-15
0.5.9 - 2024-03-13
- Don't strip on
str![].indent(false)
to work with lines with indentation
0.5.8 - 2024-03-01
- Make auto-path snapshots more deterministic
0.5.7 - 2024-02-27
- Respect
Assert::normalize_paths(false)
when runningsubset_matches
0.5.6 - 2024-02-22
- (term-svg) Reduce noise in SVG snapshots
0.5.5 - 2024-02-22
0.5.4 - 2024-02-22
0.5.3 - 2024-02-22
- (term-svg) Correctly coerce "actual" to this type on when the snapshot doesn't yet exist
- (term-svg) Ignore irrelevant details when checking for failuress
- (term-svg) Don't show irrelevant details in the diff
0.5.2 - 2024-02-19
- Add
term-svg
feature for snapshotting of terminal styling by ending files with.term.svg
0.5.1 - 2024-02-15
- Fixed regression where you couldn't overwrite a snapshot that doesn't exist yet
0.5.0 - 2024-02-14
_path
assertions have been replaced by regular assertions accepting and updatingData::read_from
/file![]
- Renamed
Data::try_coerce
toData::coerce_to
- Normalization types and
DataFormat
were moved to thedata
mod
str![]
macro for inline snapshotscoerce_to
for specifying the structure of the snapshot
file!["<path-relative-to-rs>"]
macro for test-relative snapshots_
placeholder can be used for auto-generated file names: Json
(seeDataFormat
) type ascriptions for specifying the structure of the snapshot
ToDebug
extension trait for easier snapshot testing of debug output- Help catch swapped parameters to assertions by panicking if the "actual" has a source to update but not the "expected"
- Allow inserting multiple values for the same variable, to handle multiple forms of the same value (like UNC paths vs regular paths)
path::current_rs!()
macro for an absolute path ofstd::fs::file!
path::current_dir!()
macro to get the absolute path tostd::fs::file!
path::cargo_rustc_current_dir()
macro as a polyfill for the unstableCARGO_RUSTC_CURRENT_DIR
0.4.17 - 2024-02-08
0.4.16 - 2024-01-12
- Update dependency
0.4.15 - 2023-12-08
- Actually match standard diff colors
0.4.14 - 2023-10-02
- Match standard diff colors
0.4.13 - 2023-09-28
- Update
anstream
0.4.12 - 2023-08-24
- MSRV bumped to 1.70.0
- Improved build-times by dropping the
is-terminal
dependency
- Wildcard support for structured data
0.4.11 - 2023-04-13
- Dependency update
0.4.10 - 2023-03-16
- Dependency update
0.4.9 - 2023-03-14
- Update MSRV to 1.64.0
- Deprecated
color-auto
feature, its now automatic
- Improved terminal detection for color
0.4.8 - 2023-02-28
- Update dependencies
0.4.7 - 2023-02-20
- Reduce dependencies
0.4.6 - 2023-02-19
- Added
examples
feature to expose example-compilation functions in thecmd
module
0.4.5 - 2023-02-15
- Dependency updates
0.4.4 - 2023-01-04
0.4.3 - 2022-11-26
0.4.2 - 2022-11-24
0.4.1 - 2022-11-04
- Report signal that terminated a command
0.4.0 - 2022-09-23
- Initial json support
- Hide optional dependencies
0.3.3 - 2022-08-15
- Don't hang when merging stderr with stdout on large output (#121)
0.3.2 - 2022-08-15
Assert::eq
andPathDiff::subset_eq_iter
normalize newlines but not paths (broken in 0.3.0)
0.3.1 - 2022-08-03
- Added
Assert::normalize_paths
to allow disabling path normalization
0.3.0 - 2022-08-01
Data::read_from
now takes a desired data format rather than a bool between text/binaryData::try_text
was replaced withData::try_coerce
Data::as_bytes
was replaced withData::to_bytes
Assert::eq
(and everything built on it) normalizes paths but notPathDiff::subset_eq_iter
(bug)
- Make diffs viewable with large output by eliding large sections of unchanged content
0.2.10 - 2022-05-02
- Link in documentation
0.2.9 - 2022-03-09
0.2.8 - 2022-03-08
- In Diffs, emphasize role over name
0.2.7 - 2022-03-08
- Configure asserts on the
Command
itself
- When manually setting
Action
, overwrite the env var
0.2.6 - 2022-03-08
- Show relpath in diff header where possible
0.2.5 - 2022-03-08
- Have standard gutter divider in Diffs
- Improve command assertion output
0.2.4 - 2022-03-08
- Create target directory when needed
0.2.3 - 2022-03-08
- Simple path assert
0.2.2 - 2022-03-08
- Defaulted the action env to
SNAPSHOTS
- Made path function more accepting of inputs
0.2.1 - 2022-03-07
- Remove need for doing
<VAR>=overwrite
twice due to lack of normalization on first call
0.2.0 - 2022-03-07
- Name changed from
fs_snapshot
- More flexible return types
- Diffs now show full context, with highlighting of changes within lines and a marker for no newline at end of file
- Everything needed to implement
trycmd
is now included
0.1.2 - 2022-01-11
0.1.1 - 2021-12-28
- Working no-default-features