bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#74786: [PATCH] Add custom args to test compile step


From: O'Brien, Will
Subject: bug#74786: [PATCH] Add custom args to test compile step
Date: Wed, 11 Dec 2024 16:31:49 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

On Wed, Dec 11 2024 at 16:58, Robert Pluim <rpluim@gmail.com> wrote:

>>>>>> On Wed, 11 Dec 2024 17:45:59 +0200, Eli Zaretskii <eliz@gnu.org> said:
>
> Iʼm not Randy, but:
>
>     >> +(defun go-ts-mode--get-test-args ()
>     >> +  "Return the test args.
>     >> +This function respects the `go-ts-mode-test-args' variable for
>     >> +specifying test args, such as adding coverage file."
>     >> +  (if go-ts-mode-test-args
>     >> +      (string-join go-ts-mode-test-args)
>     >> +    ""))
>     >> +
>
> This entire function is not needed, since
>
> (string-join nil) => ""
>
>     >>  (defun go-ts-mode--compile-test (regexp)
>     >>    "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'"
>     >> +                   (go-ts-mode--get-test-args)
>     >>                     (go-ts-mode--get-build-tags-flag)
>     >>                     regexp)))
>     >> 
>
> so you could just inline the `string-join' here.

Ah, thanks!  I've attached a new patch with the simplification.

best
--
will

Attachment: 0001-Add-custom-args-to-test-compile-step.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]