summaryrefslogtreecommitdiff
path: root/test/irb
AgeCommit message (Collapse)Author
2018-08-18Suppress read of ~/.irbrckazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-12irb.rb: update `_`nobu
* lib/irb.rb (IRB::Irb#eval_input): update `_` after exception. [ruby-core:86989] [Bug #14749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-12fix TestInputMethodnobu
* test/irb/test_context.rb (TestInputMethod#initialize): fix typos and increment `line_no` only when not reaching the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-14irb.rb: restore the last errornobu
* lib/irb.rb (eval_input): restore the last error `$!`, as the previous result. [Feature #14684] * lib/irb/context.rb (evaluate): add `exception` keyword argument to set the last error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-14irb/{context,workspace}.rb: use local_variable_setnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-10skip some tests so that no failure occurs in root privilegemame
Some tests had failed on `sudo make test-all`, mainly because root can access any files regardless of permission. This change adds `skip` guards into such tests. Note that almost all tests in which `skip` guards is added, already have "windows" guard. This is because there is no support to avoid read access by owner on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12irb/test_init.rb: add test to ensure $0k0kubun
is not changed. At first `ARGV.unshift('something')` was suggested for r61149, but it wasn't sufficient because it modifies $0. Not only to preserve ARGV, but also r61149 intends to preserve $0. This test prevents future breakage of the behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12irb.rb: preserve ARGV on binding.irbk0kubun
This is not perfectly good solution (at least we don't want to have ARGV as default value of `argv` argument), but unfortunately IRB.setup and IRB.parse_opts are public methods and we can't make breaking change to those methods. We may deprecate using them and then make them private in the future, but the removal should not be in Ruby 2.5. So I kept their interface for now. [Bug #14162] [close GH-1770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-29test_workspace.rb: prefer using skipk0kubun
rather than ignoring test definition to know untestability when executing test with `-v`. Also this simplifies check using `MiniTest::Unit::Guard#windows?`. This change is suggested by @MSP-Greg here: https://github.com/ruby/ruby/commit/7128849c8c5fce8df450379db54136fd21fab6ad#commitcomment-25836745 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24test_workspace.rb: skip test failing on windowsk0kubun
> Note that all files are always readable > https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/chmod-wchmod It seems that we can't make a file unreadable with `File.chmod` on Windows. When file can't be read, File::EACCES is raised on Windows too. So r60900 should work anyway, but I don't know how to let it happen by Ruby code. I tried to open file before reading it, but I couldn't reproduce File::EACCES too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24Fix TOCTTOU and avoid to read existing unreadable filekazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24Fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24test/irb/test_workspace.rb: fix SCRIPT_LINES__nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24irb.rb: show source around binding.irb on startk0kubun
[Feature #14124] [ruby-dev:50319] [close GH-1764] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20ruby-lex.rb: fix continued line conditionsnobu
* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued line; empty lines, a semicolon, first line in `begin` block, just after `else` are not continued. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30refine assertionsnobu
* test/irb/test_ruby-lex.rb (test_prompt): invert confinue flag by FIXME comments. adjust line numbers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30more checks for promptnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30test for promptnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29test for immature statementnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29test for top level statementnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29test for commentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29tests for irb lexernobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-13* lib/irb.rb: Prevent irb from crashing when exception withhsbt
nil backtrace is raised. [fix GH-434][ruby-core:58078][Bug #9063] * test/irb/test_raise_no_backtrace_exception.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-30* test/irb/test_completion.rb: skip if cannot load irb/completionusa
(maybe readline does not exist). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-27* lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):nobu
ignore non-string name modules. [ruby-core:42244][Bug #5938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-08* test/irb/test_option.rb (test_end_of_option): don't read .irbrc. Bug#4138nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-05* lib/irb/init.rb (IRB.parse_opts): fix typo. [ruby-core:33574]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e