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
|
@ -1,3 +1,9 @@
|
|||
Sat Sep 29 19:40:32 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
Sat Sep 29 11:21:06 2012 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* vm_insnhelper.c (rb_vm_using_modules): use using_modules before
|
||||
|
|
|
@ -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…
Reference in a new issue