1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

19 commits

Author SHA1 Message Date
nobu
7e2269a9ce test_fileutils.rb: tests for chown
* test/fileutils/fileasserts.rb (assert_ownership_user): new
  assertion for user ownership.
* test/fileutils/test_fileutils.rb (test_chown_error),
  (test_chown_without_permission, test_chown_with_root):
  based on the patch by vajrasky (Vajrasky Kok) at
  [ruby-core:59298].  [Feature #9292]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-24 14:20:47 +00:00
nobu
e6847d1c55 test_fileutils.rb: tests for chown
* test/fileutils/fileasserts.rb (assert_ownership_group): new
  assertion for group ownership.
* test/fileutils/test_fileutils.rb (test_chown{,_verbose,_noop}):
  based on the patch by vajrasky (Vajrasky Kok) at
  [ruby-core:59281].  [Feature #9286]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-23 09:37:23 +00:00
knu
3488db9455 * test/fileutils/fileasserts.rb
(Test::Unit::FileAssertions#{assert_filemode,assert_equal_timestamp}):
  New utility assertion methods for testing file modes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09 09:03:32 +00:00
knu
f5a6a2a7e0 * test/fileutils/fileasserts.rb
(Test::Unit::FileAssertions#assert_not_symlink): Add a missing
  optional argument "message".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09 07:02:01 +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
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
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
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
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
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
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
18c0a86cc6 * lib/fileutils.rb (cp_r): copies symlink to symlink, except cp_r root.
* lib/fileutils.rb: new method FileUtils.copy_entry.
* test/fileutils/test_fileutils.rb: more cp_r tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-08 21:35:11 +00:00
aamine
2bfd5c1a3d * lib/fileutils.rb (fu_each_src_dest): raise if src==dest. [ruby-talk:85344] [ruby-core:01699]
* lib/fileutils.rb: use Object#is_a? instead of Class#=== to allow e.g. remote objects for receivers.
* lib/fileutils.rb: FileTest -> File.
* lib/fileutils.rb: put parentheses for arguments of File.xxxx?
* test/fileutils/test_fileutils.rb (test_cp): test "cp a a".
* test/fileutils/test_fileutils.rb (test_mv): test "mv a a".
* test/fileutils/test_fileutils.rb (test_ln): test "ln a a".
* test/fileutils/test_fileutils.rb (test_ln_s): test "ln_s a a".
* test/fileutils/test_fileutils.rb (test_install): test "install a a".
* test/fileutils/fileasserts.rb: new method assert_symlink.
* test/fileutils/fileasserts.rb: assert_is_directory -> assert_directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-18 05:09:20 +00:00
aamine
577fa4c6a8 * test/fileutils/fileassertions.rb: new file.
* test/fileutils/test_fileutils.rb: new file.
* test/fileutils/test_nowrite.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-17 09:52:50 +00:00