summaryrefslogtreecommitdiff
path: root/yarnlib/block_parser_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-06-09 12:04:17 +0100
committerLars Wirzenius <liw@liw.fi>2013-06-09 12:04:17 +0100
commit784e8f70e7c95c202937f0403600c44dafd029f6 (patch)
treeaeb3bb0f3827dbab884289bf7aed8ec009faf2d6 /yarnlib/block_parser_tests.py
parent7ce156c74927ae99d9f824ce91183b126f7549e9 (diff)
downloadcmdtest-784e8f70e7c95c202937f0403600c44dafd029f6.tar.gz
Add test for wrong keyword
Diffstat (limited to 'yarnlib/block_parser_tests.py')
-rw-r--r--yarnlib/block_parser_tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py
index 3dc8111..45bfe67 100644
--- a/yarnlib/block_parser_tests.py
+++ b/yarnlib/block_parser_tests.py
@@ -55,6 +55,12 @@ class BlockParserTests(unittest.TestCase):
self.parser.parse_blocks(['STORY foo\n\nGIVEN bar\nTHEN foobar'])
self.assertEqual(len(self.parser.stories), 1)
+ def test_raises_error_for_unknown_step(self):
+ self.assertRaises(
+ yarnlib.BlockError,
+ self.parser.parse_blocks,
+ ['STORY foo\nblah'])
+
def test_parses_implements_in_a_block_by_itself(self):
self.parser.parse_blocks(['IMPLEMENTS GIVEN foo\ntrue'])
impls = self.parser.implementations