neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

081_coptions_movement_spec.lua (773B)


      1 -- Test for t movement command and 'cpo-;' setting
      2 
      3 local n = require('test.functional.testnvim')()
      4 
      5 local clear, feed, insert = n.clear, n.feed, n.insert
      6 local feed_command, expect = n.feed_command, n.expect
      7 
      8 describe('coptions', function()
      9  setup(clear)
     10 
     11  -- luacheck: ignore 613 (Trailing whitespace in a string)
     12  it('is working', function()
     13    insert([[
     14      aaa two three four
     15          zzz
     16      yyy   
     17      bbb yee yoo four
     18      ccc two three four
     19      ddd yee yoo four]])
     20 
     21    feed_command('set cpo-=;')
     22 
     23    feed('gg0tt;D')
     24    feed('j0fz;D')
     25    feed('j$Fy;D')
     26    feed('j$Ty;D')
     27 
     28    feed_command('set cpo+=;')
     29 
     30    feed('j0tt;;D')
     31    feed('j$Ty;;D')
     32 
     33    expect([[
     34      aaa two
     35          z
     36      y
     37      bbb y
     38      ccc
     39      ddd yee y]])
     40  end)
     41 end)