changeset 4839:d59ff2114733 v7.3.1166

updated for version 7.3.1166 Problem: Loading Python modules is not tested. Solution: Enable commented-out tests, add missing files. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Tue, 11 Jun 2013 18:48:21 +0200
parents 3f7ab3403078
children 1a93b399dd6f
files .hgignore Filelist src/testdir/python2/module.py src/testdir/python3/module.py src/testdir/pythonx/module.py src/testdir/pythonx/modulex.py src/testdir/test86.in src/testdir/test86.ok src/testdir/test87.in src/testdir/test87.ok src/version.c
diffstat 11 files changed, 26 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore
+++ b/.hgignore
@@ -44,6 +44,7 @@ gvimext.lib
 *.mo
 *.swp
 *~
+*.pyc
 src/po/vim.pot
 
 # Generated by "make test"
--- a/Filelist
+++ b/Filelist
@@ -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 \
new file mode 100644
--- /dev/null
+++ b/src/testdir/python2/module.py
@@ -0,0 +1,1 @@
+dir = '2'
new file mode 100644
--- /dev/null
+++ b/src/testdir/python3/module.py
@@ -0,0 +1,1 @@
+dir = '3'
new file mode 100644
--- /dev/null
+++ b/src/testdir/pythonx/module.py
@@ -0,0 +1,1 @@
+dir = 'x'
new file mode 100644
--- /dev/null
+++ b/src/testdir/pythonx/modulex.py
@@ -0,0 +1,1 @@
+ddir = 'xx'
--- a/src/testdir/test86.in
+++ b/src/testdir/test86.in
@@ -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)
--- a/src/testdir/test86.ok
+++ b/src/testdir/test86.ok
@@ -1083,6 +1083,7 @@ vim.current.buffer = True:(<type 'except
 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',))
--- a/src/testdir/test87.in
+++ b/src/testdir/test87.in
@@ -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)
--- a/src/testdir/test87.ok
+++ b/src/testdir/test87.ok
@@ -1092,6 +1092,7 @@ vim.current.buffer = True:(<class 'TypeE
 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',))
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1166,
+/**/
     1165,
 /**/
     1164,