blob: fb987ebc88b6e25561c5c194452bd4a4b5cbf1c0 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001Tests for "vaBiB", end could be wrong.
2Also test ":s/pat/sub/" with different ~s in sub.
3Also test for ^Vxff and ^Vo123 in Insert mode.
4Also test "[m", "]m", "[M" and "]M"
Bram Moolenaardb333a52013-03-19 15:27:48 +01005Also test search()
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
7STARTTEST
8:so small.vim
9/Start cursor here
10vaBiBD:?Bug?,/Piece/-2w! test.out
11/^- Bug
12:s/u/~u~/
13:s/i/~u~/
14:s/o/~~~/
15:.w >>test.out
16:if has("ebcdic")
17: let tt = "o\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>"
18:else
19: let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
20:endif
21:exe "normal " . tt
Bram Moolenaar9d2c8c12007-09-25 16:00:00 +000022:unlet tt
Bram Moolenaar071d4272004-06-13 20:20:40 +000023:.w >>test.out
24:set vb
25/^Piece
262]maA:.w >>test.out
27j]maB:.w >>test.out
28]maC:.w >>test.out
29[maD:.w >>test.out
30k2[maE:.w >>test.out
313[maF:.w >>test.out
32]MaG:.w >>test.out
33j2]MaH:.w >>test.out
34]M]MaI:.w >>test.out
352[MaJ:.w >>test.out
36k[MaK:.w >>test.out
373[MaL:.w >>test.out
Bram Moolenaardb333a52013-03-19 15:27:48 +010038:"
39/^foobar
40:let startline = line('.')
41:call search('foobar', 'c')
42:call append(line('$'), line('.') - startline)
43j:call search('^$', 'c')
44:call append(line('$'), line('.') - startline)
45:call search('^$', 'bc')
46:call append(line('$'), line('.') - startline)
Bram Moolenaar7bcb30e2013-04-03 21:14:29 +020047/two
48:call search('.', 'c')
49:call append(line('$'), getline('.')[col('.') - 1:])
Bram Moolenaar14177b72014-01-14 15:53:51 +010050:"
51/^substitute
52:s/foo/bar/
53:$put =@/
54/^substitute
55:keeppatterns s/asdf/xyz/
56:$put =@/
57/^substitute
58Y:$put =@0
Bram Moolenaarac8400d2014-01-14 21:31:34 +010059/bar /e
60:$put =@0
61-:keeppatterns /xyz
620dn:/^search()/,$w >>test.out
Bram Moolenaar071d4272004-06-13 20:20:40 +000063:qa!
64ENDTEST
65
66- Bug in "vPPPP" on this text (Webb):
67 {
68 cmd;
69 {
70 cmd; /* <-- Start cursor here */
71 {
72 }
73 }
74 }
75
76Piece of Java
77{
78 tt m1 {
79 t1;
80 } e1
81
82 tt m2 {
83 t2;
84 } e2
85
86 tt m3 {
87 if (x)
88 {
89 t3;
90 }
91 } e3
92}
Bram Moolenaardb333a52013-03-19 15:27:48 +010093
94foobar
95
Bram Moolenaar14177b72014-01-14 15:53:51 +010096substitute foo asdf
Bram Moolenaardb333a52013-03-19 15:27:48 +010097
Bram Moolenaar7bcb30e2013-04-03 21:14:29 +020098one two
Bram Moolenaardb333a52013-03-19 15:27:48 +010099search()