Test Russian and Hebrew sort

This commit is contained in:
Anatol Broder 2014-05-11 01:06:35 +02:00
parent ab990933a2
commit b2f30f5bee
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,10 @@ class TestFilters < Test::Unit::TestCase
assert_equal [{"a" => "10"}, {"a" => "2"}], @filter.sort([{"a" => "10"}, {"a" => "2"}], "a")
assert_equal ["FOO", "Foo", "foo"], @filter.sort(["foo", "Foo", "FOO"])
assert_equal ["_foo", "foo", "foo_"], @filter.sort(["foo_", "_foo", "foo"])
# Cyrillic
assert_equal ["ВУЗ", "Вуз", "вуз"], @filter.sort(["Вуз", "вуз", "ВУЗ"])
# Hebrew
assert_equal ["אלף", "בית"], @filter.sort(["בית", "אלף"])
end
should "return sorted by property array" do
assert_equal [{"a" => 1}, {"a" => 2}, {"a" => 3}, {"a" => 4}],