test: verify and document desktop ui
This commit is contained in:
@@ -25,6 +25,24 @@ class StartScriptTests(unittest.TestCase):
|
||||
):
|
||||
self.assertNotIn(forbidden, normalized)
|
||||
|
||||
def test_gui_script_reuses_safe_starter_without_system_changes(self) -> None:
|
||||
repository_root = Path(__file__).resolve().parents[2]
|
||||
script = (repository_root / "scripts" / "start-javis-gui.ps1").read_text(encoding="utf-8")
|
||||
normalized = script.lower()
|
||||
|
||||
self.assertIn("start-javis.ps1", normalized)
|
||||
self.assertIn("javis_start_interface", normalized)
|
||||
self.assertIn("'gui'", normalized)
|
||||
self.assertNotIn("c:\\users\\", normalized)
|
||||
for forbidden in (
|
||||
"set-executionpolicy",
|
||||
"setx ",
|
||||
"new-service",
|
||||
"schtasks",
|
||||
"hkey_",
|
||||
):
|
||||
self.assertNotIn(forbidden, normalized)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user