diff src/testdir/test_digraph.vim @ 13359:81c348d40312 v8.0.1553

patch 8.0.1553: cannot see what digraph is used to insert a character commit https://github.com/vim/vim/commit/5f73ef8d20070cd45c9aea4dc33c2e0657f5515c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 27 21:09:30 2018 +0100 patch 8.0.1553: cannot see what digraph is used to insert a character Problem: Cannot see what digraph is used to insert a character. Solution: Show the digraph with the "ga" command. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Tue, 27 Feb 2018 21:15:06 +0100
parents 1fad9675d8fd
children 8a9a00357676
line wrap: on
line diff
--- 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