Skip to content

Commit dcfc26d

Browse files
test: Add tests for string and autocat
1 parent ed14ed7 commit dcfc26d

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

test/.snapshots/test_astgen.txt

Lines changed: 22 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/test_astgen.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,11 @@ def test_error(self):
3535

3636
def test_getattr(self):
3737
self.assertAstMatchesSnapshot('a.b[c].d = e.f[g].h[i];')
38+
39+
def test_string_basic(self): # Just test very basic string stuff, rest is in eval_string
40+
self.assertAstMatchesSnapshot('a="a\\ueDf9\\t";'
41+
"b = 'q\\a\\'q';")
42+
43+
def test_autocat(self):
44+
self.assertAstMatchesSnapshot(
45+
'b="abc\\U0010f9aB" ' + "'end1234'\n" + "'\"'" + '"\'";')

0 commit comments

Comments
 (0)