mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
a923203811
conveniently (https://github.com/ruby/irb/pull/429) * Create a base TestIRB::TestCase class * Save/restore encodings for tests that initializes InputMethod classes Because `RelineInputMethod#initializes` calls `set_encoding`, which changes stdio/out/err and Encoding's default encoding values, we need to make sure any test that directly or indirectly (e.g. through Context) initializes `RelineInputMethod` restores encodings. `ReadlineInputMethod` also changes encodings but currently no tests cover it. * Remove unnecessary TestHelper module Since we now have a base TestCase, without_rdoc can just live there. https://github.com/ruby/irb/commit/c2874ec121
13 lines
412 B
Ruby
13 lines
412 B
Ruby
# frozen_string_literal: false
|
|
require_relative "helper"
|
|
|
|
module TestIRB
|
|
class TestOption < TestCase
|
|
def test_end_of_option
|
|
bug4117 = '[ruby-core:33574]'
|
|
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
|
|
status = assert_in_out_err(bundle_exec + %w[-W0 -rirb -e IRB.start(__FILE__) -- -f --], "", //, [], bug4117)
|
|
assert(status.success?, bug4117)
|
|
end
|
|
end
|
|
end
|