GitLab wurde erfolgreich aktualisiert. Durch regelmäßige Updates bleibt das THM GitLab sicher. Danke für Ihre Geduld.

Commit 3ce6bc90 authored by tmaruyama's avatar tmaruyama

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

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 2377383e
......@@ -11,16 +11,16 @@ class FilesystemAdapterTest < ActiveSupport::TestCase
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)
# 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"
......@@ -40,7 +40,7 @@ class RepositoryFilesystemTest < ActiveSupport::TestCase
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
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