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>
|
||||
|
||||
* test/rexml/test_comment.rb: Remove needless REXML module wrapping.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "test/unit"
|
||||
require "rexml/document"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestParseDocumentTypeDeclaration < Test::Unit::TestCase
|
||||
private
|
||||
def xml(internal_subset)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test/unit'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestParseNotationDeclaration < Test::Unit::TestCase
|
||||
private
|
||||
def xml(internal_subset)
|
||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit"
|
|||
require "rexml/parsers/sax2parser"
|
||||
require "rexml/sax2listener"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestSAX2Parser < Test::Unit::TestCase
|
||||
class TestDocumentTypeDeclaration < self
|
||||
private
|
||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit"
|
|||
require "rexml/document"
|
||||
require "rexml/parsers/treeparser"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestTreeParser < Test::Unit::TestCase
|
||||
class TestInvalid < self
|
||||
def test_unmatched_close_tag
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "test/unit"
|
||||
require "rexml/parsers/ultralightparser"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestUltraLightParser < Test::Unit::TestCase
|
||||
class TestDocumentTypeDeclaration < self
|
||||
def test_entity_declaration
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test/unit/testcase'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class AttributesTester < Test::Unit::TestCase
|
||||
include REXML
|
||||
def test_accessor
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test/unit'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestAttributes < Test::Unit::TestCase
|
||||
def setup
|
||||
@ns_a = "urn:x-test:a"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'rexml/encoding'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class ChangingEncodings < Test::Unit::TestCase
|
||||
def initialize a
|
||||
@u = 'テスト ほげ ふが 美しい'
|
||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit/testcase"
|
|||
|
||||
require 'rexml/document'
|
||||
|
||||
module REXMLTest
|
||||
module REXMLTests
|
||||
class CommentTester < Test::Unit::TestCase
|
||||
# Bug #5278
|
||||
def test_hyphen_end_line_in_doctype
|
||||
|
|
|
@ -6,7 +6,7 @@ require "rexml/document"
|
|||
require "rexml/parseexception"
|
||||
require "rexml/formatters/default"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class ContribTester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -11,7 +11,7 @@ require "rexml/undefinednamespaceexception"
|
|||
|
||||
require_relative "listener"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class Tester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test/unit'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestDocTypeAccessor < Test::Unit::TestCase
|
||||
|
||||
def setup
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test/unit/testcase'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class ElementsTester < Test::Unit::TestCase
|
||||
include REXML
|
||||
def test_accessor
|
||||
|
|
|
@ -5,7 +5,7 @@ require_relative "rexml_test_utils"
|
|||
require 'rexml/source'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class EncodingTester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'rexml/document'
|
|||
require 'rexml/entity'
|
||||
require 'rexml/source'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class EntityTester < Test::Unit::TestCase
|
||||
def test_parse_general_decl
|
||||
simple = "<!ENTITY foo 'bar'>"
|
||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit/testcase"
|
|||
|
||||
require "rexml/document"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class FunctionsTester < Test::Unit::TestCase
|
||||
include REXML
|
||||
def test_functions
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'rexml/document'
|
|||
require 'test/unit'
|
||||
require 'rexml/functions'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TC_Rexml_Functions_Number < Test::Unit::TestCase
|
||||
|
||||
def test_functions_number_int
|
||||
|
|
|
@ -6,7 +6,7 @@ require "rexml/xpath"
|
|||
# Harness to test REXML's capabilities against the test suite from Jaxen
|
||||
# ryan.a.cox@gmail.com
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class JaxenTester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -2,7 +2,7 @@ require_relative "rexml_test_utils"
|
|||
require "rexml/light/node"
|
||||
require "rexml/parsers/lightparser"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class LightTester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML::Light
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require_relative 'rexml_test_utils'
|
||||
require 'rexml/parsers/lightparser'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class LightParserTester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -5,7 +5,7 @@ require_relative 'rexml_test_utils'
|
|||
require 'rexml/document'
|
||||
require 'rexml/streamlistener'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class BaseTester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
def test_empty
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test/unit'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class OrderTester < Test::Unit::TestCase
|
||||
DOC = <<END
|
||||
<paper>
|
||||
|
|
|
@ -2,7 +2,7 @@ require_relative "rexml_test_utils"
|
|||
|
||||
require "rexml/document"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestNamespace < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -5,7 +5,7 @@ begin
|
|||
rescue LoadError
|
||||
end
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class OrderTester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require 'test/unit'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
# daz - for report by Dan Kohn in:
|
||||
# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/156328
|
||||
class XPathTesterDd < Test::Unit::TestCase
|
||||
|
|
|
@ -2,7 +2,7 @@ require "test/unit/testcase"
|
|||
|
||||
require 'rexml/parsers/pullparser'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class PullParserTester < Test::Unit::TestCase
|
||||
include REXML
|
||||
def test_basics
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require_relative 'rexml_test_utils'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestIssuezillaParsing < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
def test_rexml
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'rexml/sax2listener'
|
|||
require 'rexml/parsers/sax2parser'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class SAX2Tester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -3,7 +3,7 @@ require "rexml/document"
|
|||
require 'rexml/streamlistener'
|
||||
require 'stringio'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class MyListener
|
||||
include REXML::StreamListener
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "rexml/text"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TextTester < Test::Unit::TestCase
|
||||
include REXML
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
require 'test/unit'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class Ticket80 < Test::Unit::TestCase
|
||||
|
||||
@@xmlstr = '<?xml version="1.0"?>
|
||||
|
|
|
@ -3,7 +3,7 @@ require "test/unit/testcase"
|
|||
require "rexml/document"
|
||||
require "rexml/validation/relaxng"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class RNGValidation < Test::Unit::TestCase
|
||||
include REXML
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
require "rexml/document"
|
||||
require "test/unit"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestXmlDeclaration < Test::Unit::TestCase
|
||||
def setup
|
||||
xml = <<-'END_XML'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'test/unit'
|
||||
require 'rexml/document'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestXPathAttribute < Test::Unit::TestCase
|
||||
def setup
|
||||
@xml = <<-XML
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "test/unit/testcase"
|
||||
require "rexml/document"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestXPathAxisPredcedingSibling < Test::Unit::TestCase
|
||||
include REXML
|
||||
SOURCE = <<-EOF
|
||||
|
|
|
@ -2,7 +2,7 @@ require_relative "../rexml_test_utils"
|
|||
|
||||
require "rexml/document"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestXPathBase < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
include REXML
|
||||
|
|
|
@ -4,7 +4,7 @@ require_relative "../rexml_test_utils"
|
|||
|
||||
require "rexml/document"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestXPathNode < Test::Unit::TestCase
|
||||
def matches(xml, xpath)
|
||||
document = REXML::Document.new(xml)
|
||||
|
|
|
@ -3,7 +3,7 @@ require "rexml/document"
|
|||
require "rexml/xpath"
|
||||
require "rexml/parsers/xpathparser"
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestXPathPredicate < Test::Unit::TestCase
|
||||
include REXML
|
||||
SRC=<<-EOL
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'rexml/document'
|
|||
require 'rexml/element'
|
||||
require 'rexml/xpath'
|
||||
|
||||
module REXML
|
||||
module REXMLTests
|
||||
class TestXPathText < Test::Unit::TestCase
|
||||
def setup
|
||||
@doc = REXML::Document.new
|
||||
|
|
Loading…
Reference in a new issue