From b007e5d8820c613606bdc3afcb49d7eecc14ea0b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 5 Oct 2019 22:59:31 -0400 Subject: vim-patch:8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251" Problem: Displayed digraph for "ga" wrong with 'encoding' "cp1251". Solution: Convert from 'encoding' to "utf-8" if needed. (closes vim/vim#3015) https://github.com/vim/vim/commit/bc5020aa4d7ef4aea88395eff858f74fc881eab9 --- src/nvim/testdir/test_digraph.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nvim/testdir/test_digraph.vim') diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim index 62a5da33df..5da05e85b5 100644 --- a/src/nvim/testdir/test_digraph.vim +++ b/src/nvim/testdir/test_digraph.vim @@ -465,4 +465,17 @@ func Test_show_digraph() bwipe! endfunc +func Test_show_digraph_cp1251() + throw 'skipped: Nvim supports ''utf8'' encoding only' + if !has('multi_byte') + return + endif + new + set encoding=cp1251 + call Put_Dig("='") + call assert_equal("\n<\xfa> <|z> 250, Hex fa, Oct 372, Digr ='", execute('ascii')) + set encoding=utf-8 + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit From 5f7384bf423be5948194cf9f6fa087f448709684 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 13 Apr 2020 20:04:21 -0400 Subject: vim-patch:8.2.0575: :digraph! not tested Problem: :digraph! not tested. Solution: Add a test. (Dominique Pelle, closes vim/vim#5925) https://github.com/vim/vim/commit/e3242346cf1c2ff8b0315cb2cb98e731bfa952c0 --- src/nvim/testdir/test_digraph.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir/test_digraph.vim') diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim index 5da05e85b5..1792dcc00b 100644 --- a/src/nvim/testdir/test_digraph.vim +++ b/src/nvim/testdir/test_digraph.vim @@ -433,6 +433,18 @@ func Test_digraphs_output() call assert_equal('Z% Ж 1046', matchstr(out, '\C\')) call assert_equal('u- ū 363', matchstr(out, '\C\')) call assert_equal('SH ^A 1', matchstr(out, '\C\')) + call assert_notmatch('Latin supplement', out) + + let out_bang_without_custom = execute(':digraph!') + digraph lt 60 + let out_bang_with_custom = execute(':digraph!') + call assert_notmatch('lt', out_bang_without_custom) + call assert_match("^\n" + \ .. "NU ^@ 10 .*\n" + \ .. "Latin supplement\n" + \ .. "!I ¡ 161 .*\n" + \ .. ".*\n" + \ .. 'Custom\n.*\', out_bang_with_custom) bw! endfunc -- cgit