summaryrefslogtreecommitdiff
path: root/test/autoload
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2016-12-25 15:48:48 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2016-12-25 15:48:48 +0900
commitc71c70f0b2674cfeab3fbcfa8d866ee37e17a73f (patch)
treee0667e48ac3953e35e2c1564bd9dd73698aca432 /test/autoload
parentf94851be9b91c3c91291119de4fb44bc28042076 (diff)
downloaddeoplete.nvim-c71c70f0b2674cfeab3fbcfa8d866ee37e17a73f.zip
Update tests
Diffstat (limited to 'test/autoload')
-rw-r--r--test/autoload/deoplete/util.vim27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/autoload/deoplete/util.vim b/test/autoload/deoplete/util.vim
new file mode 100644
index 0000000..e6ca889
--- /dev/null
+++ b/test/autoload/deoplete/util.vim
@@ -0,0 +1,27 @@
+let s:suite = themis#suite('parser')
+let s:assert = themis#helper('assert')
+
+function! s:suite.vimoption2python() abort
+ call s:assert.equals(
+ \ 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#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