summaryrefslogtreecommitdiff
path: root/test/test_tmpdir.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tmpdir.rb')
-rw-r--r--test/test_tmpdir.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb
index c56fd5f401..7ef9f59b54 100644
--- a/test/test_tmpdir.rb
+++ b/test/test_tmpdir.rb
@@ -97,8 +97,10 @@ class TestTmpdir < Test::Unit::TestCase
target = target.chomp('/') + '/'
traversal_path = target.sub(/\A\w:/, '') # for DOSISH
traversal_path = Array.new(target.count('/')-2, '..').join('/') + traversal_path
- actual = yield traversal_path
- assert_not_send([File.absolute_path(actual), :start_with?, target])
+ [File::SEPARATOR, File::ALT_SEPARATOR].compact.each do |separator|
+ actual = yield traversal_path.tr('/', separator)
+ assert_not_send([File.absolute_path(actual), :start_with?, target])
+ end
end
end
end