Commit Graph

4 Commits

Author SHA1 Message Date
AW-UC 0066c6f001 Add PHPunit test for DefaultCollator
This extends Test_NaturalSort to include a basic test for
\OC\NaturalSort_DefaultCollator()
2015-02-24 23:51:08 +01:00
Joas Schilling cb3a598cdb Make root tests extend the \Test\TestCase 2014-11-19 14:53:51 +01:00
Vincent Petry f2001a48a4 Fixed sort algo for additional cases 2014-08-11 13:28:53 +02:00
Vincent Petry 173059f6d0 Fixed file list sorting
Now using a natural sort algorithm that is more consistent between JS
and PHP (although not perfect in some corner cases)

- added OC.Util.naturalSortComparator that uses the same algo that was
  used for the user list
- changed user list and files list to use OC.Util.naturalSortComparator
- removed toLowerCase() and changed the comparator to use
  String.localeCompare()
- added unit tests
- added OC_NaturalSort that is used by OCP\Util::naturalSortCompare()
2014-08-11 13:28:53 +02:00