diff options
author | Kouhei Sutou <kou@clear-code.com> | 2019-05-25 17:58:49 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-04 11:55:43 +0900 |
commit | 643344dc9460626617c9ce88f07b3ae0fed49150 (patch) | |
tree | f8fd1055293a32a7568467fd7c86af34412f8918 /test/rexml/test_functions_number.rb | |
parent | 5f78b138b10a6732676689f0f8690c1db16c1355 (diff) | |
download | ruby-643344dc9460626617c9ce88f07b3ae0fed49150.tar.gz |
[ruby/rexml] xpath local_name: fix a bug that nil is returned for nonexistent case
It must be an empty string.
https://github.com/ruby/rexml/commit/81bc7cd4f5
Diffstat (limited to 'test/rexml/test_functions_number.rb')
-rw-r--r-- | test/rexml/test_functions_number.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/test/rexml/test_functions_number.rb b/test/rexml/test_functions_number.rb deleted file mode 100644 index 84ec5c7ba7..0000000000 --- a/test/rexml/test_functions_number.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: false -require 'rexml/document' -require 'test/unit' -require 'rexml/functions' - -module REXMLTests - class TC_Rexml_Functions_Number < Test::Unit::TestCase - - def test_functions_number_int - telem = REXML::Element.new("elem") - telem.text="9" - assert_equal(9, REXML::Functions::number(telem)) - end - def test_functions_number_float - telem = REXML::Element.new("elem") - telem.text="10.4" - assert_equal(10.4, REXML::Functions::number(telem)) - end - def test_functions_number_negative_int - telem = REXML::Element.new("elem") - telem.text="-9" - assert_equal(-9, REXML::Functions::number(telem)) - end - def test_functions_number_negative_float - telem = REXML::Element.new("elem") - telem.text="-9.13" - assert_equal(-9.13, REXML::Functions::number(telem)) - end - #def test_functions_number_scientific_notation - # telem = REXML::Element.new("elem") - # telem.text="9.13E12" - # assert_equal(9.13E12, REXML::Functions::number(telem)) - #end - end -end |