Added assertions

This commit is contained in:
Nobuyoshi Nakada 2020-11-19 15:41:38 +09:00
parent 9c1e2a99fc
commit 44ad72fa21
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -103,13 +103,13 @@ class TestISeq < Test::Unit::TestCase
f.puts "{ '\u00de' => 'Th', '\u00df' => 'ss', '\u00e0' => 'a' }" f.puts "{ '\u00de' => 'Th', '\u00df' => 'ss', '\u00e0' => 'a' }"
f.close f.close
previous_external = Encoding.default_external EnvUtil.with_default_external(Encoding::US_ASCII) do
Encoding.default_external = Encoding::US_ASCII assert_warn('') {
begin
load f.path load f.path
}
assert_nothing_raised(SyntaxError) {
RubyVM::InstructionSequence.compile_file(f.path) RubyVM::InstructionSequence.compile_file(f.path)
ensure }
Encoding.default_external = previous_external
end end
end end
end end