Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable pager in show-source test #720

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 4 additions & 20 deletions test/irb/test_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ def setup
save_encodings
IRB.instance_variable_get(:@CONF).clear
@is_win = (RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/)
STDIN.singleton_class.define_method :tty? do
false
end
end

def teardown
Expand All @@ -31,6 +34,7 @@ def teardown
Dir.chdir(@pwd)
FileUtils.rm_rf(@tmpdir)
restore_encodings
STDIN.singleton_class.remove_method :tty?
end

def execute_lines(*lines, conf: {}, main: self, irb_path: nil)
Expand Down Expand Up @@ -665,16 +669,6 @@ def test_whereami_alias


class ShowCmdsTest < CommandTestCase
def setup
STDIN.singleton_class.define_method :tty? do
false
end
end

def teardown
STDIN.singleton_class.remove_method :tty?
end

def test_show_cmds
out, err = execute_lines(
"show_cmds\n"
Expand All @@ -687,16 +681,6 @@ def test_show_cmds
end

class LsTest < CommandTestCase
def setup
STDIN.singleton_class.define_method :tty? do
false
end
end

def teardown
STDIN.singleton_class.remove_method :tty?
end

def test_ls
out, err = execute_lines(
"class P\n",
Expand Down