Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | Tests for "vaBiB", end could be wrong. |
| 2 | Also test ":s/pat/sub/" with different ~s in sub. |
| 3 | Also test for ^Vxff and ^Vo123 in Insert mode. |
| 4 | Also test "[m", "]m", "[M" and "]M" |
Bram Moolenaar | db333a5 | 2013-03-19 15:27:48 +0100 | [diff] [blame] | 5 | Also test search() |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 6 | |
| 7 | STARTTEST |
| 8 | :so small.vim |
| 9 | /Start cursor here |
| 10 | vaBiBD:?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 Moolenaar | 9d2c8c1 | 2007-09-25 16:00:00 +0000 | [diff] [blame] | 22 | :unlet tt |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 23 | :.w >>test.out |
| 24 | :set vb |
| 25 | /^Piece |
| 26 | 2]maA:.w >>test.out |
| 27 | j]maB:.w >>test.out |
| 28 | ]maC:.w >>test.out |
| 29 | [maD:.w >>test.out |
| 30 | k2[maE:.w >>test.out |
| 31 | 3[maF:.w >>test.out |
| 32 | ]MaG:.w >>test.out |
| 33 | j2]MaH:.w >>test.out |
| 34 | ]M]MaI:.w >>test.out |
| 35 | 2[MaJ:.w >>test.out |
| 36 | k[MaK:.w >>test.out |
| 37 | 3[MaL:.w >>test.out |
Bram Moolenaar | db333a5 | 2013-03-19 15:27:48 +0100 | [diff] [blame] | 38 | :" |
| 39 | /^foobar |
| 40 | :let startline = line('.') |
| 41 | :call search('foobar', 'c') |
| 42 | :call append(line('$'), line('.') - startline) |
| 43 | j:call search('^$', 'c') |
| 44 | :call append(line('$'), line('.') - startline) |
| 45 | :call search('^$', 'bc') |
| 46 | :call append(line('$'), line('.') - startline) |
Bram Moolenaar | 7bcb30e | 2013-04-03 21:14:29 +0200 | [diff] [blame] | 47 | /two |
| 48 | :call search('.', 'c') |
| 49 | :call append(line('$'), getline('.')[col('.') - 1:]) |
Bram Moolenaar | 14177b7 | 2014-01-14 15:53:51 +0100 | [diff] [blame] | 50 | :" |
| 51 | /^substitute |
| 52 | :s/foo/bar/ |
| 53 | :$put =@/ |
| 54 | /^substitute |
| 55 | :keeppatterns s/asdf/xyz/ |
| 56 | :$put =@/ |
| 57 | /^substitute |
| 58 | Y:$put =@0 |
Bram Moolenaar | ac8400d | 2014-01-14 21:31:34 +0100 | [diff] [blame] | 59 | /bar /e |
| 60 | :$put =@0 |
| 61 | -:keeppatterns /xyz |
| 62 | 0dn:/^search()/,$w >>test.out |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 63 | :qa! |
| 64 | ENDTEST |
| 65 | |
| 66 | - Bug in "vPPPP" on this text (Webb): |
| 67 | { |
| 68 | cmd; |
| 69 | { |
| 70 | cmd; /* <-- Start cursor here */ |
| 71 | { |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | Piece 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 Moolenaar | db333a5 | 2013-03-19 15:27:48 +0100 | [diff] [blame] | 93 | |
| 94 | foobar |
| 95 | |
Bram Moolenaar | 14177b7 | 2014-01-14 15:53:51 +0100 | [diff] [blame] | 96 | substitute foo asdf |
Bram Moolenaar | db333a5 | 2013-03-19 15:27:48 +0100 | [diff] [blame] | 97 | |
Bram Moolenaar | 7bcb30e | 2013-04-03 21:14:29 +0200 | [diff] [blame] | 98 | one two |
Bram Moolenaar | db333a5 | 2013-03-19 15:27:48 +0100 | [diff] [blame] | 99 | search() |