eregon
d4c84d175e
make FileUtils tests safe when interrupting in setup
...
* test/fileutils/test_fileutils.rb (TestFileUtils#teardown):
do not assume cwd is TMPROOT and never remove current directory.
[ruby-core:47224][Bug #6884 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 11:32:18 +00:00
ayumin
d570a76cba
* test/fileutils/test_fileutils.rb: add test for FileUtils#uptodate?
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-16 08:15:08 +00:00
nobu
298258891d
use assert_equal, assert_match, and so on.
...
* 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-05-07 01:23:07 +00:00
akr
52af87a5a7
add an assertion.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 14:45:31 +00:00
akr
7d89ecdc52
* lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod to
...
update meta data of symlinks.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30 14:37:54 +00:00
tenderlove
ace46301d8
* lib/fileutils.rb: refactored FileUtil methods to use the
...
`define_command` API. Patch from 7rans <transfire@gmail.com>
* test/fileutils/test_dryrun.rb: corresponding test refactoring
* test/fileutils/test_nowrite.rb: ditto
* test/fileutils/test_verbose.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17 17:59:47 +00:00
ngoto
8b8c7fd386
* test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solaris
...
seems to behave the same as FreeBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-24 16:41:12 +00:00
naruse
d7138d72db
* test/fileutils/test_fileutils.rb: add OpenBSD case.
...
patched by Jeremy Evans [ruby-core:38530] see #5097
* test/ruby/test_process.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-27 15:30:11 +00:00
naruse
4de27b35b5
NetBSD also denies to set sticky bit against regular file.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-29 17:01:27 +00:00
kosaki
50522eb351
* test/fileutils/test_fileutils.rb (TestFileUtils#test_chmod_symbol_mode):
...
Skip sticky bit test if the platform is FreeBSD. It doesn't allow to
change sticky bit if a target is regular file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-03 11:31:20 +00:00
kosaki
0a1e7d1568
* lib/fileutils.rb (FileUtils#chmod): accept symbolic mode argument.
...
The patch was written by takkanm. [ruby-core:26029][Feature #2190 ]
* lib/fileutils.rb (FileUtils#fu_mode): new helper function.
* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): ditto.
* lib/fileutils.rb (FileUtils#mode_mask): ditto.
* lib/fileutils.rb (FileUtils#user_mask): ditto.
* test/fileutils/test_fileutils.rb (TestFileUtils#test_chmod_symbol_mode):
new test for the above symbolic mode.
* test/fileutils/test_fileutils.rb (TestFileUtils#test_chmod_R): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-01 16:16:05 +00:00
nobu
c7837ed8d3
* lib/fileutils.rb (FileUtils::Entry_#copy_file): updated FileUtils.cp
...
to still copy file permissions when :preserve is false (as cp does
this even when -p isn't set).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-17 23:48:13 +00:00
nobu
58195557b2
* test/fileutils/fileasserts.rb (FileAssertions): separate module.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-06 03:13:08 +00:00
nobu
dd9341f02b
* lib/test/unit/assertions.rb (assert_block): move from
...
test/fileutils/fileasserts.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-05 12:22:27 +00:00
nobu
790f43a374
* test/fileutils/fileasserts.rb (assert_block): pass arguments
...
as-is. [ruby-dev:43174]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-05 11:40:43 +00:00
nobu
780678dafb
* lib/fileutils.rb (FileUtils::LowMethods): make low level methods
...
in NoWrite and DryRun to do nothing. [ruby-dev:43129]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-04 18:37:52 +00:00
nobu
ab53367bc7
* test/fileutils/fileasserts.rb: add message arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-04 18:35:07 +00:00
nobu
f38aad8d87
* test/fileutils/fileasserts.rb (Test::Unit::Assertions#assert_block):
...
show the given message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-04 18:34:12 +00:00
nobu
878384483d
* lib/fileutils.rb (FileUtils::Entry_#copy): check file name
...
spearator boundary. [ruby-core:31360]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-20 03:27:59 +00:00
nobu
16c40ec1a5
* test/fileutils/test_fileutils.rb (test_copy_stream):
...
IO.copy_stream support binmode only currently.
[ruby-core:23724]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04 09:38:21 +00:00
naruse
d065e56c71
Follow reverting wrong commit; see r11156, r27400.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-29 12:56:41 +00:00
akr
a967f738c8
* lib/matrix.rb: suppress warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 22:08:29 +00:00
naruse
315cab1249
Explicitly use FileUtils.rm_f. [ruby-dev:39345]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-14 03:19:51 +00:00
nobu
f2b68df43e
* test/fileutils/test_fileutils.rb: fixed indent by splitting methods.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18 02:20:39 +00:00
kazu
263abf2963
* test/fileutils/test_fileutils.rb: add a test for [ruby-dev:39345]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-17 22:08:32 +00:00
naruse
f20d759cd0
* test/fileutils: use require_relative to require fileasserts.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-11 09:53:50 +00:00
nobu
ee647e1b96
* lib/fileutils.rb (FileUtils::Entry_#copy_file): open the source
...
file first to ensure it can be copied. [ruby-core:25498]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09 13:02:04 +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
yugui
a8c3540b32
* dln.c: Ruby no longer supports Windows CE.
...
* eval.c: ditto.
* include/ruby/defines.h: ditto.
* include/ruby/win32.h: ditto.
* ruby.c: ditto.
* strftime.c: ditto.
* win32/Makefile.sub: ditto.
* win32/win32.c: ditto.
* ext/tk/extconf.rb: ditto.
* lib/fileutils.rb: ditto.
* test/fileutils/test_fileutils.rb: ditto.
* wince/*: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:48:20 +00:00
yugui
8dd118c0db
* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
...
* 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 13:25:12 +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
ryan
8e05c69aa1
Added changes needed for miniunit. usually from using internal calls that aren't needed anymore.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23 21:39:21 +00:00
nobu
6c2108e2ac
* io.c (copy_stream_fallback_body): use read method unless readpartial
...
is available. [ruby-dev:36124]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 09:37:55 +00:00
akr
a5c4480732
* test/fileutils/fileasserts.rb (assert_equal_timestamp): new assert
...
to test tv_sec only for filestamp resolution portability.
(assert_same_entry): use assert_same_entry for mtime comparison.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-21 07:40:36 +00:00
akr
44b6b031ba
previous change refined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 16:19:12 +00:00
akr
b4a0020707
* test/fileutils/fileasserts.rb (assert_equal_time): show nsec if
...
assertion fails but time.to_s equals.
(assert_same_entry): use assert_equal_time.
* test/fileutils/test_fileutils.rb (test_install): use
assert_equal_time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-19 15:57:52 +00:00
akr
68543f3092
use ML ref. for assertion message.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18 07:18:56 +00:00
ko1
a8d47615da
* test/fileutils/test_fileutils.rb (check_singleton): fix to use
...
symbole instead of string.
* test/io/nonblock/test_flush.rb: enable tests.
* test/xmlrpc/test_webrick_server.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-14 16:53:00 +00:00
aamine
a33aa9c9f4
* lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose, DryRun. [ruby-core:05954]
...
* test/fileutils/test_nowrite.rb: test it.
* test/fileutils/test_dryrun.rb: new file.
* test/fileutils/test_verbose.rb: new file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-23 23:30:09 +00:00
aamine
b7083f661d
* lib/fileutils.rb: use module_function instead of single extend.
...
* test/fileutils/test_fileutils.rb: test existence of singleton methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18 20:59:29 +00:00
aamine
98855e4a27
* lib/fileutils.rb (remove_entry_secure): add documentation.
...
* lib/fileutils.rb (remove_entry_secure): should not invoke unlink(2) against a directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-26 11:33:16 +00:00
aamine
55ec2ad163
* lib/fileutils.rb (rm_r): use lchown(2), not chown(2). [ruby-dev:26226]
...
* lib/fileutils.rb (cd): remove :noop option. (FEATURE CHANGE)
* lib/fileutils.rb (cp_r): should copy symlink as symlink, for also tree root. (FEATURE CHANGE)
* lib/fileutils.rb (cp_r): new option :dereference_root.
* lib/fileutils.rb: new method remove_entry.
* lib/fileutils.rb: new method remove_entry_secure.
* lib/fileutils.rb: add documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-25 22:41:32 +00:00
aamine
af759b81a1
* lib/fileutils.rb (remove_file): ignore exceptions caused by chmod.
...
* lib/fileutils.rb (remove_dir): try to get rights to rmdir. [ruby-Bugs:1502]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-14 10:00:52 +00:00
aamine
ad5830c4d0
* test/fileutils/test_fileutils.rb (setup): support BSD style directory group inheritance (again).
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-26 15:13:03 +00:00
aamine
2d042f539b
* test/fileutils/test_fileutils.rb: remove junk print statement.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-26 15:05:42 +00:00
aamine
19b9567c84
* test/fileutils/test_fileutils.rb (setup): support BSD style directory group inheritance. [ruby-dev:25440]
...
* test/fileutils/fileasserts.rb (assert_same_entry): show entry difference.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-26 15:03:37 +00:00
aamine
b2625d914e
* test/fileutils/test_fileutils.rb (test_copy_entry): copy_entry copies only file type, not mtime. [ruby-dev:25383]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-08 18:23:24 +00:00
aamine
0a4a9dbaea
* lib/fileutils.rb (copy_stream): use read/write instead of sysread/syswrite, which allows duck typing. [ruby-dev:25369]
...
* lib/fileutils.rb (copy_stream): does NOT support nonblocking IO. [ruby-dev:25370]
* test/fileutils/test_fileutils.rb: test copy_entry, copy_file, copy_stream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-01 07:22:04 +00:00
aamine
3cf02cc03e
* test/fileutils/test_fileutils.rb (cp_r): tested wrong file name. [ruby-dev:25339]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-27 06:29:34 +00:00
aamine
95a5b4e9a4
* lib/fileutils.rb: (In previous commit) new method chown.
...
* lib/fileutils.rb: (In previous commit) new method chown_R.
* lib/fileutils.rb: (In previous commit) new method chmod_R wrongly added. Removed now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-04 12:29:55 +00:00