blob: 3fc39fe4d9ea1218a7be16f65b4ec861e8daf77c [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
Bram Moolenaarc3c766e2017-03-08 22:55:19 +01009:set belloff=all
Bram Moolenaar071d4272004-06-13 20:20:40 +000010/Start cursor here
11vaBiBD:?Bug?,/Piece/-2w! test.out
12/^- Bug
13:s/u/~u~/
14:s/i/~u~/
15:s/o/~~~/
16:.w >>test.out
17:if has("ebcdic")
18: let tt = "o\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>"
19:else
20: let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
21:endif
22:exe "normal " . tt
Bram Moolenaar9d2c8c12007-09-25 16:00:00 +000023:unlet tt
Bram Moolenaar071d4272004-06-13 20:20:40 +000024:.w >>test.out
25:set vb
26/^Piece
272]maA:.w >>test.out
28j]maB:.w >>test.out
29]maC:.w >>test.out
30[maD:.w >>test.out
31k2[maE:.w >>test.out
323[maF:.w >>test.out
33]MaG:.w >>test.out
34j2]MaH:.w >>test.out
35]M]MaI:.w >>test.out
362[MaJ:.w >>test.out
37k[MaK:.w >>test.out
383[MaL:.w >>test.out
Bram Moolenaardb333a52013-03-19 15:27:48 +010039:"
40/^foobar
41:let startline = line('.')
42:call search('foobar', 'c')
43:call append(line('$'), line('.') - startline)
44j:call search('^$', 'c')
45:call append(line('$'), line('.') - startline)
46:call search('^$', 'bc')
47:call append(line('$'), line('.') - startline)
Bram Moolenaar7bcb30e2013-04-03 21:14:29 +020048/two
49:call search('.', 'c')
50:call append(line('$'), getline('.')[col('.') - 1:])
Bram Moolenaar14177b72014-01-14 15:53:51 +010051:"
52/^substitute
53:s/foo/bar/
54:$put =@/
55/^substitute
56:keeppatterns s/asdf/xyz/
57:$put =@/
58/^substitute
59Y:$put =@0
Bram Moolenaarac8400d2014-01-14 21:31:34 +010060/bar /e
61:$put =@0
62-:keeppatterns /xyz
630dn:/^search()/,$w >>test.out
Bram Moolenaar071d4272004-06-13 20:20:40 +000064:qa!
65ENDTEST
66
67- Bug in "vPPPP" on this text (Webb):
68 {
69 cmd;
70 {
71 cmd; /* <-- Start cursor here */
72 {
73 }
74 }
75 }
76
77Piece of Java
78{
79 tt m1 {
80 t1;
81 } e1
82
83 tt m2 {
84 t2;
85 } e2
86
87 tt m3 {
88 if (x)
89 {
90 t3;
91 }
92 } e3
93}
Bram Moolenaardb333a52013-03-19 15:27:48 +010094
95foobar
96
Bram Moolenaar14177b72014-01-14 15:53:51 +010097substitute foo asdf
Bram Moolenaardb333a52013-03-19 15:27:48 +010098
Bram Moolenaar7bcb30e2013-04-03 21:14:29 +020099one two
Bram Moolenaardb333a52013-03-19 15:27:48 +0100100search()