Mercurial > vim
annotate src/testdir/test_fnameescape.vim @ 33622:ff131131b561 v9.0.2053
patch 9.0.2053: zig filetype detection test wrong
Commit: https://github.com/vim/vim/commit/a8c664a042707e293d887d5b90f944f6fd5c99aa
Author: Gregory Anders <greg@gpanders.com>
Date: Thu Oct 19 19:57:57 2023 +0200
patch 9.0.2053: zig filetype detection test wrong
Problem: zig filetype detection test wrong
Solution: Remove .zir pattern, add new test for .zon pattern
closes: #13389
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 19 Oct 2023 20:00:03 +0200 |
parents | 08940efa6b4e |
children |
rev | line source |
---|---|
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19231
diff
changeset
|
1 " Test if fnameescape is correct for special chars like ! |
10072
c104f09ae2f4
commit https://github.com/vim/vim/commit/cd055da370114f66c960be9c8b1eb0f33a9e0a85
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
15406
63b02fcf1361
patch 8.1.0711: test files still use function!
Bram Moolenaar <Bram@vim.org>
parents:
10145
diff
changeset
|
3 func Test_fnameescape() |
10072
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 |
17849
73ddc462979d
patch 8.1.1921: more functions can be used as methods
Bram Moolenaar <Bram@vim.org>
parents:
15406
diff
changeset
|
16 exe "w! " . fname->fnameescape() |
10072
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) |
19231
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
17849
diff
changeset
|
21 |
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
17849
diff
changeset
|
22 call assert_equal('\-', fnameescape('-')) |
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
17849
diff
changeset
|
23 call assert_equal('\+', fnameescape('+')) |
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
17849
diff
changeset
|
24 call assert_equal('\>', fnameescape('>')) |
15406
63b02fcf1361
patch 8.1.0711: test files still use function!
Bram Moolenaar <Bram@vim.org>
parents:
10145
diff
changeset
|
25 endfunc |
19231
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
17849
diff
changeset
|
26 |
b8fd7364befd
patch 8.2.0174: various commands not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
17849
diff
changeset
|
27 " vim: shiftwidth=2 sts=2 expandtab |