Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible.
--HG--
branch : trunk
diff --git a/tests/test_syntax.py b/tests/test_syntax.py
index 2a8e46f..5e9e804 100644
--- a/tests/test_syntax.py
+++ b/tests/test_syntax.py
@@ -195,3 +195,11 @@
bar = xrange(100)
tmpl = env.from_string('''{{ not 42 in bar }}''')
assert tmpl.render(bar=bar) == unicode(not 42 in bar)
+
+
+def test_implicit_subscribed_tuple(env):
+ class Foo(object):
+ def __getitem__(self, x):
+ return x
+ t = env.from_string('{{ foo[1, 2] }}')
+ assert t.render(foo=Foo()) == u'(1, 2)'