aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/digraph_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-04 19:49:23 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-04 20:54:50 +0800
commit2476f41a4a4dcf940bce9ea9ae48a6017a35fbc2 (patch)
tree94140dbc845f6145eae7876cd0bd933a9dcfcdbe /test/functional/legacy/digraph_spec.lua
parent2b86ca81b400b1311379f3258cc6c38be94fcf36 (diff)
downloadrneovim-2476f41a4a4dcf940bce9ea9ae48a6017a35fbc2.tar.gz
rneovim-2476f41a4a4dcf940bce9ea9ae48a6017a35fbc2.tar.bz2
rneovim-2476f41a4a4dcf940bce9ea9ae48a6017a35fbc2.zip
vim-patch:8.2.1022: various parts of code not covered by tests
Problem: Various parts of code not covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#6300) https://github.com/vim/vim/commit/845e0ee59430eac07e74b6cb92020e420d17953d Omit test_iminsert.vim: the commit that created this file was N/A. Omit test_viminfo.vim: the added tests are N/A.
Diffstat (limited to 'test/functional/legacy/digraph_spec.lua')
-rw-r--r--test/functional/legacy/digraph_spec.lua46
1 files changed, 46 insertions, 0 deletions
diff --git a/test/functional/legacy/digraph_spec.lua b/test/functional/legacy/digraph_spec.lua
new file mode 100644
index 0000000000..0cb0bb84be
--- /dev/null
+++ b/test/functional/legacy/digraph_spec.lua
@@ -0,0 +1,46 @@
+local helpers = require('test.functional.helpers')(after_each)
+local Screen = require('test.functional.ui.screen')
+local clear = helpers.clear
+local feed = helpers.feed
+
+before_each(clear)
+
+describe('digraph', function()
+ -- oldtest: Test_entering_digraph()
+ it('characters displayed on the screen', function()
+ local screen = Screen.new(10, 6)
+ screen:set_default_attr_ids({
+ [0] = {bold = true, foreground = Screen.colors.Blue}, -- NonText
+ [1] = {foreground = Screen.colors.Blue}, -- SpecialKey
+ [2] = {bold = true}, -- ModeMsg
+ })
+ screen:attach()
+ feed('i<C-K>')
+ screen:expect([[
+ {1:^?} |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {2:-- INSERT -} |
+ ]])
+ feed('1')
+ screen:expect([[
+ {1:^1} |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {2:-- INSERT -} |
+ ]])
+ feed('2')
+ screen:expect([[
+ ½^ |
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {0:~ }|
+ {2:-- INSERT -} |
+ ]])
+ end)
+end)