summaryrefslogtreecommitdiff
path: root/test/fileutils/test_fileutils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/fileutils/test_fileutils.rb')
-rw-r--r--test/fileutils/test_fileutils.rb22
1 files changed, 14 insertions, 8 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index c531af1569..f2600005f5 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -233,7 +233,7 @@ class TestFileUtils < Test::Unit::TestCase
def test_assert_output_lines
assert_raise(MiniTest::Assertion) {
- Timeout.timeout(0.1) {
+ Timeout.timeout(0.5) {
assert_output_lines([]) {
Thread.current.report_on_exception = false
raise "ok"
@@ -834,13 +834,15 @@ class TestFileUtils < Test::Unit::TestCase
check_singleton :ln_s
TARGETS.each do |fname|
- fname = "../#{fname}"
- lnfname = 'tmp/lnsdest'
- ln_s fname, lnfname
- assert FileTest.symlink?(lnfname), 'not symlink'
- assert_equal fname, File.readlink(lnfname)
- ensure
- rm_f lnfname
+ begin
+ fname = "../#{fname}"
+ lnfname = 'tmp/lnsdest'
+ ln_s fname, lnfname
+ assert FileTest.symlink?(lnfname), 'not symlink'
+ assert_equal fname, File.readlink(lnfname)
+ ensure
+ rm_f lnfname
+ end
end
end if have_symlink? and !no_broken_symlink?
@@ -1613,6 +1615,10 @@ class TestFileUtils < Test::Unit::TestCase
check_singleton :cd
end
+ def test_cd_result
+ assert_equal 42, cd('.') { 42 }
+ end
+
def test_chdir
check_singleton :chdir
end