mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_unicode_escape.rb: fix test for Windows
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic): echo command doesn't work properly against non-ascii character on Windows with chcp 437. Instead we use ruby. [ruby-core:47709] [Bug #7076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2adb9fd4a5
commit
b5de8fcd81
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Sep 28 22:19:31 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
|
||||
|
||||
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
|
||||
echo command doesn't work properly against non-ascii character on
|
||||
Windows with chcp 437. Instead we use ruby.
|
||||
[ruby-core:47709] [Bug #7076]
|
||||
|
||||
Fri Sep 28 17:54:31 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_insnhelper.c (vm_setup_method): refactoring.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
require 'test/unit'
|
||||
require_relative 'envutil'
|
||||
|
||||
class TestUnicodeEscape < Test::Unit::TestCase
|
||||
def test_basic
|
||||
|
@ -47,7 +48,7 @@ EOS
|
|||
# \u in %x strings
|
||||
assert_match(/^("?)A\1$/, `echo "\u0041"`) #"
|
||||
assert_match(/^("?)A\1$/, %x{echo "\u0041"}) #"
|
||||
assert_match(/^("?)ü\1$/, `echo "\u{FC}"`.force_encoding("utf-8")) #"
|
||||
assert_match(/^("?)ü\1$/, `#{EnvUtil.rubybin} -e "puts \\"\u{FC}\\""`.force_encoding("utf-8")) #"
|
||||
|
||||
# \u in quoted symbols
|
||||
assert_equal(:A, :"\u0041")
|
||||
|
|
Loading…
Reference in a new issue