Skip to content

Commit

Permalink
test(sub): Handle the clear case
Browse files Browse the repository at this point in the history
Cherry pick a3c18fe (#280)
  • Loading branch information
epage committed May 16, 2024
1 parent 0fdeaae commit e6523a5
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
Expand Up @@ -447,4 +447,14 @@ mod test {
let actual = normalize(input, pattern, &sub);
assert_eq!(actual, pattern);
}

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

0 comments on commit e6523a5

Please sign in to comment.