comparison src/testdir/test86.in @ 4851:96e154e825a7 v7.3.1172

updated for version 7.3.1172 Problem: Python 2: loading modules doesn't work well. Solution: Fix the code. Add more tests. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Wed, 12 Jun 2013 14:20:36 +0200
parents d59ff2114733
children b584d361e746
comparison
equal deleted inserted replaced
4850:6c1f3a6714bd 4851:96e154e825a7
6 See http://svn.python.org/view/python/trunk/Misc/README.valgrind?view=markup 6 See http://svn.python.org/view/python/trunk/Misc/README.valgrind?view=markup
7 7
8 STARTTEST 8 STARTTEST
9 :so small.vim 9 :so small.vim
10 :set encoding=latin1 10 :set encoding=latin1
11 :set noswapfile
11 :if !has('python') | e! test.ok | wq! test.out | endif 12 :if !has('python') | e! test.ok | wq! test.out | endif
12 :lang C 13 :lang C
13 :py import vim 14 :py import vim
14 :fun Test() 15 :fun Test()
15 :let l = [] 16 :let l = []
1069 ee('vim.current.xxx = True') 1070 ee('vim.current.xxx = True')
1070 EOF 1071 EOF
1071 :" 1072 :"
1072 :" Test import 1073 :" Test import
1073 py << EOF 1074 py << EOF
1075 sys.path.insert(0, os.path.join(os.getcwd(), 'python_before'))
1076 sys.path.append(os.path.join(os.getcwd(), 'python_after'))
1074 vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\') 1077 vim.options['rtp'] = os.getcwd().replace(',', '\\,').replace('\\', '\\\\')
1075 from module import dir as d 1078 from module import dir as d
1076 from modulex import ddir 1079 from modulex import ddir
1077 cb.append(d + ',' + ddir) 1080 cb.append(d + ',' + ddir)
1081 import before
1082 cb.append(before.dir)
1083 import after
1084 cb.append(after.dir)
1078 EOF 1085 EOF
1079 :" 1086 :"
1080 :" Test exceptions 1087 :" Test exceptions
1081 :fun Exe(e) 1088 :fun Exe(e)
1082 : execute a:e 1089 : execute a:e