summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-06-11 18:48:21 +0200
committerBram Moolenaar <Bram@vim.org>2013-06-11 18:48:21 +0200
commita9f2220176cc318ed076472ac41d00e70934bc83 (patch)
tree04d596972eae42b9930a9910f58910badd71f3f6 /src/testdir
parent16619a235bae49c11d28ac462dc2d42fcfea44ba (diff)
downloadvim-a9f2220176cc318ed076472ac41d00e70934bc83.zip
updated for version 7.3.1166
Problem: Loading Python modules is not tested. Solution: Enable commented-out tests, add missing files. (ZyX)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/python2/module.py1
-rw-r--r--src/testdir/python3/module.py1
-rw-r--r--src/testdir/pythonx/module.py1
-rw-r--r--src/testdir/pythonx/modulex.py1
-rw-r--r--src/testdir/test86.in14
-rw-r--r--src/testdir/test86.ok1
-rw-r--r--src/testdir/test87.in14
-rw-r--r--src/testdir/test87.ok1
8 files changed, 20 insertions, 14 deletions
diff --git a/src/testdir/python2/module.py b/src/testdir/python2/module.py
new file mode 100644
index 000000000..5f0a6f0a9
--- /dev/null
+++ b/src/testdir/python2/module.py
@@ -0,0 +1 @@
+dir = '2'
diff --git a/src/testdir/python3/module.py b/src/testdir/python3/module.py
new file mode 100644
index 000000000..1ccfb094c
--- /dev/null
+++ b/src/testdir/python3/module.py
@@ -0,0 +1 @@
+dir = '3'
diff --git a/src/testdir/pythonx/module.py b/src/testdir/pythonx/module.py
new file mode 100644
index 000000000..6bf5a6498
--- /dev/null
+++ b/src/testdir/pythonx/module.py
@@ -0,0 +1 @@
+dir = 'x'
diff --git a/src/testdir/pythonx/modulex.py b/src/testdir/pythonx/modulex.py
new file mode 100644
index 000000000..ec6a70633
--- /dev/null
+++ b/src/testdir/pythonx/modulex.py
@@ -0,0 +1 @@
+ddir = 'xx'
diff --git a/src/testdir/test86.in b/src/testdir/test86.in
index f2248c477..26c7fe217 100644
--- 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)
diff --git a/src/testdir/test86.ok b/src/testdir/test86.ok
index 3c22bf63d..145979ff5 100644
--- a/src/testdir/test86.ok
+++ b/src/testdir/test86.ok
@@ -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',))
diff --git a/src/testdir/test87.in b/src/testdir/test87.in
index 986565e43..7a3d58359 100644
--- 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)
diff --git a/src/testdir/test87.ok b/src/testdir/test87.ok
index 01ff127ec..31c7df4b6 100644
--- a/src/testdir/test87.ok
+++ b/src/testdir/test87.ok
@@ -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',))