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
This commit is contained in:
Toshi MARUYAMA 2011-03-22 15:30:19 +00:00
parent 9000cdbf2f
commit 0597adfe53
3 changed files with 6 additions and 6 deletions

View File

@ -11,16 +11,16 @@ class FilesystemAdapterTest < ActiveSupport::TestCase
end end
def test_entries def test_entries
assert_equal 2, @adapter.entries.size assert_equal 3, @adapter.entries.size
assert_equal ["dir", "test"], @adapter.entries.collect(&:name) assert_equal ["dir", "japanese", "test"], @adapter.entries.collect(&:name)
assert_equal ["dir", "test"], @adapter.entries(nil).collect(&:name) assert_equal ["dir", "japanese", "test"], @adapter.entries(nil).collect(&:name)
assert_equal ["dir", "test"], @adapter.entries("/").collect(&:name) assert_equal ["dir", "japanese", "test"], @adapter.entries("/").collect(&:name)
["dir", "/dir", "/dir/", "dir/"].each do |path| ["dir", "/dir", "/dir/", "dir/"].each do |path|
assert_equal ["subdir", "dirfile"], @adapter.entries(path).collect(&:name) assert_equal ["subdir", "dirfile"], @adapter.entries(path).collect(&:name)
end end
# If y try to use "..", the path is ignored # If y try to use "..", the path is ignored
["/../","dir/../", "..", "../", "/..", "dir/.."].each do |path| ["/../","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" ".. must be ignored in path argument"
end end
end end

View File

@ -40,7 +40,7 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase
end end
def test_entries 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 assert_equal 2, @repository.entries("dir", 3).size
end end