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:
parent
9000cdbf2f
commit
0597adfe53
Binary file not shown.
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue