neovim

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

018_unset_smart_indenting_spec.lua (657B)


      1 -- Tests for not doing smart indenting when it isn't set.
      2 
      3 local n = require('test.functional.testnvim')()
      4 
      5 local feed = n.feed
      6 local clear = n.clear
      7 local insert = n.insert
      8 local expect = n.expect
      9 local feed_command = n.feed_command
     10 
     11 describe('unset smart indenting', function()
     12  before_each(clear)
     13 
     14  it('is working', function()
     15    insert([[
     16      start text
     17              some test text
     18              test text
     19      test text
     20              test text]])
     21 
     22    feed_command('set nocin nosi ai')
     23    feed_command('/some')
     24    feed('2cc#test<Esc>')
     25 
     26    expect([[
     27      start text
     28              #test
     29      test text
     30              test text]])
     31  end)
     32 end)