summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_digraph.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-27 21:09:30 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-27 21:09:30 +0100
commit5f73ef8d20070cd45c9aea4dc33c2e0657f5515c (patch)
tree4a223aa7d89da5c1d733287193626efee279155e /src/testdir/test_digraph.vim
parent8195247054a659fe5cbc238197634d5e13e8e8e9 (diff)
patch 8.0.1553: cannot see what digraph is used to insert a characterv8.0.1553
Problem: Cannot see what digraph is used to insert a character. Solution: Show the digraph with the "ga" command. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_digraph.vim')
-rw-r--r--src/testdir/test_digraph.vim21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/testdir/test_digraph.vim b/src/testdir/test_digraph.vim
index 6290680305..271066df41 100644
--- a/src/testdir/test_digraph.vim
+++ b/src/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