From 497266302d7ac20be411685c8d7a6dba0126360a Mon Sep 17 00:00:00 2001 From: w08r Date: Wed, 11 Dec 2024 09:31:47 +0000 Subject: [PATCH] Add custom args to test compile step --- lisp/progmodes/go-ts-mode.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 86e74ad58a8..acf458bf63b 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -52,6 +52,12 @@ :type '(repeat string) :group 'go) +(defcustom go-ts-mode-test-args nil + "List of extra args for the Go test commands." + :version "31.1" + :type '(repeat string) + :group 'go) + (defvar go-ts-mode--syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?+ "." table) @@ -396,7 +402,8 @@ specifying build tags." "Compile the tests matching REGEXP. This function respects the `go-ts-mode-build-tags' variable for specifying build tags." - (compile (format "go test -v %s -run '%s'" + (compile (format "go test %s -v %s -run '%s'" + (string-join go-ts-mode-test-args) (go-ts-mode--get-build-tags-flag) regexp))) -- 2.32.0