summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-31 21:27:30 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-31 21:27:30 +0200
commit20a825ae0f90099249924740a5113e6ed413bc66 (patch)
tree701bee23df4392b438c677a8b28cf76b0240f8c7 /src/testdir
parenta3ff49fdccd518c91c9445ab3e82394b6812bf4a (diff)
downloadvim-git-20a825ae0f90099249924740a5113e6ed413bc66.tar.gz
Add test for gettabvar() and settabvar().
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test62.in23
-rw-r--r--src/testdir/test62.ok2
2 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test62.in b/src/testdir/test62.in
index 83def27c3..b81383098 100644
--- a/src/testdir/test62.in
+++ b/src/testdir/test62.in
@@ -26,6 +26,29 @@ STARTTEST
:call append(line('$'), line2)
:unlet line1 line2
:"
+:" Test for settabvar() and gettabvar() functions. Open a new tab page and
+:" set 3 variables to a number, string and a list. Verify that the variables
+:" are correctly set.
+:tabnew
+:tabfirst
+:call settabvar(2, 'val_num', 100)
+:call settabvar(2, 'val_str', 'SetTabVar test')
+:call settabvar(2, 'val_list', ['red', 'blue', 'green'])
+:"
+:let test_status = 'gettabvar: fail'
+:if gettabvar(2, 'val_num') == 100 && gettabvar(2, 'val_str') == 'SetTabVar test') && gettabvar(2, 'val_list') == ['red', 'blue', 'green'])
+: let test_status = 'gettabvar: pass'
+:endif
+:call append(line('$'), test_status)
+:"
+:tabnext 2
+:let test_status = 'settabvar: fail'
+:if t:val_num == 100 && t:val_str == 'SetTabVar test' && t:val_list == ['red', 'blue', 'green']
+: let test_status = 'settabvar: pass'
+:endif
+:tabclose
+:call append(line('$'), test_status)
+:"
:"
:/^Results/,$w! test.out
:qa!
diff --git a/src/testdir/test62.ok b/src/testdir/test62.ok
index 57438ed69..9a51e4424 100644
--- a/src/testdir/test62.ok
+++ b/src/testdir/test62.ok
@@ -3,3 +3,5 @@ tab page 2
this is tab page 3
this is tab page 1
this is tab page 4
+gettabvar: pass
+settabvar: pass