Kill the mutant that reads any word recurse after an option as recursion
This commit is contained in:
@@ -494,6 +494,10 @@ class EnvFileRead(unittest.TestCase):
|
||||
with self.subTest(command):
|
||||
self.assertEqual(self.breached("Bash", {"command": command}), [])
|
||||
self.assertEqual(self.breached("Bash", {"command": "rg TOKEN"}, f"{self.home}/code"), [])
|
||||
# The word recurse is only a pattern or a file name here, and -d read is no recursion.
|
||||
for command in ("grep -n recurse notes.md", "grep -d read TOKEN ~/secrets", "grep --directories read TOKEN ~/secrets"):
|
||||
with self.subTest(command):
|
||||
self.assertEqual(self.breached("Bash", {"command": command}, str(self.home)), [])
|
||||
# secrets is the pattern, not the folder ~/secrets that the home directory holds.
|
||||
self.assertEqual(self.breached("Bash", {"command": "rg secrets ~/code"}, str(self.home)), [])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user