1
0
Fork 0
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:
naruse 2013-02-24 13:10:46 +00:00
parent 66f9135726
commit ef33958094
56 changed files with 61 additions and 60 deletions

View file

@ -1,3 +1,4 @@
require 'test/unit'
module REXMLTestUtils module REXMLTestUtils
def fixture_path(*components) def fixture_path(*components)
File.join(File.dirname(__FILE__), "data", *components) File.join(File.dirname(__FILE__), "data", *components)

View file

@ -1,6 +1,6 @@
# coding: binary # coding: binary
require "rexml_test_utils" require_relative "rexml_test_utils"
require "rexml/document" require "rexml/document"
require "rexml/parseexception" require "rexml/parseexception"

View file

@ -1,6 +1,6 @@
# coding: binary # coding: binary
require "rexml_test_utils" require_relative "rexml_test_utils"
require "rexml/document" require "rexml/document"
require "rexml/parseexception" require "rexml/parseexception"
@ -9,7 +9,7 @@ require "rexml/source"
require "rexml/formatters/pretty" require "rexml/formatters/pretty"
require "rexml/undefinednamespaceexception" require "rexml/undefinednamespaceexception"
require "listener" require_relative "listener"
class Tester < Test::Unit::TestCase class Tester < Test::Unit::TestCase
include REXMLTestUtils include REXMLTestUtils

View file

@ -1,6 +1,6 @@
# coding: binary # coding: binary
require "rexml_test_utils" require_relative "rexml_test_utils"
require 'rexml/source' require 'rexml/source'
require 'rexml/document' require 'rexml/document'

View file

@ -1,4 +1,4 @@
require 'rexml_test_utils' require_relative 'rexml_test_utils'
require "rexml/document" require "rexml/document"
require "rexml/xpath" require "rexml/xpath"

View file

@ -1,4 +1,4 @@
require "rexml_test_utils" require_relative "rexml_test_utils"
require "rexml/light/node" require "rexml/light/node"
require "rexml/parsers/lightparser" require "rexml/parsers/lightparser"

View file

@ -1,4 +1,4 @@
require 'rexml_test_utils' require_relative 'rexml_test_utils'
require 'rexml/parsers/lightparser' require 'rexml/parsers/lightparser'
class LightParserTester < Test::Unit::TestCase class LightParserTester < Test::Unit::TestCase

View file

@ -1,6 +1,6 @@
# coding: binary # coding: binary
require 'rexml_test_utils' require_relative 'rexml_test_utils'
require 'rexml/document' require 'rexml/document'
require 'rexml/streamlistener' require 'rexml/streamlistener'
@ -82,16 +82,16 @@ class BaseTester < Test::Unit::TestCase
end end
def test_accents def test_accents
source = '<?xml version="1.0" encoding="ISO-8859-1"?> source = %[<?xml version="1.0" encoding="ISO-8859-1"?>
<g> <g>
<f a="é" /> <f a="\xE9" />
</g>' </g>]
doc = REXML::Document.new( source ) doc = REXML::Document.new( source )
a = doc.elements['/g/f'].attribute('a') a = doc.elements['/g/f'].attribute('a')
if a.value.respond_to? :force_encoding if a.value.respond_to? :force_encoding
a.value.force_encoding('binary') a.value.force_encoding('binary')
end end
assert_equal( 'é', a.value) assert_equal( "\xC3\xA9", a.value)
doc = REXML::Document.parse_stream( doc = REXML::Document.parse_stream(
File::new(fixture_path("stream_accents.xml")), File::new(fixture_path("stream_accents.xml")),
AccentListener::new AccentListener::new

View file

@ -1,4 +1,4 @@
require "rexml_test_utils" require_relative "rexml_test_utils"
require "rexml/document" require "rexml/document"

View file

@ -1,4 +1,4 @@
require 'rexml_test_utils' require_relative 'rexml_test_utils'
require 'rexml/document' require 'rexml/document'
begin begin
require 'zlib' require 'zlib'

View file

@ -1,4 +1,4 @@
require 'rexml_test_utils' require_relative 'rexml_test_utils'
require 'rexml/document' require 'rexml/document'
class TestIssuezillaParsing < Test::Unit::TestCase class TestIssuezillaParsing < Test::Unit::TestCase

View file

@ -1,4 +1,4 @@
require "rexml_test_utils" require_relative "rexml_test_utils"
require 'rexml/sax2listener' require 'rexml/sax2listener'
require 'rexml/parsers/sax2parser' require 'rexml/parsers/sax2parser'
require 'rexml/document' require 'rexml/document'

View file

@ -1,4 +1,4 @@
require "rexml_test_utils" require_relative "rexml_test_utils"
require "rexml/document" require "rexml/document"

View file

@ -1,7 +1,7 @@
require "erb" require "erb"
require "test/unit" require "test/unit"
require 'rss-assertions' require_relative 'rss-assertions'
require "rss" require "rss"

View file

@ -1,6 +1,6 @@
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"

View file

@ -1,6 +1,6 @@
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
module RSS module RSS
class TestRSS20Core < TestCase class TestRSS20Core < TestCase

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/2.0" require "rss/2.0"

View file

@ -1,6 +1,6 @@
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/atom" require "rss/atom"

View file

@ -1,7 +1,7 @@
require "cgi" require "cgi"
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/content" require "rss/content"

View file

@ -1,7 +1,7 @@
require "cgi" require "cgi"
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/dublincore" require "rss/dublincore"

View file

@ -1,7 +1,7 @@
require "cgi" require "cgi"
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/image" require "rss/image"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"

View file

@ -1,7 +1,7 @@
require "cgi" require "cgi"
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/2.0" require "rss/2.0"
require "rss/itunes" require "rss/itunes"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,6 +1,6 @@
require "tempfile" require "tempfile"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/dublincore" require "rss/dublincore"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/dublincore" require "rss/dublincore"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/2.0" require "rss/2.0"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/atom" require "rss/atom"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/atom" require "rss/atom"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"

View file

@ -1,7 +1,7 @@
require "cgi" require "cgi"
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/slash" require "rss/slash"

View file

@ -1,7 +1,7 @@
require "cgi" require "cgi"
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/syndication" require "rss/syndication"

View file

@ -1,6 +1,6 @@
require "cgi" require "cgi"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/2.0" require "rss/2.0"

View file

@ -1,6 +1,6 @@
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/maker" require "rss/maker"
require "rss/1.0" require "rss/1.0"

View file

@ -1,7 +1,7 @@
require "cgi" require "cgi"
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/2.0" require "rss/2.0"

View file

@ -1,4 +1,4 @@
require "rss-testcase" require_relative "rss-testcase"
module RSS module RSS
class TestVersion < TestCase class TestVersion < TestCase

View file

@ -1,6 +1,6 @@
require "rexml/document" require "rexml/document"
require "rss-testcase" require_relative "rss-testcase"
require "rss/1.0" require "rss/1.0"
require "rss/xml-stylesheet" require "rss/xml-stylesheet"