Skip to content

Commit ad96108

Browse files
seafoamteallpil
authored andcommitted
Add regression test for parentheses
1 parent c3a8140 commit ad96108

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/packages/text_search_test.gleam

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,16 @@ pub fn fix_for_typo_can_fix_multiple_words_at_once_test() {
195195
let assert Ok(value) = text_search.did_you_mean(index, "tme und spice")
196196
assert value == "time and space"
197197
}
198+
199+
pub fn parentheses_test() {
200+
let index = text_search.new()
201+
let assert Ok(_) =
202+
text_search.insert(
203+
index,
204+
"paint",
205+
"Make drawings, animations, and games (HTML Canvas)",
206+
)
207+
208+
let assert Ok(value) = text_search.lookup(index, "canvas")
209+
assert value == [Found("paint", 1)]
210+
}

0 commit comments

Comments
 (0)