summaryrefslogtreecommitdiff
path: root/test/test_templite.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_templite.py')
-rw-r--r--test/test_templite.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_templite.py b/test/test_templite.py
index 6102183d..4c7545bf 100644
--- a/test/test_templite.py
+++ b/test/test_templite.py
@@ -126,6 +126,16 @@ class TempliteTest(unittest.TestCase):
"123 and 123"
)
+ def test_comments(self):
+ # Single-line comments work:
+ self.try_render(
+ "Hello, {# Name goes here: #}{{name}}!",
+ {'name':'Ned'}, "Hello, Ned!")
+ # and so do multi-line comments:
+ self.try_render(
+ "Hello, {# Name\ngoes\nhere: #}{{name}}!",
+ {'name':'Ned'}, "Hello, Ned!")
+
if __name__ == '__main__':
unittest.main()