1
0
Fork 0
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:
kou 2014-05-27 12:07:40 +00:00
parent effcb9a712
commit 28e78bf7f2
40 changed files with 47 additions and 39 deletions

View file

@ -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.

View file

@ -1,7 +1,7 @@
require "test/unit"
require "rexml/document"
module REXML
module REXMLTests
class TestParseDocumentTypeDeclaration < Test::Unit::TestCase
private
def xml(internal_subset)

View file

@ -1,7 +1,7 @@
require 'test/unit'
require 'rexml/document'
module REXML
module REXMLTests
class TestParseNotationDeclaration < Test::Unit::TestCase
private
def xml(internal_subset)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -2,7 +2,7 @@
require 'rexml/encoding'
module REXML
module REXMLTests
class ChangingEncodings < Test::Unit::TestCase
def initialize a
@u = 'テスト ほげ ふが 美しい'

View file

@ -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

View file

@ -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

View file

@ -11,7 +11,7 @@ require "rexml/undefinednamespaceexception"
require_relative "listener"
module REXML
module REXMLTests
class Tester < Test::Unit::TestCase
include REXMLTestUtils
include REXML

View file

@ -1,7 +1,7 @@
require 'test/unit'
require 'rexml/document'
module REXML
module REXMLTests
class TestDocTypeAccessor < Test::Unit::TestCase
def setup

View file

@ -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

View file

@ -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

View file

@ -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'>"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,7 +1,7 @@
require 'test/unit'
require 'rexml/document'
module REXML
module REXMLTests
class OrderTester < Test::Unit::TestCase
DOC = <<END
<paper>

View file

@ -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

View file

@ -5,7 +5,7 @@ begin
rescue LoadError
end
module REXML
module REXMLTests
class OrderTester < Test::Unit::TestCase
include REXMLTestUtils

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -3,7 +3,7 @@ require "rexml/document"
require 'rexml/streamlistener'
require 'stringio'
module REXML
module REXMLTests
class MyListener
include REXML::StreamListener
end

View file

@ -1,6 +1,6 @@
require "rexml/text"
module REXML
module REXMLTests
class TextTester < Test::Unit::TestCase
include REXML

View file

@ -9,7 +9,7 @@
require 'test/unit'
require 'rexml/document'
module REXML
module REXMLTests
class Ticket80 < Test::Unit::TestCase
@@xmlstr = '<?xml version="1.0"?>

View file

@ -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

View file

@ -6,7 +6,7 @@
require "rexml/document"
require "test/unit"
module REXML
module REXMLTests
class TestXmlDeclaration < Test::Unit::TestCase
def setup
xml = <<-'END_XML'

View file

@ -1,7 +1,7 @@
require 'test/unit'
require 'rexml/document'
module REXML
module REXMLTests
class TestXPathAttribute < Test::Unit::TestCase
def setup
@xml = <<-XML

View file

@ -1,7 +1,7 @@
require "test/unit/testcase"
require "rexml/document"
module REXML
module REXMLTests
class TestXPathAxisPredcedingSibling < Test::Unit::TestCase
include REXML
SOURCE = <<-EOF

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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