mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[win32] skip example about STDIN encodings
This commit is contained in:
parent
37cd35aea8
commit
a84dc9d80d
Notes:
git
2021-12-01 18:54:47 +09:00
1 changed files with 17 additions and 15 deletions
|
@ -1208,6 +1208,7 @@ describe "The predefined global constant" do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "STDIN" do
|
describe "STDIN" do
|
||||||
|
platform_is_not :windows do
|
||||||
it "has the same external encoding as Encoding.default_external" do
|
it "has the same external encoding as Encoding.default_external" do
|
||||||
STDIN.external_encoding.should equal(Encoding.default_external)
|
STDIN.external_encoding.should equal(Encoding.default_external)
|
||||||
end
|
end
|
||||||
|
@ -1217,6 +1218,16 @@ describe "The predefined global constant" do
|
||||||
STDIN.external_encoding.should equal(Encoding::ISO_8859_16)
|
STDIN.external_encoding.should equal(Encoding::ISO_8859_16)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "has nil for the internal encoding" do
|
||||||
|
STDIN.internal_encoding.should be_nil
|
||||||
|
end
|
||||||
|
|
||||||
|
it "has nil for the internal encoding despite Encoding.default_internal being changed" do
|
||||||
|
Encoding.default_internal = Encoding::IBM437
|
||||||
|
STDIN.internal_encoding.should be_nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it "has the encodings set by #set_encoding" do
|
it "has the encodings set by #set_encoding" do
|
||||||
code = "STDIN.set_encoding Encoding::IBM775, Encoding::IBM866; " \
|
code = "STDIN.set_encoding Encoding::IBM775, Encoding::IBM866; " \
|
||||||
"p [STDIN.external_encoding.name, STDIN.internal_encoding.name]"
|
"p [STDIN.external_encoding.name, STDIN.internal_encoding.name]"
|
||||||
|
@ -1229,15 +1240,6 @@ describe "The predefined global constant" do
|
||||||
"p [STDIN.external_encoding.name, STDIN.internal_encoding.name]"
|
"p [STDIN.external_encoding.name, STDIN.internal_encoding.name]"
|
||||||
ruby_exe(code).chomp.should == %{["IBM775", "IBM866"]}
|
ruby_exe(code).chomp.should == %{["IBM775", "IBM866"]}
|
||||||
end
|
end
|
||||||
|
|
||||||
it "has nil for the internal encoding" do
|
|
||||||
STDIN.internal_encoding.should be_nil
|
|
||||||
end
|
|
||||||
|
|
||||||
it "has nil for the internal encoding despite Encoding.default_internal being changed" do
|
|
||||||
Encoding.default_internal = Encoding::IBM437
|
|
||||||
STDIN.internal_encoding.should be_nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "STDOUT" do
|
describe "STDOUT" do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue