Skip to content

Commit

Permalink
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/snapbox/src/filter/redactions.rs
Original file line number Diff line number Diff line change
@@ -437,4 +437,14 @@ mod test {
assert_eq!(expected, actual, "placeholder={:?}", placeholder);
}
}

#[test]
fn substitute_literal() {
let input = "Hello world!";
let pattern = "Hello [OBJECT]!";
let mut sub = Redactions::new();
sub.insert("[OBJECT]", "world").unwrap();
let actual = normalize(input, pattern, &sub);
assert_eq!(actual, pattern);
}
}

0 comments on commit 0fdeaae

Please sign in to comment.