deprecated_spec.lua 561 B

1234567891011121314151617181920212223
  1. local t = require('test.testutil')
  2. local n = require('test.functional.testnvim')()
  3. local clear = n.clear
  4. local exec_lua = n.exec_lua
  5. local eq = t.eq
  6. describe('deprecated lua code', function()
  7. before_each(clear)
  8. describe('vim.treesitter.get_parser()', function()
  9. it('returns nil for versions >= 0.12', function()
  10. local result = exec_lua(function()
  11. if vim.version.ge(vim.version(), '0.12') then
  12. return vim.treesitter.get_parser(0, 'borklang')
  13. end
  14. return nil
  15. end)
  16. eq(nil, result)
  17. end)
  18. end)
  19. end)