Skip to content

Commit 94b7252

Browse files
test: Add tests for new list decls
1 parent 7350420 commit 94b7252

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

test/test_astgen.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ def test_autocat(self):
4646

4747
def test_unaries(self):
4848
self.assertAstMatchesSnapshot('a=+(-!b==!-+c)-+--r+(-9);')
49+
50+
def test_decl(self):
51+
self.assertAstMatchesSnapshot('let a,b=1+1,c;\n'
52+
'global d = "STRING", e;\n'
53+
'let[] local_list=list(), other;\n'
54+
'global[] STACK;')

test/test_integration/test_treegen.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ def test_decl_multiple(self):
3232
self.assertCstMatchesSnapshot(
3333
'let a, b=9, c,d=w.1[2],e="w",f,g;\n'
3434
'global z,y=-11, x , w="a".lower() ,v=o , u, t;')
35+
36+
def test_decl(self):
37+
self.assertCstMatchesSnapshot('let a,b=1+1,c;\n'
38+
'global d = "STRING", e;\n'
39+
'let[] local_list=list(), other;\n'
40+
'global[] STACK;')
3541

3642

3743
class TestBlocks(CommonTestCase):

0 commit comments

Comments
 (0)