We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 565eeb3 commit a7097c5Copy full SHA for a7097c5
test/irb/test_cmd.rb
@@ -113,7 +113,17 @@ def test_irb_info_singleline
113
East\sAsian\sAmbiguous\sWidth:\s\d\n
114
#{@is_win ? 'Code\spage:\s\d+\n' : ''}
115
}x
116
- assert_match expected, irb.context.main.irb_info.to_s
+ info = irb.context.main.irb_info
117
+ capture_output do
118
+ # Reline::Core#ambiguous_width may access STDOUT, not $stdout
119
+ stdout = STDOUT.dup
120
+ STDOUT.reopen(IO::NULL, "w")
121
+ info = info.to_s
122
+ ensure
123
+ STDOUT.reopen(stdout)
124
+ stdout.close
125
+ end
126
+ assert_match expected, info
127
ensure
128
ENV["LANG"] = lang_backup
129
ENV["LC_ALL"] = lc_all_backup
0 commit comments