annotate src/testdir/test80.in @ 9719:219dbe63ad2a v7.4.2135

commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 31 14:17:27 2016 +0200 patch 7.4.2135 Problem: Various tiny issues. Solution: Update comments, white space, etc.
author Christian Brabandt <cb@256bit.org>
date Sun, 31 Jul 2016 14:30:05 +0200
parents a63d0cd691dc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9719
219dbe63ad2a commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents: 5794
diff changeset
1 Test for *sub-replace-special* and *sub-replace-expression* on substitute().
219dbe63ad2a commit https://github.com/vim/vim/commit/89eaa4185efacab253b23a182c1c8a7bbf1096c9
Christian Brabandt <cb@256bit.org>
parents: 5794
diff changeset
2 Test for submatch() on substitute().
2904
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 Test for *:s%* on :substitute.
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :so small.vim
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 TEST_1:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 :set magic
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 :set cpo&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :$put =\"\n\nTEST_1:\"
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 :$put =substitute('A', 'A', '&&', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 :$put =substitute('B', 'B', '\&', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 :$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\3\2\1', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :$put =substitute('D', 'D', 'd', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :$put =substitute('E', 'E', '~', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 :$put =substitute('F', 'F', '\~', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :$put =substitute('G', 'G', '\ugg', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :$put =substitute('H', 'H', '\Uh\Eh', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :$put =substitute('I', 'I', '\lII', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :$put =substitute('J', 'J', '\LJ\EJ', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :$put =substitute('K', 'K', '\Uk\ek', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :$put =substitute('lLl', 'L', ' ', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :$put =substitute('mMm', 'M', '\r', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :$put =substitute('nNn', 'N', '\ ', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :$put =substitute('oOo', 'O', '\n', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :$put =substitute('pPp', 'P', '\b', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :$put =substitute('qQq', 'Q', '\t', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :$put =substitute('rRr', 'R', '\\', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :$put =substitute('sSs', 'S', '\c', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :$put =substitute('uUu', 'U', \"\n\", '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :$put =substitute('vVv', 'V', \"\b\", '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :$put =substitute('wWw', 'W', \"\\\", '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :$put =substitute('xXx', 'X', \"\r\", '')
4244
7faeece39228 updated for version 7.3.873
Bram Moolenaar <bram@vim.org>
parents: 4099
diff changeset
38 :$put =substitute('Y', 'Y', '\L\uyYy\l\EY', '')
7faeece39228 updated for version 7.3.873
Bram Moolenaar <bram@vim.org>
parents: 4099
diff changeset
39 :$put =substitute('Z', 'Z', '\U\lZzZ\u\Ez', '')
2904
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 /^TEST_2
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 TEST_2:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 :set nomagic
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 :set cpo&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 :$put =\"\n\nTEST_2:\"
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 :$put =substitute('A', 'A', '&&', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 :$put =substitute('B', 'B', '\&', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 :$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\3\2\1', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 :$put =substitute('D', 'D', 'd', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 :$put =substitute('E', 'E', '~', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 :$put =substitute('F', 'F', '\~', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 :$put =substitute('G', 'G', '\ugg', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 :$put =substitute('H', 'H', '\Uh\Eh', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 :$put =substitute('I', 'I', '\lII', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 :$put =substitute('J', 'J', '\LJ\EJ', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 :$put =substitute('K', 'K', '\Uk\ek', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 :$put =substitute('lLl', 'L', ' ', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 :$put =substitute('mMm', 'M', '\r', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 :$put =substitute('nNn', 'N', '\ ', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 :$put =substitute('oOo', 'O', '\n', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 :$put =substitute('pPp', 'P', '\b', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 :$put =substitute('qQq', 'Q', '\t', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 :$put =substitute('rRr', 'R', '\\', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 :$put =substitute('sSs', 'S', '\c', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 :$put =substitute('tTt', 'T', \"\r\", '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 :$put =substitute('uUu', 'U', \"\n\", '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 :$put =substitute('vVv', 'V', \"\b\", '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 :$put =substitute('wWw', 'W', \"\\\", '')
4244
7faeece39228 updated for version 7.3.873
Bram Moolenaar <bram@vim.org>
parents: 4099
diff changeset
72 :$put =substitute('X', 'X', '\L\uxXx\l\EX', '')
7faeece39228 updated for version 7.3.873
Bram Moolenaar <bram@vim.org>
parents: 4099
diff changeset
73 :$put =substitute('Y', 'Y', '\U\lYyY\u\Ey', '')
2904
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 /^TEST_3
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 TEST_3:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 :set magic&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 :set cpo&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 :$put =\"\n\nTEST_3:\"
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 :let y = substitute('aAa', 'A', '\="\\"', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 :let y = substitute('bBb', 'B', '\="\\\\"', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 :let y = substitute('cCc', 'C', '\=" "', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 :let y = substitute('dDd', 'D', '\="\\ "', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 :let y = substitute('eEe', 'E', '\="\\\\ "', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 :let y = substitute('fFf', 'F', '\="\\r"', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 :let y = substitute('jJj', 'J', '\="\\n"', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 :let y = substitute('kKk', 'K', '\="\r"', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 :let y = substitute('lLl', 'L', '\="\n"', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 /^TEST_4
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 TEST_4:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 :set magic&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 :set cpo&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100 :$put =\"\n\nTEST_4:\"
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 :let y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 :let y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 :let y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", " ", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 :let y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\ ", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 :let y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\ ", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 :let y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 :let y = substitute('jJj', 'J', '\=substitute(submatch(0), ".", "\\n", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 :let y = substitute('kKk', 'K', '\=substitute(submatch(0), ".", "\r", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 :let y = substitute('lLl', 'L', '\=substitute(submatch(0), ".", "\n", "")', '') | $put =y
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 /^TEST_5
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 TEST_5:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
114
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
115 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 :set magic&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
117 :set cpo&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
118 :$put =\"\n\nTEST_5:\"
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
119 :$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) . submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)', '')
5794
a63d0cd691dc updated for version 7.4.241
Bram Moolenaar <bram@vim.org>
parents: 5623
diff changeset
120 :$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=string([submatch(0, 1), submatch(9, 1), submatch(8, 1), submatch(7, 1), submatch(6, 1), submatch(5, 1), submatch(4, 1), submatch(3, 1), submatch(2, 1), submatch(1, 1)])', '')
2904
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 /^TEST_6
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
122 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124 TEST_6:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 :set magic&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
128 :$put =\"\n\nTEST_6:\"
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 :set cpo+=/
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
130 :$put =substitute('A', 'A', 'a', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131 :$put =substitute('B', 'B', '%', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 :set cpo-=/
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133 :$put =substitute('C', 'C', 'c', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134 :$put =substitute('D', 'D', '%', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 /^TEST_7
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
137
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
138 TEST_7:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
139
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
140 STARTTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
141 :set magic&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
142 :set cpo&
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
143 :$put =\"\n\nTEST_7:\"
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
144 :$put =substitute('A A', 'A.', '\=submatch(0)', '')
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
145 :$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
5794
a63d0cd691dc updated for version 7.4.241
Bram Moolenaar <bram@vim.org>
parents: 5623
diff changeset
146 :$put =substitute(\"B\nB\", 'B.', '\=string(submatch(0, 1))', '')
5388
8ced827b2e8b updated for version 7.4.045
Bram Moolenaar <bram@vim.org>
parents: 4244
diff changeset
147 :$put =substitute('-bb', '\zeb', 'a', 'g')
8ced827b2e8b updated for version 7.4.045
Bram Moolenaar <bram@vim.org>
parents: 4244
diff changeset
148 :$put =substitute('-bb', '\ze', 'c', 'g')
2904
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
149 /^TEST_8
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
150 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
151
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
152 TEST_8:
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
153
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
154 STARTTEST
4078
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
155 :set magic&
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
156 :set cpo&
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
157 :$put =\"\n\nTEST_8:\"
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
158 :$put =',,X'
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
159 :s/\(^\|,\)\ze\(,\|X\)/\1N/g
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
160 :$put =',,Y'
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
161 :s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
162 a:$put =',,Z'
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
163 :s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
4099
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
164 yy/^TEST_9:
4078
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
165 ENDTEST
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
166
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
167 TEST_9:
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
168
fdbded463fdc updated for version 7.3.793
Bram Moolenaar <bram@vim.org>
parents: 2904
diff changeset
169 STARTTEST
4099
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
170 :set magic&
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
171 :set cpo&
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
172 :$put =\"\n\nTEST_9:\"
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
173 :$put ='xxx'
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
174 :s/x/X/gc
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
175 yyq/^TEST_10:
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
176 ENDTEST
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
177
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
178 TEST_10:
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
179
77fa4dee43fc updated for version 7.3.803
Bram Moolenaar <bram@vim.org>
parents: 4078
diff changeset
180 STARTTEST
5623
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
181 :set magic&
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
182 :set cpo&
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
183 :$put =\"\n\nTEST_10:\"
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
184 :let y = substitute('123', '\zs', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
185 :let y = substitute('123', '\zs.', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
186 :let y = substitute('123', '.\zs', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
187 :let y = substitute('123', '\ze', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
188 :let y = substitute('123', '\ze.', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
189 :let y = substitute('123', '.\ze', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
190 :let y = substitute('123', '1\|\ze', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
191 :let y = substitute('123', '1\zs\|[23]', 'a', 'g') | $put =y
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
192 /^TEST_11
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
193 ENDTEST
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
194
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
195 TEST_11:
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
196
d59544f3022b updated for version 7.4.158
Bram Moolenaar <bram@vim.org>
parents: 5388
diff changeset
197 STARTTEST
2904
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
198 :/^Results/,$wq! test.out
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
199 ENDTEST
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
200
c249d9aa60f7 updated for version 7.3.225
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
201 Results of test72: