Mercurial > vim
annotate src/testdir/test_fnameescape.vim @ 14966:d65790af8514 v8.1.0494
patch 8.1.0494: functions do not check for a window ID in other tabs
commit https://github.com/vim/vim/commit/babfcf54ae9bf9570eddf4958a553635cd589e21
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 25 13:11:16 2018 +0200
patch 8.1.0494: functions do not check for a window ID in other tabs
Problem: Functions do not check for a window ID in other tabs.
Solution: Also find the window ID in other than the current tab.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 25 Oct 2018 13:15:05 +0200 |
parents | eb9a7296ae9f |
children | 63b02fcf1361 |
rev | line source |
---|---|
10072
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " Test if fnameescape is correct for special chars like ! |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 function! Test_fnameescape() |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 let fname = 'Xspa ce' |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 let status = v:false |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 try |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 exe "w! " . fnameescape(fname) |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 let status = v:true |
10145
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
10072
diff
changeset
|
9 endtry |
10072
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 call assert_true(status, "Space") |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 call delete(fname) |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 let fname = 'Xemark!' |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 let status = v:false |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 try |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 exe "w! " . fnameescape(fname) |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 let status = v:true |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 endtry |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call assert_true(status, "ExclamationMark") |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 call delete(fname) |
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 endfunction |