macro_rules! assert_snapshot { ($name:expr, $buf:expr) => { ... }; ($name:expr, $buf:expr, $mode:expr) => { ... }; }
Assert that a buffer matches a stored snapshot (plain text).
Uses CARGO_MANIFEST_DIR to locate the snapshot directory automatically.
CARGO_MANIFEST_DIR
// Default mode: TrimTrailing assert_snapshot!("widget_basic", &buf); // Explicit mode assert_snapshot!("widget_exact", &buf, MatchMode::Exact);