Macro insta::assert_csv_snapshot[][src]

macro_rules! assert_csv_snapshot {
    ($value : expr, @ $snapshot : literal) => { ... };
    ($value : expr, { $($k : expr => $v : expr), * $(,) ? }, @ $snapshot :
 literal) => { ... };
    ($value : expr, { $($k : expr => $v : expr), * $(,) ? }) => { ... };
    ($name : expr, $value : expr) => { ... };
    ($name : expr, $value : expr, { $($k : expr => $v : expr), * $(,) ? }) => { ... };
    ($value : expr) => { ... };
}
Expand description

Asserts a Serialize snapshot in CSV format.

Feature: csv (disabled by default)

This works exactly like assert_yaml_snapshot! but serializes in CSV format instead of YAML.

Example:

assert_csv_snapshot!(vec[1, 2, 3]);

The third argument to the macro can be an object expression for redaction. It’s in the form { selector => replacement }. For more information about redactions see redactions.

The snapshot name is optional but can be provided as first argument.