tidbit in hierarchy tests

This commit is contained in:
Wouter Scherphof 2013-04-02 13:06:32 +02:00
parent 2bba6a7189
commit b3bbb56d9f

View File

@ -53,6 +53,9 @@ function test_descendants()
<child>8</child> <child>8</child>
</arbitrary> </arbitrary>
</parent> </parent>
<arbitrary>
<child>not</child>
</arbitrary>
]]) ]])
sel = tree("parent child") sel = tree("parent child")
assert_equal(8, sel:len(), 'parent child') assert_equal(8, sel:len(), 'parent child')
@ -78,6 +81,9 @@ function test_children()
<child>not</child> <child>not</child>
</arbitrary> </arbitrary>
</parent> </parent>
<arbitrary>
<child>not</child>
</arbitrary>
]]) ]])
sel = tree("parent > child") sel = tree("parent > child")
assert_equal(4, sel:len(), 'parent > child') assert_equal(4, sel:len(), 'parent > child')