Adjust test

This commit is contained in:
F. Levi 2024-10-04 11:38:47 +03:00
parent c3de3a9ab7
commit 03579aba13

View File

@ -798,12 +798,12 @@ mod tests {
@"…the power to split <em>the world</em> between those who embraced…" @"…the power to split <em>the world</em> between those who embraced…"
); );
let builder = MatcherBuilder::new_test(&rtxn, &temp_index, "\"power to\" \"and those\""); let builder = MatcherBuilder::new_test(&rtxn, &temp_index, "those \"and those\"");
let mut matcher = builder.build(text, None); let mut matcher = builder.build(text, None);
// should highlight "those" and the phrase "and those". // should highlight "those" and the phrase "and those".
insta::assert_snapshot!( insta::assert_snapshot!(
matcher.format(format_options), matcher.format(format_options),
@"groundbreaking invention had the <em>power to</em> split the world between" @"world between <em>those</em> who embraced progress <em>and those</em> who resisted"
); );
let builder = MatcherBuilder::new_test( let builder = MatcherBuilder::new_test(
@ -841,17 +841,6 @@ mod tests {
@"…between those who <em>embraced progress and those who resisted change</em>…" @"…between those who <em>embraced progress and those who resisted change</em>…"
); );
let builder = MatcherBuilder::new_test(
&rtxn,
&temp_index,
"\"The groundbreaking invention\" \"split the world between those\"",
);
let mut matcher = builder.build(text, None);
insta::assert_snapshot!(
matcher.format(format_options),
@"…the power to <em>split the world between those</em> who embraced…"
);
let builder = MatcherBuilder::new_test( let builder = MatcherBuilder::new_test(
&rtxn, &rtxn,
&temp_index, &temp_index,