aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent DAVERIO <daverio@Vialfre>2015-05-04 15:55:44 +0200
committerLaurent DAVERIO <daverio@Vialfre>2015-05-04 15:55:44 +0200
commit64ab2c67fdb74ac96bdf52fc291b2d1a43e62f2c (patch)
tree1868a8c3eb01fef24e8e45e1d40421d31f132f10
parentcf82617c6259db402d613a35204bfd8d5bebdaf2 (diff)
downloadexternal_python_mako-64ab2c67fdb74ac96bdf52fc291b2d1a43e62f2c.tar.gz
external_python_mako-64ab2c67fdb74ac96bdf52fc291b2d1a43e62f2c.tar.bz2
external_python_mako-64ab2c67fdb74ac96bdf52fc291b2d1a43e62f2c.zip
Added test cases for gettext extraction: `for/else` and `while` blocks.
-rw-r--r--test/templates/gettext.mako12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/templates/gettext.mako b/test/templates/gettext.mako
index 947d76c..c174219 100644
--- a/test/templates/gettext.mako
+++ b/test/templates/gettext.mako
@@ -98,7 +98,7 @@ ${_(u'bar')}
<p>${_("No action at a distance.")}</p>
-## TRANSLATOR: this block should be ignored during extraction
+## TRANSLATOR: these blocks should be ignored during extraction
% if 1==1:
<p>One is one!</p>
@@ -107,3 +107,13 @@ ${_(u'bar')}
% else:
<p>How much is one?</p>
% endif
+
+% for i in range(10):
+<p>${i} squared is ${i*i}</p>
+% else:
+<p>Done with squares!</p>
+% endfor
+
+% while random.randint(1,6) != 6:
+<p>Not 6!</p>
+% endwhile