aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_digraph.vim
diff options
context:
space:
mode:
authorlokesh1197 <lokesh1197@gmail.com>2018-02-28 16:36:14 +0530
committerJustin M. Keyes <justinkz@gmail.com>2018-10-30 19:47:59 +0100
commit3159cd4503ae39301e010abe79c2d304437ee5c5 (patch)
treea9a05dceae909bacf268bfe8d9eb540c99b1af25 /src/nvim/testdir/test_digraph.vim
parent500345aea2ef88b45e0905043ed435ad4676bcef (diff)
downloadrneovim-3159cd4503ae39301e010abe79c2d304437ee5c5.tar.gz
rneovim-3159cd4503ae39301e010abe79c2d304437ee5c5.tar.bz2
rneovim-3159cd4503ae39301e010abe79c2d304437ee5c5.zip
vim-patch:8.0.1553: find digraph to insert a character #8190
Problem: Cannot see what digraph is used to insert a character. Solution: Show the digraph with the "ga" command. (Christian Brabandt) https://github.com/vim/vim/commit/5f73ef8d20070cd45c9aea4dc33c2e0657f5515c close #8190
Diffstat (limited to 'src/nvim/testdir/test_digraph.vim')
-rw-r--r--src/nvim/testdir/test_digraph.vim21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim
index 6290680305..271066df41 100644
--- a/src/nvim/testdir/test_digraph.vim
+++ b/src/nvim/testdir/test_digraph.vim
@@ -4,15 +4,15 @@ if !has("digraphs") || !has("multi_byte")
finish
endif
-func! Put_Dig(chars)
+func Put_Dig(chars)
exe "norm! o\<c-k>".a:chars
endfu
-func! Put_Dig_BS(char1, char2)
+func Put_Dig_BS(char1, char2)
exe "norm! o".a:char1."\<bs>".a:char2
endfu
-func! Test_digraphs()
+func Test_digraphs()
new
call Put_Dig("00")
call assert_equal("∞", getline('.'))
@@ -214,7 +214,7 @@ func! Test_digraphs()
bw!
endfunc
-func! Test_digraphs_option()
+func Test_digraphs_option()
" reset whichwrap option, so that testing <esc><bs>A works,
" without moving up a line
set digraph ww=
@@ -420,7 +420,7 @@ func! Test_digraphs_option()
bw!
endfunc
-func! Test_digraphs_output()
+func Test_digraphs_output()
new
let out = execute(':digraph')
call assert_equal('Eu € 8364', matchstr(out, '\C\<Eu\D*8364\>'))
@@ -436,7 +436,7 @@ func! Test_digraphs_output()
bw!
endfunc
-func! Test_loadkeymap()
+func Test_loadkeymap()
if !has('keymap')
return
endif
@@ -450,7 +450,7 @@ func! Test_loadkeymap()
bw!
endfunc
-func! Test_digraph_cmndline()
+func Test_digraph_cmndline()
" Create digraph on commandline
" This is a hack, to let Vim create the digraph in commandline mode
let s = ''
@@ -458,4 +458,11 @@ func! Test_digraph_cmndline()
call assert_equal("€", s)
endfunc
+func Test_show_digraph()
+ new
+ call Put_Dig("e=")
+ call assert_equal("\n<е> 1077, Hex 0435, Oct 2065, Digr e=", execute('ascii'))
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab