diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-01-14 16:55:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-01-14 16:55:00 +0100 |
commit | 1028f4d75ee04261f1338620c22f388a05098bb0 (patch) | |
tree | 46c911fb9aaca60b7caad845dcb8dce1915eaf06 /src/testdir/test86.in | |
parent | 063a46ba77c3251f0b5245e872dcbad003c71024 (diff) | |
download | vim-1028f4d75ee04261f1338620c22f388a05098bb0.zip |
updated for version 7.4.152
Problem: Python: Cannot iterate over options.
Solution: Add options iterator. (ZyX)
Diffstat (limited to 'src/testdir/test86.in')
-rw-r--r-- | src/testdir/test86.in | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test86.in b/src/testdir/test86.in index 1ccf7bd3d..240e07e47 100644 --- a/src/testdir/test86.in +++ b/src/testdir/test86.in @@ -506,6 +506,11 @@ EOF :py bopts1=vim.buffers[vim.bindeval("g:bufs")[2]].options :py bopts2=vim.buffers[vim.bindeval("g:bufs")[1]].options :py bopts3=vim.buffers[vim.bindeval("g:bufs")[0]].options +:$put ='wopts iters equal: '.pyeval('list(wopts1) == list(wopts2)') +:$put ='bopts iters equal: '.pyeval('list(bopts1) == list(bopts2)') +:py gset=set(iter(gopts1)) +:py wset=set(iter(wopts1)) +:py bset=set(iter(bopts1)) :set path=.,..,, :let lst=[] :let lst+=[['paste', 1, 0, 1, 2, 1, 1, 0 ]] @@ -536,6 +541,8 @@ EOF : py oval3=bool(oval3) : endif : put ='>>> '.oname +: $put =' g/w/b:'.pyeval('oname in gset').'/'.pyeval('oname in wset').'/'.pyeval('oname in bset') +: $put =' g/w/b (in):'.pyeval('oname in gopts1').'/'.pyeval('oname in wopts1').'/'.pyeval('oname in bopts1') : for v in ['gopts1', 'wopts1', 'bopts1'] : try : put =' p/'.v.': '.Ev('repr('.v.'['''.oname.'''])') @@ -1122,6 +1129,13 @@ ee('import failing_import') ee('import failing') vim.options['rtp'] = old_rtp del old_rtp +cb.append("> Options") +cb.append(">> OptionsItem") +ee('vim.options["abcQ"]') +ee('vim.options[""]') +stringtochars_test('vim.options[%s]') +cb.append(">> OptionsContains") +stringtochars_test('%s in vim.options') cb.append("> Dictionary") cb.append(">> DictionaryConstructor") ee('vim.Dictionary("abcI")') |