mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_unicode_escape.rb: set script encoding
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic): set script encoding to work with LANG=C. It would work on both Windows and Unix. Refix of r37051. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0954607864
commit
6d1220b013
2 changed files with 8 additions and 5 deletions
|
@ -48,11 +48,8 @@ EOS
|
|||
# \u in %x strings
|
||||
assert_match(/^("?)A\1$/, `echo "\u0041"`) #"
|
||||
assert_match(/^("?)A\1$/, %x{echo "\u0041"}) #"
|
||||
if /mswin|mingw/ =~ RUBY_PLATFORM
|
||||
assert_match(/^("?)ü\1$/, `#{EnvUtil.rubybin} -e "puts \\"\u{FC}\\""`.force_encoding("utf-8")) #"
|
||||
else
|
||||
assert_match(/^("?)ü\1$/, `echo "\u{FC}"`.force_encoding("utf-8")) #"
|
||||
end
|
||||
assert_match(/^("?)ü\1$/,
|
||||
`#{EnvUtil.rubybin} -e "#coding:utf-8\nputs \\"\u{FC}\\""`.force_encoding("utf-8")) #"
|
||||
|
||||
# \u in quoted symbols
|
||||
assert_equal(:A, :"\u0041")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue