the list is no more sorted in s:uniq, it only removes the adjacent elements

This commit is contained in:
itchyny
2016-03-24 21:39:30 +09:00
parent 2977ed29d0
commit ed13dda6a6

View File

@@ -14,11 +14,11 @@ function! s:suite.one()
endfunction
function! s:suite.two()
call s:assert.equals(s:uniq(['foo', 'bar']), ['bar', 'foo'])
call s:assert.equals(s:uniq(['foo', 'bar']), ['foo', 'bar'])
endfunction
function! s:suite.three()
call s:assert.equals(s:uniq(['foo', 'bar', 'baz']), ['bar', 'baz', 'foo'])
call s:assert.equals(s:uniq(['foo', 'bar', 'baz']), ['foo', 'bar', 'baz'])
endfunction
function! s:suite.two_duplicated()
@@ -26,9 +26,9 @@ function! s:suite.two_duplicated()
endfunction
function! s:suite.three_duplicated()
call s:assert.equals(s:uniq(['foo', 'bar', 'foo']), ['bar', 'foo'])
call s:assert.equals(s:uniq(['foo', 'bar', 'foo']), ['foo', 'bar', 'foo'])
endfunction
function! s:suite.many()
call s:assert.equals(s:uniq(['foo', 'bar', 'foo', 'baz', 'baz', 'qux', 'foo']), ['bar', 'baz', 'foo', 'qux'])
call s:assert.equals(s:uniq(['foo', 'foo', 'bar', 'baz', 'baz', 'qux', 'foo']), ['foo', 'bar', 'baz', 'qux', 'foo'])
endfunction