-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
A-snapboxArea: snapbox packageArea: snapbox packageenhancementImprove the expectedImprove the expected
Description
cargo-test-support
s built-in assertions for jsonlines would perform the following transformation to the "expected" value
let expected_objs: Vec<_> = expected
.split("\n\n")
.map(|expect| {
expect
.parse()
.with_context(|| format!("failed to parse expected JSON object:\n{}", expect))
})
.collect::<Result<_>>()?;
so instead of
{}
{}
you'd get
{
}
{
}
This makes it easier to inspect the jsonlines data and to view the diffs.
For Cargo to adopt snapbox, we need something similar, see rust-lang/cargo#14039
Metadata
Metadata
Assignees
Labels
A-snapboxArea: snapbox packageArea: snapbox packageenhancementImprove the expectedImprove the expected