Mercurial > vim
diff src/testdir/test_regexp_utf8.vim @ 9896:7b39615c0db1 v7.4.2222
commit https://github.com/vim/vim/commit/6bff02eb530aa29aafa2cb5627399837be7a5dd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 16 22:50:55 2016 +0200
patch 7.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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 16 Aug 2016 23:00:06 +0200 |
parents | 81ba6e4eb72b |
children | bff8a09016a5 |
line wrap: on
line diff
--- 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