summaryrefslogtreecommitdiff
path: root/test/rexml/test_listener.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-24 13:10:46 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-24 13:10:46 +0000
commitef339580947c7df1281263ccfb99718887e5378d (patch)
tree49b17e75bae90e436884ade206c10209db785884 /test/rexml/test_listener.rb
parent66f913572682f54eda3b0d4b78c5e9cef08043dd (diff)
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
Diffstat (limited to 'test/rexml/test_listener.rb')
-rw-r--r--test/rexml/test_listener.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/rexml/test_listener.rb b/test/rexml/test_listener.rb
index 0afbdcd5ff..a3d763c5da 100644
--- a/test/rexml/test_listener.rb
+++ b/test/rexml/test_listener.rb
@@ -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