Spec for XPath functions inside predicates.

This commit is contained in:
Yorick Peterse 2015-03-08 22:14:58 +01:00
parent 0fa9d4df88
commit 62fa2a9cc5
1 changed files with 8 additions and 0 deletions

View File

@ -71,5 +71,13 @@ describe Oga::XPath::Parser do
s(:call, 'bar')
)
end
it 'parses a function call inside a predicate' do
parse_xpath('A[foo()]').should == s(
:predicate,
s(:axis, 'child', s(:test, nil, 'A')),
s(:call, 'foo')
)
end
end
end