number() spec for converting empty strings.

This commit is contained in:
Yorick Peterse 2014-08-27 23:52:12 +02:00
parent 7c68f2a49b
commit 27d2b6c2c3
1 changed files with 4 additions and 0 deletions

View File

@ -42,5 +42,9 @@ describe Oga::XPath::Evaluator do
example 'return NaN for empty node sets' do example 'return NaN for empty node sets' do
@evaluator.evaluate('number(foo)').should be_nan @evaluator.evaluate('number(foo)').should be_nan
end end
example 'return NaN for empty strings' do
@evaluator.evaluate('number("")').should be_nan
end
end end
end end