From 765d394f18733bc6d962e3915ff53c06ac095642 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 27 Jan 2016 03:19:23 -0500 Subject: [PATCH] vim-patch:ac809999 https://github.com/vim/vim/commit/ac80999985299dae4a9ef56dbf31fbdb35c04c08 --- test/functional/legacy/glob2regpat_spec.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/functional/legacy/glob2regpat_spec.lua 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('') + 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)