diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-15 11:55:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-15 11:55:52 +0000 |
commit | 3a47cf3395dd4c4fe8bdd5df13aab698f2ca314b (patch) | |
tree | c4a278220ba8141b829c5c7b0777c1049cfe413c /test/rexml/test_contrib.rb | |
parent | 39da1b63699faf30c86e753e193c29b81b16136d (diff) |
* remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/test_contrib.rb')
-rw-r--r-- | test/rexml/test_contrib.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/rexml/test_contrib.rb b/test/rexml/test_contrib.rb index eb16b8946c..7d00202c95 100644 --- a/test/rexml/test_contrib.rb +++ b/test/rexml/test_contrib.rb @@ -92,7 +92,7 @@ DELIMITER doc = REXML::Document.new source assert_equal "myprog-config", doc.root.name count = 0 - REXML::XPath.each(doc, "x:myprog-config/x:main/x:parameter", + REXML::XPath.each(doc, "x:myprog-config/x:main/x:parameter", {"x"=>"http://someurl/program/version"}) { |element| assert_equal "name", element.attributes["name"] count += 1; @@ -183,7 +183,7 @@ DELIMITER result = XPath.first(doc, xpath) assert_equal desired_result.to_s, result.to_s end - + def test_xpath_whitespace_TobiasReif # same as above, with whitespace in XPath doc = Document.new(XML_STRING_01.dup) @@ -193,7 +193,7 @@ DELIMITER failure_message = "\n[[[TR: AFAIK, whitespace should be allowed]]]\n" assert_equal(desired_result.to_s, result.to_s, failure_message) end - + def test_xpath_02_TobiasReif doc = Document.new XML_STRING_01.dup desired_result = Document.new '<author>Thomas, David; Hunt, Andrew</author>' @@ -211,7 +211,7 @@ DELIMITER failure_message = "\nHow to handle the apos inside the string inside the XPath?\nXPath = #{xpath}\n" assert_equal desired_result.to_s, result.to_s, failure_message end - + def test_xpath_03_TobiasReif doc = Document.new XML_STRING_02.dup desired_result_string = "<entry type='Book'> @@ -303,7 +303,7 @@ EOF assert_nil XPath.first(doc,'//leg') assert_equal 'http://www.foo.com/human', doc.root.elements[1].namespace - assert_equal 'human leg', + assert_equal 'human leg', XPath.first(doc, '//x:leg/text()', {'x'=>'http://www.foo.com/human'}).to_s end @@ -312,8 +312,8 @@ EOF source = File.new(fixture_path('ProductionSupport.xml')) h = Hash.new doc = REXML::Document.new source - doc.elements.each("//CommonError") { |el| - h[el.elements['Key'].text] = 'okay' + doc.elements.each("//CommonError") { |el| + h[el.elements['Key'].text] = 'okay' } assert(h.include?('MotorInsuranceContract(Object)>>#error:')) end @@ -426,7 +426,7 @@ EOF assert text !~ /&rbconfig/, "'#{text}' failed" end - #Error occurred in test_package_file_opens(TC_PackageInstall): + #Error occurred in test_package_file_opens(TC_PackageInstall): # ArgumentError: #illegal access mode &rbconfig.prefix;/lib/rexml # @@ -464,7 +464,7 @@ EOL end end - def test_maintain_dtd + def test_maintain_dtd src = %q{<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ivattacks SYSTEM "../../ivacm.dtd" [ <!ENTITY % extern-packages SYSTEM "../../ivpackages.dtd"> |