From ac1bf19fcd7cd5aa37ea6eae2d7f8d7659e5916c Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Wed, 23 Nov 2016 12:22:17 +0530 Subject: [PATCH] Emacs: Add the '-run .' test flag in Go to allow for test selection --- .emacs.d/lisp/mode-go.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.emacs.d/lisp/mode-go.el b/.emacs.d/lisp/mode-go.el index b0a218cb..9aaf62f6 100644 --- a/.emacs.d/lisp/mode-go.el +++ b/.emacs.d/lisp/mode-go.el @@ -18,7 +18,7 @@ Note that the -cover test flag is left out since it shifts line numbers." (set (make-local-variable 'compile-command) (if (string= compile-command "go build") (concat "go run " (shell-quote-argument buffer-file-name)) - (if (go-buffer-in-gopath-p) (if (string-match "_test.[gG][oO]$" buffer-file-name) "go test -v" "go install") "go build"))) + (if (go-buffer-in-gopath-p) (if (string-match "_test.[gG][oO]$" buffer-file-name) "go test -v -run ." "go install") "go build"))) (message "Set `compile-command' to `%s'" compile-command)) (defun go-buffer-in-gopath-p ()