mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/irb] Suppress sequence to inspect asian ambiguous width
https://github.com/ruby/irb/commit/a7097c5b80
This commit is contained in:
parent
7440fc3eb4
commit
13e968c1cd
1 changed files with 11 additions and 1 deletions
|
@ -113,7 +113,17 @@ module TestIRB
|
||||||
East\sAsian\sAmbiguous\sWidth:\s\d\n
|
East\sAsian\sAmbiguous\sWidth:\s\d\n
|
||||||
#{@is_win ? 'Code\spage:\s\d+\n' : ''}
|
#{@is_win ? 'Code\spage:\s\d+\n' : ''}
|
||||||
}x
|
}x
|
||||||
assert_match expected, irb.context.main.irb_info.to_s
|
info = irb.context.main.irb_info
|
||||||
|
capture_output do
|
||||||
|
# Reline::Core#ambiguous_width may access STDOUT, not $stdout
|
||||||
|
stdout = STDOUT.dup
|
||||||
|
STDOUT.reopen(IO::NULL, "w")
|
||||||
|
info = info.to_s
|
||||||
|
ensure
|
||||||
|
STDOUT.reopen(stdout)
|
||||||
|
stdout.close
|
||||||
|
end
|
||||||
|
assert_match expected, info
|
||||||
ensure
|
ensure
|
||||||
ENV["LANG"] = lang_backup
|
ENV["LANG"] = lang_backup
|
||||||
ENV["LC_ALL"] = lc_all_backup
|
ENV["LC_ALL"] = lc_all_backup
|
||||||
|
|
Loading…
Reference in a new issue