Add *of-type selectors
tests.lisp
Mon Jan 4 06:32:07 UTC 2010 pix@kepibu.org
* Add *of-type selectors
--- old-Oh, Ducks!/tests.lisp 2015-10-01 22:48:02.000000000 +0000
+++ new-Oh, Ducks!/tests.lisp 2015-10-01 22:48:02.000000000 +0000
@@ -59,10 +59,17 @@
"<div>I do <i>not</i> <i>like</i> cheese.</div><div><span>I like <i>cheese</i>.</span></div>")
(values div d2))
+(match (#t(html (:model dom)
+ (":nth-last-of-type(2)" . ?first)
+ (":nth-of-type(2)" . ?last))
+ "<div><span>1</span><i>i</i><span>2</span><i>i</i></div>")
+ (values first last))
+
(match (#T(html (:model dom)
- ("i:only-child" . ?i))
+ ("i:only-child" . ?i)
+ ("i:only-of-type" . ?i-type))
"<div>I do <i>not</i> <i>like</i> cheese.</div><div><span>I like <i>cheese</i>.</span></div>")
- (values i))
+ (values i i-type))
;; throws 'unification-failure
(match (#T(html (:model dom)