summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-09 14:44:10 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-09 14:44:10 +0000
commit42144fc3bb3ec87c8b7a619d0957aa907eea56b6 (patch)
tree14c85fa8083c3360a875bb563eb21a1768c51d61 /test
parent3b1276eb390779a79d42bfabd588567efadcb72d (diff)
* test/pathname/test_pathname.rb (test_binread): add assertion to
check encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/pathname/test_pathname.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 1631403eb2..ccdc5bd8eb 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -710,7 +710,9 @@ class TestPathname < Test::Unit::TestCase
def test_binread
with_tmpchdir('rubytest-pathname') {|dir|
open("a", "w") {|f| f.write "abc" }
- assert_equal("abc", Pathname("a").binread)
+ str = Pathname("a").binread
+ assert_equal("abc", str)
+ assert_equal(Encoding::ASCII_8BIT, str.encoding)
}
end