summaryrefslogtreecommitdiff
path: root/test/ruby/test_file_exhaustive.rb
AgeCommit message (Collapse)Author
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-08-28test: File.symlink needs administrator privilegenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-13* test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.akr
* test/ruby/test_io.rb: Ditto. * test/ruby/test_file_exhaustive.rb: Use File.mkfifo. * test/ruby/test_process.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: assert_predicatenobu
* test/ruby/test_file_exhaustive.rb: use assert_predicate and assert_not_predicate for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12Consider more block devices.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: NTFSnobu
* test/ruby/test_file_exhaustive.rb (NTFS): flag for test of NTFS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: POSIX-like testsnobu
* test/ruby/test_file_exhaustive.rb: define POSIX-like filesystem depenedent tests only on POSIX-like systems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: POSIXnobu
* test/ruby/test_file_exhaustive.rb (POSIX): flag for test of POSIX-like filesystems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12test_file_exhaustive.rb: skip when rootnobu
* test/ruby/test_file_exhaustive.rb (test_owned_p): skipt when running as super user. * test/ruby/test_file_exhaustive.rb (test_stat_owned_p): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* test/ruby/test_file_exhaustive.rb: Test a block device on GNU/Linux.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* test/ruby/test_file_exhaustive.rb: Test a file not owned.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* test/ruby/test_file_exhaustive.rb: Windows doesn't support Unix fileusa
modes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* test/ruby/test_file_exhaustive.rb: Test suid, sgid and sticky file.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* test/ruby/test_file_exhaustive.rbusa
(TestFileExhaustive#test_stat_socket_p): r50226 accidentally missed the guard for non-unix environments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11simplified.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11refactored to make code consistent around sleep.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11reorder invocations in test_stat_init.akr
This doesn't change actual behavior because hardlinkfile invokes regular_file. This change make it more explicit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* test/ruby/test_file_exhaustive.rb: Create sample files lazily.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-11* test/ruby/test_file_exhaustive.rb: Test character device usingakr
/dev/null. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10Use more shorter filenames to avoid sockaddr_un size limitation.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10Use shorter filenames to avoid sockaddr_un size limitation.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10* test/ruby/test_file_exhaustive.rb: Test socket.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10* test/ruby/test_file_exhaustive.rb: Test anonymous pipe.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-10* test/ruby/test_file_exhaustive.rb: Test named pipe.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20file.c: fix handle leaknobu
* file.c (rb_file_identical_p): fix handle leak, ensure to close the handle of the first argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20test_file_exhaustive.rb: tests for File.identical?nobu
* test/ruby/test_file_exhaustive.rb (test_path_identical_p): rename and add other tests for File.identical? method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-20test_file_exhaustive.rb: remove useless assignmentnobu
* test/ruby/test_file_exhaustive.rb (make_tmp_filename): not assign to instance variable, @hardlinkfile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-18win32/file.c: fix drive letternobu
* win32/file.c (rb_file_expand_path_internal): neither the drive of base directory nor the current drive are involved in the result if different than the drive of path. [ruby-core:68130] [Bug #10858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17win32/file.c: fix drive letternobu
* win32/file.c (rb_file_expand_path_internal): do not make invalid (or ADS) path if the path has a drive letter, the result also should have be under it. [ruby-core:68130] [Bug #10858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25file.c: drop ignored charsnobu
* file.c (rb_file_expand_path_internal): drop characters ignored by filesystem on Mac OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-15* ext/objspace/objspace.c: ObjectSpace.memsize_of(obj) returnsko1
with sizeof(RVALUE). [Bug #8984] * gc.c (obj_memsize_of): ditto. * NEWS: add a NEWS entry. * test/objspace/test_objspace.rb: catch up this fix. * test/ruby/test_file_exhaustive.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48846 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-06-15test_file_exhaustive.rb: fix expected valuenobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_memsize): correct expected value, count terminator byte. [Bug #9934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-15test_file_exhaustive.rb: fix assertionnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_memsize): wrong expected value, considering a prefix (drive letter or UNC) on DOSISH platforms. [Bug #9934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-13add more test coverage for [ruby-core:63136] [Bug #9934]tmm1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-12file.c: shrink expanded pathnobu
* file.c (expand_path): shrink expanded path which no longer needs rooms to append. [ruby-core:63114] [Bug #9934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13test/ruby: better assertionsnobu
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26file.c: fix buffer overflownobu
* file.c (rb_readlink): fix buffer overflow on a long symlink. since rb_str_modify_expand() expands from its length but not its capacity, need to set the length properly for each expansion. [ruby-core:58592] [Bug #9157] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-17file.c: fix memory leaknobu
* win32/file.c (rb_file_expand_path_internal): fix memory leaks at a non-absolute home exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30skip if ENV['USER'] is nilnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28add assert_not_empty ENV['USER']naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25* file.c (rb_file_expand_path_internal): fix r42160; skip '~'.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-24file.c: exception message encodingnobu
* file.c (rb_file_expand_path_internal): preserve the file name encoding in an exception message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42150 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-03-13test_file_exhaustive.rb: fix abolute rootnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_home_dir_string): fix abolute root path for dosish platforms. [ruby-core:53354] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-11test_file_exhaustive.rb: others homenobu
* test/ruby/test_file_exhaustive.rb (test_expand_path_home_dir_string): add assertions for other user's home directory path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-10* test/ruby/test_file_exhaustive.rb (test_expand_path_home_dir_string):nobu
enable generic test on all platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-10Expand home directory when used in dir_stringluislavena
* win32/file.c (rb_file_expand_path_internal): Expand home directory when used as second parameter (dir_string). [ruby-core:53168] [Bug #8034] * test/ruby/test_file_exhaustive.rb: add test to verify. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-17Skip path expansion for all wildcard charactersluislavena
* win32/file.c (replace_to_long_name): skip expansion for all wildcard characters. [ruby-core:49451] [Bug #7374] * test/ruby/test_file_exhaustive.rb: add more assertions to test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16skip long name conversion if last character is a wildcard oneluislavena
* win32/file.c (replace_to_long_name): skip automatic path expansion when wildcard character is used. [ruby-core:49451] [Bug #7374] * test/ruby/test_file_exhaustive.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e