From 42144fc3bb3ec87c8b7a619d0957aa907eea56b6 Mon Sep 17 00:00:00 2001 From: nagachika Date: Thu, 9 Feb 2012 14:44:10 +0000 Subject: * 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 --- test/pathname/test_pathname.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/pathname') 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 -- cgit v1.2.3