diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-09 14:44:10 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-09 14:44:10 +0000 |
commit | 42144fc3bb3ec87c8b7a619d0957aa907eea56b6 (patch) | |
tree | 14c85fa8083c3360a875bb563eb21a1768c51d61 | |
parent | 3b1276eb390779a79d42bfabd588567efadcb72d (diff) | |
download | ruby-42144fc3bb3ec87c8b7a619d0957aa907eea56b6.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/pathname/test_pathname.rb | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu Feb 9 23:41:44 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com> + + * test/pathname/test_pathname.rb (test_binread): add assertion to + check encoding. + Thu Feb 9 16:48:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/dl/dl.c (Init_dl): fix mangled document. 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 |