annotate src/testdir/test96.in @ 5915:daebf8ce6608 v7.4.299

updated for version 7.4.299 Problem: When running configure twice DYNAMIC_PYTHON_DLL may become empty. Solution: Use AC_CACHE_VAL. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Thu, 22 May 2014 14:44:22 +0200
parents 6cabac58f26f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5084
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 This will test for problems in quickfix:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 A. incorrectly copying location lists which caused the location list to show a
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 different name than the file that was actually being displayed.
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 B. not reusing the window for which the location list window is opened but
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 instead creating new windows.
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 C. make sure that the location list window is not reused instead of the window
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 it belongs to.
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 Note: to debug a problem comment out the last ":b 1" in a test and testing will
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 stop at this point.
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 STARTTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :so small.vim
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 : enew
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 : w! test.out
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 : b 1
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 : " Set up the test environment:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 : function! ReadTestProtocol(name)
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 : let base = substitute(a:name, '\v^test://(.*)%(\.[^.]+)?', '\1', '')
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 : let word = substitute(base, '\v(.*)\..*', '\1', '')
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 : setl modifiable
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 : setl noreadonly
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 : setl noswapfile
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 : setl bufhidden=delete
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 : %del _
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 : " For problem 2:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 : " 'buftype' has to be set to reproduce the constant opening of new windows
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 : setl buftype=nofile
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 : call setline(1, word)
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 : setl nomodified
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 : setl nomodifiable
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 : setl readonly
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 : exe 'doautocmd BufRead ' . substitute(a:name, '\v^test://(.*)', '\1', '')
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 : endfunction
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 : augroup testgroup
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 : au!
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 : autocmd BufReadCmd test://* call ReadTestProtocol(expand("<amatch>"))
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 : augroup END
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 : let words = [ "foo", "bar", "baz", "quux", "shmoo", "spam", "eggs" ]
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 :
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 : let qflist = []
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 : for word in words
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 : call add(qflist, {'filename': 'test://' . word . '.txt', 'text': 'file ' . word . '.txt', })
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 : " NOTE: problem 1:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 : " intentionally not setting 'lnum' so that the quickfix entries are not
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 : " valid
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 : call setloclist(0, qflist, ' ')
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 : endfor
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 ENDTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 Test A:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 STARTTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 :lrewind
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 :enew
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 :lopen
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 :lnext
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 :lnext
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 :lnext
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 :lnext
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 :vert split
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 :wincmd L
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 :lopen
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 :wincmd p
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 :lnext
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 :"b 1
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 :let fileName = expand("%")
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 :wincmd p
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 :let locationListFileName = substitute(getline(line('.')), '\([^|]*\)|.*', '\1', '')
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 :wincmd n
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 :wincmd K
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 :b test.out
5116
6cabac58f26f updated for version 7.3.1301
Bram Moolenaar <bram@vim.org>
parents: 5084
diff changeset
75 :let fileName = substitute(fileName, '\\', '/', 'g')
6cabac58f26f updated for version 7.3.1301
Bram Moolenaar <bram@vim.org>
parents: 5084
diff changeset
76 :let locationListFileName = substitute(locationListFileName, '\\', '/', 'g')
5084
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 :call append(line('$'), "Test A:")
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 :call append(line('$'), " - file name displayed: " . fileName)
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 :call append(line('$'), " - quickfix claims that the file name displayed is: " . locationListFileName)
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 :w
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 :wincmd o
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 :b 1
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 ENDTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 Test B:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 STARTTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 :lrewind
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 :lopen
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 :2
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 :exe "normal \<CR>"
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 :wincmd p
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 :3
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 :exe "normal \<CR>"
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 :wincmd p
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 :4
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 :exe "normal \<CR>"
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 :let numberOfWindowsOpen = winnr('$')
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 :wincmd n
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 :wincmd K
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 :b test.out
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 :call append(line('$'), "Test B:")
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 :call append(line('$'), " - number of window open: " . numberOfWindowsOpen)
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 :w
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 :wincmd o
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 :b 1
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 ENDTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 Test C:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 STARTTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 :lrewind
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 :lopen
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 :" Let's move the location list window to the top to check whether it (the first
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 :" window found) will be reused when we try to open new windows:
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
114 :wincmd K
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
115 :2
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 :exe "normal \<CR>"
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
117 :wincmd p
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
118 :3
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
119 :exe "normal \<CR>"
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
120 :wincmd p
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 :4
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
122 :exe "normal \<CR>"
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123 :1wincmd w
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124 :let locationListWindowBufType = &buftype
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125 :2wincmd w
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 :let bufferName = expand("%")
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 :wincmd n
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
128 :wincmd K
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 :b test.out
5116
6cabac58f26f updated for version 7.3.1301
Bram Moolenaar <bram@vim.org>
parents: 5084
diff changeset
130 :let bufferName = substitute(bufferName, '\\', '/', 'g')
5084
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131 :call append(line('$'), "Test C:")
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 :call append(line('$'), " - 'buftype' of the location list window: " . locationListWindowBufType)
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133 :call append(line('$'), " - buffer displayed in the 2nd window: " . bufferName)
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134 :w
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 :wincmd o
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 :b 1
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
137 ENDTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
138
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
139 STARTTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
140 :qa
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
141 ENDTEST
14e7a115d54d updated for version 7.3.1285
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
142