annotate src/testdir/test50.in @ 4511:ce94a870b59b v7.3.1003

updated for version 7.3.1003 Problem: Python interface does not compile with Python 2.2 Solution: Fix thread issues and True/False. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Tue, 21 May 2013 22:23:56 +0200
parents 3fc0f57ecb91
children 5cd32322154c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 Test for shortpathname ':8' extension.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 Only for use on Win32 systems!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 STARTTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 :so small.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :fun! TestIt(file, bits, expected)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 let res=fnamemodify(a:file,a:bits)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if a:expected == ''
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 echo "'".a:file."'->(".a:bits.")->'".res."'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if substitute(res,'/','\\', 'g') != substitute( a:expected, '/','\\', 'g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 echo "FAILED: '".a:file."'->(".a:bits.")->'".res."'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 echo "Expected: '".a:expected."'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 echo "OK"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 :fun! MakeDir( dirname )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 "exe '!mkdir '.substitute(a:dirname,'/','\\','g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 call system('mkdir '.substitute(a:dirname,'/','\\','g'))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 :fun! RMDir( dirname)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 "exe '!rmdir '.substitute(a:dirname,'/','\\','g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 call system('rmdir '.substitute(a:dirname,'/','\\','g'))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 :fun! MakeFile( filename)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 "exe '!copy nul '.substitute(a:filename,'/','\\','g')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 call system('copy nul '.substitute(a:filename,'/','\\','g'))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 :fun! TestColonEight()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 redir! >test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " This could change for CygWin to //cygdrive/c
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 let dir1='c:/x.x.y'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 if filereadable(dir1) || isdirectory(dir1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 call confirm( "'".dir1."' exists, cannot run test" )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 return
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 let file1=dir1.'/zz.y.txt'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 let nofile1=dir1.'/z.y.txt'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 let dir2=dir1.'/VimIsTheGreatestSinceSlicedBread'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 let file2=dir2.'/z.txt'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let nofile2=dir2.'/zz.txt'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 let resdir1='c:/XX2235~1.Y'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 let resfile1=resdir1.'/ZZY~1.TXT'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 let resnofile1=resdir1.'/z.y.txt'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 let resdir2=resdir1.'/VIMIST~1'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 let resfile2=resdir2.'/z.txt'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 let resnofile2=resdir2.'/zz.txt'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 call MakeDir( dir1 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 call MakeDir( dir2 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 call MakeFile( file1 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 call MakeFile( file2 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 call TestIt(file1, ':p:8', resfile1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 call TestIt(nofile1, ':p:8', resnofile1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 call TestIt(file2, ':p:8', resfile2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 call TestIt(nofile2, ':p:8', resnofile2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 call TestIt(nofile2, ':p:8:h', fnamemodify(resnofile2,':h'))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 exe 'cd '.dir1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 call TestIt(file1, ':.:8', strpart(resfile1,strlen(resdir1)+1))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 call TestIt(nofile1, ':.:8', strpart(resnofile1,strlen(resdir1)+1))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 call TestIt(file2, ':.:8', strpart(resfile2,strlen(resdir1)+1))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 call TestIt(nofile2, ':.:8', strpart(resnofile2,strlen(resdir1)+1))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 let $HOME=dir1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 call TestIt(file1, ':~:8', '~'.strpart(resfile1,strlen(resdir1)))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 call TestIt(nofile1, ':~:8', '~'.strpart(resnofile1,strlen(resdir1)))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 call TestIt(file2, ':~:8', '~'.strpart(resfile2,strlen(resdir1)))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 call TestIt(nofile2, ':~:8', '~'.strpart(resnofile2,strlen(resdir1)))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 cd c:/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 call delete( file2 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 call delete( file1 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 call RMDir( dir2 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 call RMDir( dir1 )
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 echo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 redir END
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 :let dir = getcwd()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 :call TestColonEight()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 :exe "cd " . dir
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 :edit! test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 :set ff=dos
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 :w
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85