mirror of
https://github.com/itchyny/lightline.vim.git
synced 2025-11-12 13:33:50 -05:00
rename s:unique to s:uniq
This commit is contained in:
34
test/uniq.vim
Normal file
34
test/uniq.vim
Normal file
@@ -0,0 +1,34 @@
|
||||
let s:suite = themis#suite('uniq')
|
||||
let s:assert = themis#helper('assert')
|
||||
|
||||
function! s:uniq(...)
|
||||
return call(SID('uniq'), a:000)
|
||||
endfunction
|
||||
|
||||
function! s:suite.nil()
|
||||
call s:assert.equals(s:uniq([]), [])
|
||||
endfunction
|
||||
|
||||
function! s:suite.one()
|
||||
call s:assert.equals(s:uniq(['foo']), ['foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.two()
|
||||
call s:assert.equals(s:uniq(['foo', 'bar']), ['bar', 'foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.three()
|
||||
call s:assert.equals(s:uniq(['foo', 'bar', 'baz']), ['bar', 'baz', 'foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.two_duplicated()
|
||||
call s:assert.equals(s:uniq(['foo', 'foo']), ['foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.three_duplicated()
|
||||
call s:assert.equals(s:uniq(['foo', 'bar', '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'])
|
||||
endfunction
|
||||
@@ -1,34 +0,0 @@
|
||||
let s:suite = themis#suite('unique')
|
||||
let s:assert = themis#helper('assert')
|
||||
|
||||
function! s:unique(...)
|
||||
return call(SID('unique'), a:000)
|
||||
endfunction
|
||||
|
||||
function! s:suite.nil()
|
||||
call s:assert.equals(s:unique([]), [])
|
||||
endfunction
|
||||
|
||||
function! s:suite.one()
|
||||
call s:assert.equals(s:unique(['foo']), ['foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.two()
|
||||
call s:assert.equals(s:unique(['foo', 'bar']), ['bar', 'foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.three()
|
||||
call s:assert.equals(s:unique(['foo', 'bar', 'baz']), ['bar', 'baz', 'foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.two_duplicated()
|
||||
call s:assert.equals(s:unique(['foo', 'foo']), ['foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.three_duplicated()
|
||||
call s:assert.equals(s:unique(['foo', 'bar', 'foo']), ['bar', 'foo'])
|
||||
endfunction
|
||||
|
||||
function! s:suite.many()
|
||||
call s:assert.equals(s:unique(['foo', 'bar', 'foo', 'baz', 'baz', 'qux', 'foo']), ['bar', 'baz', 'foo', 'qux'])
|
||||
endfunction
|
||||
Reference in New Issue
Block a user