Add unit testing for launcher code

This commit is contained in:
Kovid Goyal
2025-04-28 09:25:25 +05:30
parent a484d6928e
commit 5c9c8aa424
5 changed files with 189 additions and 30 deletions

View File

@@ -470,9 +470,10 @@ def kitty_main() -> None:
'Run kitty and open the specified files or URLs in it, using launch-actions.conf. For details'
' see https://sw.kovidgoyal.net/kitty/open_actions/#scripting-the-opening-of-files-with-kitty-on-macos'
'\n\nAll the normal kitty options can be used.')
cli_flags = None
else:
cli_flags = getattr(sys, 'kitty_run_data', {}).get('cli_flags', None)
usage = msg = appname = None
cli_flags = getattr(sys, 'kitty_run_data', {}).get('cli_flags', None)
cli_opts, rest = parse_args(args=args, result_class=CLIOptions, usage=usage, message=msg, appname=appname, preparsed_from_c=cli_flags)
if getattr(sys, 'cmdline_args_for_open', False):
setattr(sys, 'cmdline_args_for_open', rest)