aboutsummaryrefslogtreecommitdiffstats
path: root/test/pathname
Commit message (Collapse)AuthorAgeFilesLines
* * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true".akr2015-11-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/pp.rb: Ditto. * lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/securerandom.rb: Ditto. * lib/tmpdir.rb: Ditto. * lib/unicode_normalize/tables.rb: Ditto. * test/net/ftp/test_buffered_socket.rb: Ditto. * test/net/ftp/test_mlsx_entry.rb: Ditto. * test/open-uri/test_open-uri.rb: Ditto. * test/open-uri/test_ssl.rb: Ditto. * test/pathname/test_pathname.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. * ext/pathname/lib/pathname.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Put an line before "frozen_string_literal: true" for emacs.akr2015-10-051-0/+1
| | | | | | | https://bugs.ruby-lang.org/issues/8976#note-49 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* specify frozen_string_literal: true.akr2015-10-051-12/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_pathname.rb: fix exceptionnobu2015-08-291-1/+1
| | | | | | | * test/pathname/test_pathname.rb (has_symlink): now raises ENOENT instead of TypeError when symlink is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: try File.symlink with invalid pathsnobu2015-08-291-1/+1
| | | | | | | | * test (have_symlink?): try File.symlink with invalid paths to test the administrator privilege, nil just raises an ArgumentError before trying the actual API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51719 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_pathname.rb: skip EACCESnobu2015-08-261-0/+1
| | | | | | | * test/pathname/test_pathname.rb (test_realpath): skip EACCES if changing mode of a directory may have no effect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove unnecessary enumerator requiresnormal2015-07-171-1/+0
| | | | | | | | | | * lib/rinda/tuplespace.rb: remove enumerator require * test/pathname/test_pathname.rb: ditto Related to https://bugs.ruby-lang.org/issues/10902 but not a complete fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/lib/pathname.rb (descend): Blockless form supported.akr2015-06-141-2/+10
| | | | | | | | | (ascend): Ditto. [ruby-core:68820] [Feature #11052] Patch by Piotr Szotkowski. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * 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
* pathname.rb: fix a Pathname#relative_path_from crash onnobu2014-09-151-0/+13
| | | | | | | | | | * ext/pathname/lib/pathname.rb (SAME_PATHS): Pathname#relative_path_from uses String#casecmp to compare strings on case-insensitive filesystem platforms (e.g., Windows). This can return nil for strings with different encodings, and the code previously assumed that it always returned a Fixnum. [Fix GH-713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb: added testcase for Pathname#mountpoint.hsbt2014-09-041-0/+5
| | | | | | [fix GH-709] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_birthtime): New method,akr2014-06-281-0/+8
| | | | | | | | | Pathname#birthtime. Proposed by Kazuhiro NISHIYAMA. [ruby-dev:48232] [Feature #9857] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/lib/pathname.rb (cleanpath_aggressive): make allakr2014-05-051-0/+8
| | | | | | | | | | | | separators File::SEPARATOR from File::ALT_SEPARATOR. Reported by Daniel Rikowski. Fixed by Nobuyoshi Nakada. [Bug #9618] * ext/pathname/lib/pathname.rb (cleanpath_conservative): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/lib/pathname.rb (Pathname#/): Aliased to Pathname#+.akr2014-05-051-0/+4
| | | | | | | | Suggested by Alexey Muranov. [ruby-core:61432] [Feature #9625] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix error with empty args.kazu2014-04-021-0/+2
| | | | | | | | | | * ext/pathname/lib/pathname.rb (Pathname#join): Fix error with empty args. Reported by ko1 via IRC. * test/pathname/test_pathname.rb (TestPathname#test_join): Add the test for above case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* remove unnecessary unshiftkazu2014-03-251-0/+8
| | | | | | | * ext/pathname/lib/pathname.rb (Pathname#join): remove unnecessary unshift. * test/pathname/test_pathname.rb (TestPathname#test_join): add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/lib/pathname.rb (Pathname#find): add "ignore_error"ktsj2014-03-041-0/+25
| | | | | | keyword argument defaulted to true as well as Find#find. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb: use File.exist? instead of File.exists?hsbt2014-02-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_write): New method.akr2013-04-041-0/+16
| | | | | | | | | (path_binwrite): Ditto. [ruby-core:49468] [Feature #7378] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb (test_binread): add assertion tonagachika2012-02-091-1/+3
| | | | | | check encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb: not read but binread.naruse2012-02-081-1/+1
| | | | | | patched by Benoit Daloze, [ruby-core:42440] [Bug #5984] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_enc_path_next, rb_enc_path_skip_prefix)nobu2012-01-251-6/+2
| | | | | | | | | | | | | | | (rb_enc_path_last_separator, rb_enc_path_end) (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware path handling functions. * file.c (rb_home_dir, file_expand_path, rb_realpath_internal) (rb_file_s_basename, rb_file_dirname, rb_file_s_extname) (rb_file_join): should respect the encodings of arguments than file system encoding. [ruby-dev:45145] [Bug #5919] * dir.c (check_dirname, ruby_glob0): ditto. * ext/pathname/pathname.c (path_sub_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#find): return an enumerator ifakr2011-11-191-0/+4
| | | | | | | | | | | | no block is given. * test/pathname/test_pathname.rb: add tests for above. [ruby-dev:44797] [Feature #5572] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_io.rb (test_copy_stream_socket): wait a child processakr2011-06-151-13/+19
| | | | | | | | | | | before SIGUSR1 handler is removed. * test/pathname/test_pathname.rb (define_assertion): use line number for test method names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/test/unit.rb (assert_include): add alias.nobu2011-02-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb (TestPathname#test_grpowned?): theakr2010-10-291-0/+1
| | | | | | | | | | group of the created file is inherited from the parent directory on BSDs and MacOS X. Linux also inherit the group if the setgid bit of the directory is set. It causes the test fail. fixed by Shota Fukumori. [ruby-dev:42458] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb (TestPathname#test_mkdir): fix typo.kazu2010-09-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_mkdir): Pathname#mkdir translatedakr2010-09-151-0/+2
| | | | | | | from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_s_getwd): Pathname.getwd andakr2010-09-141-0/+5
| | | | | | | Pathname.pwd translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_s_glob): Pathname.glob translatedakr2010-09-131-0/+4
| | | | | | | from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb (test_expand_path): should treat drive letter.usa2010-08-291-5/+10
| | | | | | | | | | | | * test/pathname/test_pathnamr.rb (test_grpowned?): group onwer is not suppoted on DOSISH platforms. * test/pathname/test_pathnamr.rb (test_world_readable?, test_sticky?, test_world_writable?): skip some tests on the assumptions for Unix on DOSISH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_each_line): Pathname#each_lineakr2010-08-231-0/+17
| | | | | | | translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_expand_path): Pathname#expand_pathakr2010-08-201-0/+8
| | | | | | | translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_basename): Pathname#basename translatedakr2010-08-161-0/+1
| | | | | | | from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_open): Pathname#openakr2010-08-091-1/+19
| | | | | | | translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a test name.akr2010-08-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_fnmatch): Pathname#fnmatch andakr2010-08-071-0/+2
| | | | | | | Pathname#fnmatch? translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_lchown): Pathname#lchown translatedakr2010-08-071-1/+0
| | | | | | | from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/pathname.c (path_sub_ext): don't clobber shared string.nobu2010-08-071-1/+5
| | | | | | | [ruby-core:31640] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (assert_normal_exit): use assert. fixakr2010-08-071-0/+3
| | | | | | | | | | faildesc. * test/pathname/test_pathname.rb (test_lchmod): test Pathname#lchmod using assert_normal_exit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2010-08-031-0/+602
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2010-07-281-0/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c: add optional basedir argument for realpath/realdirpath.akr2010-03-071-2/+4
| | | | | | | | | | | | | (realpath_internal): handle basedir. (rb_file_s_realpath): extract basedir from argument list. (rb_file_s_realdirpath): extract basedir from argument list. * lib/pathname.rb (realpath): pass basedir. (realdirpath): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#sub): set $~ in block.binding.akr2009-03-171-0/+9
| | | | | | | [ruby-dev:38173] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (Pathname#realdirpath): new method.akr2009-01-301-6/+41
| | | | | | | | [ruby-dev:36290] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2009-01-291-1/+45
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Back out the previous change after miniunit import.knu2008-10-021-12/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/pathname/test_pathname.rb: Fix use of deprecated methods.knu2008-09-261-12/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb (each_filename): return Enumerator if no blockmame2008-09-231-0/+1
| | | | | | | | | given. * test/pathname/test_pathname.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e