Live finding: a line the tokenizer cannot split that plainly writes is ordinary source; scenario 1 reads file by file. done / next: rerun live 1 and 3

This commit is contained in:
swaits committed 2026-11-23 15:33:22 -07:00
1 parent 7dcd9eb477
commit f428243ba3
3 files changed
+17 -3

No files matched your search

+7
View File
@@ -441,6 +441,13 @@ class NoDeadlockAfterARefusedEdit(TG.GuardCase):
self.open_unit()
self.assertIsNone(self.bash('for f in src/*.py; do sed -i "s/a/b/" "$f"; done'))
def test_a_line_that_cannot_be_split_but_plainly_writes_is_ordinary_source(self):
cmd = ("for i in 01 02; do sed -i \"s/a$i/b/\" src/mod$i.py; done && python3 -c \"\nimport sys\nprint(f'x{1}')\n\" ; "
"git diff | grep '^[-+] ' \"") # an unbalanced quote: no tokenizer reads it
self.assertEqual(G.shell_targets(cmd, self.proj), [G.UNPARSED])
self.assertIn("sisi contract init", self.bash(cmd))
self.assertEqual(G.shell_targets('echo "unbalanced; ls', self.proj), []) # nothing plainly writing: left to the snapshot
def test_a_cache_folder_is_as_ignorable_as_the_files_in_it(self):
self.assertIsNone(self.bash("rm -rf src/__pycache__"))