Mercurial > vim
diff src/testdir/test_cscope.vim @ 19249:2a017e9dc6da v8.2.0183
patch 8.2.0183: tests fail when the float feature is disabled
Commit: https://github.com/vim/vim/commit/5feabe00c47fa66d5f4c95213f150488433f78e3
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 30 18:24:53 2020 +0100
patch 8.2.0183: tests fail when the float feature is disabled
Problem: Tests fail when the float feature is disabled.
Solution: Skip tests that don't work without float support.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 Jan 2020 18:30:04 +0100 |
parents | 0da9bc55c31a |
children | d9378abde532 |
line wrap: on
line diff
--- a/src/testdir/test_cscope.vim +++ b/src/testdir/test_cscope.vim @@ -116,23 +116,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 = LALLOC_CLEAR_ONE(mf_hashitem_T);'], split(a, '\n', 1)) - call assert_equal(' item = LALLOC_CLEAR_ONE(mf_hashitem_T);', 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 = LALLOC_CLEAR_ONE(mf_hashitem_T);'], split(a, '\n', 1)) + call assert_equal(' item = LALLOC_CLEAR_ONE(mf_hashitem_T);', 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