summaryrefslogtreecommitdiff
path: root/test/util.vim
diff options
context:
space:
mode:
authorTommy Allen <tommy@esdf.io>2016-09-24 13:50:54 -0400
committerTommy Allen <tommy@esdf.io>2016-09-24 13:51:33 -0400
commitf7b16ebd367d2e7f0145bb0c1edfa939b9362a23 (patch)
tree009f66c1541aa14f087c5c9c36b4b5ca813ab98b /test/util.vim
parentb50ad118a91c03ae782b6abf97744f0b2507ef0a (diff)
downloaddeoplete.nvim-f7b16ebd367d2e7f0145bb0c1edfa939b9362a23.zip
Fix Neovim version check.
fixes #342
Diffstat (limited to 'test/util.vim')
-rw-r--r--test/util.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/util.vim b/test/util.vim
index c375d18..008b465 100644
--- a/test/util.vim
+++ b/test/util.vim
@@ -8,6 +8,22 @@ function! s:suite.vimoption2python() abort
\ deoplete#util#vimoption2python('@,-,48-57,_'), '[a-zA-Z@0-9_-]')
call s:assert.equals(
\ deoplete#util#vimoption2python('@,,,48-57,_'), '[a-zA-Z@,0-9_]')
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('0.1.10', '0.1.8'), 2)
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('0.1.10', '0.1.10'), 0)
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('0.1.10', '0.1.0010'), 0)
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('0.1.1', '0.1.8'), -7)
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('0.1.1000', '0.1.10'), 990)
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('0.1.0001', '0.1.10'), -9)
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('2.0.1', '1.3.5'), 9696)
+ call s:assert.equals(
+ \ deoplete#util#versioncmp('3.2.1', '0.0.0'), 30201)
endfunction