Merge branch 'fix/go-test-selection' of https://github.com/M-Hassan-Raza/kitty

This commit is contained in:
Kovid Goyal 2026-10-06 13:10:42 +05:30
commit affbdaea37
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -191,8 +191,8 @@ def run_go(packages: set[str], names: Sequence[str]) -> GoProc:
go = go_exe()
go_pkg_args = [f'github.com/kovidgoyal/kitty/{x}' for x in packages]
cmd = [go, 'test', '--tags', 'testing', '-v', '-json']
for name in names:
cmd.extend(('-run', name))
if names:
cmd.extend(('-run', '^Test(?:' + '|'.join(re.escape(name) for name in names) + ')$'))
cmd += go_pkg_args
return GoProc(cmd)