From 7314e9aec2094c26f7c2ae66190d0ba92d074d27 Mon Sep 17 00:00:00 2001 From: Mika Vilpas Date: Thu, 7 Nov 2024 15:25:10 +0200 Subject: [PATCH] test: getting the search strings works with nonmatching input at end --- spec/blink-ripgrep/get_prefix_spec.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/blink-ripgrep/get_prefix_spec.lua b/spec/blink-ripgrep/get_prefix_spec.lua index a9d9053..19c8cab 100644 --- a/spec/blink-ripgrep/get_prefix_spec.lua +++ b/spec/blink-ripgrep/get_prefix_spec.lua @@ -27,6 +27,21 @@ describe("match_prefix", function() end ) + it("matches when there is nonmatching input at the end", function() + assert.are_same(blink_ripgrep.match_prefix(".hello)"), "hello") + assert.are_same(blink_ripgrep.match_prefix(",hello)"), "hello") + assert.are_same( + blink_ripgrep.match_prefix(".,,!@!@$@%<<@$