aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/tlib_vim/spec/tlib/var.vim
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-06-30 16:03:25 +0200
committerKarel Kočí <cynerd@email.cz>2016-06-30 16:03:25 +0200
commite573b3020c032400eed60b649a2cbf55266e6bb0 (patch)
tree8f572394ac8433529c7a8e70d160a2fbe8268b4e /vim/bundle/tlib_vim/spec/tlib/var.vim
parentb8c667bd64b3edd38d56c63c5bd1db53a23b4499 (diff)
downloadmyconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.gz
myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.tar.bz2
myconfigs-e573b3020c032400eed60b649a2cbf55266e6bb0.zip
Add current configurations from old repository
Diffstat (limited to 'vim/bundle/tlib_vim/spec/tlib/var.vim')
-rwxr-xr-xvim/bundle/tlib_vim/spec/tlib/var.vim37
1 files changed, 37 insertions, 0 deletions
diff --git a/vim/bundle/tlib_vim/spec/tlib/var.vim b/vim/bundle/tlib_vim/spec/tlib/var.vim
new file mode 100755
index 0000000..28e3fac
--- /dev/null
+++ b/vim/bundle/tlib_vim/spec/tlib/var.vim
@@ -0,0 +1,37 @@
+" @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#var'
+
+
+let g:foo = 1
+let g:bar = 2
+let b:bar = 3
+let s:bar = 4
+
+Should be equal tlib#var#Get('bar', 'bg'), 3
+Should be equal tlib#var#Get('bar', 'g'), 2
+Should be equal tlib#var#Get('foo', 'bg'), 1
+Should be equal tlib#var#Get('foo', 'g'), 1
+Should be equal tlib#var#Get('none', 'l'), ''
+
+Should be equal eval(tlib#var#EGet('bar', 'bg')), 3
+Should be equal eval(tlib#var#EGet('bar', 'g')), 2
+" Should be equal eval(tlib#var#EGet('bar', 'sg')), 4
+Should be equal eval(tlib#var#EGet('foo', 'bg')), 1
+Should be equal eval(tlib#var#EGet('foo', 'g')), 1
+Should be equal eval(tlib#var#EGet('none', 'l')), ''
+
+
+
+let &cpo = s:save_cpo
+unlet s:save_cpo