aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_cscope.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-24 14:43:47 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-24 15:25:32 -0400
commit1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd (patch)
treed4f14bd0d4e723780f19e4f10235758f46a47f88 /src/nvim/testdir/test_cscope.vim
parent529d88c64164f69e8005192f75e392640c941b9f (diff)
downloadrneovim-1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd.tar.gz
rneovim-1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd.tar.bz2
rneovim-1b0937dd894d4ea5d1c66f8037b4e1c4e2b888bd.zip
test/old: partial port of patch v8.2.1.0183
Prep for patch v8.2.0511.
Diffstat (limited to 'src/nvim/testdir/test_cscope.vim')
-rw-r--r--src/nvim/testdir/test_cscope.vim36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/nvim/testdir/test_cscope.vim b/src/nvim/testdir/test_cscope.vim
index e5dab05511..2c016ea1f6 100644
--- a/src/nvim/testdir/test_cscope.vim
+++ b/src/nvim/testdir/test_cscope.vim
@@ -115,23 +115,25 @@ func Test_cscopeWithCscopeConnections()
" Test 10: Invalid find command
call assert_fails('cs find x', 'E560:')
- " Test 11: Find places where this symbol is assigned a value
- " this needs a cscope >= 15.8
- " unfortunately, Travis has cscope version 15.7
- let cscope_version = systemlist('cscope --version')[0]
- let cs_version = str2float(matchstr(cscope_version, '\d\+\(\.\d\+\)\?'))
- if cs_version >= 15.8
- for cmd in ['cs find a item', 'cs find 9 item']
- let a = execute(cmd)
- call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = (mf_hashitem_T *)lalloc_clear(sizeof(*item), FALSE);'], split(a, '\n', 1))
- call assert_equal(' item = (mf_hashitem_T *)lalloc_clear(sizeof(*item), FALSE);', getline('.'))
- cnext
- call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
- cnext
- call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
- cnext
- call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
- endfor
+ if has('float')
+ " Test 11: Find places where this symbol is assigned a value
+ " this needs a cscope >= 15.8
+ " unfortunately, Travis has cscope version 15.7
+ let cscope_version = systemlist('cscope --version')[0]
+ let cs_version = str2float(matchstr(cscope_version, '\d\+\(\.\d\+\)\?'))
+ if cs_version >= 15.8
+ for cmd in ['cs find a item', 'cs find 9 item']
+ let a = execute(cmd)
+ call assert_equal(['', '(1 of 4): <<test_mf_hash>> item = (mf_hashitem_T *)lalloc_clear(sizeof(*item), FALSE);'], split(a, '\n', 1))
+ call assert_equal(' item = (mf_hashitem_T *)lalloc_clear(sizeof(*item), FALSE);', getline('.'))
+ cnext
+ call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
+ cnext
+ call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
+ cnext
+ call assert_equal(' item = mf_hash_find(&ht, key);', getline('.'))
+ endfor
+ endif
endif
" Test 12: leading whitespace is not removed for cscope find text