@@ -16,7 +16,7 @@ def test_echo_command(self):
16
16
"""Verify 'echo Hello' runs without errors and prints 'Hello'."""
17
17
cmd = [
18
18
"python" , "cli_monitor.py" ,
19
- "--command" , "echo Hello" ,
19
+ "--command" , "echo" , " Hello" ,
20
20
"--timer" , "2"
21
21
]
22
22
result = subprocess .run (cmd , capture_output = True , text = True , shell = True )
@@ -27,7 +27,7 @@ def test_invalid_frequency(self):
27
27
"""Frequency outside allowed range should cause an error exit."""
28
28
cmd = [
29
29
"python" , "cli_monitor.py" ,
30
- "--command" , "echo Hello" ,
30
+ "--command" , "echo" , " Hello" ,
31
31
"--frequency" , "999999999" # way too large
32
32
]
33
33
result = subprocess .run (cmd , capture_output = True , text = True , shell = True )
@@ -49,7 +49,7 @@ def test_command_with_quotes(self):
49
49
"""Ensure commands with quotes are properly handled."""
50
50
cmd = [
51
51
"python" , "cli_monitor.py" ,
52
- "--command" , "echo Hello World" ,
52
+ "--command" , "echo" , " Hello World" ,
53
53
"--timer" , "2"
54
54
]
55
55
result = subprocess .run (cmd , capture_output = True , text = True , shell = True )
0 commit comments