summaryrefslogtreecommitdiff
path: root/yarnlib
diff options
context:
space:
mode:
Diffstat (limited to 'yarnlib')
-rw-r--r--yarnlib/block_parser_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/yarnlib/block_parser_tests.py b/yarnlib/block_parser_tests.py
index 7051e17..975444f 100644
--- a/yarnlib/block_parser_tests.py
+++ b/yarnlib/block_parser_tests.py
@@ -92,6 +92,14 @@ class BlockParserTests(unittest.TestCase):
self.assertEqual(impls[0].regexp, 'foo')
self.assertEqual(impls[0].shell, 'true')
+ def test_parses_implements_with_empty_shell_text(self):
+ self.parser.parse_blocks(['IMPLEMENTS GIVEN foo'])
+ impls = self.parser.implementations
+ self.assertEqual(len(impls), 1)
+ self.assertEqual(impls[0].what, 'GIVEN')
+ self.assertEqual(impls[0].regexp, 'foo')
+ self.assertEqual(impls[0].shell, '')
+
def test_parses_two_implements_in_a_code_block(self):
self.parser.parse_blocks(
['IMPLEMENTS GIVEN foo\ntrue\nIMPLEMENTS WHEN bar\ncat /dev/null'])