From 62fa2a9cc540c7b6a535acdc5fc0dab8b55ca31f Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Sun, 8 Mar 2015 22:14:58 +0100 Subject: [PATCH] Spec for XPath functions inside predicates. --- spec/oga/xpath/parser/calls_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/oga/xpath/parser/calls_spec.rb b/spec/oga/xpath/parser/calls_spec.rb index 0e960ce..81356c7 100644 --- a/spec/oga/xpath/parser/calls_spec.rb +++ b/spec/oga/xpath/parser/calls_spec.rb @@ -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