diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-16 22:50:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-16 22:50:55 +0200 |
commit | 6bff02eb530aa29aafa2cb5627399837be7a5dd5 (patch) | |
tree | bbdc08501666f8c44b1bc16b8f4724360555b398 /src/testdir/test_regexp_utf8.vim | |
parent | 91984b9034d3b698459622be277d963e0c6df60e (diff) | |
download | vim-git-6bff02eb530aa29aafa2cb5627399837be7a5dd5.tar.gz |
patch 7.4.2222v7.4.2222
Problem: Sourcing a script where a character has 0x80 as a second byte does
not work. (Filipe L B Correia)
Solution: Turn 0x80 into K_SPECIAL KS_SPECIAL KE_FILLER. (Christian
Brabandt, closes #728) Add a test case.
Diffstat (limited to 'src/testdir/test_regexp_utf8.vim')
-rw-r--r-- | src/testdir/test_regexp_utf8.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_regexp_utf8.vim b/src/testdir/test_regexp_utf8.vim index 81d8f5b04..ea9182916 100644 --- a/src/testdir/test_regexp_utf8.vim +++ b/src/testdir/test_regexp_utf8.vim @@ -25,11 +25,13 @@ endfunc func Test_equivalence_re1() set re=1 call s:equivalence_test() + set re=0 endfunc func Test_equivalence_re2() set re=2 call s:equivalence_test() + set re=0 endfunc func s:classes_test() @@ -82,9 +84,26 @@ endfunc func Test_classes_re1() set re=1 call s:classes_test() + set re=0 endfunc func Test_classes_re2() set re=2 call s:classes_test() + set re=0 +endfunc + +func Test_source_utf8() + " check that sourcing a script with 0x80 as second byte works + new + call setline(1, [':%s/àx/--à1234--/g', ':%s/Àx/--À1234--/g']) + write! Xscript + bwipe! + new + call setline(1, [' àx ', ' Àx ']) + source! Xscript | echo + call assert_equal(' --à1234-- ', getline(1)) + call assert_equal(' --À1234-- ', getline(2)) + bwipe! + call delete('Xscript') endfunc |