diff options
Diffstat (limited to 'test/functional/legacy/cpoptions_spec.lua')
-rw-r--r-- | test/functional/legacy/cpoptions_spec.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/legacy/cpoptions_spec.lua b/test/functional/legacy/cpoptions_spec.lua new file mode 100644 index 0000000000..d2f382ec12 --- /dev/null +++ b/test/functional/legacy/cpoptions_spec.lua @@ -0,0 +1,34 @@ +local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') +local clear = helpers.clear +local command = helpers.command +local feed = helpers.feed + +before_each(clear) + +describe('cpoptions', function() + it('$', function() + local screen = Screen.new(30, 6) + screen:attach() + command('set cpo+=$') + command([[call setline(1, 'one two three')]]) + feed('c2w') + screen:expect([[ + ^one tw$ three | + ~ | + ~ | + ~ | + ~ | + -- INSERT -- | + ]]) + feed('vim<Esc>') + screen:expect([[ + vi^m three | + ~ | + ~ | + ~ | + ~ | + | + ]]) + end) +end) |