Add tests

This commit is contained in:
Vansh Nath 2025-04-06 16:05:04 +02:00
parent 8422b512da
commit 1c9377df6f
No known key found for this signature in database
GPG Key ID: 709BF3EAFB217A96

View File

@ -313,6 +313,11 @@ mod test {
#[case(MatchAlgorithm::Fuzzy, "example text", "ext", true)]
#[case(MatchAlgorithm::Fuzzy, "example text", "mplxt", true)]
#[case(MatchAlgorithm::Fuzzy, "example text", "mpp", false)]
#[case(MatchAlgorithm::Substring, "example text", "", true)]
#[case(MatchAlgorithm::Substring, "example text", "examp", true)]
#[case(MatchAlgorithm::Substring, "example text", "ple", true)]
#[case(MatchAlgorithm::Substring, "example text", "text", true)]
#[case(MatchAlgorithm::Substring, "example text", "mplxt", false)]
fn match_algorithm_simple(
#[case] match_algorithm: MatchAlgorithm,
#[case] haystack: &str,