diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-06-09 12:07:44 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-06-09 12:07:44 +0100 |
commit | a6c8b66d4c8bc4138dae2a8872b8fa879d1eb2f1 (patch) | |
tree | 1238151cce58c5692e84d98916a3ff0d4f6eb360 /yarnlib | |
parent | d5b13256d9db7f94420a0b052055f691a3ede56f (diff) | |
download | cmdtest-a6c8b66d4c8bc4138dae2a8872b8fa879d1eb2f1.tar.gz |
Add tests for misplaced ANDs
Diffstat (limited to 'yarnlib')
-rw-r--r-- | yarnlib/block_parser_tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py index b28e258..0a1d441 100644 --- a/yarnlib/block_parser_tests.py +++ b/yarnlib/block_parser_tests.py @@ -72,6 +72,18 @@ class BlockParserTests(unittest.TestCase): self.parser.parse_blocks, ['GIVEN foo']) + def test_raises_error_for_AND_before_story(self): + self.assertRaises( + yarnlib.BlockError, + self.parser.parse_blocks, + ['AND bar']) + + def test_raises_error_for_AND_before_step(self): + self.assertRaises( + yarnlib.BlockError, + self.parser.parse_blocks, + ['STORY foo\nAND bar']) + def test_parses_implements_in_a_block_by_itself(self): self.parser.parse_blocks(['IMPLEMENTS GIVEN foo\ntrue']) impls = self.parser.implementations |