ruby/test/irb
Stan Lo cb9b885e78 [ruby/irb] Store context in RubyLex
Some background for this refactor:

1. Through a RubyLex instance's lifetime, the context passed to its methods
   should be the same.
   Given that `Context` is only initialised in `Irb#initialize`,
   this should be true.

2. When `RubyLex` is initialised, the context object should be accessible.
   This is also true in all 3 of `RubyLex.new`'s invocations.

With the above observations, we should be able to store the context in `RubyLex`
as an instance variable. And doing so will make `RubyLex`'s instance methods
easier to use and maintain.

5c8d3df2df
2023-01-14 09:19:09 +00:00
..
yamatanooroti [ruby/irb] Test debug commands without yamatanooroti 2022-12-02 01:05:22 +00:00
helper.rb [ruby/irb] Require pathname in test helper 2022-12-02 22:00:42 +00:00
test_cmd.rb [ruby/irb] Avoid calling private methods on the main object 2023-01-12 11:49:16 +00:00
test_color.rb [ruby/irb] Test colors with enabling colors 2022-12-26 15:28:38 +00:00
test_color_printer.rb [ruby/irb] Test colors with enabling colors 2022-12-26 15:28:38 +00:00
test_completion.rb [ruby/irb] Provide a base test class and let tests restore encodings 2022-11-03 22:13:11 +00:00
test_context.rb Drop Ruby 2.5 support 2022-11-17 13:06:32 +09:00
test_debug_cmd.rb [ruby/irb] PTY module is platform dependent 2022-12-19 17:49:59 +09:00
test_history.rb [ruby/irb] Prefer to use File.open instead of Kernel.open 2022-12-16 01:10:46 +00:00
test_init.rb [ruby/irb] Allow disabling autocompletion with 2022-12-06 00:53:32 +00:00
test_input_method.rb [ruby/irb] Provide a base test class and let tests restore encodings 2022-11-03 22:13:11 +00:00
test_option.rb [ruby/irb] Provide a base test class and let tests restore encodings 2022-11-03 22:13:11 +00:00
test_raise_no_backtrace_exception.rb [ruby/irb] Improve testing infra 2022-11-15 17:26:51 +00:00
test_ruby_lex.rb [ruby/irb] Store context in RubyLex 2023-01-14 09:19:09 +00:00
test_workspace.rb [ruby/irb] Provide a base test class and let tests restore encodings 2022-11-03 22:13:11 +00:00