Mercurial > vim
annotate src/testdir/test17.in @ 8232:a777ff826523 v7.4.1409
commit https://github.com/vim/vim/commit/1858a842af5e3b07157add378ee3fd7b512cfea6
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 23 22:30:31 2016 +0100
patch 7.4.1409
Problem: Configure includes GUI despite --disable-gui flag.
Solution: Add SKIP_GTK3. (Kazunobu Kuriyama)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 23 Feb 2016 22:45:09 +0100 |
parents | bc269cf15ccd |
children | 05e7d084c6c2 |
rev | line source |
---|---|
3699 | 1 Tests for: |
2 - "gf" on ${VAR}, | |
3 - ":checkpath!" with various 'include' settings. | |
7 | 4 |
5 STARTTEST | |
6 :so small.vim | |
7 :if has("ebcdic") | |
8 : set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,} | |
9 :else | |
10 : set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,} | |
11 :endif | |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
12 :function! DeleteDirectory(dir) |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
13 : if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32") |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
14 : exec "silent !rmdir /Q /S " . a:dir |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
15 : else |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
16 : exec "silent !rm -rf " . a:dir |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
17 : endif |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
18 :endfun |
7 | 19 :if has("unix") |
20 :let $CDIR = "." | |
21 /CDIR | |
22 :else | |
23 :if has("amiga") | |
24 :let $TDIR = "/testdir" | |
25 :else | |
26 :let $TDIR = "." | |
27 :endif | |
28 /TDIR | |
29 :endif | |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
30 :" Dummy writing for making that sure gf doesn't fail even if the current |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
31 :" file is modified. It can be occurred when executing the following command |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
32 :" directly on Windows without fixing the 'fileformat': |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
33 :" > nmake -f Make_dos.mak test17.out |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
34 :w! test.out |
7 | 35 gf |
5118
5569d11ef585
updated for version 7.3.1302
Bram Moolenaar <bram@vim.org>
parents:
4956
diff
changeset
|
36 :set ff=unix |
7 | 37 :w! test.out |
3699 | 38 :brewind |
7 | 39 ENDTEST |
40 | |
41 ${CDIR}/test17a.in | |
42 $TDIR/test17a.in | |
3699 | 43 |
44 STARTTEST | |
45 :" check for 'include' without \zs or \ze | |
46 :lang C | |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
47 :call delete("./Xbase.a") |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
48 :call DeleteDirectory("Xdir1") |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
49 :!mkdir Xdir1 |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
50 :!mkdir "Xdir1/dir2" |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
51 :e! Xdir1/dir2/foo.a |
7003 | 52 i#include "bar.a": |
3699 | 53 :w |
54 :e Xdir1/dir2/bar.a | |
7003 | 55 i#include "baz.a": |
3699 | 56 :w |
57 :e Xdir1/dir2/baz.a | |
7003 | 58 i#include "foo.a": |
3699 | 59 :w |
60 :e Xbase.a | |
61 :set path=Xdir1/dir2 | |
7003 | 62 i#include <foo.a>: |
3699 | 63 :w |
64 :redir! >>test.out | |
65 :checkpath! | |
66 :redir END | |
67 :brewind | |
68 ENDTEST | |
69 | |
70 STARTTEST | |
71 :" check for 'include' with \zs and \ze | |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
72 :call delete("./Xbase.b") |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
73 :call DeleteDirectory("Xdir1") |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
74 :!mkdir Xdir1 |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
75 :!mkdir "Xdir1/dir2" |
3699 | 76 :let &include='^\s*%inc\s*/\zs[^/]\+\ze' |
77 :function! DotsToSlashes() | |
78 : return substitute(v:fname, '\.', '/', 'g') . '.b' | |
79 :endfunction | |
80 :let &includeexpr='DotsToSlashes()' | |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
81 :e! Xdir1/dir2/foo.b |
7003 | 82 i%inc /bar/: |
3699 | 83 :w |
84 :e Xdir1/dir2/bar.b | |
7003 | 85 i%inc /baz/: |
3699 | 86 :w |
87 :e Xdir1/dir2/baz.b | |
7003 | 88 i%inc /foo/: |
3699 | 89 :w |
90 :e Xbase.b | |
91 :set path=Xdir1/dir2 | |
7003 | 92 i%inc /foo/: |
3699 | 93 :w |
94 :redir! >>test.out | |
95 :checkpath! | |
96 :redir END | |
97 :brewind | |
98 ENDTEST | |
99 | |
100 STARTTEST | |
101 :" check for 'include' with \zs and no \ze | |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
102 :call delete("./Xbase.c") |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
103 :call DeleteDirectory("Xdir1") |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
104 :!mkdir Xdir1 |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
105 :!mkdir "Xdir1/dir2" |
3699 | 106 :let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze' |
107 :function! StripNewlineChar() | |
108 : if v:fname =~ '\n$' | |
109 : return v:fname[:-2] | |
110 : endif | |
111 : return v:fname | |
112 :endfunction | |
113 :let &includeexpr='StripNewlineChar()' | |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
114 :e! Xdir1/dir2/foo.c |
7003 | 115 i%inc bar.c: |
3699 | 116 :w |
117 :e Xdir1/dir2/bar.c | |
7003 | 118 i%inc baz.c: |
3699 | 119 :w |
120 :e Xdir1/dir2/baz.c | |
7003 | 121 i%inc foo.c: |
3699 | 122 :w |
123 :e Xdir1/dir2/FALSE.c | |
7003 | 124 i%inc foo.c: |
3699 | 125 :w |
126 :e Xbase.c | |
127 :set path=Xdir1/dir2 | |
7003 | 128 i%inc FALSE.c foo.c: |
3699 | 129 :w |
130 :redir! >>test.out | |
131 :checkpath! | |
132 :redir END | |
133 :brewind | |
5118
5569d11ef585
updated for version 7.3.1302
Bram Moolenaar <bram@vim.org>
parents:
4956
diff
changeset
|
134 :" change "\" to "/" for Windows and fix 'fileformat' |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
135 :e test.out |
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
136 :%s#\\#/#g |
5118
5569d11ef585
updated for version 7.3.1302
Bram Moolenaar <bram@vim.org>
parents:
4956
diff
changeset
|
137 :set ff& |
4956
5cd32322154c
updated for version 7.3.1223
Bram Moolenaar <bram@vim.org>
parents:
3699
diff
changeset
|
138 :w |
3699 | 139 :q |
140 ENDTEST | |
141 |