Changeset 4440:b0c1a4ec589a in livinglogic.python.xist

Show
Ignore:
Timestamp:
04/04/11 13:27:47 (8 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add a test for pretty printing UL4.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • test/test_xist_pretty.py

    r4422 r4440  
    1111 
    1212from ll.xist import xsc 
    13 from ll.xist.ns import html, php 
     13from ll.xist.ns import html, php, ul4 
    1414 
    1515 
     
    3939            b"<div>\n\t<?php apple?>\n\t<p>appletree</p>\n\t<div>\n\t\t<p>apple</p>\n\t\t<p>tree</p>\n\t</div>\n\t<br />\n</div>" 
    4040        ), 
     41        ( 
     42            html.ul( 
     43                ul4.for_("name in names"), 
     44                html.li( 
     45                    ul4.printx("name"), 
     46                ), 
     47                ul4.end("for"), 
     48            ), 
     49            b"<ul>\n\t<?for name in names?>\n\t\t<li>\n\t\t\t<?printx name?>\n\t\t</li>\n\t<?end for?>\n</ul>" 
     50        ), 
    4151    ] 
    4252    for (got, exp) in tests: