aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshirosaki <shirosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-29 11:18:57 +0000
committershirosaki <shirosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-09-29 11:18:57 +0000
commit6d1220b0131af25e14f56b1d0b49b8e650376885 (patch)
treede6211d59c7069ce8104081ea798da5c28480832
parent0954607864bcdd81ea5f3dd2ea52f638f2f32e47 (diff)
downloadruby-6d1220b0131af25e14f56b1d0b49b8e650376885.tar.gz
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
-rw-r--r--ChangeLog6
-rw-r--r--test/ruby/test_unicode_escape.rb7
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index deb65d7262..12cc173fef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/test/ruby/test_unicode_escape.rb b/test/ruby/test_unicode_escape.rb
index af09428421..c1b1e2ca40 100644
--- a/test/ruby/test_unicode_escape.rb
+++ b/test/ruby/test_unicode_escape.rb
@@ -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")