diff options
Diffstat (limited to 'test/functional/insert/last_inserted_spec.lua')
-rw-r--r-- | test/functional/insert/last_inserted_spec.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/insert/last_inserted_spec.lua b/test/functional/insert/last_inserted_spec.lua new file mode 100644 index 0000000000..dce23a3790 --- /dev/null +++ b/test/functional/insert/last_inserted_spec.lua @@ -0,0 +1,22 @@ +local helpers = require('test.functional.helpers')(after_each) +local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert +local expect = helpers.expect + +clear() + +describe('insert-mode', function() + it('CTRL-@ inserts last-inserted text, leaves insert-mode', function() + insert('hello') + feed('i<C-@>x') + expect('hellhello') + end) + -- C-Space is the same as C-@ + it('CTRL-SPC inserts last-inserted text, leaves insert-mode', function() + feed('i<C-Space>x') + expect('hellhellhello') + end) + it('CTRL-A inserts last inserted text', function() + feed('i<C-A>x') + expect('hellhellhellhelloxo') + end) +end) |