naruse
3e92b635fb
Add frozen_string_literal: false for all files
...
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
2015-12-16 05:07:31 +00:00
akr
5fdf367348
* test/readline/test_readline.rb: Restore environment variables:
...
COLUMNS LINES
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13 03:29:43 +00:00
nobu
095886b572
readline.c: initialize before rl_refresh_line
...
* ext/readline/readline.c (readline_s_refresh_line): initialize
before rl_refresh_line(), as some function make the internal
state non-clean but rl_refresh_line() does not re-initialize it.
[ruby-core:43957] [Bug #6232 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14 06:43:50 +00:00
akr
fb2008a73a
* test/lib/envutil.rb: Moved from test/ruby/.
...
* 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-11-13 16:05:37 +00:00
akr
1a956cea38
test/readline/test_readline.rb: Close fds.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29 14:47:28 +00:00
akr
e2ec76056a
* test/readline/test_readline.rb (teardown): Clear Readline.input and
...
Readline.output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 14:26:41 +00:00
kouji
19efdcee1e
* ext/readline/readline.c, test/readline/test_readline.rb: fix
...
indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 13:07:25 +00:00
nobu
814b7b5448
* remove trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 12:56:12 +00:00
kouji
a78713ce45
* ext/readline/readline.c (readline_s_set_point, Init_readline):
...
add Readline.point=(pos). Patched by naruse. [ruby-dev:47535]
[Feature #8675 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-06 12:52:22 +00:00
naruse
182cf90d30
fix test of r42101 [Feature #6626 ]
...
rl_delete_text removes characters in line_buffer, but it doesn't move rl_point.
Therefore it may cause invalid rl_point.
On following case, test_input_metachar causes test_insert_text failure.
(test_input_metachar_multibyte) is skipped because of locale)
http://c5664.rubyci.org/~chkbuild/ruby-trunk/log/20130723T133302Z.log.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 18:00:26 +00:00
naruse
7bbe99cb74
fix typo
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 16:20:03 +00:00
naruse
1a61e05d01
it may stuck with console on readline 5.1 + CentOS 5
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-23 16:17:58 +00:00
kouji
56af74277c
* ext/readline/readline.c (Init_readline): added
...
Readline.delete_text. [ruby-dev:45789] [Feature #6626 ]
* ext/readline/extconf.rb: check for rl_delete_text() in Readline library.
Thanks, Nobuyoshi Nakada, for the patch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22 00:37:10 +00:00
shugo
1f828497d1
* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentError
...
when $SAFE is set to 4. $SAFE=4 is now obsolete.
[ruby-core:55222] [Feature #8468 ]
* object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust):
Kernel#untrusted?, untrust, and trust are now deprecated.
Their behavior is same as tainted?, taint, and untaint,
respectively.
* include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED()
and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(),
respectively.
* array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c,
ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c,
ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c,
ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c,
ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c,
ext/socket/socket.c, ext/socket/udpsocket.c,
ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c,
ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c,
load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c,
safe.c, string.c, thread.c, transcode.c, variable.c,
vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for
$SAFE=4.
* test/dl/test_dl2.rb, test/erb/test_erb.rb,
test/readline/test_readline.rb,
test/readline/test_readline_history.rb, test/ruby/test_alias.rb,
test/ruby/test_array.rb, test/ruby/test_dir.rb,
test/ruby/test_encoding.rb, test/ruby/test_env.rb,
test/ruby/test_eval.rb, test/ruby/test_exception.rb,
test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb,
test/ruby/test_io.rb, test/ruby/test_method.rb,
test/ruby/test_module.rb, test/ruby/test_object.rb,
test/ruby/test_pack.rb, test/ruby/test_rand.rb,
test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb,
test/ruby/test_struct.rb, test/ruby/test_thread.rb,
test/ruby/test_time.rb: remove tests for $SAFE=4.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12 14:20:51 +00:00
akr
8f671120f1
* test/csv/test_features.rb, test/logger/test_logger.rb
...
test/mkmf/test_have_macro.rb, test/net/http/test_http.rb,
test/openssl/test_config.rb, test/psych/test_encoding.rb,
test/psych/test_exception.rb, test/psych/test_psych.rb,
test/psych/test_tainted.rb, test/readline/test_readline.rb,
test/rexml/test_contrib.rb, test/ruby/test_autoload.rb,
test/ruby/test_beginendblock.rb, test/ruby/test_exception.rb,
test/ruby/test_file.rb, test/ruby/test_io.rb,
test/ruby/test_marshal.rb, test/ruby/test_process.rb,
test/ruby/test_require.rb, test/ruby/test_rubyoptions.rb,
test/syslog/test_syslog_logger.rb, test/webrick/test_httpauth.rb,
test/zlib/test_zlib.rb: Use Tempfile.create.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-20 23:03:52 +00:00
nobu
385de15d55
test_readline.rb: try UTF-8
...
* test/readline/test_readline.rb (test_completion_encoding),
(test_input_metachar_multibyte): try to run under UTF-8 locale,
before skipping.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-17 05:20:18 +00:00
akr
052c0e67d9
* test/ruby/test_require.rb: Remove temporally files in the tests.
...
* test/ruby/test_rubyoptions.rb: Ditto.
* test/logger/test_logger.rb: Ditto.
* test/psych/test_psych.rb: Ditto.
* test/readline/test_readline.rb: Ditto.
* test/syslog/test_syslog_logger.rb: Ditto.
* test/webrick/test_httpauth.rb: Ditto.
* test/zlib/test_zlib.rb: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-24 02:06:32 +00:00
naruse
6696fd0c49
Skip on non UTF-8 locale.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19 06:30:55 +00:00
naruse
9c6ae17a66
Add test for [Bug #6262 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19 04:15:37 +00:00
naruse
2418f9cc55
Skip Readline 4.3. [Feature #5785 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19 03:05:54 +00:00
naruse
e47c4e38a8
* ext/readline/readline.c (readline_s_get_special_prefixes): suppress
...
warning: unitinialized instance variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19 02:58:43 +00:00
naruse
d998ba1c3c
* ext/readline/readline.c (readline_getc): fix editline compatibility
...
broken by r36123. [Bug #6601 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-19 02:58:40 +00:00
nobu
e2ad92a075
ext/readline/readline.c: [Bug #6601 ]
...
* ext/readline/readline.c (readline_getc): deal with ESC just followed
by ASCII as meta prefix in incremental search mode. based on the
patch from rctay (Tay Ray Chuan) at [ruby-core:45682]. [Bug #6601 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-18 01:43:00 +00:00
nobu
7690aab833
test/readline/test_readline.rb: fix argument order
...
* test/readline/test_readline.rb (TestReadline#test_pre_input_hook)
(TestReadline#test_insert_text): fix argument order. expectd value
should come first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-17 15:38:22 +00:00
kouji
7c602ea07f
* ext/readline/readline.c (Readline.special_prefixes=)
...
(Readline.special_prefixes): new function. An original patch was
created by nagachika. [Feature #5784 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-02 00:47:57 +00:00
kouji
7a4b214558
* ext/readline/readline.c (Readline.pre_input_hook)
...
(Readline.insert_text, Readline.redisplay): new function. An
original patch was created by nagachika. [Feature #5785 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-01 13:21:55 +00:00
nobu
0a68f1200b
* test/readline/test_readline.rb (setup): avoid affected by user's
...
inputrc file. [ruby-dev:45584][Bug #6357 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-27 01:58:21 +00:00
nobu
664a13b732
test/readline/test_readline.rb: suppress bell
...
* test/readline/test_readline.rb (replace_stdio, with_pipe): suppress bell.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-27 01:41:02 +00:00
naruse
8474c90eac
Don't run tests which can't run with editline.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-08 06:26:48 +00:00
nobu
cba57022b0
* test/readline/test_readline.rb (test_completion_encoding): test on more locales.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-30 05:37:28 +00:00
naruse
1971897890
Skip test if locale is not Japanese nor UTF-8.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-29 14:24:05 +00:00
nobu
f3dabacefb
* ext/readline/readline.c (readline_attempted_completion_function):
...
respect encodings. [Bug #5941 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-29 03:18:11 +00:00
nagachika
2afa0b4cca
* test/readline/test_readline.rb (test_completion_proc_empty_result):
...
ensure clearance of Readline's line_buffer after the test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-11 13:46:32 +00:00
nobu
7ef154f833
* test/readline/test_readline.rb (test_completion_proc_empty_result): rescue NoMemoryError.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-10 01:45:09 +00:00
nobu
9fa668f34a
* ext/readline/readline.c (readline_attempted_completion_function):
...
empty completion result does not mean memory error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-10 01:41:15 +00:00
nobu
1dec79c324
* ext/readline/readline.c (readline_readline): check if outstream
...
is closed to get rid of a bug of readline 6. [ruby-dev:45043]
[Bug #5803 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-24 01:56:36 +00:00
nobu
8397134330
* test/readline/test_readline.rb (test_line_buffer__point): use
...
lambda not to exit entire method by "return". or "next" for
proc. [ruby-dev:45042] [Bug #5802 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-23 21:59:54 +00:00
nobu
3a47cf3395
* remove trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15 11:55:52 +00:00
naruse
59f551635a
* ext/readline/readline.c (readline_s_get_line_buffer):
...
Readline.line_buffer should return locale string.
[ruby-dev:42184] #3791
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-06 01:38:51 +00:00
kouji
257c314fbb
* ext/readline/extconf.rb: checked rl_refresh_line in readline.
...
* ext/readline/readline.c (readline_s_refresh_line): add new
method, a patch from Koichiro Ohba. see [ruby-list:45922].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10 13:03:40 +00:00
kouji
89fd521319
* ext/readline/extconf.rb: checked rl_line_buffer and rl_point in
...
readline.
* ext/readline/readline.c (readline_s_get_line_buffer): new method.
(readline_s_get_point): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10 12:13:18 +00:00
nobu
287a34ae0d
* {ext,lib,test}/**/*.rb: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
kouji
d60cd5b379
* ext/readline/extconf.rb: checked rl_set_screen_size and
...
rl_get_screen_size.
* ext/readline/readline.c (readline_s_set_screen_size): added
Readline.set_screen_size.
* ext/readline/readline.c (readline_s_get_screen_size): added
Readline.get_screen_size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 12:21:08 +00:00
kouji
823cfeed89
* test/readline/test_readline_history.rb: check the encoding that
...
is in the Readline::HISTORY.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24 16:11:01 +00:00
kouji
bd877eb7af
* test/readline/test_readline_history.rb: did not check the
...
encoding that is in the Readline::HISTORY. I will fix it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-24 16:03:25 +00:00
kouji
1cf4744a83
* test/readline/test_readline_history.rb: checked encoding.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-21 05:49:18 +00:00
kouji
67cd02b40c
* test/readline/test_readline.rb
...
(TestReadline#test_some_characters_methods): checked encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-21 04:51:43 +00:00
kouji
8b123714e2
* ext/readline/readline.c
...
(readline_s_get_completion_append_character): uses locale
encoding but not ASCII-8BIT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-12 16:13:11 +00:00
nobu
00b4a3f9c4
* test: assert_raises has been deprecated since a long time ago.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 17:44:39 +00:00
kouji
b043284bfe
* test/readline/test_readline_history.rb
...
(Readline::TestHistory#test_each): checked return value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-22 17:13:25 +00:00