From 3bed6e74a15a8d1688fa2fdb5e27a954d8d1011d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 22 Sep 2026 19:45:55 +0900 Subject: [PATCH] Test file moves and verify the `move` alias Check the result and effects of `mv` and verify the `move` alias. Fix #187 --- test/fileutils/test_fileutils.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 27511c2..d6ec3aa 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -582,6 +582,11 @@ def test_cp_lr def test_mv check_singleton :mv + File.write('tmp/source', "contents\n") + assert_equal(0, FileUtils.mv('tmp/source', 'tmp/destination')) + assert_file_not_exist('tmp/source') + assert_equal("contents\n", File.read('tmp/destination')) + mkdir 'tmp/dest' TARGETS.each do |fname| cp fname, 'tmp/mvsrc' @@ -1989,6 +1994,7 @@ def test_mkpath def test_move check_singleton :move + assert_equal(FileUtils.method(:mv), FileUtils.method(:move)) end def test_rm_rf