diff options
Diffstat (limited to 'test/test_tmpdir.rb')
-rw-r--r-- | test/test_tmpdir.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb index 50583b5ce1..ea2cc123c1 100644 --- a/test/test_tmpdir.rb +++ b/test/test_tmpdir.rb @@ -86,6 +86,10 @@ class TestTmpdir < Test::Unit::TestCase 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 |