mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/rexml/: Use REXMLTests as wrapping module for REXML tests.
I avoid using the same module for library in test because it provides "include REXML" environment in test. Normally, users don't use REXML on "include REXML" environment. So I don't want to write tests on "include REXML" environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
effcb9a712
commit
28e78bf7f2
40 changed files with 47 additions and 39 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Tue May 27 21:03:03 2014 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
|
* test/rexml/: Use REXMLTests as wrapping module for REXML tests.
|
||||||
|
I avoid using the same module for library in test because
|
||||||
|
it provides "include REXML" environment in test. Normally,
|
||||||
|
users don't use REXML on "include REXML" environment. So I
|
||||||
|
don't want to write tests on "include REXML" environment.
|
||||||
|
|
||||||
Tue May 27 20:59:37 2014 Kouhei Sutou <kou@cozmixng.org>
|
Tue May 27 20:59:37 2014 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
* test/rexml/test_comment.rb: Remove needless REXML module wrapping.
|
* test/rexml/test_comment.rb: Remove needless REXML module wrapping.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require "test/unit"
|
require "test/unit"
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestParseDocumentTypeDeclaration < Test::Unit::TestCase
|
class TestParseDocumentTypeDeclaration < Test::Unit::TestCase
|
||||||
private
|
private
|
||||||
def xml(internal_subset)
|
def xml(internal_subset)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestParseNotationDeclaration < Test::Unit::TestCase
|
class TestParseNotationDeclaration < Test::Unit::TestCase
|
||||||
private
|
private
|
||||||
def xml(internal_subset)
|
def xml(internal_subset)
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit"
|
||||||
require "rexml/parsers/sax2parser"
|
require "rexml/parsers/sax2parser"
|
||||||
require "rexml/sax2listener"
|
require "rexml/sax2listener"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestSAX2Parser < Test::Unit::TestCase
|
class TestSAX2Parser < Test::Unit::TestCase
|
||||||
class TestDocumentTypeDeclaration < self
|
class TestDocumentTypeDeclaration < self
|
||||||
private
|
private
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit"
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
require "rexml/parsers/treeparser"
|
require "rexml/parsers/treeparser"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestTreeParser < Test::Unit::TestCase
|
class TestTreeParser < Test::Unit::TestCase
|
||||||
class TestInvalid < self
|
class TestInvalid < self
|
||||||
def test_unmatched_close_tag
|
def test_unmatched_close_tag
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require "test/unit"
|
require "test/unit"
|
||||||
require "rexml/parsers/ultralightparser"
|
require "rexml/parsers/ultralightparser"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestUltraLightParser < Test::Unit::TestCase
|
class TestUltraLightParser < Test::Unit::TestCase
|
||||||
class TestDocumentTypeDeclaration < self
|
class TestDocumentTypeDeclaration < self
|
||||||
def test_entity_declaration
|
def test_entity_declaration
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test/unit/testcase'
|
require 'test/unit/testcase'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class AttributesTester < Test::Unit::TestCase
|
class AttributesTester < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
def test_accessor
|
def test_accessor
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
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"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require 'rexml/encoding'
|
require 'rexml/encoding'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class ChangingEncodings < Test::Unit::TestCase
|
class ChangingEncodings < Test::Unit::TestCase
|
||||||
def initialize a
|
def initialize a
|
||||||
@u = 'テスト ほげ ふが 美しい'
|
@u = 'テスト ほげ ふが 美しい'
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit/testcase"
|
||||||
|
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXMLTest
|
module REXMLTests
|
||||||
class CommentTester < Test::Unit::TestCase
|
class CommentTester < Test::Unit::TestCase
|
||||||
# Bug #5278
|
# Bug #5278
|
||||||
def test_hyphen_end_line_in_doctype
|
def test_hyphen_end_line_in_doctype
|
||||||
|
|
|
@ -6,7 +6,7 @@ require "rexml/document"
|
||||||
require "rexml/parseexception"
|
require "rexml/parseexception"
|
||||||
require "rexml/formatters/default"
|
require "rexml/formatters/default"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class ContribTester < Test::Unit::TestCase
|
class ContribTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -11,7 +11,7 @@ require "rexml/undefinednamespaceexception"
|
||||||
|
|
||||||
require_relative "listener"
|
require_relative "listener"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class Tester < Test::Unit::TestCase
|
class Tester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestDocTypeAccessor < Test::Unit::TestCase
|
class TestDocTypeAccessor < Test::Unit::TestCase
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test/unit/testcase'
|
require 'test/unit/testcase'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class ElementsTester < Test::Unit::TestCase
|
class ElementsTester < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
def test_accessor
|
def test_accessor
|
||||||
|
|
|
@ -5,7 +5,7 @@ require_relative "rexml_test_utils"
|
||||||
require 'rexml/source'
|
require 'rexml/source'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class EncodingTester < Test::Unit::TestCase
|
class EncodingTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -4,7 +4,7 @@ require 'rexml/document'
|
||||||
require 'rexml/entity'
|
require 'rexml/entity'
|
||||||
require 'rexml/source'
|
require 'rexml/source'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class EntityTester < Test::Unit::TestCase
|
class EntityTester < Test::Unit::TestCase
|
||||||
def test_parse_general_decl
|
def test_parse_general_decl
|
||||||
simple = "<!ENTITY foo 'bar'>"
|
simple = "<!ENTITY foo 'bar'>"
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit/testcase"
|
||||||
|
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class FunctionsTester < Test::Unit::TestCase
|
class FunctionsTester < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
def test_functions
|
def test_functions
|
||||||
|
|
|
@ -2,7 +2,7 @@ require 'rexml/document'
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/functions'
|
require 'rexml/functions'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TC_Rexml_Functions_Number < Test::Unit::TestCase
|
class TC_Rexml_Functions_Number < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_functions_number_int
|
def test_functions_number_int
|
||||||
|
|
|
@ -6,7 +6,7 @@ require "rexml/xpath"
|
||||||
# Harness to test REXML's capabilities against the test suite from Jaxen
|
# Harness to test REXML's capabilities against the test suite from Jaxen
|
||||||
# ryan.a.cox@gmail.com
|
# ryan.a.cox@gmail.com
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class JaxenTester < Test::Unit::TestCase
|
class JaxenTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -2,7 +2,7 @@ require_relative "rexml_test_utils"
|
||||||
require "rexml/light/node"
|
require "rexml/light/node"
|
||||||
require "rexml/parsers/lightparser"
|
require "rexml/parsers/lightparser"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class LightTester < Test::Unit::TestCase
|
class LightTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML::Light
|
include REXML::Light
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require_relative 'rexml_test_utils'
|
require_relative 'rexml_test_utils'
|
||||||
require 'rexml/parsers/lightparser'
|
require 'rexml/parsers/lightparser'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class LightParserTester < Test::Unit::TestCase
|
class LightParserTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -5,7 +5,7 @@ require_relative 'rexml_test_utils'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
require 'rexml/streamlistener'
|
require 'rexml/streamlistener'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class BaseTester < Test::Unit::TestCase
|
class BaseTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
def test_empty
|
def test_empty
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class OrderTester < Test::Unit::TestCase
|
class OrderTester < Test::Unit::TestCase
|
||||||
DOC = <<END
|
DOC = <<END
|
||||||
<paper>
|
<paper>
|
||||||
|
|
|
@ -2,7 +2,7 @@ require_relative "rexml_test_utils"
|
||||||
|
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestNamespace < Test::Unit::TestCase
|
class TestNamespace < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -5,7 +5,7 @@ begin
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
end
|
end
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class OrderTester < Test::Unit::TestCase
|
class OrderTester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
# 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
|
||||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit/testcase"
|
||||||
|
|
||||||
require 'rexml/parsers/pullparser'
|
require 'rexml/parsers/pullparser'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class PullParserTester < Test::Unit::TestCase
|
class PullParserTester < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
def test_basics
|
def test_basics
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require_relative 'rexml_test_utils'
|
require_relative 'rexml_test_utils'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestIssuezillaParsing < Test::Unit::TestCase
|
class TestIssuezillaParsing < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
def test_rexml
|
def test_rexml
|
||||||
|
|
|
@ -3,7 +3,7 @@ require 'rexml/sax2listener'
|
||||||
require 'rexml/parsers/sax2parser'
|
require 'rexml/parsers/sax2parser'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class SAX2Tester < Test::Unit::TestCase
|
class SAX2Tester < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -3,7 +3,7 @@ require "rexml/document"
|
||||||
require 'rexml/streamlistener'
|
require 'rexml/streamlistener'
|
||||||
require 'stringio'
|
require 'stringio'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class MyListener
|
class MyListener
|
||||||
include REXML::StreamListener
|
include REXML::StreamListener
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require "rexml/text"
|
require "rexml/text"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TextTester < Test::Unit::TestCase
|
class TextTester < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class Ticket80 < Test::Unit::TestCase
|
class Ticket80 < Test::Unit::TestCase
|
||||||
|
|
||||||
@@xmlstr = '<?xml version="1.0"?>
|
@@xmlstr = '<?xml version="1.0"?>
|
||||||
|
|
|
@ -3,7 +3,7 @@ require "test/unit/testcase"
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
require "rexml/validation/relaxng"
|
require "rexml/validation/relaxng"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class RNGValidation < Test::Unit::TestCase
|
class RNGValidation < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
require "test/unit"
|
require "test/unit"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestXmlDeclaration < Test::Unit::TestCase
|
class TestXmlDeclaration < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
xml = <<-'END_XML'
|
xml = <<-'END_XML'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'rexml/document'
|
require 'rexml/document'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestXPathAttribute < Test::Unit::TestCase
|
class TestXPathAttribute < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
@xml = <<-XML
|
@xml = <<-XML
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require "test/unit/testcase"
|
require "test/unit/testcase"
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestXPathAxisPredcedingSibling < Test::Unit::TestCase
|
class TestXPathAxisPredcedingSibling < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
SOURCE = <<-EOF
|
SOURCE = <<-EOF
|
||||||
|
|
|
@ -2,7 +2,7 @@ require_relative "../rexml_test_utils"
|
||||||
|
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestXPathBase < Test::Unit::TestCase
|
class TestXPathBase < Test::Unit::TestCase
|
||||||
include REXMLTestUtils
|
include REXMLTestUtils
|
||||||
include REXML
|
include REXML
|
||||||
|
|
|
@ -4,7 +4,7 @@ require_relative "../rexml_test_utils"
|
||||||
|
|
||||||
require "rexml/document"
|
require "rexml/document"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestXPathNode < Test::Unit::TestCase
|
class TestXPathNode < Test::Unit::TestCase
|
||||||
def matches(xml, xpath)
|
def matches(xml, xpath)
|
||||||
document = REXML::Document.new(xml)
|
document = REXML::Document.new(xml)
|
||||||
|
|
|
@ -3,7 +3,7 @@ require "rexml/document"
|
||||||
require "rexml/xpath"
|
require "rexml/xpath"
|
||||||
require "rexml/parsers/xpathparser"
|
require "rexml/parsers/xpathparser"
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestXPathPredicate < Test::Unit::TestCase
|
class TestXPathPredicate < Test::Unit::TestCase
|
||||||
include REXML
|
include REXML
|
||||||
SRC=<<-EOL
|
SRC=<<-EOL
|
||||||
|
|
|
@ -3,7 +3,7 @@ require 'rexml/document'
|
||||||
require 'rexml/element'
|
require 'rexml/element'
|
||||||
require 'rexml/xpath'
|
require 'rexml/xpath'
|
||||||
|
|
||||||
module REXML
|
module REXMLTests
|
||||||
class TestXPathText < Test::Unit::TestCase
|
class TestXPathText < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
@doc = REXML::Document.new
|
@doc = REXML::Document.new
|
||||||
|
|
Loading…
Reference in a new issue