diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-15 13:47:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-15 13:47:13 +0100 |
| commit | 3b52e3c4c8784d60e44f3dc9a6bb7795af588931 (patch) | |
| tree | 5df3024e99dd2a92042b054cfd39fa083d1a1fba /src/nvim/testdir/test_source_utf8.vim | |
| parent | 227859ea79f981e67d5835cfed0be2123522ab2e (diff) | |
| parent | d72c177b2a743e147e0386f97b07030b49247390 (diff) | |
| download | rneovim-3b52e3c4c8784d60e44f3dc9a6bb7795af588931.tar.gz rneovim-3b52e3c4c8784d60e44f3dc9a6bb7795af588931.tar.bz2 rneovim-3b52e3c4c8784d60e44f3dc9a6bb7795af588931.zip | |
Merge #6252 from jamessan/vim-7.4.2069
vim-patch:7.4.2069,7.4.2101,7.4.2222,7.4.2223
Diffstat (limited to 'src/nvim/testdir/test_source_utf8.vim')
| -rw-r--r-- | src/nvim/testdir/test_source_utf8.vim | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_source_utf8.vim b/src/nvim/testdir/test_source_utf8.vim new file mode 100644 index 0000000000..edb76fc43d --- /dev/null +++ b/src/nvim/testdir/test_source_utf8.vim @@ -0,0 +1,33 @@ +" Test the :source! command +if !has('multi_byte') + finish +endif + +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 + +func Test_source_latin() + " check that sourcing a latin1 script with a 0xc0 byte works + new + call setline(1, ["call feedkeys('r')", "call feedkeys('\xc0', 'xt')"]) + write! Xscript + bwipe! + new + call setline(1, ['xxx']) + source Xscript + call assert_equal("\u00c0xx", getline(1)) + bwipe! + call delete('Xscript') +endfunc |