Author: fw Date: 2005-10-20 12:24:28 +0000 (Thu, 20 Oct 2005) New Revision: 2509 Modified: lib/python/web_support.py Log: lib/python/web_support.py (make_pre); Fix bug which caused make_pre to include only the last element of the passed list in its output. (__test); Regression test. Modified: lib/python/web_support.py ==================================================================--- lib/python/web_support.py 2005-10-20 12:21:02 UTC (rev 2508) +++ lib/python/web_support.py 2005-10-20 12:24:28 UTC (rev 2509) @@ -422,7 +422,7 @@ for l in lines: append(l) append(''\n'') - return tag(''pre'', ''''.join(l)) + return tag(''pre'', ''''.join(r)) def make_menu(convert, *entries): """Creates an unnumbered list of hyperlinks. @@ -676,6 +676,7 @@ == ''<span class="red">green</span>'' assert TD(A("http://www.example.net/", "example")).toString() \ == ''<td><a href="http://www.example.net/">example</a></td>'' + assert make_pre([''a'', ''b'']).toString() == ''<pre>a\nb\n</pre>'' s = cStringIO.StringIO() RedirectResult(u.scriptRelativeFull("123")).flatten(s.write)