mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/rexml/: untabify.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
146bf4fdaf
commit
2a15d25a59
23 changed files with 1668 additions and 1673 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Fri Sep 17 22:46:02 2010 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
|
* test/rexml/: untabify.
|
||||||
|
|
||||||
Fri Sep 17 22:29:56 2010 Kouhei Sutou <kou@cozmixng.org>
|
Fri Sep 17 22:29:56 2010 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
* test/rexml/: fix fixture data path. All REXML tests are worked.
|
* test/rexml/: fix fixture data path. All REXML tests are worked.
|
||||||
|
|
|
@ -5,7 +5,6 @@ require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
class TestAttributes < Test::Unit::TestCase
|
class TestAttributes < Test::Unit::TestCase
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@ns_a = "urn:x-test:a"
|
@ns_a = "urn:x-test:a"
|
||||||
@ns_b = "urn:x-test:b"
|
@ns_b = "urn:x-test:b"
|
||||||
|
@ -30,5 +29,4 @@ class TestAttributes < Test::Unit::TestCase
|
||||||
assert_equal("5", @attributes.get_attribute_ns(@ns_a, "e").value)
|
assert_equal("5", @attributes.get_attribute_ns(@ns_a, "e").value)
|
||||||
assert_equal("6", @attributes.get_attribute_ns(@ns_b, "f").value)
|
assert_equal("6", @attributes.get_attribute_ns(@ns_b, "f").value)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ class ContribTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
||||||
XML_STRING_01 = <<DELIMITER
|
XML_STRING_01 = <<DELIMITER
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<biblio>
|
<biblio>
|
||||||
<entry type="Book">
|
<entry type="Book">
|
||||||
|
@ -31,7 +31,7 @@ XML_STRING_01 = <<DELIMITER
|
||||||
</biblio>
|
</biblio>
|
||||||
DELIMITER
|
DELIMITER
|
||||||
|
|
||||||
XML_STRING_02 = <<DELIMITER
|
XML_STRING_02 = <<DELIMITER
|
||||||
<biblio>
|
<biblio>
|
||||||
<entry type="Book">
|
<entry type="Book">
|
||||||
<language>english</language>
|
<language>english</language>
|
||||||
|
|
|
@ -2,6 +2,20 @@ require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
class OrderTester < Test::Unit::TestCase
|
class OrderTester < Test::Unit::TestCase
|
||||||
|
DOC = <<END
|
||||||
|
<paper>
|
||||||
|
<title>Remove this element and figs order differently</title>
|
||||||
|
<figure src="fig1"/>
|
||||||
|
<figure src="fig2"/>
|
||||||
|
<p>Para of text</p>
|
||||||
|
<p>Remove this and figs order differently</p>
|
||||||
|
<section>
|
||||||
|
<figure src="fig3"/>
|
||||||
|
</section>
|
||||||
|
<figure src="fig4"/>
|
||||||
|
</paper>
|
||||||
|
END
|
||||||
|
|
||||||
def initialize n
|
def initialize n
|
||||||
@doc = REXML::Document.new(DOC)
|
@doc = REXML::Document.new(DOC)
|
||||||
@figs = REXML::XPath.match(@doc,'//figure')
|
@figs = REXML::XPath.match(@doc,'//figure')
|
||||||
|
@ -21,18 +35,3 @@ class OrderTester < Test::Unit::TestCase
|
||||||
assert_equal 'fig4', @figs[3].attributes['src']
|
assert_equal 'fig4', @figs[3].attributes['src']
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
DOC = <<END
|
|
||||||
<paper>
|
|
||||||
<title>Remove this element and figs order differently</title>
|
|
||||||
<figure src="fig1"/>
|
|
||||||
<figure src="fig2"/>
|
|
||||||
<p>Para of text</p>
|
|
||||||
<p>Remove this and figs order differently</p>
|
|
||||||
<section>
|
|
||||||
<figure src="fig3"/>
|
|
||||||
</section>
|
|
||||||
<figure src="fig4"/>
|
|
||||||
</paper>
|
|
||||||
END
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
p [REXML::VERSION, RUBY_VERSION, RUBY_RELEASE_DATE]
|
|
||||||
|
|
||||||
# daz - for report by Dan Kohn in:
|
# daz - for report by Dan Kohn in:
|
||||||
# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/156328
|
# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/156328
|
||||||
class XPathTesterDd < Test::Unit::TestCase
|
class XPathTesterDd < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
require "test/unit/testcase"
|
require "test/unit/testcase"
|
||||||
require "test/unit/ui/console/testrunner"
|
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
|
|
||||||
class XPathAxesTester < Test::Unit::TestCase
|
class XPathAxesTester < Test::Unit::TestCase
|
||||||
|
@ -37,6 +36,3 @@ class XPathAxesTester < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
#Test::Unit::UI::Console::TestRunner.run(XPathAxesTester.suite)
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue