neovim

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

glob2regpat_spec.lua (434B)


      1 local t = require('test.testutil')
      2 local n = require('test.functional.testnvim')()
      3 
      4 local clear = n.clear
      5 local eq, eval = t.eq, n.eval
      6 
      7 describe('glob2regpat()', function()
      8  before_each(clear)
      9 
     10  it('returns ^$ for empty input', function()
     11    eq('^$', eval("glob2regpat('')"))
     12  end)
     13  it('handles valid input', function()
     14    eq('^foo\\.', eval("glob2regpat('foo.*')"))
     15    eq('\\.vim$', eval("glob2regpat('*.vim')"))
     16  end)
     17 end)