Use (name) nodes for @foo axes.

This commit is contained in:
Yorick Peterse 2014-06-13 18:00:55 +02:00
parent ce23cce9bd
commit a733869f53
1 changed files with 15 additions and 3 deletions

View File

@ -10,7 +10,11 @@ describe Oga::XPath::Parser do
s(
:node_test,
s(:name, nil, 'foo'),
s(:eq, s(:axis, 'attribute', 'class'), s(:string, 'bar'))
s(
:eq,
s(:axis, 'attribute', s(:name, nil, 'class')),
s(:string, 'bar')
)
)
)
)
@ -26,8 +30,16 @@ describe Oga::XPath::Parser do
s(:name, nil, 'foo'),
s(
:or,
s(:eq, s(:axis, 'attribute', 'class'), s(:string, 'bar')),
s(:eq, s(:axis, 'attribute', 'class'), s(:string, 'baz'))
s(
:eq,
s(:axis, 'attribute', s(:name, nil, 'class')),
s(:string, 'bar')
),
s(
:eq,
s(:axis, 'attribute', s(:name, nil, 'class')),
s(:string, 'baz')
)
)
)
)