summaryrefslogtreecommitdiff
path: root/test/ruby/test_env.rb
AgeCommit message (Collapse)Author
2016-01-17Add a test case for ENV#select_bang,keep_ifnobu
* test/ruby/test_env.rb: [Fix GH-1201] * Extract test code for ENV#keep_if from ENV#select_bang * Add a test case for ENV#select_bang,keep_if git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-17Add a test case for ENV#reject_bang,delete_ifnobu
* test/ruby/test_env.rb: [Fix GH-1201] * Extract test code for ENV#delete_if from ENV#reject_bang * Add a test case for ENV#reject_bang,delete_if git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53559 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
2015-12-06test_env.rb: escapenobu
* test/ruby/test_env.rb (TestEnv#test_utf8): escape non-ASCII string with \u explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05hash.c: env encoding fallback on Windowsnobu
* hash.c (env_str_new, env_path_str_new): make default string UTF-8 for the case conversion is not possible. [Bug #8822] * hash.c (get_env_cstr): convert non-ASCII string to UTF-8 string. * hash.c (ruby_setenv): use wide char version to put environment variable to deal with non-ASCII value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-27test/unit/assertions.rb: all_assertionsnobu
* test/lib/test/unit/assertions.rb (all_assertions): try all assertions and check if all passed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18* include/ruby/ruby.h: $SAFE=2 is now obsolete.hsbt
* dir.c, ext/fiddle/handle.c, ext/socket/basicsocket.c, file.c gc.c, io.c, process.c, safe.c, signal.c, win32/file.c: removed code for $SAFE=2 * test/erb/test_erb.rb, test/fiddle/test_handle.rb test/ruby/test_env.rb: removed tests for $SAFE=2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-19hash.c: check env vars encodingnobu
* hash.c (get_env_cstr): environment variables must be ASCII compatible, as dummy encodings and wide char encodings are unsupproted now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50344 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-07-15test/ruby/test_env.rb: test memory leaks only on Windowsnobu
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}): test for Windows platform specific code. (test_memory_crash_select): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28test_env.rb: relax limitsnobu
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}): increase rehearsals and memory leak limits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27test_env.rb: rehearsalnobu
* test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}): have a rehearsal before the main loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26hash.c: fix memory leaknobu
* hash.c (env_shift): fix memory leak on Windows, free environment strings block always. [ruby-dev:48332] [Bug #9983] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25hash.c: fix memory leaknobu
* hash.c (env_select): fix memory leak and crash on Windows, make keys array first instead of iterating on envrion directly. [ruby-dev:48325] [Bug #9978] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25hash.c: fix memory leaknobu
* hash.c (ruby_setenv): fix memory leak on Windows, free environment strings block after check for the size. [ruby-dev:48323] [Bug #9977] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-25hash.c: prohibit tainted stringsnobu
* hash.c (env_aset, env_has_key, env_assoc, env_has_value), (env_rassoc, env_key): prohibit tainted strings if $SAFE is non-zero. [Bug #9976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-24hash.c: frozen PATH envnobu
* hash.c (env_path_str_new): make PATH environment variable string, to be frozen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-17hash.c: key name in error messagenobu
* hash.c (env_fetch): Add key name to message on ENV.fetch KeyError, as well as Hash#fetch. [ruby-core:56062] [Feature #8649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21test_env.rb: fix testnobu
* test/ruby/test_env.rb (test_win32_blocksize): fix remained size, and delete added envvars. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
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-04-09test_{env,hash}.rb: descriptive assertionsnobu
* test/ruby/test_{env,hash}.rb: use descriptive assertions than plain assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07use assert_equal, assert_match, and so on.nobu
* test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on. * test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb, test/ruby/test_io_m17n.rb (assert_str_equal): ditto. * test/rubygems/test_gem_remote_fetcher.rb (assert_data_from_{server,proxy}): ditto. * test/test_pstore.rb (test_thread_safe): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24* hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.nobu
[Feature #6276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-29try and catch for the test of setenv(3).naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-19* hash.c (ruby_setenv): calculate total env block size for win32.arton
* test/ruby/test_env.rb: add test for above patch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-30* win32/win32.c (rb_w32_getenv): should return NULL if specified nameusa
is empty. a patch from Heesob Park at [ruby-core:32650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-11* hash.c (ruby_setenv): raise if putenv and SetEnvironmentVariablenobu
failed, because of the restriction of the size on Windows. based on a patch from Peter Weldon at [ruby-core:32304]. fix: Bug#3812, [ruby-core:32250] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-09* test/ruby/test_env.rb (test_aset): OpenBSD acts like NetBSD innaruse
that it ignores characters after = in ENV. patched by Jeremy Evans [ruby-core:32184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-06 * test/ruby/test_env.rb (class TestEnv): fix typo.tarui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19Fix test to follow NetBSD's setenv(3).naruse
On NetBSD, setenv("FOO=bar", "buzz") is interpreted that environ is "FOO=buzz". This is from API change in POSIX.1-2001. http://togetter.com/li/22380 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-03* test/ruby/test_env.rb (TestEnv#test_select_bang): add tests.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-22* test/ruby/test_array.rb: add a test for Array#rotate, rotate!.mame
* test/ruby/test_dir.rb, test/ruby/test_fnmatch.rb: add some tests (for coverage of dir.c). * test/ruby/test_enum.rb: add a test for Enumerable#minmax. * test/ruby/test_enumerator.rb: add some tests for Enumerator#inspect, Enumerator::Generator and Yielder. * test/ruby/test_env.rb: add a test for ENV#index. * test/ruby/test_exception.rb: add some tests (for coverage of error.c). * test/ruby/test_hash.rb: add a test for recursive check. * test/ruby/test_integer.rb: add a test for number of argument of Integer. * test/ruby/test_method.rb: add a test for define_method. * test/ruby/test_module.rb: add a test for constant of included module. * test/ruby/test_proc.rb: add a test for parameters with cfunc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-11Make sure that ENV.[]= fails when an invalid variable name is given.knu
Fix this if there is an environment where a variable name containing an '=' is allowed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.yugui
* djgpp/README.djgpp: ditto. * djgpp/config.hin: ditto. * djgpp/config.sed: ditto. * djgpp/configure.bat: ditto. * djgpp/mkver.sed: ditto. * ext/Setup.dj: ditto. * dln.c: removed djgpp supports. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * signal.c: ditto. * util.c: ditto. * vm_core.h: ditto. * lib/fileutils.rb: ditto. * lib/mkmf.rb: ditto. * ext/socket/socket.c: ditto. * test/fileutils/test_fileutils.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* x68/_dtos18.c: removed. Ruby no longer supports human68k.yugui
* x68/_round.c: ditto. * x68/fconvert.c: ditto. * x68/select.c: ditto. * ext/Setup.x68: ditto. * missing/x68.c: ditto. * dln.c (dln_find_exe_r): removed human68k supports. (dln_find_1): ditto. * lib/mkmf.rb: ditto. * ext/extmk.rb (Init_ext): ditto. * ext/socket/socket.c (init_sock): ditto. * gc.c (GC_MALLOC_LIMIT): ditto. (rb_setjmp, rb_jmpbuf): ditto. (mark_current_machine_context): ditto. * include/ruby/defines.h (PATH_ENV): ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. * LEGAL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* test: assert_raises has been deprecated since a long time ago.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-22* test/ruby/test_env.rb (TestEnv#test_aset): test updated.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-13* test/ruby/test_io_m17n.rb: remove a duplicative method.mame
* test/ruby/test_utf16.rb: rename a conflicting method name. * test/ruby/test_array.rb: ditto. * test/ruby/test_file_exhaustive.rb: ditto. * test/ruby/test_hash.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_fixnum.rb: ditto. * test/ruby/test_rational.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05* test/ruby/test_hash.rb: add tests to achieve over 90% test coveragemame
of hash.c. * test/ruby/test_env.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-14* test/ruby/test_env.rb (setup, teardown): do not depend on the behavior ↵nobu
setting nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-06* test/ruby/test_env.rb (test_key): should test ENV.key instead ofocean
ENV.index. [ruby-dev:25994] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-18 * test/*: should not depend on $KCODE.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-03* io.c (argf_read): should not terminate on empty string; waitmatz
until real EOF. [ruby-dev:21969] * io.c (argf_read): should adjust length to read, when length is specified and read spans command line argument files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-28* test/ruby/test_env.rb (test_has_value, test_index): condition fornobu
aboves. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-28* test/ruby/test_env.rb: add tests for ENV.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e