aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/testdir/test_glob2regpat.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_glob2regpat.vim b/src/nvim/testdir/test_glob2regpat.vim
new file mode 100644
index 0000000000..250ab2746c
--- /dev/null
+++ b/src/nvim/testdir/test_glob2regpat.vim
@@ -0,0 +1,10 @@
+" Test glob2regpat()
+
+func Test_invalid()
+ call assert_fails('call glob2regpat(1.33)', 'E806:')
+endfunc
+
+func Test_valid()
+ call assert_equal('^foo\.', glob2regpat('foo.*'))
+ call assert_equal('\.vim$', glob2regpat('*.vim'))
+endfunc