Run all requested Go test names

This commit is contained in:
Hassan Raza 2026-09-26 22:08:24 +05:00
parent 5466034fcf
commit e18a2e3ec6
No known key found for this signature in database

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)