Skip to content

Commit da92dfc

Browse files
committed
updated for version 7.3.1166
Problem: Loading Python modules is not tested. Solution: Enable commented-out tests, add missing files. (ZyX)
1 parent 865eb41 commit da92dfc

11 files changed

Lines changed: 26 additions & 14 deletions

File tree

.hgignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ gvimext.lib
4444
*.mo
4545
*.swp
4646
*~
47+
*.pyc
4748
src/po/vim.pot
4849

4950
# Generated by "make test"

Filelist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ SRC_ALL = \
8484
src/testdir/test49.vim \
8585
src/testdir/test60.vim \
8686
src/testdir/test83-tags? \
87+
src/testdir/python2/*.py \
88+
src/testdir/python3/*.py \
89+
src/testdir/pythonx/*.py \
8790
src/proto.h \
8891
src/proto/blowfish.pro \
8992
src/proto/buffer.pro \

src/testdir/python2/module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dir = '2'

src/testdir/python3/module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dir = '3'

src/testdir/pythonx/module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dir = 'x'

src/testdir/pythonx/modulex.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ddir = 'xx'

src/testdir/test86.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,13 +1069,13 @@ ee('vim.current.tabpage = True')
10691069
ee('vim.current.xxx = True')
10701070
EOF
10711071
:"
1072-
:" Test import TODO: BROKEN
1073-
:"py << EOF
1074-
:"vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
1075-
:"from module import dir as d
1076-
:"from modulex import ddir
1077-
:"cb.append(d + ',' + ddir)
1078-
:"EOF
1072+
:" Test import
1073+
py << EOF
1074+
vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
1075+
from module import dir as d
1076+
from modulex import ddir
1077+
cb.append(d + ',' + ddir)
1078+
EOF
10791079
:"
10801080
:" Test exceptions
10811081
:fun Exe(e)

src/testdir/test86.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,7 @@ vim.current.buffer = True:(<type 'exceptions.TypeError'>, TypeError('expected vi
10831083
vim.current.window = True:(<type 'exceptions.TypeError'>, TypeError('expected vim.Window object',))
10841084
vim.current.tabpage = True:(<type 'exceptions.TypeError'>, TypeError('expected vim.TabPage object',))
10851085
vim.current.xxx = True:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
1086+
2,xx
10861087
vim.command("throw 'abc'"):(<class 'vim.error'>, error('abc',))
10871088
Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
10881089
vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))

src/testdir/test87.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,13 +1036,13 @@ ee('vim.current.tabpage = True')
10361036
ee('vim.current.xxx = True')
10371037
EOF
10381038
:"
1039-
:" Test import TODO: BROKEN
1040-
:"py3 << EOF
1041-
:"vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
1042-
:"from module import dir as d
1043-
:"from modulex import ddir
1044-
:"cb.append(d + ',' + ddir)
1045-
:"EOF
1039+
:" Test import
1040+
py3 << EOF
1041+
vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
1042+
from module import dir as d
1043+
from modulex import ddir
1044+
cb.append(d + ',' + ddir)
1045+
EOF
10461046
:"
10471047
:" Test exceptions
10481048
:fun Exe(e)

src/testdir/test87.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ vim.current.buffer = True:(<class 'TypeError'>, TypeError('expected vim.Buffer o
10921092
vim.current.window = True:(<class 'TypeError'>, TypeError('expected vim.Window object',))
10931093
vim.current.tabpage = True:(<class 'TypeError'>, TypeError('expected vim.TabPage object',))
10941094
vim.current.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
1095+
3,xx
10951096
vim.command("throw 'abc'"):(<class 'vim.error'>, error('abc',))
10961097
Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
10971098
vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))

0 commit comments

Comments
 (0)