summaryrefslogtreecommitdiff
path: root/yarnlib/block_parser_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-06-09 11:57:42 +0100
committerLars Wirzenius <liw@liw.fi>2013-06-09 11:57:42 +0100
commit13826e66dd4225483019c72ff12566916dc71a67 (patch)
tree607016cd7e9c9f26d5ff430c23885c188e1eeffc /yarnlib/block_parser_tests.py
parenta91ac948b037f58217d89553fa031a18960b9623 (diff)
downloadcmdtest-13826e66dd4225483019c72ff12566916dc71a67.tar.gz
Handle an empty line in a story
Diffstat (limited to 'yarnlib/block_parser_tests.py')
-rw-r--r--yarnlib/block_parser_tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py
index ff1feab..1576950 100644
--- a/yarnlib/block_parser_tests.py
+++ b/yarnlib/block_parser_tests.py
@@ -51,6 +51,10 @@ class BlockParserTests(unittest.TestCase):
self.parser.parse_blocks(['STORY foo bar '])
self.assertEqual(self.parser.stories[0].name, 'foo bar')
+ def test_handles_empty_line(self):
+ self.parser.parse_blocks([''])
+ self.assertEqual(self.parser.stories, [])
+
def test_parses_implements_in_a_block_by_itself(self):
self.parser.parse_blocks(['IMPLEMENTS GIVEN foo\ntrue'])
impls = self.parser.implementations