aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/tlib_vim/spec/tlib/rx.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/bundle/tlib_vim/spec/tlib/rx.vim')
-rwxr-xr-xvim/bundle/tlib_vim/spec/tlib/rx.vim27
1 files changed, 27 insertions, 0 deletions
diff --git a/vim/bundle/tlib_vim/spec/tlib/rx.vim b/vim/bundle/tlib_vim/spec/tlib/rx.vim
new file mode 100755
index 0000000..fc28103
--- /dev/null
+++ b/vim/bundle/tlib_vim/spec/tlib/rx.vim
@@ -0,0 +1,27 @@
+" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
+" @Website: http://www.vim.org/account/profile.php?user_id=4037
+" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
+" @Created: 2010-04-03.
+" @Last Change: 2010-04-03.
+" @Revision: 2
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+
+
+SpecBegin 'title': 'tlib#rx'
+
+
+for c in split('^$.*+\()|{}[]~', '\zs')
+ let s = printf('%sfoo%sbar%s', c, c, c)
+ Should be like s, '\m^'. tlib#rx#Escape(s, 'm') .'$'
+ Should be like s, '\M^'. tlib#rx#Escape(s, 'M') .'$'
+ Should be like s, '\v^'. tlib#rx#Escape(s, 'v') .'$'
+ Should be like s, '\V\^'. tlib#rx#Escape(s, 'V') .'\$'
+endfor
+
+
+
+let &cpo = s:save_cpo
+unlet s:save_cpo