Skip to content

Commit

Permalink
test(filter): Show an elide bracketed with sub
Browse files Browse the repository at this point in the history
Cherry pick d986e57 (#279)
  • Loading branch information
epage committed May 16, 2024
1 parent b283dd9 commit e33b1cb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/snapbox/src/filter/redactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,15 @@ mod test {
assert_eq!(expected, actual);
}

#[test]
fn elide_delimited_with_sub() {
let input = "Hello World\nHow are you?\nGoodbye World";
let pattern = "Hello [..]\n...\nGoodbye [..]";
let expected = "Hello [..]\nHow are you?\nGoodbye World";
let actual = normalize(input, pattern, &Redactions::new());
assert_eq!(expected, actual);
}

#[test]
fn leading_elide() {
let input = "Hello\nWorld\nGoodbye";
Expand Down

0 comments on commit e33b1cb

Please sign in to comment.