diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-11-27 00:36:14 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-11-27 00:36:14 +0000 |
commit | fcc9871002360bf6c1a6afce13395a4f8ad0c232 (patch) | |
tree | ab841323eef046c3da4b5f0a6b7d4e50b3a556a7 /test/lexer.py | |
parent | 228f0df86a946563ffa3f98c9ac008f819c12824 (diff) | |
download | external_python_mako-fcc9871002360bf6c1a6afce13395a4f8ad0c232.tar.gz external_python_mako-fcc9871002360bf6c1a6afce13395a4f8ad0c232.tar.bz2 external_python_mako-fcc9871002360bf6c1a6afce13395a4f8ad0c232.zip |
we have liftoff (finally....)
Diffstat (limited to 'test/lexer.py')
-rw-r--r-- | test/lexer.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/lexer.py b/test/lexer.py index c673332..07e964b 100644 --- a/test/lexer.py +++ b/test/lexer.py @@ -94,8 +94,7 @@ class LexerTest(unittest.TestCase): % endif """ node = Lexer(template).parse() - print repr(node) - assert repr(node) == """TemplateNode({}, [Comment('comment', (1, 1)), ControlLine('if', 'if foo:', False, (3, 1)), Text(' hi\n', (4, 1)), ControlLine('if', 'endif', True, (5, 1)), Text(' ', (6, 1)), TextTag('text', {}, (6, 9), []), Text('\n\n ', (14, 17)), DefTag('def', {'name': 'foo'}, (16, 9), ["Text('this is foo', (16, 26))"]), Text('\n', (16, 44)), ControlLine('if', 'if bar:', False, (17, 1)), Text(' code\n', (19, 1)), ControlLine('if', 'endif', True, (20, 1)), Text(' ', (21, 1))])""" + assert repr(node) == r"""TemplateNode({}, [Comment('comment', (1, 1)), ControlLine('if', 'if foo:', False, (3, 1)), Text(' hi\n', (4, 1)), ControlLine('if', 'endif', True, (5, 1)), Text(' ', (6, 1)), TextTag('text', {}, (6, 9), ['Text(\'\\n # more code\\n \\n % more code\\n <%illegal compionent>/></>\\n <%def name="laal">def</%def>\\n \\n \\n \', (6, 16))']), Text('\n\n ', (14, 17)), DefTag('def', {'name': 'foo'}, (16, 9), ["Text('this is foo', (16, 26))"]), Text('\n', (16, 44)), ControlLine('if', 'if bar:', False, (17, 1)), Text(' code\n', (19, 1)), ControlLine('if', 'endif', True, (20, 1)), Text(' ', (21, 1))])""" def test_def_syntax(self): template = """ |