view src/testdir/test_glob2regpat.vim @ 9717:6226de5f8137 v7.4.2134

commit https://github.com/vim/vim/commit/b54c3ff3174dbb5dfbfcabdf95200b047beaa644 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 31 14:11:58 2016 +0200 patch 7.4.2134 Problem: No error for using function() badly. Solution: Check for passing wrong function name. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Sun, 31 Jul 2016 14:15:05 +0200
parents c9daa07abf34
children 6882920b42da
line wrap: on
line source

" 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