From 2dcc9e90d2d72b9d9ff41260b4dba1a319c369e6 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 28 Jun 2024 22:41:43 +0200 Subject: [PATCH] fix: escaping of []{} brackets were missing (#64) --- lua/neotest-golang/convert.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/neotest-golang/convert.lua b/lua/neotest-golang/convert.lua index 185c181c..e6eb1dfa 100644 --- a/lua/neotest-golang/convert.lua +++ b/lua/neotest-golang/convert.lua @@ -8,6 +8,10 @@ function M.to_gotest_regex_pattern(test_name) local special_characters = { "(", ")", + "[", + "]", + "{", + "}", } for _, character in ipairs(special_characters) do test_name = test_name:gsub("%" .. character, "\\" .. character)