diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-23 21:37:39 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-23 21:37:39 +0000 |
commit | f6327e732fbc8c68dae163401d283924769dee8d (patch) | |
tree | 47f2922c8db27b572148164f8de904fa569bd7de /test/rexml | |
parent | d1c42e4f341e063d3849a3a9e3622b7261735559 (diff) |
Suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml')
-rw-r--r-- | test/rexml/test_contrib.rb | 8 | ||||
-rw-r--r-- | test/rexml/test_lightparser.rb | 2 | ||||
-rw-r--r-- | test/rexml/test_pullparser.rb | 4 | ||||
-rw-r--r-- | test/rexml/test_xpath.rb | 8 | ||||
-rw-r--r-- | test/rexml/test_xpathtext.rb | 2 |
5 files changed, 12 insertions, 12 deletions
diff --git a/test/rexml/test_contrib.rb b/test/rexml/test_contrib.rb index 7d00202c95..db7c18d027 100644 --- a/test/rexml/test_contrib.rb +++ b/test/rexml/test_contrib.rb @@ -221,7 +221,7 @@ DELIMITER <type>Book</type> <year>2000</year> </entry>" - desired_result_tree = Document.new desired_result_string + Document.new desired_result_string xpath = "/biblio/entry[not(author)]" result = XPath.first(doc, xpath) assert_equal desired_result_string, result.to_s @@ -438,7 +438,7 @@ EOF end def test_whitespace_after_xml_decl - d = Document.new <<EOL + Document.new <<EOL <?xml version='1.0'?> <blo> <wak> @@ -506,7 +506,7 @@ EOL b << c a << b - REXML::Formatters::Pretty.new.write(a,s="") + REXML::Formatters::Pretty.new.write(a,"") end def test_pos @@ -523,7 +523,7 @@ EOL testfile.puts testdata testfile.rewind assert_nothing_raised do - d = REXML::Document.new(testfile) + REXML::Document.new(testfile) end testfile.close(true) end diff --git a/test/rexml/test_lightparser.rb b/test/rexml/test_lightparser.rb index ee33dc08fd..1728921434 100644 --- a/test/rexml/test_lightparser.rb +++ b/test/rexml/test_lightparser.rb @@ -7,6 +7,6 @@ class LightParserTester < Test::Unit::TestCase def test_parsing f = File.new(fixture_path("documentation.xml")) parser = REXML::Parsers::LightParser.new( f ) - root = parser.parse + parser.parse end end diff --git a/test/rexml/test_pullparser.rb b/test/rexml/test_pullparser.rb index bfce60f268..03c95642e4 100644 --- a/test/rexml/test_pullparser.rb +++ b/test/rexml/test_pullparser.rb @@ -33,7 +33,7 @@ class PullParserTester < Test::Unit::TestCase source = "<a><b></a>" parser = REXML::Parsers::PullParser.new(source) assert_raise(ParseException, "Parsing should have failed") { - results = parser.pull while parser.has_next? + parser.pull while parser.has_next? } end @@ -63,7 +63,7 @@ class PullParserTester < Test::Unit::TestCase def test_peek_unshift source = "<a><b/></a>" - pp = REXML::Parsers::PullParser.new(source) + REXML::Parsers::PullParser.new(source) # FINISH ME! end diff --git a/test/rexml/test_xpath.rb b/test/rexml/test_xpath.rb index ad09fcafb2..4ccd4edeaf 100644 --- a/test/rexml/test_xpath.rb +++ b/test/rexml/test_xpath.rb @@ -219,7 +219,7 @@ class XPathTester < Test::Unit::TestCase for line in File.new(xpathtests) line.strip! begin - rt = doc.root + doc.root #puts "#"*80 #print "\nDoing #{line} " ; $stdout.flush doc.elements.each(line) do |el| @@ -332,7 +332,7 @@ class XPathTester < Test::Unit::TestCase </foo> EOF doc = Document.new source - result = XPath.each( doc, "//bar" ) { + XPath.each( doc, "//bar" ) { fail "'bar' should match nothing in this case" } @@ -523,7 +523,7 @@ class XPathTester < Test::Unit::TestCase # examples from http://www.w3.org/TR/xpath#function-substring doc = Document.new('<test string="12345" />') - d = Document.new("<a b='1'/>") + Document.new("<a b='1'/>") #puts XPath.first(d, 'node()[0 + 1]') #d = Document.new("<a b='1'/>") #puts XPath.first(d, 'a[0 mod 0]') @@ -589,7 +589,7 @@ class XPathTester < Test::Unit::TestCase def test_name assert_raise( UndefinedNamespaceException, "x should be undefined" ) { - d = REXML::Document.new("<a x='foo'><b/><x:b/></a>") + REXML::Document.new("<a x='foo'><b/><x:b/></a>") } d = REXML::Document.new("<a xmlns:x='foo'><b/><x:b/></a>") assert_equal 1, d.root.elements.to_a('*[name() = "b"]').size diff --git a/test/rexml/test_xpathtext.rb b/test/rexml/test_xpathtext.rb index c3393987f2..87441cb6d5 100644 --- a/test/rexml/test_xpathtext.rb +++ b/test/rexml/test_xpathtext.rb @@ -14,7 +14,7 @@ class XpathTestCase < Test::Unit::TestCase def test_text_as_element node1 = REXML::Element.new('a', @doc) node2 = REXML::Element.new('b', node1) - textnode = REXML::Text.new('test', false, node2) + REXML::Text.new('test', false, node2) assert_equal(1, @doc.elements.size, "doc owns 1 element node1") assert_same(node1, @doc.elements[1], "doc owns 1 element node1") assert_equal(1, node1.elements.size, "node1 owns 1 element node2") |