Commit 80b7a1e4 authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

scm: filesystem: update test repository for non ascii text files displaying (#6256).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5203 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 071fc2c8
......@@ -11,16 +11,16 @@ class FilesystemAdapterTest < ActiveSupport::TestCase
end
def test_entries
assert_equal 2, @adapter.entries.size
assert_equal ["dir", "test"], @adapter.entries.collect(&:name)
assert_equal ["dir", "test"], @adapter.entries(nil).collect(&:name)
assert_equal ["dir", "test"], @adapter.entries("/").collect(&:name)
assert_equal 3, @adapter.entries.size
assert_equal ["dir", "japanese", "test"], @adapter.entries.collect(&:name)
assert_equal ["dir", "japanese", "test"], @adapter.entries(nil).collect(&:name)
assert_equal ["dir", "japanese", "test"], @adapter.entries("/").collect(&:name)
["dir", "/dir", "/dir/", "dir/"].each do |path|
assert_equal ["subdir", "dirfile"], @adapter.entries(path).collect(&:name)
end
# If y try to use "..", the path is ignored
["/../","dir/../", "..", "../", "/..", "dir/.."].each do |path|
assert_equal ["dir", "test"], @adapter.entries(path).collect(&:name),
assert_equal ["dir", "japanese", "test"], @adapter.entries(path).collect(&:name),
".. must be ignored in path argument"
end
end
......
......@@ -40,7 +40,7 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase
end
def test_entries
assert_equal 2, @repository.entries("", 2).size
assert_equal 3, @repository.entries("", 2).size
assert_equal 2, @repository.entries("dir", 3).size
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment