Mercurial > vim
annotate src/testdir/test_source_utf8.vim @ 34495:d43c2e4b645c v9.1.0154
patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread'
Commit: https://github.com/vim/vim/commit/9db39b0ec90600bb41faec3a12b934b17c298b1f
Author: Shougo Matsushita <Shougo.Matsu@gmail.com>
Date: Wed Mar 6 20:58:41 2024 +0100
patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread'
Problem: shm=F not respected when reloading buffer with 'autoread'
Solution: Check SHM_FILEINFO in buf_check_timestamp()
(Shougo Matsushita)
closes: #14144
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 06 Mar 2024 21:15:03 +0100 |
parents | ae10b91ac6b3 |
children |
rev | line source |
---|---|
9898
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test the :source! command |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19591
diff
changeset
|
2 |
18736
97d534e17874
patch 8.1.2358: tests fail on Cirrus CI for FreeBSD
Bram Moolenaar <Bram@vim.org>
parents:
15607
diff
changeset
|
3 source check.vim |
9898
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func Test_source_utf8() |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " check that sourcing a script with 0x80 as second byte works |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 new |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 call setline(1, [':%s/àx/--à1234--/g', ':%s/Àx/--À1234--/g']) |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 write! Xscript |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 bwipe! |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 new |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 call setline(1, [' àx ', ' Àx ']) |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 source! Xscript | echo |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 call assert_equal(' --à1234-- ', getline(1)) |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 call assert_equal(' --À1234-- ', getline(2)) |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 bwipe! |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 call delete('Xscript') |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 endfunc |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 func Test_source_latin() |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 " check that sourcing a latin1 script with a 0xc0 byte works |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 new |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 call setline(1, ["call feedkeys('r')", "call feedkeys('\xc0', 'xt')"]) |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 write! Xscript |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 bwipe! |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 new |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call setline(1, ['xxx']) |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 source Xscript |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 call assert_equal("\u00c0xx", getline(1)) |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 bwipe! |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 call delete('Xscript') |
bff8a09016a5
commit https://github.com/vim/vim/commit/d3c907b5d2b352482b580a0cf687cbbea4c19ea1
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 endfunc |
12686
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
33 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
34 " Test for sourcing a file with CTRL-V's at the end of the line |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
35 func Test_source_ctrl_v() |
19591
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
36 call writefile(['map __1 afirst', |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
37 \ 'map __2 asecond', |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
38 \ 'map __3 athird', |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
39 \ 'map __4 afourth', |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
40 \ 'map __5 afifth', |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
41 \ "map __1 asd\<C-V>", |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
42 \ "map __2 asd\<C-V>\<C-V>", |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
43 \ "map __3 asd\<C-V>\<C-V>", |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
44 \ "map __4 asd\<C-V>\<C-V>\<C-V>", |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
45 \ "map __5 asd\<C-V>\<C-V>\<C-V>", |
30769
ae10b91ac6b3
patch 9.0.0719: too many delete() calls in tests
Bram Moolenaar <Bram@vim.org>
parents:
21765
diff
changeset
|
46 \ ], 'Xtestfile', 'D') |
12686
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
47 source Xtestfile |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
48 enew! |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
49 exe "normal __1\<Esc>\<Esc>__2\<Esc>__3\<Esc>\<Esc>__4\<Esc>__5\<Esc>" |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
50 exe "%s/\<C-J>/0/g" |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
51 call assert_equal(['sd', |
19591
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
52 \ "map __2 asd\<Esc>secondsd\<Esc>sd0map __5 asd0fifth"], |
ac3f5096f438
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Bram Moolenaar <Bram@vim.org>
parents:
18736
diff
changeset
|
53 \ getline(1, 2)) |
12686
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
54 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
55 enew! |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
56 unmap __1 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
57 unmap __2 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
58 unmap __3 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
59 unmap __4 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
60 unmap __5 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
9898
diff
changeset
|
61 endfunc |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19591
diff
changeset
|
62 |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19591
diff
changeset
|
63 " vim: shiftwidth=2 sts=2 expandtab |