diff --git a/test/functional/editor/mode_insert_spec.lua b/test/functional/editor/mode_insert_spec.lua index f03508035d..528e228121 100644 --- a/test/functional/editor/mode_insert_spec.lua +++ b/test/functional/editor/mode_insert_spec.lua @@ -75,4 +75,57 @@ describe('insert-mode', function() expect('hello oooworld') end) end) + + describe('Ctrl-V', function() + it('supports entering the decimal value of a character', function() + feed('i076167') + expect('L§') + end) + + it('supports entering the octal value of a character with "o"', function() + feed('io114o247') + expect('L§') + end) + + it('supports entering the octal value of a character with "O"', function() + feed('iO114O247') + expect('L§') + end) + + it('supports entering the hexadecimal value of a character with "x"', function() + feed('ix4cxA7') + expect('L§') + end) + + it('supports entering the hexadecimal value of a character with "X"', function() + feed('iX4cXA7') + expect('L§') + end) + + it('supports entering the hexadecimal value of a character with "u"', function() + feed('iu25bau25C7') + expect('►◇') + end) + + it('supports entering the hexadecimal value of a character with "U"', function() + feed('iU0001f600U0001F601') + expect('😀😁') + end) + + it('entering character by value is interrupted by invalid character', function() + feed('i76c76u3c0ju3c0U1f600jU1f600') + expect('LcLπjπ😀j😀') + end) + + it('shows o, O, u, U, x, X, and digits with modifiers', function() + feed('i') + expect('') + feed('cc') + expect('') + feed('cc') + expect('') + feed('cc') + expect('') + end) + end) end)