2026-06-05 02:42:10 +01:00
|
|
|
from tests.helpers.cli_loader import load_script
|
2026-06-03 02:56:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_is_runnable_subcommand_requires_executable_file(tmp_path):
|
2026-06-05 02:42:10 +01:00
|
|
|
cli = load_script("odysseus")
|
2026-06-03 02:56:56 +03:00
|
|
|
sub = tmp_path / "odysseus-demo"
|
|
|
|
|
sub.write_text("#!/bin/sh\n")
|
|
|
|
|
sub.chmod(0o644)
|
|
|
|
|
|
|
|
|
|
assert cli._is_runnable_subcommand(sub) is False
|
|
|
|
|
|
|
|
|
|
sub.chmod(0o755)
|
|
|
|
|
assert cli._is_runnable_subcommand(sub) is True
|