Skip to content

Commit

Permalink
updated for version 7.3.1166
Browse files Browse the repository at this point in the history
Problem:    Loading Python modules is not tested.
Solution:   Enable commented-out tests, add missing files. (ZyX)
  • Loading branch information
brammool committed Jun 11, 2013
1 parent 16619a2 commit a9f2220
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ gvimext.lib
*.mo
*.swp
*~
*.pyc
src/po/vim.pot

# Generated by "make test"
Expand Down
3 changes: 3 additions & 0 deletions Filelist
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ SRC_ALL = \
src/testdir/test49.vim \
src/testdir/test60.vim \
src/testdir/test83-tags? \
src/testdir/python2/*.py \
src/testdir/python3/*.py \
src/testdir/pythonx/*.py \
src/proto.h \
src/proto/blowfish.pro \
src/proto/buffer.pro \
Expand Down
1 change: 1 addition & 0 deletions src/testdir/python2/module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dir = '2'
1 change: 1 addition & 0 deletions src/testdir/python3/module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dir = '3'
1 change: 1 addition & 0 deletions src/testdir/pythonx/module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dir = 'x'
1 change: 1 addition & 0 deletions src/testdir/pythonx/modulex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ddir = 'xx'
14 changes: 7 additions & 7 deletions src/testdir/test86.in
Original file line number Diff line number Diff line change
Expand Up @@ -1069,13 +1069,13 @@ ee('vim.current.tabpage = True')
ee('vim.current.xxx = True')
EOF
:"
:" Test import TODO: BROKEN
:"py << EOF
:"vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
:"from module import dir as d
:"from modulex import ddir
:"cb.append(d + ',' + ddir)
:"EOF
:" Test import
py << EOF
vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
from module import dir as d
from modulex import ddir
cb.append(d + ',' + ddir)
EOF
:"
:" Test exceptions
:fun Exe(e)
Expand Down
1 change: 1 addition & 0 deletions src/testdir/test86.ok
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ vim.current.buffer = True:(<type 'exceptions.TypeError'>, TypeError('expected vi
vim.current.window = True:(<type 'exceptions.TypeError'>, TypeError('expected vim.Window object',))
vim.current.tabpage = True:(<type 'exceptions.TypeError'>, TypeError('expected vim.TabPage object',))
vim.current.xxx = True:(<type 'exceptions.AttributeError'>, AttributeError('xxx',))
2,xx
vim.command("throw 'abc'"):(<class 'vim.error'>, error('abc',))
Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
Expand Down
14 changes: 7 additions & 7 deletions src/testdir/test87.in
Original file line number Diff line number Diff line change
Expand Up @@ -1036,13 +1036,13 @@ ee('vim.current.tabpage = True')
ee('vim.current.xxx = True')
EOF
:"
:" Test import TODO: BROKEN
:"py3 << EOF
:"vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
:"from module import dir as d
:"from modulex import ddir
:"cb.append(d + ',' + ddir)
:"EOF
:" Test import
py3 << EOF
vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
from module import dir as d
from modulex import ddir
cb.append(d + ',' + ddir)
EOF
:"
:" Test exceptions
:fun Exe(e)
Expand Down
1 change: 1 addition & 0 deletions src/testdir/test87.ok
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ vim.current.buffer = True:(<class 'TypeError'>, TypeError('expected vim.Buffer o
vim.current.window = True:(<class 'TypeError'>, TypeError('expected vim.Window object',))
vim.current.tabpage = True:(<class 'TypeError'>, TypeError('expected vim.TabPage object',))
vim.current.xxx = True:(<class 'AttributeError'>, AttributeError('xxx',))
3,xx
vim.command("throw 'abc'"):(<class 'vim.error'>, error('abc',))
Exe("throw 'def'"):(<class 'vim.error'>, error('def',))
vim.eval("Exe('throw ''ghi''')"):(<class 'vim.error'>, error('ghi',))
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1166,
/**/
1165,
/**/
Expand Down

0 comments on commit a9f2220

Please sign in to comment.