diff options
author | Lars Wirzenius <lars.wirzenius@tilaajavastuu.fi> | 2015-02-10 10:23:17 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-02-10 10:30:51 +0200 |
commit | 19e090549b933c31aeb057e59825a8c279e26e99 (patch) | |
tree | fe32c33dbaca33a143ffe2de01a132ef792481c4 /yarnlib/block_parser_tests.py | |
parent | acd3d6316ef5831be1a9663a267b485767ada418 (diff) | |
download | cmdtest-19e090549b933c31aeb057e59825a8c279e26e99.tar.gz |
Implement continuation lines in yarn
Diffstat (limited to 'yarnlib/block_parser_tests.py')
-rw-r--r-- | yarnlib/block_parser_tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py index 78754b5..689a197 100644 --- a/yarnlib/block_parser_tests.py +++ b/yarnlib/block_parser_tests.py @@ -54,6 +54,14 @@ class BlockParserTests(unittest.TestCase): self.assertEqual(scenario.steps[5].what, 'FINALLY') self.assertEqual(scenario.steps[5].text, 'yeehaa') + def test_handles_continuation_line(self): + self.parser.parse_blocks(['SCENARIO foo', 'GIVEN foo', '... and bar']) + scenario = self.parser.scenarios[0] + self.assertEqual(len(self.parser.scenarios), 1) + self.assertEqual(scenario.name, 'foo') + self.assertEqual(scenario.steps[0].what, 'GIVEN') + self.assertEqual(scenario.steps[0].text, 'foo and bar') + def test_normalises_whitespace(self): self.parser.parse_blocks(['SCENARIO foo bar ']) self.assertEqual(self.parser.scenarios[0].name, 'foo bar') |