diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-06-09 12:10:46 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-06-09 12:10:46 +0100 |
commit | 9489339ce4c9710067207e5e15c6591ed0bf4782 (patch) | |
tree | c0c9325c0e16f26045990710b97cc342fb95603f /yarnlib/block_parser_tests.py | |
parent | 0f367f13c234495e5f448fe3e42d38ede10400b5 (diff) | |
download | cmdtest-9489339ce4c9710067207e5e15c6591ed0bf4782.tar.gz |
Add test for empty shell text for IMPLEMENTS
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 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']) |