mirror of
https://github.com/neovim/neovim.git
synced 2025-12-06 06:32:33 +00:00
test59: Inital clean up.
Fix some feed() calls and string delimiters Fix trimming of buffer before final expect().
This commit is contained in:
committed by
Björn Linse
parent
0a495d0be8
commit
e60e46596a
@@ -8,7 +8,7 @@ describe("spell checking with 'encoding' set to utf-8", function()
|
|||||||
setup(clear)
|
setup(clear)
|
||||||
|
|
||||||
it('is working', function()
|
it('is working', function()
|
||||||
insert([=[
|
insert([[
|
||||||
1affstart
|
1affstart
|
||||||
SET ISO8859-1
|
SET ISO8859-1
|
||||||
TRY esianrtolcdugmphbyfvkwjkqxz-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'ESIANRTOLCDUGMPHBYFVKWJKQXZ
|
TRY esianrtolcdugmphbyfvkwjkqxz-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'ESIANRTOLCDUGMPHBYFVKWJKQXZ
|
||||||
@@ -523,10 +523,7 @@ describe("spell checking with 'encoding' set to utf-8", function()
|
|||||||
leadprobar
|
leadprobar
|
||||||
badend
|
badend
|
||||||
|
|
||||||
test output:]=])
|
test output:]])
|
||||||
|
|
||||||
execute('so small.vim')
|
|
||||||
execute('so mbyte.vim')
|
|
||||||
|
|
||||||
-- Don't want to depend on the locale from the environment. The .aff and .dic.
|
-- Don't want to depend on the locale from the environment. The .aff and .dic.
|
||||||
-- Text is in latin1, the test text is utf-8.
|
-- Text is in latin1, the test text is utf-8.
|
||||||
@@ -577,42 +574,53 @@ describe("spell checking with 'encoding' set to utf-8", function()
|
|||||||
|
|
||||||
|
|
||||||
-- And now with SAL instead of SOFO items; test automatic reloading.
|
-- And now with SAL instead of SOFO items; test automatic reloading.
|
||||||
feed('gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff<cr>')
|
feed('gg')
|
||||||
|
execute(':/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff')
|
||||||
execute('mkspell! Xtest Xtest')
|
execute('mkspell! Xtest Xtest')
|
||||||
execute([[$put =soundfold('goobledygoook')]])
|
execute([[$put =soundfold('goobledygoook')]])
|
||||||
execute([[$put =soundfold('kóopërÿnôven')]])
|
execute([[$put =soundfold('kóopërÿnôven')]])
|
||||||
execute([[$put =soundfold('oeverloos gezwets edale')]])
|
execute([[$put =soundfold('oeverloos gezwets edale')]])
|
||||||
|
|
||||||
-- Also use an addition file.
|
-- Also use an addition file.
|
||||||
feed('gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add<cr>')
|
feed('gg')
|
||||||
|
execute(':/^addstart/+1,/^addend/-1w! Xtest.utf-8.add')
|
||||||
execute('mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add')
|
execute('mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add')
|
||||||
execute('set spellfile=Xtest.utf-8.add')
|
execute('set spellfile=Xtest.utf-8.add')
|
||||||
execute('/^test2:')
|
execute('/^test2:')
|
||||||
feed(']s:let [str, a] = spellbadword()<cr>')
|
feed(']s')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
execute('set spl=Xtest_us.utf-8.spl')
|
execute('set spl=Xtest_us.utf-8.spl')
|
||||||
execute('/^test2:')
|
execute('/^test2:')
|
||||||
feed(']smm:let [str, a] = spellbadword()<cr>')
|
feed(']smm')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
feed('`m]s:let [str, a] = spellbadword()<cr>')
|
feed('`m]s')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
execute('set spl=Xtest_gb.utf-8.spl')
|
execute('set spl=Xtest_gb.utf-8.spl')
|
||||||
execute('/^test2:')
|
execute('/^test2:')
|
||||||
feed(']smm:let [str, a] = spellbadword()<cr>')
|
feed(']smm')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
feed('`m]s:let [str, a] = spellbadword()<cr>')
|
feed('`m]s')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
execute('set spl=Xtest_nz.utf-8.spl')
|
execute('set spl=Xtest_nz.utf-8.spl')
|
||||||
execute('/^test2:')
|
execute('/^test2:')
|
||||||
feed(']smm:let [str, a] = spellbadword()<cr>')
|
feed(']smm')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
feed('`m]s:let [str, a] = spellbadword()<cr>')
|
feed('`m]s')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
execute('set spl=Xtest_ca.utf-8.spl')
|
execute('set spl=Xtest_ca.utf-8.spl')
|
||||||
execute('/^test2:')
|
execute('/^test2:')
|
||||||
feed(']smm:let [str, a] = spellbadword()<cr>')
|
feed(']smm')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
feed('`m]s:let [str, a] = spellbadword()<cr>')
|
feed('`m]s')
|
||||||
|
execute('let [str, a] = spellbadword()')
|
||||||
execute('$put =str')
|
execute('$put =str')
|
||||||
execute('unlet str a')
|
execute('unlet str a')
|
||||||
|
|
||||||
@@ -630,7 +638,7 @@ describe("spell checking with 'encoding' set to utf-8", function()
|
|||||||
execute('delfunc TestOne')
|
execute('delfunc TestOne')
|
||||||
execute('set spl= enc=latin1')
|
execute('set spl= enc=latin1')
|
||||||
|
|
||||||
feed('gg:/^test output:/,$wq! test.out<cr>')
|
execute('0,/^test output:/-1 delete')
|
||||||
|
|
||||||
-- Assert buffer contents.
|
-- Assert buffer contents.
|
||||||
expect([=[
|
expect([=[
|
||||||
|
|||||||
Reference in New Issue
Block a user