diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 3205666f..cb691598 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -360,6 +360,12 @@ class Main(unittest.TestCase): mocks[1].assert_called_once_with("/r") mocks[2].assert_called_once_with("/r", "do it", 3, 2) self.assertEqual(mocks[3].call_args.args[0], "/r") + stack.enter_context(unittest.mock.patch.object(sys, "argv", ["loop-claude", "do it"])) + mocks[0].return_value = "/s" + with self.assertRaises(SystemExit): + loop.main() + mocks[0].assert_called_once_with() + mocks[1].assert_called_with("/s") self.assertIn("=== cycle 4 ===", sys.stdout.getvalue()) mocks[3].side_effect = ["claude exited 3"] * 3 stack.enter_context(unittest.mock.patch.object(sys, "argv", ["loop-claude", loop.RELOAD_FLAG, "3", "0", "/r", "do it"]))