aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/digraph_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-04 21:49:43 +0800
committerGitHub <noreply@github.com>2022-11-04 21:49:43 +0800
commit234b8c5f3d57294dda06dbc6c1760e5983bd2c19 (patch)
tree30ee4255289a1c3be9a7a80ab06242ec91908406 /test/functional/legacy/digraph_spec.lua
parent0aba1761714661b8576d4676c61c319e76bfac1b (diff)
parent2aafaa59928e17fd7858a89d203e2b2a07707601 (diff)
downloadrneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.tar.gz
rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.tar.bz2
rneovim-234b8c5f3d57294dda06dbc6c1760e5983bd2c19.zip
Merge pull request #20934 from zeertzjq/vim-8.2.0968
vim-patch:8.2.{0968,0976,1022,1810,2901}: various tests
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)