aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/glob2regpat_spec.lua22
-rw-r--r--test/functional/legacy/quickfix_spec.lua18
2 files changed, 40 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..357128bcb6
--- /dev/null
+++ b/test/functional/legacy/glob2regpat_spec.lua
@@ -0,0 +1,22 @@
+-- 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('returns ^$ for empty input', function()
+ eq('^$', eval("glob2regpat('')"))
+ end)
+ it('handles valid input', function()
+ eq('^foo\\.', eval("glob2regpat('foo.*')"))
+ eq('\\.vim$', eval("glob2regpat('*.vim')"))
+ end)
+end)
diff --git a/test/functional/legacy/quickfix_spec.lua b/test/functional/legacy/quickfix_spec.lua
new file mode 100644
index 0000000000..7a9958b949
--- /dev/null
+++ b/test/functional/legacy/quickfix_spec.lua
@@ -0,0 +1,18 @@
+-- Test for the quickfix commands.
+
+local helpers = require('test.functional.helpers')
+local insert, source = helpers.insert, helpers.source
+local clear, expect = helpers.clear, helpers.expect
+
+describe('helpgrep', function()
+ before_each(clear)
+
+ it('works', function()
+ source([[
+ helpgrep quickfix
+ copen
+ " This wipes out the buffer, make sure that doesn't cause trouble.
+ cclose
+ ]])
+ end)
+end)