comparison src/testdir/test86.ok @ 5608:ec02e1474bc2 v7.4.151

updated for version 7.4.151 Problem: Python: slices with steps are not supported. Solution: Support slices in Python vim.List. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Tue, 14 Jan 2014 16:36:51 +0100
parents 064e2a080e2e
children 2ace11abcfb5
comparison
equal deleted inserted replaced
5607:98a642716acc 5608:ec02e1474bc2
39 [0, 1, 2, 3] 39 [0, 1, 2, 3]
40 [0, 2, 3] 40 [0, 2, 3]
41 [2, 3] 41 [2, 3]
42 [2, 3] 42 [2, 3]
43 [2, 3] 43 [2, 3]
44 [1, 3]
45 [0, 2]
46 [0, 1, 2, 3]
44 ['a', 0, 1, 2, 3] 47 ['a', 0, 1, 2, 3]
45 [0, 'b', 2, 3] 48 [0, 'b', 2, 3]
46 [0, 1, 'c'] 49 [0, 1, 'c']
47 [0, 1, 2, 3, 'd'] 50 [0, 1, 2, 3, 'd']
48 [0, 1, 2, 'e', 3] 51 [0, 1, 2, 'e', 3]
49 ['f', 2, 3] 52 ['f', 2, 3]
50 [0, 1, 'g', 2, 3] 53 [0, 1, 'g', 2, 3]
51 ['h'] 54 ['h']
55 [0, 1, 10, 3, 20, 5, 6, 7]
56 [0, 1, 2, 3, 20, 5, 10, 7]
57 [0, 1, 2, 3, 4, 5, 6, 7]
58 [0, 1, 2, 3, 4, 5, 6, 7]
59 [0, 1, 2, 3, 4, 5, 6, 7]
52 [0, 1, 2, 3] 60 [0, 1, 2, 3]
53 [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd'] 61 [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd']
54 [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}] 62 [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}]
55 [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New'] 63 [function('New'), function('DictNew'), 'NewStart', 1, 2, 3, 'NewEnd', 'DictNewStart', 1, 2, 3, 'DictNewEnd', {'a': 'b'}, 'New']
56 l[1](1, 2, 3):error:('Vim:E725: Calling dict function without Dictionary: DictNew',) 64 l[1](1, 2, 3):error:('Vim:E725: Calling dict function without Dictionary: DictNew',)
94 [2, 3] 102 [2, 3]
95 [] 103 []
96 [0, 1, 2, 3, 4, 5] 104 [0, 1, 2, 3, 4, 5]
97 [0, 1, 2, 3, 4, 5] 105 [0, 1, 2, 3, 4, 5]
98 [0, 1, 2, 3, 4, 5] 106 [0, 1, 2, 3, 4, 5]
107 [4, 3]
108 [0, 2, 4]
109 []
99 Abc 110 Abc
100 bac 111 bac
101 def 112 def
102 bar 113 bar
103 jkl 114 jkl
597 >> DictionaryUpdate 608 >> DictionaryUpdate
598 >>> kwargs 609 >>> kwargs
599 >>> iter 610 >>> iter
600 d.update(FailingMapping()):NotImplementedError:('keys',) 611 d.update(FailingMapping()):NotImplementedError:('keys',)
601 d.update([FailingIterNext()]):NotImplementedError:('next',) 612 d.update([FailingIterNext()]):NotImplementedError:('next',)
613 d.update([FailingIterNextN(1)]):NotImplementedError:('next N',)
602 >>> Testing *Iter* using d.update(%s) 614 >>> Testing *Iter* using d.update(%s)
603 d.update(FailingIter()):NotImplementedError:('iter',) 615 d.update(FailingIter()):NotImplementedError:('iter',)
604 d.update(FailingIterNext()):NotImplementedError:('next',) 616 d.update(FailingIterNext()):NotImplementedError:('next',)
605 <<< Finished 617 <<< Finished
606 >>> Testing StringToChars using d.update({%s : 1}) 618 >>> Testing StringToChars using d.update({%s : 1})
827 ll[1:100] = "abcJ":error:('list is locked',) 839 ll[1:100] = "abcJ":error:('list is locked',)
828 >>> Testing *Iter* using l[:] = %s 840 >>> Testing *Iter* using l[:] = %s
829 l[:] = FailingIter():NotImplementedError:('iter',) 841 l[:] = FailingIter():NotImplementedError:('iter',)
830 l[:] = FailingIterNext():NotImplementedError:('next',) 842 l[:] = FailingIterNext():NotImplementedError:('next',)
831 <<< Finished 843 <<< Finished
844 nel[1:10:2] = "abcK":ValueError:('attempt to assign sequence of size greater then 2 to extended slice',)
845 ('a', 'b', 'c', 'O')
846 nel[1:10:2] = "a":ValueError:('attempt to assign sequence of size 1 to extended slice of size 2',)
847 ('a', 'b', 'c', 'O')
848 nel[1:1:-1] = "a":ValueError:('attempt to assign sequence of size greater then 0 to extended slice',)
849 ('a', 'b', 'c', 'O')
850 nel[:] = FailingIterNextN(2):NotImplementedError:('next N',)
851 ('a', 'b', 'c', 'O')
832 >>> Testing StringToChars using l[:] = [{%s : 1}] 852 >>> Testing StringToChars using l[:] = [{%s : 1}]
833 l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',) 853 l[:] = [{1 : 1}]:TypeError:('expected str() or unicode() instance, but got int',)
834 l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',) 854 l[:] = [{u"\0" : 1}]:TypeError:('expected string without null bytes',)
835 l[:] = [{"\0" : 1}]:TypeError:('expected string without null bytes',) 855 l[:] = [{"\0" : 1}]:TypeError:('expected string without null bytes',)
836 <<< Finished 856 <<< Finished