diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-01-27 03:19:23 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-27 03:20:07 -0500 |
commit | 765d394f18733bc6d962e3915ff53c06ac095642 (patch) | |
tree | 4eda25f7f7e1be7c940d809eb201aa0d53e83b7f | |
parent | c15e796211f04b16f58d06fe440f4009a69a1a01 (diff) | |
download | rneovim-765d394f18733bc6d962e3915ff53c06ac095642.tar.gz rneovim-765d394f18733bc6d962e3915ff53c06ac095642.tar.bz2 rneovim-765d394f18733bc6d962e3915ff53c06ac095642.zip |
vim-patch:ac809999
https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08
-rw-r--r-- | test/functional/legacy/glob2regpat_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/legacy/glob2regpat_spec.lua b/test/functional/legacy/glob2regpat_spec.lua new file mode 100644 index 0000000000..373aad68a1 --- /dev/null +++ b/test/functional/legacy/glob2regpat_spec.lua @@ -0,0 +1,19 @@ +-- Tests for signs + +local helpers = require('test.functional.helpers') +local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect +local eq, neq, eval = helpers.eq, helpers.neq, helpers.eval + +describe('glob2regpat()', function() + before_each(clear) + + it('handles invalid input', function() + execute('call glob2regpat(1.33)') + helpers.feed('<cr>') + neq(nil, string.find(eval('v:errmsg'), '^E806:')) + end) + it('handles valid input', function() + eq('^foo\\.', eval("glob2regpat('foo.*')")) + eq('\\.vim$', eval("glob2regpat('*.vim')")) + end) +end) |