diff --git a/crates/nu-cli/src/completions/completion_options.rs b/crates/nu-cli/src/completions/completion_options.rs index 8d2716f2c4..b716d2edaa 100644 --- a/crates/nu-cli/src/completions/completion_options.rs +++ b/crates/nu-cli/src/completions/completion_options.rs @@ -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,