aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_file_exhaustive.rb
Commit message (Collapse)AuthorAgeFilesLines
* Should return "." for File.extname("file.") also on WindowsNAKAMURA Usaku2019-12-221-3/+3
| | | | | But not changes another cases, such as "file.rb." [Bug #15267]
* test/ruby/test_file_exhaustive.rb: shorten the name of temporary dirYusuke Endoh2019-12-071-1/+1
| | | | | | | | | ``` 1) Error: TestFileExhaustive#test_socket_p: ArgumentError: too long unix socket path (109bytes given but 108bytes max) /export/home/users/chkbuild/cb-sunc/tmp/build/20191207T024036Z/ruby/test/ruby/test_file_exhaustive.rb:155:in `initialize' ```
* Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans2019-11-181-44/+0
| | | | | | This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby.
* Fixed File.extname at a name ending with a dotNobuyoshi Nakada2019-10-171-4/+6
| | | | | File.extname now returns a dot string at a name ending with a dot. [Bug #15267]
* test/ruby/test_file_exhaustive.rb: check the owner of the root directoryYusuke Endoh2019-10-101-1/+1
| | | | | The root directory may be owned by the current user, for example, in chroot environment.
* Make test-all and test-spec runnable on AndroidYusuke Endoh2019-09-091-0/+1
| | | | | | Calling some syscall functions such as Dir.chroot causes SIGSYS instead of EPERM on Android. This change skips all tests that stops the test-suite run.
* test/ruby/test_file_exhaustive.rb: suppress method-redefined warningYusuke Endoh2019-07-311-0/+1
|
* Do not always taint the result of File#pathJeremy Evans2019-07-301-0/+17
| | | | | | | | | | | | | | | | | | The result should only be tainted if the path given to the method was tainted. The code to always taint the result was added in a4934a42cbb84b6679912226581c71b435671f55 (svn revision 4892) in 2003 by matz. However, the change wasn't mentioned in the commit message, and it may have been committed by accident. Skip part of a readline test that uses Reline. Reline in general would pass the test, but Reline's test mode doesn't raise a SecurityError if passing a tainted prompt and $SAFE >= 1. This was hidden earlier because File#path was always returning a tainted string. Fixes [Bug #14485]
* Revert "Do not always taint the result of File#path"Jeremy Evans2019-07-291-16/+0
| | | | | | This reverts commit 1a759bfe5d554c22571d2e6e4e5998cf06a7b98f. This fails on some operating systems.
* Do not always taint the result of File#pathJeremy Evans2019-07-291-0/+16
| | | | | | | | | | | | | | | | | | The result should only be tainted if the path given to the method was tainted. The code to always taint the result was added in a4934a42cbb84b6679912226581c71b435671f55 (svn revision 4892) in 2003 by matz. However, the change wasn't mentioned in the commit message, and it may have been committed by accident. Skip part of a readline test that uses Reline. Reline in general would pass the test, but Reline's test mode doesn't raise a SecurityError if passing a tainted prompt and $SAFE >= 1. This was hidden earlier because File#path was always returning a tainted string. Fixes [Bug #14485]
* The behavior of statx(2) depends on the filesystemNobuyoshi Nakada2019-07-021-1/+1
| | | | | birthtime may not be supported on some filesystems, and NotImplementedError can be raised. [Bug #15972]
* Removed unused variablesNobuyoshi Nakada2019-06-301-1/+0
|
* Skip EPERM, when statx(2) is wholely blockednobu2019-02-221-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Skip EPERM, like as r67102nobu2019-02-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* STATX_BTIME depends on filesystemsnobu2019-02-221-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support File#birthtime on Linuxnobu2019-02-221-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Already nlink is properly set on Windowsnobu2018-12-171-5/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Split test_expand_path, test_basename, test_dirnamenobu2018-12-171-9/+36
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Document File.{setuid?,setgid?,sticky?} support for IO objects [Bug #13972]aycabta2018-10-201-3/+20
| | | | | | | | | | | * file.c (rb_file_setuid_p): rdoc for IO object support (rb_file_sgid_p): ditto (rb_file_sticky_p): ditto * NEWS: inform users of new feature * test/file/test_file_exhaustive.rb (io_open): wrapper for bare IO object (test_suid): test for bare IO support (test_sgid): ditto (test_sticky): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/file.c: relative path with drive letternobu2018-03-281-0/+2
| | | | | | | | * win32/file.c (IS_ABSOLUTE_PATH_P): home directory should not be a relative path regardless a drive letter. PathIsRelativeW returns FALSE on such path. [ruby-core:86356] [Bug #14638] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: get rid of failuresnobu2017-12-081-3/+0
| | | | | | | | * test/ruby/test_file_exhaustive.rb (test_utime_symlinkfile): under some condition, symlink file is also affected by utimes() on Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: test_utime_symlinkfilenobu2017-12-081-0/+1
| | | | | | | | * test_file_exhaustive.rb (test_utime_symlinkfile): investigate failures on some platforms. wait a second to tell if symlink atime is changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: fix arguments ordernobu2017-12-081-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: File.lutimenobu2017-11-291-0/+30
| | | | | | * file.c (utime_internal): add File.lutime. [Feature #4052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* added workaround for APFS file format.hsbt2017-09-141-1/+10
| | | | | | | | | | | * TestFileExhaustive#test_atime: It fails with nano-sec precise. I changed to use unixtime for this assertion for APFS. * TestFileExhaustive#test_expand_path: skip assertion when given invalid charactor on APFS. [Bug #13816][ruby-core:82383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: check case-sensitive fsnobu2017-04-221-2/+4
| | | | | | | | * test/ruby/test_file_exhaustive.rb (test_expand_path): dump expanded file name, not only appended char, for case-sensitive filesystem. [ruby-dev:50093] [Bug #13489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: join with /nobu2017-03-131-0/+13
| | | | | | | * file.c (rb_file_join): join using "/" always, not a constant. and fix the document. [ruby-core:79579] [Bug #13223] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: cygwin behaviornobu2016-12-071-1/+17
| | | | | | | * file.c: recent cygwin hides NTFS specific features. [ruby-core:78497] [Bug #13008] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* EPERM by symlinknobu2016-12-061-1/+1
| | | | | | | * test/ruby/test_file_exhaustive.rb (symlinkfile): EPERM can raise on cygwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: home directory from systemnobu2016-11-261-1/+0
| | | | | | | * file.c (rb_default_home_dir): resolve home directory from the system database when HOME is not set. [Feature #12695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Normalization test iff UTF-8 file systemnobu2016-06-191-2/+1
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_expand_path_compose): normalization is meaningless unless file system encoding is UTF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* File.expand_path compose test only on OS Xnobu2016-06-121-12/+15
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_expand_path_compose): valid only on OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: normalize cwdnobu2016-06-121-0/+18
| | | | | | | | * file.c (append_fspath): normalize directory name to be appended on OS X. [ruby-core:75957] [Ruby trunk Bug#12483] https://github.com/rails/rails/issues/25303#issuecomment-224834804 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: writable opennobu2016-05-301-1/+1
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_flock_shared): open in writable mode for exclusive lock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: blocking flocknobu2016-05-281-7/+51
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_flock): add assertions for the blocking cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-05-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_file_exhaustive.rb: test UTF-8 filename. see [Bug #12340]usa2016-05-021-88/+217
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a test message.akr2016-05-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: File.empty?nobu2016-04-131-0/+7
| | | | | | | * file.c (Init_File): add alias File.empty? to File.zero?. [Feature #9969] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: strict check test_dirnamenobu2016-03-181-1/+1
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_dirname): assert same as the parent directory, not ascendant directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby: suppress runtime warningsnobu2016-02-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* r53688 testnobu2016-01-311-0/+9
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_realpath_mount_point): test for r53688. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test for File#lstat.nobu2016-01-311-0/+10
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_lstat): Add lacking test for File#lstat. [Fix GH-1231] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* r53689 testnobu2016-01-291-0/+9
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_readlink_junction): test for r53689. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | 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
* test: File.symlink needs administrator privilegenobu2015-08-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.akr2015-04-131-1/+1
| | | | | | | | | | | | * 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
* test_file_exhaustive.rb: assert_predicatenobu2015-04-121-56/+55
| | | | | | | * 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
* Consider more block devices.akr2015-04-121-5/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: NTFSnobu2015-04-121-5/+7
| | | | | | * 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