Commit graph

21 commits

Author SHA1 Message Date
Stan Lo
91b106fe4b [ruby/irb] Stanardise test class names with Test postfix instead
of prefix
(https://github.com/ruby/irb/pull/603)

359cb28def
2023-06-13 11:02:26 +00:00
Stan Lo
23892d95f5 [ruby/irb] Drop unnecessary pends for truffleruby
2517039812
2023-03-31 22:02:58 +00:00
Stan Lo
a923203811 [ruby/irb] Provide a base test class and let tests restore encodings
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.

c2874ec121
2022-11-03 22:13:11 +00:00
Nobuyoshi Nakada
7983fb9658 [ruby/irb] Tests may not execute in the source directory
f4aaa70cfc
2021-09-10 08:34:51 +09:00
aycabta
62cecea073 Find irb command path in test 2021-09-10 07:43:01 +09:00
aycabta
7cc298a484 [ruby/irb] Pend on truffleruby
fbf52d9608
2021-09-10 06:37:07 +09:00
aycabta
3bd596efa4 [ruby/irb] Remove an unused variable
5bf1cb2078
2021-09-10 06:37:07 +09:00
Marc-Andre Lafortune
3503c94af5 [ruby/irb] Avoid loading files' local variables [Bug #17623]
b12f0cb8e2
2021-09-10 06:37:06 +09:00
Hiroshi SHIBATA
598f4f4219 [ruby/irb] Use pend instead of skip
f441ce35bf
2021-08-30 12:39:23 +09:00
aycabta
b2d2d25b94 [ruby/irb] Suppress colorize on Windows tests
5be9354cf9
2021-02-11 20:31:29 +09:00
Koichi Sasada
c87ee8005b rubygems is needed to run solo-file test 2020-07-15 11:21:14 +09:00
aycabta
be0d9c0d26 Add "require 'irb'" to use IRB.conf 2019-05-21 09:24:09 +09:00
Takashi Kokubun
52cfb17086
make sync-default-gems GEM=irb
from e6739d8c66
2019-04-26 18:28:57 +09:00
Takashi Kokubun
94af6cd383
Colorize IRB's code_around_binding
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-26 00:47:39 +09:00
mame
b496220a1f skip some tests so that no failure occurs in root privilege
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
2018-01-10 10:39:09 +00:00
k0kubun
96d576733a test_workspace.rb: prefer using skip
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:
7128849c8c (commitcomment-25836745)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-29 11:27:32 +00:00
k0kubun
7128849c8c test_workspace.rb: skip test failing on windows
> 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-24 12:37:07 +00:00
kazu
6d14c47c20 Fix TOCTTOU and avoid to read existing unreadable file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 11:00:10 +00:00
kazu
dff3d5dc69 Fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 11:00:08 +00:00
nobu
9560d2e0fb test/irb/test_workspace.rb: fix SCRIPT_LINES__
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-11-24 05:46:55 +00:00
k0kubun
106c9883e1 irb.rb: show source around binding.irb on start
[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-11-24 03:53:27 +00:00