Mercurial > vim
comparison src/testdir/test_cscope.vim @ 10046:4a07f8de5efa v7.4.2295
commit https://github.com/vim/vim/commit/4792255eff03760dca0fd014616532e6d47db364
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 10:56:50 2016 +0200
patch 7.4.2295
Problem: Cscope test fails.
Solution: Avoid checking for specific line and column numbers.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 11:00:07 +0200 |
parents | c470694733db |
children | 1c4ebbae41d2 |
comparison
equal
deleted
inserted
replaced
10045:672a63fac3d2 | 10046:4a07f8de5efa |
---|---|
95 | 95 |
96 " Test 8: Find this file | 96 " Test 8: Find this file |
97 for cmd in ['cs find f Xmemfile_test.c', 'cs find 7 Xmemfile_test.c'] | 97 for cmd in ['cs find f Xmemfile_test.c', 'cs find 7 Xmemfile_test.c'] |
98 enew | 98 enew |
99 let a=execute(cmd) | 99 let a=execute(cmd) |
100 call assert_match('\n"Xmemfile_test.c" 143L, 3137C', a) | 100 call assert_true(a =~ '"Xmemfile_test.c" \d\+L, \d\+C') |
101 call assert_equal('Xmemfile_test.c', @%) | 101 call assert_equal('Xmemfile_test.c', @%) |
102 endfor | 102 endfor |
103 | 103 |
104 " Test 9: Find files #including this file | 104 " Test 9: Find files #including this file |
105 for cmd in ['cs find i assert.h', 'cs find 8 assert.h'] | 105 for cmd in ['cs find i assert.h', 'cs find 8 assert.h'] |
106 enew | 106 enew |
107 let a=execute(cmd) | 107 let a=execute(cmd) |
108 call assert_equal(['','"Xmemfile_test.c" 143L, 3137C','(1 of 1): <<global>> #include <assert.h>'], split(a, '\n', 1)) | 108 let alines = split(a, '\n', 1) |
109 call assert_equal('', alines[0]) | |
110 call assert_true(alines[1] =~ '"Xmemfile_test.c" \d\+L, \d\+C') | |
111 call assert_equal('(1 of 1): <<global>> #include <assert.h>', alines[2]) | |
109 call assert_equal('#include <assert.h>', getline('.')) | 112 call assert_equal('#include <assert.h>', getline('.')) |
110 endfor | 113 endfor |
111 | 114 |
112 " Test 10: Invalid find command | 115 " Test 10: Invalid find command |
113 call assert_fails('cs find x', 'E560:') | 116 call assert_fails('cs find x', 'E560:') |