From 73e4c18045055da158929f556765b0f25837c2ba Mon Sep 17 00:00:00 2001 From: Arne Van Maele Date: Tue, 19 Dec 2023 14:09:49 +0100 Subject: [PATCH] Fix: #51: Add beginning and end delimiters to -only param to avoid unwanted test function generation. --- lua/gopher/gotests.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/gopher/gotests.lua b/lua/gopher/gotests.lua index f98b365..f185026 100644 --- a/lua/gopher/gotests.lua +++ b/lua/gopher/gotests.lua @@ -39,7 +39,7 @@ function gotests.func_test() return end - add_test { "-only", ns.name } + add_test { "-only", "^" .. ns.name .. "$" } end ---generate unit tests for all functions in current file