aboutsummaryrefslogtreecommitdiffstats
path: root/test/irb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/irb] skip a failling test on TruffleRubyNobuhiro IMAI2021-01-181-0/+1
| | | | | | * due to the difference of backtrace pointed out by @aycabta https://github.com/ruby/irb/commit/5e00a0ae61
* [ruby/irb] handle repeated exception separatelyNobuhiro IMAI2021-01-181-0/+18
| | | | https://github.com/ruby/irb/commit/fcf6b34bc5
* [ruby/irb] handle `__ENCODING__` as a keyword as wellNobuhiro IMAI2021-01-181-1/+2
| | | | https://github.com/ruby/irb/commit/a6a33d908f
* Fix the failing test with XDG_CONFIG_HOMEHiroshi SHIBATA2021-01-121-0/+4
|
* Suppress constant redefinition warningsNobuyoshi Nakada2021-01-111-1/+3
|
* [ruby/irb] Make IRB::ColorPrinter.pp compatible with PP.ppTakashi Kokubun2021-01-071-3/+3
| | | | | | | | | The incompatible interface is not helpful, again if you want to use it as a standalone library, falling it back to PP. Original PP.pp also ends with `out << "\n"`. https://github.com/ruby/irb/commit/4c74c7d84c
* should use `assert_include` here.Koichi Sasada2021-01-081-1/+1
| | | | | Random ordering test can introduce antoher candidate so it should be `assert_include`.
* [ruby/irb] Fix BACK_TRACE_LIMIT logicaycabta2021-01-081-0/+66
| | | | https://github.com/ruby/irb/commit/30dc5d43fe
* [ruby/irb] Use Exception#full_message to show backtrace in the correct orderaycabta2021-01-082-2/+63
| | | | | | [Bug #17466] https://github.com/ruby/irb/commit/1c76845cca
* [ruby/irb] refactoring an error handling in `IRB::Inspector`Nobuhiro IMAI2021-01-081-8/+15
| | | | | | | | * moved rescue clause to `#inspect_value` to catch all failures in inspectors * test with all (currently five kind of) inspect modes - tweaked the input due to only `Marshal` can inspect(dump) a `BasicObject` https://github.com/ruby/irb/commit/9d112fab8e
* [ruby/irb] do not escape a predicate method for doc namespaceNobuhiro IMAI2021-01-081-0/+8
| | | | | | * Fixes #88 https://github.com/ruby/irb/commit/d431a30af4
* [ruby/irb] Use error tokens if there are no correct tokens in the same placeaycabta2021-01-051-0/+32
| | | | | | For example, the broken code "%www" will result in only one error token. https://github.com/ruby/irb/commit/9fa39a7cf3
* [ruby/irb] Use Ripper::Lexer#scan to take broken tokensaycabta2021-01-051-0/+19
| | | | | | ref. https://github.com/ruby/reline/pull/242 https://github.com/ruby/irb/commit/54f90cb6c9
* [ruby/irb] Heredoc may contain multiple newlines in a single tokenaycabta2021-01-051-0/+17
| | | | | | | | | Use the start token as the indentation criteria so that it works properly in heredoc. ref. https://github.com/ruby/reline/pull/242 https://github.com/ruby/irb/commit/9704808dfd
* [ruby/irb] Handle indentations related to keyword "do" correctlyaycabta2021-01-051-0/+70
| | | | | | This fixes ruby/irb#158. https://github.com/ruby/irb/commit/964643400b
* [ruby/irb] Escape invalid byte sequence in Exceptionaycabta2021-01-051-0/+8
| | | | | | This fixes ruby/irb#141. https://github.com/ruby/irb/commit/0815317d42
* [ruby/irb] Newline in oneliner def doesn't reset indentaycabta2021-01-051-0/+17
| | | | | | This closes ruby/irb#132. https://github.com/ruby/irb/commit/43456dcf5e
* [ruby/irb] Stringify when a non-object is passed to PP#textaycabta2021-01-041-0/+19
| | | | | | | | | | | | | | If a nested object is passed to #pp, it may be sometimes passed to the #text method as an object without being stringified. This is fixed on the Ruby main repository; https://github.com/ruby/ruby/commit/433a3be86a811de0b4adbb92e054ee3a6fc6b4d8 but it was a bug of Ripper so still needs this workaround for using irb as a gem on Ruby 3.0.0 or earlier. Co-authored-by: k0kubun <takashikkbn@gmail.com> https://github.com/ruby/irb/commit/8d13df22ee
* irb: add more syntax errors colorizing support (#3967)Nobuhiro IMAI2020-12-281-0/+14
|
* [ruby/irb] Fix failing testsTakashi Kokubun2020-12-281-3/+3
| | | | https://github.com/ruby/irb/commit/7723ade899
* [ruby/irb] Fix error_message for assert_dynamic_promptaycabta2020-12-231-2/+8
| | | | https://github.com/ruby/irb/commit/b12dfb6298
* [ruby/reline] [ruby/irb] Handle multiple newlines in a token correctlyaycabta2020-12-231-2/+53
| | | | | | | | | Co-authored-by: manga_osyo <manga.osyo@gmail.com> Co-authored-by: ima1zumi <mariimaizumi5@gmail.com> https://github.com/ruby/irb/commit/c59a9be82f https://github.com/ruby/reline/commit/a7922da16b
* irb: Removed unused variablesv3_0_0_rc1Nobuyoshi Nakada2020-12-201-2/+0
|
* irb: Define extension command only on the given objectNobuyoshi Nakada2020-12-201-1/+3
| | | | Not to interfer in class variables.
* Set non-verbose mode as well as tty modeNobuyoshi Nakada2020-12-201-0/+4
|
* Set :DEFAULT to PROMPT_MODE for CIaycabta2020-12-201-20/+8
|
* Suppress errors related to using variables that are not directly related to ↵aycabta2020-12-201-4/+20
| | | | testing
* [ruby/irb] Add measure commandaycabta2020-12-201-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can use "measure" command to check performance in IRB like below: irb(main):001:0> 3 => 3 irb(main):002:0> measure TIME is added. => nil irb(main):003:0> 3 processing time: 0.000058s => 3 irb(main):004:0> measure :off => nil irb(main):005:0> 3 => 3 You can set "measure :on" by "IRB.conf[:MEASURE] = true" in .irbrc, and, also, set custom performance check method: IRB.conf[:MEASURE_PROC][:CUSTOM] = proc { |context, code, line_no, &block| time = Time.now result = block.() now = Time.now puts 'custom processing time: %fs' % (Time.now - time) if IRB.conf[:MEASURE] result } https://github.com/ruby/irb/commit/3899eaf2e2
* [ruby/irb] Skip the few failing tests on TruffleRubyBenoit Daloze2020-12-172-0/+3
| | | | https://github.com/ruby/irb/commit/22717844c0
* [ruby/irb] support more body argument for oneliner method definitionNobuhiro IMAI2020-11-221-0/+2
| | | | https://github.com/ruby/irb/commit/2ff1295533
* Update expected IRB resultNobuyoshi Nakada2020-11-201-1/+11
|
* Remove system method for E2E testing because depends on ruby commandaycabta2020-10-051-54/+75
|
* Show stdout and stderr when history tests failaycabta2020-10-051-32/+31
|
* [ruby/irb] Drop OMIT_ON_ASSIGNMENT and add :truncate option for ↵aycabta2020-09-191-22/+6
| | | | | | ECHO_ON_ASSIGNMENT https://github.com/ruby/irb/commit/4c89b0775b
* [ruby/irb] Omit output if first line of multiline is too longaycabta2020-09-141-0/+76
| | | | https://github.com/ruby/irb/commit/0feeae38c5
* [ruby/irb] Add OMIT_ON_ASSIGNMENTaycabta2020-09-141-4/+81
| | | | | | | | | | | Omit the results evaluated at assignment if they are too long. The behavior of ECHO_ON_ASSIGNMENT being on by default is hard to understand, so I change it to off by default. Instead, we turn OMIT_ON_ASSIGNMENT on by default. The result is displayed on assignment, but it will always be short and within one line of the screen. https://github.com/ruby/irb/commit/c5ea79d5ce
* Skip irb/test_history on Windows tooaycabta2020-08-201-6/+1
|
* Skip Editline for history tests of IRBaycabta2020-08-191-0/+9
| | | | | Because Editline erases all histories in Readline::HISTORY when Readline.readline is called.
* Skip irb/test_history on Solarisaycabta2020-08-191-1/+1
|
* Use "in" and "out" options of "system" instead of "replace_stdio"aycabta2020-08-191-28/+1
|
* Do "write" to temp stdin before "reopen"aycabta2020-08-191-5/+5
|
* test/irb/test_history.rb: prevent warningsYusuke Endoh2020-08-181-4/+4
| | | | | | | | | | | | | ``` /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:16: warning: assigned but unused variable - result_output /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:34: warning: assigned but unused variable - result_output /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:57: warning: assigned but unused variable - result_output /home/chkbuild/chkbuild/tmp/build/20200818T123003Z/ruby/test/irb/test_history.rb:80: warning: assigned but unused variable - result_output ```
* Lounch external process on Windows correctlyaycabta2020-08-181-2/+1
|
* [ruby/irb] Change the way the IRB is invoked as an external processaycabta2020-08-181-2/+1
| | | | https://github.com/ruby/irb/commit/f4bcdf4375
* [ruby/irb] Support shortening lambda notetion for nesting level of promptaycabta2020-08-181-5/+15
| | | | https://github.com/ruby/irb/commit/f1a775af47
* [ruby/irb] Support shortening lambda notationaycabta2020-08-181-0/+16
| | | | https://github.com/ruby/irb/commit/8e3f81d428
* [ruby/irb] Add require 'irb' to test separatelyaycabta2020-08-181-0/+1
| | | | https://github.com/ruby/irb/commit/9e4423b6e1
* [ruby/irb] Make history infinite if set SAVE_HISTORY to negativeaycabta2020-08-181-0/+23
| | | | https://github.com/ruby/irb/commit/824473e880
* [ruby/irb] Suppress crash when bignum is set to SAVE_HISTORYaycabta2020-08-181-0/+23
| | | | https://github.com/ruby/irb/commit/5044eb2730
* [ruby/irb] Add tests about IRB historyaycabta2020-08-181-0/+131
| | | | https://github.com/ruby/irb/commit/82efd370eb