Changeset 2822:641e47498960 in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/30/07 17:37:42 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add tests for CSS attribute selectors.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • test/test_xfind.py

    r2820 r2822  
    376376    e = xsc.Frag(html.span(html.b("hurz"), "gurk")) 
    377377    assert list(e.walknode(xfind.css("*:only-child"))) == [e[0], e[0][0]] 
     378 
     379    e = xsc.Frag(html.em(class_="gurk", lang="en"), html.em(class_="gurk hurz", lang="en-us"), html.em(class_="hurz", lang="de")) 
     380    assert list(e.walknode(xfind.css("em[class='gurk']"))) == [e[0]] 
     381    assert list(e.walknode(xfind.css("em[class~='gurk']"))) == [e[0], e[1]] 
     382    assert list(e.walknode(xfind.css("em[lang|='en']"))) == [e[0], e[1]]