lispwords_spec.lua 720 B

12345678910111213141516171819202122232425262728
  1. local t = require('test.testutil')
  2. local n = require('test.functional.testnvim')()
  3. local clear = n.clear
  4. local eq = t.eq
  5. local eval = n.eval
  6. local command = n.command
  7. local source = n.source
  8. describe('lispwords', function()
  9. before_each(clear)
  10. it('should be set global-local', function()
  11. source([[
  12. setglobal lispwords=foo,bar,baz
  13. setlocal lispwords-=foo
  14. setlocal lispwords+=quux]])
  15. eq('foo,bar,baz', eval('&g:lispwords'))
  16. eq('bar,baz,quux', eval('&l:lispwords'))
  17. eq('bar,baz,quux', eval('&lispwords'))
  18. command('setlocal lispwords<')
  19. eq('foo,bar,baz', eval('&g:lispwords'))
  20. eq('foo,bar,baz', eval('&l:lispwords'))
  21. eq('foo,bar,baz', eval('&lispwords'))
  22. end)
  23. end)