mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use require_relative to require local library
* from 1.9 require relative path from the file must use require_relative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
66f9135726
commit
ef33958094
56 changed files with 61 additions and 60 deletions
|
@ -1,3 +1,4 @@
|
|||
require 'test/unit'
|
||||
module REXMLTestUtils
|
||||
def fixture_path(*components)
|
||||
File.join(File.dirname(__FILE__), "data", *components)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# coding: binary
|
||||
|
||||
require "rexml_test_utils"
|
||||
require_relative "rexml_test_utils"
|
||||
|
||||
require "rexml/document"
|
||||
require "rexml/parseexception"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# coding: binary
|
||||
|
||||
require "rexml_test_utils"
|
||||
require_relative "rexml_test_utils"
|
||||
|
||||
require "rexml/document"
|
||||
require "rexml/parseexception"
|
||||
|
@ -9,7 +9,7 @@ require "rexml/source"
|
|||
require "rexml/formatters/pretty"
|
||||
require "rexml/undefinednamespaceexception"
|
||||
|
||||
require "listener"
|
||||
require_relative "listener"
|
||||
|
||||
class Tester < Test::Unit::TestCase
|
||||
include REXMLTestUtils
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# coding: binary
|
||||
|
||||
require "rexml_test_utils"
|
||||
require_relative "rexml_test_utils"
|
||||
|
||||
require 'rexml/source'
|
||||
require 'rexml/document'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'rexml_test_utils'
|
||||
require_relative 'rexml_test_utils'
|
||||
|
||||
require "rexml/document"
|
||||
require "rexml/xpath"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rexml_test_utils"
|
||||
require_relative "rexml_test_utils"
|
||||
require "rexml/light/node"
|
||||
require "rexml/parsers/lightparser"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'rexml_test_utils'
|
||||
require_relative 'rexml_test_utils'
|
||||
require 'rexml/parsers/lightparser'
|
||||
|
||||
class LightParserTester < Test::Unit::TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# coding: binary
|
||||
|
||||
require 'rexml_test_utils'
|
||||
require_relative 'rexml_test_utils'
|
||||
|
||||
require 'rexml/document'
|
||||
require 'rexml/streamlistener'
|
||||
|
@ -82,16 +82,16 @@ class BaseTester < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_accents
|
||||
source = '<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
source = %[<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<g>
|
||||
<f a="é" />
|
||||
</g>'
|
||||
<f a="\xE9" />
|
||||
</g>]
|
||||
doc = REXML::Document.new( source )
|
||||
a = doc.elements['/g/f'].attribute('a')
|
||||
if a.value.respond_to? :force_encoding
|
||||
a.value.force_encoding('binary')
|
||||
end
|
||||
assert_equal( 'é', a.value)
|
||||
assert_equal( "\xC3\xA9", a.value)
|
||||
doc = REXML::Document.parse_stream(
|
||||
File::new(fixture_path("stream_accents.xml")),
|
||||
AccentListener::new
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rexml_test_utils"
|
||||
require_relative "rexml_test_utils"
|
||||
|
||||
require "rexml/document"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'rexml_test_utils'
|
||||
require_relative 'rexml_test_utils'
|
||||
require 'rexml/document'
|
||||
begin
|
||||
require 'zlib'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'rexml_test_utils'
|
||||
require_relative 'rexml_test_utils'
|
||||
require 'rexml/document'
|
||||
|
||||
class TestIssuezillaParsing < Test::Unit::TestCase
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rexml_test_utils"
|
||||
require_relative "rexml_test_utils"
|
||||
require 'rexml/sax2listener'
|
||||
require 'rexml/parsers/sax2parser'
|
||||
require 'rexml/document'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rexml_test_utils"
|
||||
require_relative "rexml_test_utils"
|
||||
|
||||
require "rexml/document"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "erb"
|
||||
|
||||
require "test/unit"
|
||||
require 'rss-assertions'
|
||||
require_relative 'rss-assertions'
|
||||
|
||||
require "rss"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
module RSS
|
||||
class TestRSS20Core < TestCase
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/2.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/atom"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "cgi"
|
||||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/content"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "cgi"
|
||||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/dublincore"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "cgi"
|
||||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/image"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "cgi"
|
||||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/2.0"
|
||||
require "rss/itunes"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "tempfile"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/dublincore"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/dublincore"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/2.0"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/atom"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/atom"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "cgi"
|
||||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/slash"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "cgi"
|
||||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/syndication"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "cgi"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/2.0"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/maker"
|
||||
require "rss/1.0"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require "cgi"
|
||||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/2.0"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
module RSS
|
||||
class TestVersion < TestCase
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require "rexml/document"
|
||||
|
||||
require "rss-testcase"
|
||||
require_relative "rss-testcase"
|
||||
|
||||
require "rss/1.0"
|
||||
require "rss/xml-stylesheet"
|
||||
|
|
Loading…
Add table
Reference in a new issue