Skip to content

Commit

Permalink
Added test for #318
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-zeller committed Feb 10, 2025
1 parent adc5fbf commit 77a82dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/resources/entry.fan
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<start> ::= <bit>{8}
<bit> ::= 0 | 1
1 change: 1 addition & 0 deletions tests/resources/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
8 changes: 8 additions & 0 deletions tests/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,11 @@ def test_gif(self):
self.assertEqual("", err)
self.assertEqual("", out)
self.assertEqual(0, code)

class TestEntryParsing(TestCLIParsing):
def test_entry(self):
command = shlex.split("fandango parse -f tests/resources/entry.fan tests/resources/test.txt --validate")
out, err, code = self.run_command(command)
self.assertEqual("", err)
self.assertEqual("", out)
self.assertEqual(0, code)

0 comments on commit 77a82dd

Please sign in to comment.