[Checkins] SVN: Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py Extreme forms (I hit this in a real world form.. ugh)
Wichert Akkerman
wichert at wiggy.net
Mon Oct 6 16:53:25 EDT 2008
Log message for revision 91821:
Extreme forms (I hit this in a real world form.. ugh)
Changed:
U Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py
-=-
Modified: Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py
===================================================================
--- Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py 2008-10-06 19:38:37 UTC (rev 91820)
+++ Sandbox/malthe/chameleon.genshi/src/chameleon/genshi/tests/test_edges.py 2008-10-06 20:53:24 UTC (rev 91821)
@@ -25,6 +25,22 @@
result = render_template(body, foo=c).encode('utf-8')
self.assertEqual(norm(result), norm(expected))
+class WeirdoForms(unittest.TestCase):
+ def test_lots_of_options(self):
+ option = """<option value="one" py:attrs="dict(selected=value=='one' and 'yes' or None)">one</option>\n"""
+ select = """<select py:with="value='one'">%s</select>\n""" % (70*option)
+
+ body = """\
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:py="http://genshi.edgewall.org/">
+ %s
+ </html>
+ """ % (20*select)
+ result = render_template(body)
+
def norm(s):
s = s.replace(' ', '')
s = s.replace('\n', '')
More information about the Checkins
mailing list