diff options
author | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-12-03 16:49:30 +0300 |
commit | c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57 (patch) | |
tree | b7e59c416d1435725c65f8952b6e55c70544d97e /test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua | |
parent | 62108c3b0be46936c83f6d4c98b44ceb5e6f77fd (diff) | |
parent | 27a577586eace687c47e7398845178208cae524a (diff) | |
download | rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.gz rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.tar.bz2 rneovim-c49e22d3964d6c7ae1c24e8ad01b5fec4ca40b57.zip |
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua')
-rw-r--r-- | test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua b/test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua index c6883e4902..074ee094b4 100644 --- a/test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua +++ b/test/functional/legacy/044_099_regexp_multibyte_magic_spec.lua @@ -5,7 +5,7 @@ local helpers = require('test.functional.helpers')(after_each) local feed, insert = helpers.feed, helpers.insert -local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect +local clear, feed_command, expect = helpers.clear, helpers.feed_command, helpers.expect -- Runs the test protocol with the given 'regexpengine' setting. In the old test -- suite the test protocol was duplicated in test44 and test99, the only @@ -32,19 +32,19 @@ local function run_test_with_regexpengine(regexpengine) k combinations l ä ö ü ᾱ̆́]]) - execute('set re=' .. regexpengine) + feed_command('set re=' .. regexpengine) -- Lines 1-8. Exercise regexp search with various magic settings. On each -- line the character on which the cursor is expected to land is deleted. feed('/^1<cr>') feed([[/a*b\{2}c\+/e<cr>x]]) feed([[/\Md\*e\{2}f\+/e<cr>x]]) - execute('set nomagic') + feed_command('set nomagic') feed([[/g\*h\{2}i\+/e<cr>x]]) feed([[/\mj*k\{2}l\+/e<cr>x]]) feed([[/\vm*n{2}o+/e<cr>x]]) feed([[/\V^aa$<cr>x]]) - execute('set magic') + feed_command('set magic') feed([[/\v(a)(b)\2\1\1/e<cr>x]]) feed([[/\V[ab]\(\[xy]\)\1<cr>x]]) @@ -57,7 +57,7 @@ local function run_test_with_regexpengine(regexpengine) -- Line b. Find word by change of word class. -- (The "<" character in this test step seemed to confuse our "feed" test -- helper, which is why we've resorted to "execute" here.) - execute([[/ち\<カヨ\>は]]) + feed_command([[/ち\<カヨ\>は]]) feed('x') -- Lines c-i. Test \%u, [\u], and friends. @@ -73,28 +73,28 @@ local function run_test_with_regexpengine(regexpengine) -- Line k. Test substitution with combining characters by executing register -- contents. - execute([[let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g']]) - execute('@w') + feed_command([[let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g']]) + feed_command('@w') -- Line l. Ex command ":s/ \?/ /g" should NOT split multi-byte characters -- into bytes (fixed by vim-7.3.192). - execute([[/^l]]) - execute([[s/ \?/ /g]]) + feed_command([[/^l]]) + feed_command([[s/ \?/ /g]]) -- Additional tests. Test matchstr() with multi-byte characters. feed('G') - execute([[put =matchstr(\"אבגד\", \".\", 0, 2)]]) -- ב - execute([[put =matchstr(\"אבגד\", \"..\", 0, 2)]]) -- בג - execute([[put =matchstr(\"אבגד\", \".\", 0, 0)]]) -- א - execute([[put =matchstr(\"אבגד\", \".\", 4, -1)]]) -- ג + feed_command([[put =matchstr(\"אבגד\", \".\", 0, 2)]]) -- ב + feed_command([[put =matchstr(\"אבגד\", \"..\", 0, 2)]]) -- בג + feed_command([[put =matchstr(\"אבגד\", \".\", 0, 0)]]) -- א + feed_command([[put =matchstr(\"אבגד\", \".\", 4, -1)]]) -- ג -- Test that a search with "/e" offset wraps around at the end of the buffer. - execute('new') - execute([[$put =['dog(a', 'cat('] ]]) + feed_command('new') + feed_command([[$put =['dog(a', 'cat('] ]]) feed('/(/e+<cr>') feed('"ayn') - execute('bd!') - execute([[$put ='']]) + feed_command('bd!') + feed_command([[$put ='']]) feed('G"ap') -- Assert buffer contents. |