mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e963ff1e98
commit
b487d9459d
1 changed files with 11 additions and 0 deletions
|
@ -225,6 +225,17 @@ EOT
|
|||
assert_equal(enc, s.encoding)
|
||||
}
|
||||
}
|
||||
|
||||
ENCS.reject {|e| e == Encoding::ASCII_8BIT }.each {|enc|
|
||||
with_pipe("#{enc}:UTF-8") {|r, w|
|
||||
w << "\xc2\xa1"
|
||||
w.close
|
||||
s = r.read
|
||||
assert_equal(Encoding::UTF_8, s.encoding)
|
||||
assert_equal(s.encode("UTF-8"), s)
|
||||
}
|
||||
}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue