Mercurial > vim
comparison src/testdir/test_source_utf8.vim @ 19591:ac3f5096f438 v8.2.0352
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Commit: https://github.com/vim/vim/commit/36ddf9383181f93b080eb26121bdff37e394d2db
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 3 23:06:48 2020 +0100
patch 8.2.0352: FreeBSD: test for sourcing utf-8 is skipped
Problem: FreeBSD: test for sourcing utf-8 is skipped.
Solution: Run the matchadd_conceal test separately to avoid that setting
'term' to "ansi" causes problems for other tests. (Ozaki Kiichi,
closes #5721)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 03 Mar 2020 23:15:04 +0100 |
parents | 97d534e17874 |
children | 08940efa6b4e |
comparison
equal
deleted
inserted
replaced
19590:37e333947d79 | 19591:ac3f5096f438 |
---|---|
1 " Test the :source! command | 1 " Test the :source! command |
2 source check.vim | 2 source check.vim |
3 | 3 |
4 func Test_source_utf8() | 4 func Test_source_utf8() |
5 " check that sourcing a script with 0x80 as second byte works | 5 " check that sourcing a script with 0x80 as second byte works |
6 " does not work correctly on BSD | |
7 CheckNotBSD | |
8 new | 6 new |
9 call setline(1, [':%s/àx/--à1234--/g', ':%s/Àx/--À1234--/g']) | 7 call setline(1, [':%s/àx/--à1234--/g', ':%s/Àx/--À1234--/g']) |
10 write! Xscript | 8 write! Xscript |
11 bwipe! | 9 bwipe! |
12 new | 10 new |
32 call delete('Xscript') | 30 call delete('Xscript') |
33 endfunc | 31 endfunc |
34 | 32 |
35 " Test for sourcing a file with CTRL-V's at the end of the line | 33 " Test for sourcing a file with CTRL-V's at the end of the line |
36 func Test_source_ctrl_v() | 34 func Test_source_ctrl_v() |
37 CheckNotBSD | 35 call writefile(['map __1 afirst', |
38 call writefile(['map __1 afirst', | 36 \ 'map __2 asecond', |
39 \ 'map __2 asecond', | 37 \ 'map __3 athird', |
40 \ 'map __3 athird', | 38 \ 'map __4 afourth', |
41 \ 'map __4 afourth', | 39 \ 'map __5 afifth', |
42 \ 'map __5 afifth', | 40 \ "map __1 asd\<C-V>", |
43 \ "map __1 asd\<C-V>", | 41 \ "map __2 asd\<C-V>\<C-V>", |
44 \ "map __2 asd\<C-V>\<C-V>", | 42 \ "map __3 asd\<C-V>\<C-V>", |
45 \ "map __3 asd\<C-V>\<C-V>", | 43 \ "map __4 asd\<C-V>\<C-V>\<C-V>", |
46 \ "map __4 asd\<C-V>\<C-V>\<C-V>", | 44 \ "map __5 asd\<C-V>\<C-V>\<C-V>", |
47 \ "map __5 asd\<C-V>\<C-V>\<C-V>", | 45 \ ], 'Xtestfile') |
48 \ ], 'Xtestfile') | |
49 source Xtestfile | 46 source Xtestfile |
50 enew! | 47 enew! |
51 exe "normal __1\<Esc>\<Esc>__2\<Esc>__3\<Esc>\<Esc>__4\<Esc>__5\<Esc>" | 48 exe "normal __1\<Esc>\<Esc>__2\<Esc>__3\<Esc>\<Esc>__4\<Esc>__5\<Esc>" |
52 exe "%s/\<C-J>/0/g" | 49 exe "%s/\<C-J>/0/g" |
53 call assert_equal(['sd', | 50 call assert_equal(['sd', |
54 \ "map __2 asd\<Esc>secondsd\<Esc>sd0map __5 asd0fifth"], | 51 \ "map __2 asd\<Esc>secondsd\<Esc>sd0map __5 asd0fifth"], |
55 \ getline(1, 2)) | 52 \ getline(1, 2)) |
56 | 53 |
57 enew! | 54 enew! |
58 call delete('Xtestfile') | 55 call delete('Xtestfile') |
59 unmap __1 | 56 unmap __1 |
60 unmap __2 | 57 unmap __2 |