Tue Aug 15 08:06:19 UTC 2017 make[1]: Entering directory '/sources/vim80' Starting make in the src directory. If there are problems, cd to the src directory and run make there cd src && make test make[2]: Entering directory '/sources/vim80/src' make -f Makefile vim make[3]: Entering directory '/sources/vim80/src' make[3]: 'vim' is up to date. make[3]: Leaving directory '/sources/vim80/src' if test -n "yes" -a -f po/Makefile; then \ cd po; make -f Makefile check VIM=../vim; \ fi make[3]: Entering directory '/sources/vim80/src/po' ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq af.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"af.po" "af.po" 5393 lines, 133397 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch af.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ca.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ca.po" "ca.po" 6201 lines, 161830 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ca.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq cs.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"cs.po" "cs.po" 4664 lines, 111014 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch cs.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq de.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"de.po" "de.po" 6117 lines, 156572 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch de.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq en_GB.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"en_GB.po" "en_GB.po" 290 lines, 8951 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch en_GB.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq eo.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"eo.po" "eo.po" 7037 lines, 181672 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch eo.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq es.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"es.po" "es.po" 8280 lines, 203813 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch es.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq fi.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"fi.po" "fi.po" 6959 lines, 178335 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch fi.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq fr.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"fr.po" "fr.po" 7316 lines, 200113 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch fr.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ga.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ga.po" "ga.po" 7434 lines, 193547 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ga.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq it.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"it.po" "it.po" 6949 lines, 179597 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch it.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ja.po" "ja.po" 6990 lines, 203194 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ja.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ko.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ko.po" "ko.po" 6447 lines, 155536 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ko.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ko.UTF-8.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ko.UTF-8.po" "ko.UTF-8.po" 6447 lines, 171433 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ko.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq nb.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"nb.po" "nb.po" 6166 lines, 150557 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch nb.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq nl.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"nl.po" "nl.po" 5852 lines, 135176 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch nl.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq no.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"no.po" "no.po" 6166 lines, 150557 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch no.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"pl.po" "pl.po" 6905 lines, 175274 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch pl.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pt_BR.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"pt_BR.po" "pt_BR.po" 6236 lines, 160821 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch pt_BR.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ru.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ru.po" "ru.po" 6939 lines, 227889 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ru.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sk.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"sk.po" "sk.po" 5821 lines, 147387 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch sk.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sv.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"sv.po" "sv.po" 6148 lines, 149141 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch sv.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq uk.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"uk.po" "uk.po" 7236 lines, 224452 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch uk.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq vi.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"vi.po" "vi.po" 5196 lines, 143932 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch vi.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.UTF-8.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"zh_CN.UTF-8.po" "zh_CN.UTF-8.po" 6140 lines, 147457 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch zh_CN.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"zh_CN.po" "zh_CN.po" 6140 lines, 136476 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch zh_CN.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_TW.UTF-8.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"zh_TW.UTF-8.po" "zh_TW.UTF-8.po" 5282 lines, 127286 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch zh_TW.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_TW.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"zh_TW.po" "zh_TW.po" 5275 lines, 117353 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch zh_TW.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq cs.cp1250.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"cs.cp1250.po" "cs.cp1250.po" 4664 lines, 111022 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch cs.cp1250.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.sjis.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ja.sjis.po" "ja.sjis.po" 6990 lines, 179251 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ja.sjis.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.euc-jp.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ja.euc-jp.po" "ja.euc-jp.po" 6990 lines, 179135 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ja.euc-jp.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.cp1250.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"pl.cp1250.po" "pl.cp1250.po" 6905 lines, 175270 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch pl.cp1250.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.UTF-8.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"pl.UTF-8.po" "pl.UTF-8.po" 6905 lines, 178060 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch pl.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ru.cp1251.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"ru.cp1251.po" "ru.cp1251.po" 6939 lines, 179582 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch ru.cp1251.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sk.cp1250.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"sk.cp1250.po" "sk.cp1250.po" 5821 lines, 147383 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch sk.cp1250.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq uk.cp1251.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"uk.cp1251.po" "uk.cp1251.po" 7236 lines, 181515 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch uk.cp1251.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.cp936.po [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"zh_CN.cp936.po" "zh_CN.cp936.po" 6139 lines, 136462 characters OK [?2004l [?2004l[?1l>[?12l[?25h[?1049ltouch zh_CN.cp936.ck make[3]: Leaving directory '/sources/vim80/src/po' if test vim != vim -a ! -r vim; then \ ln -s vim vim; \ fi cd testdir; make -f Makefile VIMPROG=../vim SCRIPTSOURCE=../../runtime make[3]: Entering directory '/sources/vim80/src/testdir' rm -f test.log messages rm -rf test1.failed test.out X* viminfo tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok benchmark.out wrongtermsize VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test1.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test1.in" 57 lines, 2069 charactersFirst a simple test to check if the test script works. If Vim was not compiled with the +eval feature, the small.vim script will be set to copy the test.ok file to test.out, so that it looks like the test succeeded. Otherwise an empty small.vim is written. small.vim is sourced by tests that require the +eval feature or other features that are missing in the small version. If Vim was not compiled with the +windows feature, the tiny.vim script will be set like small.vim above. tiny.vim is sourced by tests that require the +windows feature or other features that are missing in the tiny version. If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will be set like small.vim above. mbyte.vim is sourced by tests that require the +multi_byte feature. Similar logic is applied to the +mzscheme feature, using mzscheme.vim. Similar logic is applied to the +lua feature, using lua.vim. STARTTEST :" If columns or lines are too small, create wrongtermsize. :" (Some tests will fail. When columns and/or lines are small) :if &lines < 24 || &columns < 80 | sp another | w! wrongtermsize | qa! | endif :" :" Write a single line to test.out to check if testing works at all. :%d athis is a test^[:w! test.out :" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test.[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25l[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 35 lines, 1133 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:w! tiny.vim ae! test.ok w! test.out qa! ^[:w! mbyte.vim :w! mzscheme.vim :w! lua.vim :" :" If +multi_byte feature supported, make mbyte.vim empty. :if has("multi_byte") | sp another | w! mbyte.vim | q | endif :" :" If +mzscheme feature supported, make mzscheme.vim empty. :if has("mzscheme") | sp another | w! mzscheme.vim | q | endif :" :" If +lua feature supported, make lua.vim empty. :if has("lua") | sp another | w! lua.vim | q | endif :" :" If +eval feature supported quit here, leaving tiny.vim and small.vim empty. :" Otherwise write small.vim to skip the test. :if 1 | q! | endif :w! small.vim :" If +windows feature not supported :sp will fail and tiny.vim will be :" written to skip the test. :sp another :wq! tiny.vim :qa! ENDTEST [?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25h" If columns or lines are too small, create wrongtermsize. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" (Some tests will fail. When columns and/or lines are small) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hif &lines < 24 || &columns < 80 | sp another | w! wrongtermsize | qa! | endif [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Write a single line to test.out to check if testing works at all. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h%d [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?12l[?25h[?2004l[?2004h[?25lthis is a test[?12l[?25h[?25l:[?2004h[?12l[?25hw! test.out [?25l"test.out" [New File] 1 line, 15 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test. [?25l[?12l[?25h [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! small.vim [?25l"small.vim" [New File] 1 line, 1 character written[?12l[?25h[?25l:[?2004h[?12l[?25hw! tiny.vim [?25l"tiny.vim" [New File] 1 line, 1 character written[?12l[?25h[?2004l[?2004h[?25le! test.ok w! test.outqa![?12l[?25h[?25l:[?2004h[?12l[?25hw! mbyte.vim [?25l"mbyte.vim" [New File] 4 lines, 28 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hw! mzscheme.vim [?25l"mzscheme.vim" [New File] 4 lines, 28 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hw! lua.vim [?25l"lua.vim" [New File] 4 lines, 28 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" If +multi_byte feature supported, make mbyte.vim empty. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hif has("multi_byte") | sp another | w! mbyte.vim | q | endif [?25l"another" [New File] "mbyte.vim" 0 lines, 0 characters writtene! test.ok[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" If +mzscheme feature supported, make mzscheme.vim empty. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hif has("mzscheme") | sp another | w! mzscheme.vim | q | endif [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" If +lua feature supported, make lua.vim empty. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hif has("lua") | sp another | w! lua.vim | q | endif [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" If +eval feature supported quit here, leaving tiny.vim and small.vim empty. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Otherwise write small.vim to skip the test. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hif 1 | q! | endif [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049lrm -rf X* viminfo rm -rf test3.failed test.ok test.out X* viminfo cp test3.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test3.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test3.in" 2344 lines, 23156 characters/* vim: set cin ts=4 sw=4 : */ Test for 'cindent'. For new tests, consider putting them in test_cindent.vim. STARTTEST :so small.vim :set nocompatible viminfo+=nviminfo modeline :edit" read modeline /start of AUTO =/end of AUTO ENDTEST /* start of AUTO matically checked vim: set ts=4 : */ {if (test)cmd1;cmd2; } {if (test)cmd1;elsecmd2; } {[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25l/* vim: set cin ts=4 sw=4 : */[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 125 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nocompatible viminfo+=nviminfo modeline [?25l[?12l[?25h[?25l:[?2004h[>ce[?12l[?25hdit " read modeline [?25l"test3.in"2344L, 23156Cif (test)cmd1;cmd2;if (test)cmd1;elsecmd2;[?12l[?25h[?25l/[?2004h[?12l[?25hstart of AUTO [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hend of AUTO [?25l956 lines to indent... 9500 850 750 650 550 450 350 250 150 50 lines to indent... 957 lines indented [?12l[?25h[?25l/[?2004h^STARTTEST baz_f();break;}break;default:baz();baz();break; } } /* end of AUTO */ STARTTEST :set tw=0 noai fo=croq :let &wm = &columns - 20 /serious/e a about life, the universe, and the rest^[ ENDTEST { /* this is * a real serious important big * comment */ /* insert " about life, the universe, and the rest" after "serious" */ }[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 4L, 101C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset tw=0 noai fo=croq [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet &wm = &columns - 20 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hserious/e [?25l[?12l[?25h[?25l-- INSERT --about life, the * universe, and the * rest important big * comment[?12l[?25h[?25l /[?2004h^STARTTEST */ /* insert " about life, the universe, and the rest" after "serious" */ } STARTTEST[?12l[?25h[?25l :set nocin [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 6L, 78C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/comments joabout life^[/happens jothere^[/below oline^[/this Ohello^[[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset nocin [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hcomments [?25l{ /** Testing for comments, without 'cin' set[?12l[?25h[?25l */[?12l[?25h[?25l -- INSERT -- about life[?12l[?25h[?25l /[?2004h[?12l[?25hhappens [?25l/* * what happens here?[?12l[?25h[?25l */[?12l[?25h[?25l -- INSERT -- there[?12l[?25h[?25l /[?2004h[?12l[?25hbelow [?25l/*the end of the comment, try inserting a line below */[?12l[?25h[?25l -- INSERT -- line[?12l[?25h[?25l /[?2004h[?12l[?25hthis [?25l/* how aboutthis one */[?12l[?25h[?25l -- INSERT --hello[?12l[?25h[?25l this one */[?12l[?25h[?25l /[?2004h^STARTTEST } STARTTEST[?12l[?25h[?25l :set cin [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 18C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/vec2 ==[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cin [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hvec2 [?25l{ var = this + that + vec[0] * vec[0]+ vec[1] * vec[1]+ vec2[2] * vec[2];[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l :set cin [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 5L, 51C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1:set cino=}4 /testing1 k2==/testing2 k2==[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cino=}4 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25htesting1 [?25l{asdf asdflkajds f; if (tes & ting) {asdf asdf asdf ;asdfa sdf asdf;} testing1;[?12l[?25h [?25l /[?2004h[?12l[?25htesting2 [?25lif (tes & ting) {asdf asdf asdf ;asdfa sdf asdf;} testing2;[?12l[?25h [?25l /[?2004h^STARTTEST } STARTTEST[?12l[?25h[?25l :set cin [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 4L, 36C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1:set cino=(0,)20 /main =][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0,)20 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hmain [?25lmain ( int first_par, /*[?12l[?25h[?25l 19 lines to indent... 20indented [?12l[?25h[?25l * Comment for[?12l[?25h[?25l /[?2004h^STARTTEST { func( first_par, /** Comment for* first par*/second_par /** Comment for* second par*/); } STARTTEST :set cin :set cino=es,n0s /main =][ ENDTEST main(void) { /* Make sure that cino=X0s is not parsed like cino=Xs. */ if (cond)foo(); else {bar();[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 4L, 36C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cino=es,n0s [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hmain [?25l[?12l[?25h[?25l8 lines to indent... 9indented [?12l[?25h [?25l/[?2004h^STARTTEST } } STARTTEST[?12l[?25h[?25l :set cin [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 26C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1:set cino= ]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cino= [?25l[?12l[?25h[?25l{[?12l[?25h[?25l 11 lines to indent... 12indented [?12l[?25h[?25l do[?12l[?25h[?25l /[?2004h^STARTTEST {if (){if ()asdf;elseasdf;} } while (); cmd;/* this should go under the } */ } STARTTEST[?12l[?25h[?25l ]]=][ [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 1L, 6C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1[?12l[?25h[?25l ENDTEST[?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 8 lines to indent... 9indented [?12l[?25h[?25l if ( k() ) {[?12l[?25h[?25l /[?2004h^STARTTEST l();} else { /* Start (two words) end */m(); }n(); } STARTTEST[?12l[?25h[?25l :set cino={s,e-s [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 ]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino={s,e-s [?25l[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 7 lines to indent... 8indented  {[?12l[?25h[?25l if ( k() )[?12l[?25h[?25l /[?2004h^STARTTEST {l();} else { /* Start (two words) end */m();} n(); /* should be under the if () */ } STARTTEST[?12l[?25h[?25l :set cino={s,fs [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 25C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 ]]=/ foo[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino={s,fs [?25l[?12l[?25h[?25lvoid bar(void) {[?12l[?25h[?25l /[?2004h[?12l[?25h foo [?25l30 lines to indent... 31indented  {[?12l[?25h[?25l/[?2004h^STARTTEST } void func(void) { a = 1;{b = 2;} c = 3; d = 4; } /* foo */ STARTTEST :set cino= /while ohere^[ ENDTEST a() { do { a = a +a; } while ( a );/* add text under this line */ if ( a )a; }[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 25C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino= [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hwhile [?25l[?12l[?25h[?25l-- INSERT --hereif ( a ) a;[?12l[?25h[?25l /[?2004h^STARTTEST } STARTTEST[?12l[?25h[?25l :set cino= com= [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 109C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/comment olabel2: b();^Mlabel3 /* post */:^M/* pre */ label4:^Mf(/*com*/);^Mif (/*com*/)^Mcmd();^[[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino= com= [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hcomment [?25la() { label1:/* hmm */// comment[?12l[?25h[?25l -- INSERT --label2: b(); label3 /* post */: /* pre */ label4:f(/*com*/);if (/*com*/)cmd();[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l :set comments& comments^=s:/*,m:**,ex:*/ [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 53C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/simple =5j[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset comments& comments^=s:/*,m:**,ex:*/ [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hsimple [?25l/* * A simple comment[?12l[?25h[?25l 5 lines to indent... 6indented * A simple comment[?12l[?25h[?25l */[?12l[?25h[?25l /[?2004h^STARTTEST /* ** A different comment */ STARTTEST[?12l[?25h[?25l :set cino=c0 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 70C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1:set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=c0 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset comments& comments-=s1:/* comments^=s0:/* [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 4 lines to indent... 5indented [?12l[?25h[?25l [?12l[?25h[?25l /[?2004h^STARTTEST /*********A comment. *********/ } STARTTEST[?12l[?25h[?25l :set cino=c0,C1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 73C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1:set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=c0,C1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset comments& comments-=s1:/* comments^=s0:/* [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 4 lines to indent... 5indented [?12l[?25h[?25l [?12l[?25h[?25l /[?2004h^STARTTEST /********* A comment. *********/ } STARTTEST[?12l[?25h[?25l :set cino= [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 17C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 ]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino= [?25l[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 5 lines to indent... 6indented [?12l[?25h[?25l c = c1 &&[?12l[?25h[?25l /[?2004h^STARTTEST (c2 ||c3) && c4; } STARTTEST[?12l[?25h[?25l :set cino=(s [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(s [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 5 lines to indent... 6indented [?12l[?25h[?25l c = c1 &&[?12l[?25h[?25l /[?2004h^STARTTEST (c2 ||c3) && c4; } STARTTEST[?12l[?25h[?25l :set cino=(s,U1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(s,U1 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 5 lines to indent... 6indented [?12l[?25h[?25l c = c1 &&[?12l[?25h[?25l /[?2004h^STARTTEST (c2 ||c3) && c4; } STARTTEST[?12l[?25h[?25l :set cino=(0 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 4 lines to indent... 5indented [?12l[?25h[?25l if ( c1[?12l[?25h[?25l /[?2004h^STARTTEST && ( c2|| c3))foo; } STARTTEST[?12l[?25h[?25l :set cino=(0,w1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0,w1 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 4 lines to indent... 5indented [?12l[?25h[?25l if ( c1[?12l[?25h[?25l /[?2004h^STARTTEST && ( c2|| c3))foo; } STARTTEST[?12l[?25h[?25l :set cino=(s [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(s [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 8 lines to indent... 9indented [?12l[?25h[?25l c = c1 && ([?12l[?25h[?25l /[?2004h^STARTTEST c2 ||c3) && c4; if (c1 && c2)foo; } STARTTEST[?12l[?25h[?25l :set cino=(s,m1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(s,m1 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 8 lines to indent... 9indented [?12l[?25h[?25l c = c1 && ([?12l[?25h[?25l /[?2004h^STARTTEST c2 ||c3 ) && c4; if (c1 && c2 )foo; } STARTTEST[?12l[?25h[?25l :set cino=b1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=b1 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 9 lines to indent... 10 lines indented [?12l[?25h[?25l switch (x)[?12l[?25h[?25l /[?2004h^STARTTEST {case 1:a = b;break;default:a = 0;break; } } STARTTEST[?12l[?25h[?25l :set cino=(0,W5 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 26C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0,W5 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 10 lines to indent... 11indented [?12l[?25h[?25l invokeme([?12l[?25h[?25l /[?2004h^STARTTEST argu,ment); invokeme(argu,ment); invokeme(argu,ment); } STARTTEST[?12l[?25h[?25l :set cino=/6 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=/6 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l 3 lines to indent... 4indented [?12l[?25h[?25l statement;[?12l[?25h[?25l /[?2004h^STARTTEST // comment 1// comment 2 } STARTTEST[?12l[?25h[?25l :set cino= [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 34C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-12kdd]]/comment 1/+1 ==[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino= [?25l[?12l[?25h[?25l==ENDTEST[?12l[?25h[?25lvoid f() {[?12l[?25h[?25l /[?2004h[?12l[?25hcomment 1/+1 [?25lstatement;// comment 1 // comment 2[?12l[?25h[?25l // comment 2[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l :set cino=g0 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=g0 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lclass CAbc {[?12l[?25h[?25l 6 lines to indent... 7indented [?12l[?25h[?25l int Test() { return FALSE; }[?12l[?25h[?25l /[?2004h^STARTTEST public: // comment void testfall(); protected: void testfall(); }; STARTTEST[?12l[?25h[?25l :set cino=(0,gs,hs [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 29C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0,gs,hs [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lclass Foo : public Bar {[?12l[?25h[?25l 5 lines to indent... 6indented [?12l[?25h[?25l public:[?12l[?25h[?25l /[?2004h^STARTTEST virtual void method1(void) = 0;virtual void method2(int arg1,int arg2,int arg3) = 0; }; STARTTEST[?12l[?25h[?25l :set cino=+20 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 24C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=+20 [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25lvoid foo() {[?12l[?25h[?25l 4 lines to indent... 5indented [?12l[?25h[?25l if (a)[?12l[?25h[?25l /[?2004h^STARTTEST { } elseasdf; } STARTTEST[?12l[?25h[?25l :set cino=(0,W2s [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd]]=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0,W2s [?25l[?12l[?25h[?25l2kdd]]=][ENDTEST[?12l[?25h[?25l {[?12l[?25h[?25l 34 lines to indent... 35indented [?12l[?25h[?25l averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd([?12l[?25h[?25l /[?2004h^STARTTEST averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(abc,dec)->asdfasdfasdf(asdfadsf,asdfasdf,asdfasdf,),func(asdfadf,asdfasdf),asdasdf); } STARTTEST :set cino=M1 2kdd]]=][ ENDTEST int main () { if (cond1 &&cond2)foo; } STARTTEST :set cino=(0,ts[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=M1 [?25l[?12l[?25h[?25l 2kdd2j=][[?12l[?25h[?25l4 lines to indent... 5indented [?12l[?25h [?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 26C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1[?12l[?25h[?25l ENDTEST[?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0,ts [?25l[?12l[?25h[?25l2kdd2j=][ENDTEST[?12l[?25h [?25l 7 lines to indent... 8indented [?12l[?25h[?25l void func(int a[?12l[?25h[?25l /[?2004h^STARTTEST #if defined(FOO), int b, int c #endif) { } STARTTEST[?12l[?25h[?25l :set cino=(0 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd2j=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=(0 [?25l[?12l[?25h[?25l2kdd2j=][ENDTEST[?12l[?25h [?25l 8 lines to indent... 9indented [?12l[?25h[?25l void[?12l[?25h[?25l /[?2004h^STARTTEST func(int a #if defined(FOO), int b, int c #endif ) { } STARTTEST[?12l[?25h[?25l :set cino& [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 22C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd2j=7][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino& [?25l[?12l[?25h[?25l2kdd2j=7][ ENDTEST[?12l[?25h [?25l 69 lines to indent... 50 7indented [?12l[?25h[?25l void func(void)[?12l[?25h[?25l /[?2004h^STARTTEST void func5(int a,int b) { }void func6(int a) { } STARTTEST :set cino& :set cino+=l1 2kdd2j=][ ENDTEST void func(void) { int tab[] = {1, 2, 3,4, 5, 6};printf("Indent this line correctly!\n");[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino& [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cino+=l1 [?25l[?12l[?25h[?25l switch (foo)[?12l[?25h [?25l22 lines to indent... 23indented [?12l[?25h [?25l/[?2004h^STARTTEST case bar:printf("bar");break;case baz: {printf("baz");break;}case quux:printf("But don't break the indentation of this instruction\n");break; } } STARTTEST :set cino& 2kdd2j=][ ENDTEST void func(void) { cout << "a" << "b" << ") :" << "c"; } STARTTEST :set com=s1:/*,m:*,ex:*/[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 21C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino& [?25l[?12l[?25h[?25l ]]3jofoo();^[[?12l[?25h [?25l6 lines to indent... 7indented  << "b" << ") :" << "c";[?12l[?25h [?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 38C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1[?12l[?25h[?25l ENDTEST[?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset com=s1:/*,m:*,ex:*/ [?25l[?12l[?25h[?25lvoid func(void) {[?12l[?25h[?25l/** This is a comment.*/[?12l[?25h[?25l -- INSERT -- foo();[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l :set cino& [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 21C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd2j=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino& [?25l[?12l[?25h[?25l2kdd2j=][ENDTEST[?12l[?25h [?25l 8 lines to indent... 9indented [?12l[?25h[?25l void func(void)[?12l[?25h[?25l /[?2004h^STARTTEST { for (int i = 0; i < 10; ++i)if (i & 1) {foo(1);} elsefoo(0); baz(); } STARTTEST[?12l[?25h[?25l :set cino=k2s,(0 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd3j=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=k2s,(0 [?25l[?12l[?25h[?25l2kdd3j=][ENDTEST[?12l[?25h[?25l void func(void)[?12l[?25h[?25l 23 lines to indent... 24indented [?12l[?25h[?25l {[?12l[?25h[?25l /[?2004h^STARTTEST { }if ( c1&& ( c2|| c3))foo; func( c1&& ( c2|| c3))foo; } STARTTEST :set cino=k2s,(s 2kdd3j=][ ENDTEST void func(void) { if (condition1 && condition2) action(); function(argument1 && argument2);if (c1 && (c2 || c3))[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=k2s,(s [?25l[?12l[?25h[?25l foo;[?12l[?25h [?25l23 lines to indent... 24indented  && condition2) action(); && argument2); c3)) foo;[?12l[?25h [?25l/[?2004h^STARTTEST { }if ( c1&& ( c2|| c3))foo; func( c1&& ( c2|| c3))foo; } STARTTEST :set cino=k2s,(s,U1 2kdd3j=][ ENDTEST void func(void) { if (condition1 && condition2) action(); function(argument1 && argument2);if (c1 && (c2 || c3))[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 30C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=k2s,(s,U1 [?25l[?12l[?25h[?25l foo;[?12l[?25h [?25l24 lines to indent... 25indented  && condition2) action(); && argument2); c3)) foo;[?12l[?25h [?25l/[?2004h^STARTTEST } if (c123456789&& (c22345|| c3))printf("foo\n");c = c1 &&(c2 ||c3) && c4; } STARTTEST :set cino=k2s,(0,W4 2kdd3j=][ ENDTEST void func(void) { if (condition1 && condition2) action(); function(argument1 && argument2);if (c1 && (c2 || c3))[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 30C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=k2s,(0,W4 [?25l[?12l[?25h[?25l foo;[?12l[?25h [?25l29 lines to indent... 30indented  && condition2) action(); && argument2); c3)) foo;[?12l[?25h [?25l/[?2004h^STARTTEST if ( c1&& ( c2|| c3))foo;a_long_line(argument,argument); a_short_line(argument,argument); } STARTTEST :set cino=k2s,u2 2kdd3j=][ ENDTEST void func(void) { if (condition1 && condition2) action(); function(argument1 && argument2);if (c1 && (c2 || c3))[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=k2s,u2 [?25l[?12l[?25h[?25l foo;[?12l[?25h [?25l18 lines to indent... 19indented  && condition2) action(); && argument2); c3)) foo;[?12l[?25h [?25l/[?2004h^STARTTEST if (c1 &&(c2 || c3)) { } if (c123456789&& (c22345|| c3))printf("foo\n"); } STARTTEST[?12l[?25h[?25l :set cino=k2s,(0,w1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 30C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1 2kdd3j=][[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=k2s,(0,w1 [?25l[?12l[?25h[?25l2kdd3j=][ENDTEST[?12l[?25h[?25l void func(void)[?12l[?25h[?25l 27 lines to indent... 28indented [?12l[?25h[?25l {[?12l[?25h[?25l /[?2004h^STARTTEST || c3))printf("foo\n");if ( c1&& ( c2|| c3))foo; func( c1&& ( c2|| c3))foo; } STARTTEST :set cino=k2,(s 2kdd3j=][ ENDTEST void func(void) { if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 26C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=k2,(s [?25l[?12l[?25h[?25l foo;[?12l[?25h [?25l14 lines to indent... 15indented [?12l[?25h [?25l/[?2004h^STARTTEST if (c1 &&(c2 || c3)) { } } STARTTEST[?12l[?25h[?25l :set cino=N-s [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 47C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/^NAMESPACESTART =/^NAMESPACEEND[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=N-s [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^NAMESPACESTART [?25lNAMESPACESTART[?12l[?25h[?25l /[?2004h[?12l[?25h^NAMESPACEEND [?25l81 lines to indent... 50 82indented [?12l[?25h[?25l/[?2004h^STARTTEST 111111111111111111; } namespace test test2 { 1111111111111111111; } namespace111111111 { 111111111111111111; } NAMESPACEEND STARTTEST :set cino=j1,J1 /^JSSTART =/^JSEND ENDTEST JSSTART var bar = { foo: { that: this, some: ok, }, "bar":{ a : 2, b: "123abc",[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=j1,J1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSSTART [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSEND [?25l12 lines to indent... 13indented  foo: { that: this, some: ok, }, "bar":{ a : 2, b: "123abc",[?12l[?25h[?25l/[?2004h^STARTTEST x: 4,"y": 5 } } JSEND STARTTEST[?12l[?25h[?25l :set cino=j1,J1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/^JSSTART =/^JSEND[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=j1,J1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSSTART [?25lJSSTART[?12l[?25h[?25l /[?2004h[?12l[?25h^JSEND [?25l5 lines to indent... 6indented [?12l[?25h[?25l/[?2004h^STARTTEST var foo = [ 1, 2, 3 ]; JSEND STARTTEST[?12l[?25h[?25l :set cino=j1,J1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/^JSSTART =/^JSEND[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=j1,J1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSSTART [?25lJSSTART[?12l[?25h[?25l /[?2004h[?12l[?25h^JSEND [?25l7 lines to indent... 8indented [?12l[?25h[?25l/[?2004h^STARTTEST function bar() { var foo = [1,2,3 ]; } JSEND STARTTEST[?12l[?25h[?25l :set cino=j1,J1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/^JSSTART =/^JSEND[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=j1,J1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSSTART [?25lJSSTART[?12l[?25h[?25l /[?2004h[?12l[?25h^JSEND [?25l58 lines to indent... 509indented [?12l[?25h[?25l/[?2004h^STARTTEST if (typeof(method)!='function') {console.log(class_name+' has no method "'+_arguments[0]+'"');return false;}_arguments[0]=options;method.apply(this,_arguments);}}); } })(jQuery); JSEND STARTTEST :set cino=j1,J1 /^JSSTART =/^JSEND ENDTEST JSSTART function init(options) { $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', bar: 2, foobar: [ 1, 2, 3[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=j1,J1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSSTART [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSEND [?25l14 lines to indent... 15indented  $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', bar: 2, foobar: [ 1, 2, 3[?12l[?25h[?25l/[?2004h^STARTTEST ],callback: function(){return true;} }, options||{})); } JSEND STARTTEST[?12l[?25h[?25l :set cino=j1,J1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1/^JSSTART =/^JSEND[?12l[?25h[?25l ENDTEST [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=j1,J1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSSTART [?25lJSSTART[?12l[?25h[?25l /[?2004h[?12l[?25h^JSEND [?25l16 lines to indent... 17indented [?12l[?25h[?25l/[?2004h^STARTTEST foobar: [1,2,3],callback: function(){return true;}}, options||{})); } })(jQuery); JSEND STARTTEST :set cino=j1,J1,+2 /^JSSTART =/^JSEND ENDTEST JSSTART // Results of JavaScript indent // 1 (function(){ var a = [ 'a', 'b', 'c', 'd',[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 38C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cino=j1,J1,+2 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSSTART [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^JSEND [?25l149 lines to indent... 100 50 lines to indent... 150 lines indented  var a = [ 'a', 'b', 'c', 'd',[?12l[?25h[?25l/[?2004h^STARTTEST // 10 var a, b, c, d, e, f, g, h, i; JSEND STARTTEST :set cin cino& /start of define =/end of define ENDTEST /* start of define */ { } #define AAA \ BBB\ CCC #define CNT \ 1 + \[?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 48C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset cin cino& [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hstart of define [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hend of define [?25l11 lines to indent... 12indented  BBB\ CCC 1 + \[?12l[?25h[?25l/[?2004h^STARTTEST 2 + \ 4 /* end of define */ STARTTEST[?12l[?25h[?25l :g/^STARTTEST/.,/^ENDTEST/d [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 61C written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/+-1[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d [?25l227 fewer lines];// 10var a b, c, d, e, f, g, h, i;JSEND/* start of define */ {}#define AAA \ BBB\ CCC#define CNT \ 1 + \ 2 + \4 /* end of define */[?12l[?25h[?25l:[?2004h[?12l[?25h1;/start of AUTO/,$wq! test.out [?25l[?2004l"test.out" [New] 2096L, 20188C written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test3 = test61; then \ # if diff test.out test3.ok; \ # then echo flaky test ok first time; \ # else rm -rf test3.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test3.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test4.failed test.ok test.out X* viminfo cp test4.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test4.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test4.in" 34 lines, 960 charactersTest for autocommand that changes current buffer on BufEnter event. Check if modelines are interpreted for the correct buffer. STARTTEST :so small.vim :set nocompatible viminfo+=nviminfo :au BufEnter Xxx brew /start of :.,/end of/w! Xxx " write test file Xxx :set ai modeline modelines=3 :sp Xxx" split to Xxx, autocmd will do :brew G?this is a othis should be auto-indented^[ :" Append text with autoindent to this file :au! BufEnter Xxx :buf Xxx" go to Xxx, no autocmd anymore G?this is a othis should be in column 1^[:wq " append text without autoindent to Xxx G:r Xxx" include Xxx in the current file :set fo+=r" issue #57 do not move cursor on when autoindent is set Go# abcdef^[2hi ^Od0^[o# abcdef^[2hi^Od0^[: :?startstart?,$w! test.out :qa! ENDTEST startstart start of test file Xxx[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for autocommand that changes current buffer on BufEnter event.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 20 lines, 678 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nocompatible viminfo+=nviminfo [?25l[?12l[?25h[?25l:[?2004h[>ca[?12l[?25hu BufEnter Xxx brew [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hstart of [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h.,/end of/w! Xxx " write test file Xxx [?25l"Xxx" [New] 7L, 124C written[?12l[?25h[?25l:[?2004h[?12l[?25hset ai modeline modelines=3 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xxx " split to Xxx, autocmd will do :brew [?25l"Xxx" 7L, 124Ctest4.in buf Xxx " go to Xxx, no autocmd anymore G?this is aothis should be in column 1^[:wq " append text without autoindent to Xxx G:r Xxx " include Xxx in the current file:set fo+=rssue #57 do not move cursor on when autoindent is set Go# abcdef^[2hi^Od0^[o# abcdef^[2hi^Od0^[: :?startstart?,$w! test.outqa!ENDTESTstartstart of test file Xxx test4.in test4.in" line 1 of 34 --2%-- col 1[?12l[?25h[?25l^Od0^[o# abcdef^[2hi^Od0^[::?startstart?,$w! test.ou:qa! ENDTESTstartstartstart of test file Xxx vim: set noai : this is a test this is a test this is a test this is a test end of test file Xxx[?12l[?25h[?25l?[?2004h[?12l[?25hthis is a [?25l[?12l[?25h[?25l-- INSERT -- this should be auto-indented[+][+][?12l[?25h[?25l end of test file Xxx[?12l[?25h[?25l:[?2004h[?12l[?25h " Append text with autoindent to this file [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau! BufEnter Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hbuf Xxx " go to Xxx, no autocmd anymore [?25l"Xxx" 7L, 124Cstart of test file Xxxvim: set noai : this is a testthis is a test this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ Xxxt [?12l[?25h[?25l?[?2004h[?12l[?25hthis is a [?25l[?12l[?25h[?25l-- INSERT --this should be in column 1[+][?12l[?25h[?25l:[?2004h[?12l[?25hwq " append text without autoindent to Xxx [?25l"Xxx8L, 151C writtenTest for autocommand that changes current buffer on BufEnter event. Check if modelines are interpreted for the correct buffer.STARTTEST:so small.vim:set nocompatible viminfo+=nviminfo :au BufEnter Xxx brew/start of:.,/end of/w! Xxx " write test file Xxx:set ai modeline modelines=3:sp Xxx " split to Xxx, autocmd will do :brewG?this is aothis should be auto-indented^[: " Append text with autoindent to this fileau! BufEnter Xxx:buf Xxx " go to Xxx, no autocmd anymore G?this is aothis should be in column 1^[:wq " append text without autoindent to Xxx G:r Xxx nclude Xxx in the current file:set fo+=r " issue #57 do not move cursor on when autoindent is set Go# abcdef^[2hi^Od0^[o# abcdef^[2hi^Od0^[: :?startstart?,$w! test.out :qa!ENDTESTstarstart of test file Xxx[?12l[?25h[?25lvim: set noai :this is a testthis is a testthis is a testthis is a testthis should be auto-indented end of test file Xxx[?12l[?25h[?25l :[?2004h[?12l[?25hr Xxx " include Xxx in the current file [?25l"Xxx" 8L, 151C start of test file Xxx[?12l[?25h[?25l :[?2004h[?12l[?25hset fo+=r " issue #57 do not move cursor on when autoindent is set [?25l[?12l[?25h[?25lvim: set noai :this is a testthis is a testthis is a testthis is a test this should be in column 1 end of test file Xxx[?12l[?25h[?25l -- INSERT -- # abcdef[?12l[?25h[?25l -- INSERT -- -- (insert)- -- # def[?12l[?25h[?25lINSERTt --defo[?12l[?25hd[?25l[?12l[?25h[?25l -- INSERT -- # abcdef[?12l[?25h[?25l -- INSERT -- -- (insert)- --[?12l[?25h[?25l -- INSERTt --def:[?12l[?25hd[?25l[?12l[?25h[?25l :[?2004h[?12l[?25h[?25l:[?2004h[?12l[?25h?startstart?,$w! test.out [?25l"test.out" [New] 20L, 330C written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test4 = test61; then \ # if diff test.out test4.ok; \ # then echo flaky test ok first time; \ # else rm -rf test4.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test4.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test5.failed test.ok test.out X* viminfo cp test5.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test5.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test5.in" 29 lines, 949 charactersTest for autocommand that deletes the current buffer on BufLeave event. Also test deleting the last buffer, should give a new, empty buffer. STARTTEST :so small.vim :au BufLeave Xxx bwipe /start of :.,/end of/w! Xxx" write test file Xxx :sp Xxx" split to Xxx :bwipe" delete buffer Xxx, now we're back here G?this is a othis is some more text^[ :" Append some text to this file :?start?,$w! test.out" Write current file contents :bwipe test.out" delete alternate buffer :au bufleave test5.in bwipe :bwipe!" delete current buffer, get an empty one ithis is another test line^[:w >>test.out :" append an extra line to the output file :qa! ENDTEST start of test file Xxx vim: set noai :this is a testthis is a testthis is a testthis is a test[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for autocommand that deletes the current buffer on BufLeave event.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 16 lines, 664 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufLeave Xxx bwipe [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hstart of [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h.,/end of/w! Xxx " write test file Xxx [?25l"Xxx" [New File] 7 lines, 124 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xxx " split to Xxx [?25l"Xxx" 7 lines, 124 charactersstart of test file Xxxvim: set noai :this is a test this is a test this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ Xxx  Append some text to this file :?start?,$w! test.out " Write current file contents test.outalternate buffer:au bufleave test5.in bwipebwipe!delete current buffer, get an empty on ithis is another test line^[:w >>test.out : " append an extra line to the output file :qa! ENDTESTstart of test file Xxx vim: set noai :test5.in [?12l[?25h[?25l:[?2004h[?12l[?25hbwipe " delete buffer Xxx, now we're back here [?25lTest for autocommand that deletes the current buffer on BufLeave event. Also test deleting the last buffer, should give a new, empty buffer.STARTTEST:so small.vim:au BufLeave Xxx bwipe /start of:.,/end of/w! Xxx " write test file Xxx:sp Xxx " split to Xxx:bwipe " delete buffer Xxx, now we're back hereG?this is aothis is some more text^[: " Append some text to this file:?start?,$w! test.out " Write current file contentsbwipe test.outdelete alternate bufferau bufleave test5.in bwipe! current buffer, get an empty one ithis is another test line^[:w >>test.out : append an extra line to the output fil :qa!ENDTESTstart of test file Xxx vim: set noai : this is a test this is a test this is a test"test5.in" line 23 of 29 --79%-- col 1[?12l[?25h[?25l end of test file Xxx[?12l[?25h[?25l ?[?2004h[?12l[?25hthis is a [?25l[?12l[?25h[?2004l[?2004h[?25l this is some more text[?12l[?25h[?25l end of test file Xxx[?12l[?25h[?25l :[?2004h[?12l[?25h " Append some text to this file [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h?start?,$w! test.out " Write current file contents [?25l"test.out" [New File] 8 lines, 147 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hbwipe test.out " delete alternate buffer [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau bufleave test5.in bwipe [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hbwipe! " delete current buffer, get an empty one [?25lError detected while processing BufLeave Auto commands for "test5.in": E89: No write since last change for buffer 1 (add ! to override) Press ENTER or type command to continue[?12l[?25h[?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?2004l[?2004h[?25lthis is another test line[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 26 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h " append an extra line to the output file [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test5 = test61; then \ # if diff test.out test5.ok; \ # then echo flaky test ok first time; \ # else rm -rf test5.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test5.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test7.failed test.ok test.out X* viminfo cp test7.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test7.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test7.in" 26 lines, 675 charactersTest for autocommand that changes the buffer list, when doing ":ball". STARTTEST :so small.vim /^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1 :close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTEST start of test file Xxxthis is a testthis is a test end of test file Xxx ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for autocommand that changes the buffer list, when doing ":ball".[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 508 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^start of [?25l[?12l[?25h[?2004l[?2004h[?25l1[?12l[?25h[?25l:[?2004h[?12l[?25h.,/end of/w! Xxx1 " write test file Xxx1 [?25l"Xxx1" [New File] 4 lines, 77 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xxx1 [?25l"Xxx1" 4 lines, 77 charactersstart of test file Xxx1this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx1 sp Xxx3:closeau BufReadPost Xxx2 bwipe$r4:ball open window for all args, close Xxx2:.,$w! test.out " Write contents of this file^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx1 this is a test this is a testtest7.in [+] [?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25lTest for autocommand that changes the buffer list, when doing ":ball".STARTTEST:so small.vim/^start ofA1^[:.,/end of/w! Xxx1 " write test file Xxx1:sp Xxx1:close$r2:.,/end of/w! Xxx2 " write test file Xxx2:sp Xxx2:close$r3:.,/end of/w! Xxx3 " write test file Xxx3:sp Xxx3:closeau BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out " Write contents of this file ^W^W:w >>test.outAppend contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa!ENDTESTstart of test file Xxx1this is a test this is a testend of test file Xxx~ ~ [?12l[?25h[?25l2[?12l[?25h[?25l:[?2004h[?12l[?25h.,/end of/w! Xxx2 " write test file Xxx2 [?25l"Xxx2" [New File] 4 lines, 77 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xxx2 [?25l"Xxx2" 4 lines, 77 charactersstart of test file Xxx2this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx2 sp Xxx3:closeau BufReadPost Xxx2 bwipe$r4:ball open window for all args, close Xxx2:.,$w! test.out " Write contents of this file^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx2 this is a test this is a testtest7.in [+] [?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25lTest for autocommand that changes the buffer list, when doing ":ball".STARTTEST:so small.vim/^start ofA1^[:.,/end of/w! Xxx1 " write test file Xxx1:sp Xxx1:close$r2:.,/end of/w! Xxx2 " write test file Xxx2:sp Xxx2:close$r3:.,/end of/w! Xxx3 " write test file Xxx3:sp Xxx3:closeau BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out " Write contents of this file ^W^W:w >>test.outAppend contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa!ENDTESTstart of test file Xxx2this is a test this is a testend of test file Xxx~ ~ [?12l[?25h[?25l3[?12l[?25h[?25l:[?2004h[?12l[?25h.,/end of/w! Xxx3 " write test file Xxx3 [?25l"Xxx3" [New File] 4 lines, 77 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xxx3 [?25l"Xxx3" 4 lines, 77 charactersstart of test file Xxx3this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx3 sp Xxx3:closeau BufReadPost Xxx2 bwipe$r4:ball open window for all args, close Xxx2:.,$w! test.out " Write contents of this file^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx3 this is a test this is a testtest7.in [+] [?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25lTest for autocommand that changes the buffer list, when doing ":ball".STARTTEST:so small.vim/^start ofA1^[:.,/end of/w! Xxx1 " write test file Xxx1:sp Xxx1:close$r2:.,/end of/w! Xxx2 " write test file Xxx2:sp Xxx2:close$r3:.,/end of/w! Xxx3 " write test file Xxx3:sp Xxx3:closeau BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out " Write contents of this file ^W^W:w >>test.outAppend contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa!ENDTESTstart of test file Xxx3this is a test this is a testend of test file Xxx~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hau BufReadPost Xxx2 bwipe [?25l[?12l[?25h[?25l4[?12l[?25h[?25l:[?2004h[?12l[?25hball " open window for all args, close Xxx2 [?25l"Xxx1"4 lines, 77 characters "Xxx2" 4 lines, 77 characters Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25h.,$w! test.out " Write contents of this file [?25l"test.out" [New File] 4 lines, 77 characters written Press ENTER or type command to continue[?12l[?25h[?25l:sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTEST start of test file Xxx4this is a testthis is a test test7.in [+] start of test file Xxx1this is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx1 [?12l[?25h test7.in [+]  Xxx1 [?25l:[?2004h[?12l[?25hw >>test.out " Append contents of second window (Xxx1) [?25l"test.out" 4 lines, 77 characters appended[?12l[?25htest7.in [+] Xxx1  [?25l:[?2004h[?12l[?25h/^start of/,$w >>test.out " Append contents of last window (this file) [?25lsearch hit BOTTOM, continuing at TOP"test.out" 4 lines, 77 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test7 = test61; then \ # if diff test.out test7.ok; \ # then echo flaky test ok first time; \ # else rm -rf test7.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test7.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test8.failed test.ok test.out X* viminfo cp test8.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test8.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test8.in" 46 lines, 1236 charactersTest for BufWritePre autocommand that deletes or unloads the buffer. Test for BufUnload autocommand that unloads all other buffers. STARTTEST :so small.vim :au BufWritePre Xxx1 bunload :au BufWritePre Xxx2 bwipe /^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 $r2:.,/end of/w! Xxx2 " write test file Xxx2 :e! Xxx2" edit Xxx2 :bdel test8.in" delete this file from the buffer list :e Xxx1" edit Xxx1 :w" write it, will unload it and give an error msg :w! test.out" Write contents of this file :e! Xxx2" start editing Xxx2 :bwipe test.out" remove test.out from the buffer list :w" write it, will delete the buffer and give an error msg :w >>test.out" Append contents of this file :au! BufWritePre :func CloseAll() let i = 0 while i <= bufnr('$') if i != bufnr('%') && bufloaded(i)exe i . "bunload" endif let i += 1 endwhile[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for BufWritePre autocommand that deletes or unloads the buffer.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 37 lines, 1054 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTESTendfunc :func WriteToOut() edit! test.out $put ='VimLeave done' write endfunc :set viminfo='100,nviminfo :au BufUnload * call CloseAll() :au VimLeave * call WriteToOut() :e small.vim :sp mbyte.vim :q :qa! ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufWritePre Xxx1 bunload [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufWritePre Xxx2 bwipe [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^start of [?25l start of Xxx[?12l[?25h[?2004l[?2004h[?25l1[?12l[?25h[?25l :[?2004h[?12l[?25h.,/end of/w! Xxx1 " write test file Xxx1 [?25l"Xxx1" [New File] 3 lines, 31 characters written[?12l[?25h[?25l2[?12l[?25h[?25l:[?2004h[?12l[?25h.,/end of/w! Xxx2 " write test file Xxx2 [?25l"Xxx2" [New File] 3 lines, 31 characters written[?12l[?25h[?25l:[?2004h[?12l[?25he! Xxx2 " edit Xxx2 [?25l"Xxx2" 3 lines, 31 charactersstart of Xxx2 testend of Xxx~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hbdel test8.in^I^I" delete this file from the buffer list [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he Xxx1 " edit Xxx1 [?25l"Xxx1" 3 lines, 31 characters1 [?12l[?25h[?25l:[?2004h[?12l[?25hw " write it, will unload it and give an error msg [?25l"Xxx2"3 lines, 31 characters E203: Autocommands deleted or unloaded buffer to be written Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hw! test.out " Write contents of this file [?25l"test.out" [New File] 3 lines, 31 characters written Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25he! Xxx2 " start editing Xxx2 [?25l"Xxx2" 3 lines, 31 charactersstart of Xxx2test end of Xxx"Xxx2" 3 lines, 31 characters[?12l[?25h[?25l:[?2004h[?12l[?25hbwipe test.out " remove test.out from the buffer list [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw " write it, will delete the buffer and give an error msg [?25l"Xxx1"3 lines, 31 characters E203: Autocommands deleted or unloaded buffer to be written Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out " Append contents of this file [?25l"test.out" 3 lines, 31 characters appended Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hau! BufWritePre [?25lstart of Xxx1test end of Xxx[?12l[?25h[?25l:[?2004h[?12l[?25hfunc CloseAll() [?25l :[?2004h [?12l[?25h let i = 0 [?25l:[?2004h [?12l[?25h while i <= bufnr('$') [?25l:[?2004h [?12l[?25h if i != bufnr('%') && bufloaded(i) [?25l:[?2004h [?12l[?25h exe i . "bunload" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h let i += 1 [?25l:[?2004h [?12l[?25h endwhile [?25l:[?2004h [?12l[?25hendfunc [?25lstart of Xxx1test end of Xxx ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hfunc WriteToOut() [?25l :[?2004h [?12l[?25h edit! test.out [?25l:[?2004h [?12l[?25h $put ='VimLeave done' [?25l:[?2004h [?12l[?25h write [?25l:[?2004h [?12l[?25hendfunc [?25lstart of Xxx1test end of Xxx ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset viminfo='100,nviminfo [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufUnload * call CloseAll() [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau VimLeave * call WriteToOut() [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he small.vim [?25lError detected while processing function CloseAll: line 4: E16: Invalid range: 0bunload "small.vim" 1 line, 1 character Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hsp mbyte.vim [?25l"mbyte.vim" 0 lines, 0 characters~ ~ ~ mbyte.vim small.vim "mbyte.vim" 0 lines, 0 characters[?12l[?25h[?25l:[?2004h[?12l[?25hq [?25lError detected while processing function CloseAll: line 4: E16: Invalid range: 0bunload  "test.out" 6 lines, 62 characters[?2004l "test.out" 7 lines, 76 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test8 = test61; then \ # if diff test.out test8.ok; \ # then echo flaky test ok first time; \ # else rm -rf test8.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test8.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test9.failed test.ok test.out X* viminfo cp test9.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test9.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test9.in" 12 lines, 255 charactersTest for Bufleave autocommand that deletes the buffer we are about to edit. STARTTEST :so small.vim :au BufLeave test9.in bwipe yy :e yy :/^start of/,$w! test.out " Write contents of this file :qa! ENDTEST start of test file xx end of test file xx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for Bufleave autocommand that deletes the buffer we are about to edit.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 117 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufLeave test9.in bwipe yy [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he yy [?25lE143: Autocommands unexpectedly deleted new buffer yy[?12l[?25h[?25l:[?2004h[?12l[?25h/^start of/,$w! test.out " Write contents of this file [?25l"test.out" [New File] 2 lines, 42 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test9 = test61; then \ # if diff test.out test9.ok; \ # then echo flaky test ok first time; \ # else rm -rf test9.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test9.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test14.failed test.ok test.out X* viminfo cp test14.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test14.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test14.in" 100 lines, 1623 charactersTests for "vaBiB", end could be wrong. Also test ":s/pat/sub/" with different ~s in sub. Also test for ^Vxff and ^Vo123 in Insert mode. Also test "[m", "]m", "[M" and "]M" Also test search() STARTTEST :so small.vim :set belloff=all /Start cursor here vaBiBD:?Bug?,/Piece/-2w! test.out /^- Bug :s/u/~u~/ :s/i/~u~/ :s/o/~~~/ :.w >>test.out :if has("ebcdic") : let tt = "o\193\xc2\o303 \90a\xfg\o578\" :else : let tt = "o\65\x42\o103 \33a\xfg\o78\" :endif :exe "normal " . tt :unlet tt :.w >>test.out :set vb /^Piece 2]maA^[:.w >>test.out j]maB^[:.w >>test.out[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for "vaBiB", end could be wrong.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 57 lines, 1158 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST/^substitute :s/foo/bar/ :$put =@/ /^substitute :keeppatterns s/asdf/xyz/ :$put =@/ /^substitute Y:$put =@0 /bar /e :$put =@0 -:keeppatterns /xyz 0dn:/^search()/,$w >>test.out :qa! ENDTEST - Bug in "vPPPP" on this text (Webb):{cmd;{cmd; /* <-- Start cursor here */{}}} Piece of Java {tt m1 {[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset belloff=all [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hStart cursor here [?25l[?12l[?25h[?25l[?12l[?25h[?25l{ cmd; /* <-- Start cursor here */ { } [?12l[?25h[?25l cmd; }[?12l[?25h[?25l6 fewer linest1;} e1tt m2 {t2;} e26 fewer lines[?12l[?25h[?25l:[?2004h[?12l[?25h?Bug?,/Piece/-2w! test.out [?25l"test.out" [New File] 3 lines, 44 characters written[?12l[?25h[?25l/[?2004h[?12l[?25h^- Bug [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l:[?2004h[?12l[?25hs/u/~u~/ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hs/i/~u~/ [?25luuun "vPPPP" on this text (Webb): [?12l[?25h[?25l:[?2004h[?12l[?25hs/o/~~~/ [?25luuuuuuuuun this text (Webb): [?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 48 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hif has("ebcdic") [?25l :[?2004h [?12l[?25h: let tt = "o\193\xc2\o303 \90a\xfg\o578\" [?25l:[?2004h [?12l[?25h:else [?25l:[?2004h [?12l[?25h: let tt = "o\65\x42\o103 \33a\xfg\o78\" [?25l:[?2004h [?12l[?25h:endif [?25l/^substitute :s/foo/bar/ :$put =@/ /^substitute[?12l[?25h[?25l:[?2004h[?12l[?25hexe "normal " . tt [?25l[?2004l[?2004hABC !a^Og^G8[?12l[?25h[?25l:[?2004h[?12l[?25hunlet tt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset vb [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^Piece [?25l[?12l[?25h[?2004l[?2004h[?25l{A[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 10 characters appended[?12l[?25h[?2004l[?2004h[?25l{B[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 10 characters appended[?12l[?25h[?25l} e2tt m3 {[?12l[?25h[?2004l[?2004h[?25l{C[?12l[?25h[?25l :[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 10 characters appended[?12l[?25h[?2004l[?2004h[?25l{DC[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?2004l[?2004h[?25l{EA[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?2004l[?2004h[?25l{F[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 3 characters appended[?12l[?25h[?2004l[?2004h[?25l}G e1[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 7 characters appended[?12l[?25h [?25lif (x){t3;}} e3[?12l[?25h[?2004l[?2004h[?25l}H e3[?12l[?25h[?25l :[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 7 characters appended[?12l[?25h[?25l }[?12l[?25h[?2004l[?2004h[?25l}I[?12l[?25h[?25l :[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 3 characters appended[?12l[?25h[?2004l[?2004h[?25l}JH e3[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 8 characters appended[?12l[?25h[?2004l[?2004h[?25l}K e2[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 7 characters appended[?12l[?25h[?2004l[?2004h[?25l{LF[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 4 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^foobar [?25lfoobar[?12l[?25h[?25l :[?2004h[?12l[?25hlet startline = line('.') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall search('foobar', 'c') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append(line('$'), line('.') - startline) [?25l[?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25hcall search('^$', 'c') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append(line('$'), line('.') - startline) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall search('^$', 'bc') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append(line('$'), line('.') - startline) [?25l[?12l[?25h[?25l/[?2004h[?12l[?25htwo [?25lsubstitute foo asdf one two[?12l[?25h[?25l :[?2004h[?12l[?25hcall search('.', 'c') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append(line('$'), getline('.')[col('.') - 1:]) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^substitute [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l:[?2004h[?12l[?25hs/foo/bar/ [?25lbar [?12l[?25h[?25l:[?2004h[?12l[?25h$put =@/ [?25lsearch() 0 1 1 two foo[?12l[?25h[?25l /[?2004h[?12l[?25h^substitute [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l:[?2004h[?12l[?25hkeeppatterns s/asdf/xyz/ [?25lxyz[?12l[?25h[?25l:[?2004h[?12l[?25h$put =@/ [?25l ^substitute[?12l[?25h[?25l /[?2004h[?12l[?25h^substitute [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l:[?2004h[?12l[?25h$put =@0 [?25l substitute bar xyz[?12l[?25h[?25l /[?2004h[?12l[?25hbar /e [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put =@0 [?25l substitute bar xyz[?12l[?25h[?25l :[?2004h[?12l[?25hkeeppatterns /xyz [?25l[?12l[?25h[?25l /bar /exyz[?12l[?25h[?25l:[?2004h[?12l[?25h/^search()/,$w >>test.out [?25lsearch hit BOTTOM, continuing at TOP "test.out" 9 lines, 58 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test14 = test61; then \ # if diff test.out test14.ok; \ # then echo flaky test ok first time; \ # else rm -rf test14.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test14.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test15.failed test.ok test.out X* viminfo cp test15.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test15.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test15.in" 136 lines, 2246 charactersTests for :right on text with embedded TAB. Also test formatting a paragraph. Also test undo after ":%s" and formatting. STARTTEST :so small.vim :set tw=65 :/^\s*test for :left/,/^\s*test for :center/ left :/^\s*test for :center/,/^\s*test for :right/ center :/^\s*test for :right/,/^xxx/-1 right :set fo+=tcroql tw=72 /xxxxxxxx$ 0gq6kk :set nocp viminfo+=nviminfo :" undo/redo here to make the next undo only work on the following changes u^R :map gg :.,.+2s/^/x/kk:set tw=3gqq /^aa ggu :?test for :left?,$w! test.out :qa! ENDTESTtest for :leftaafaadfaa[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for :right on text with embedded TAB.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 401 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset tw=65 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^\s*test for :left/,/^\s*test for :center/ left [?25lsearch hit BOTTOM, continuing at TOPtest for :lefta afa adfa a[?12l[?25h[?25l:[?2004h[?12l[?25h/^\s*test for :center/,/^\s*test for :right/ center [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^\s*test for :right/,/^xxx/-1 right [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fo+=tcroql tw=72 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hxxxxxxxx$ [?25ldfaaxxxoikesdfaaxxxoikeasdfaaxxxoikexasdfaaxxxoikeasxxdfaaxxxoikeasxa;ofaaxxxoikeasdfaqweraxxxoikeaaxxxoikeyfaaxxxoikeydfaaxxxoikeysdfaaxxxoikeyasdfaaxxxoikeyxasdfaaxxxoikeyasxxdfaaxxxoikeyasxa;ofaaxxxoikeyasdfaqweraxxxoikey xxxxx xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx xxxxxxxxxxxxxxxxxx xxxxx xxxx, xxxx xxxx xxxx xxxx xxx xx xx xx xxxxxxx. xxxx xxxx. > xx xx, xxxx xxxx xxx xxxx xxx xxxxx xxx xxx xxxxxxx xxx xxxxx > xxxxxx xxxxxxx: xxxx xxxxxxx, xx xxxxxx xxxx xxxxxxxxxx aa aa aa aa bb bb bb bb cc cc cc cc[?12l[?25h [?25l  xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xxxx xxxxxxx. xxxx xxxx.xxxxxxx: xxxx xxxxxxx, xx xxxx xxxxxxx~ [?12l[?25h [?25l:[?2004h[?12l[?25hset nocp viminfo+=nviminfo [?25l[?12l[?25h[?25l:[?2004h[>c"[?12l[?25h undo/redo here to make the next undo only work on the following changes [?25l[?12l[?25h[?25l1 more line; before #1 0 seconds ago:set fo+=tcroql tw=72 /xxxxxxxx$ 0gq6kk :set nocp viminfo+=nviminfo :" undo/redo here to make the next undo only work on the following changes u^R :map gg :.,.+2s/^/x/kk:set tw=3gqq /^aa ggu :?test for :left?,$w! test.out :qa! ENDTESTtest for :leftaafaadfaasdfaaasdfaaxasdfaa asxxdfaatest for :centeraafaafd asdfdfaasdfaafd asdfasdfaa[?12l[?25h[?25l1 line less; after #1 0 seconds agotest for :lefta afa adfa asdfaaasdfa axasdfaa test for :center  aa fa afd asdf  dfaa sdfa afd asdf  asdfaa[?12l[?25h [?25l:[?2004h[?12l[?25hmap gg :.,.+2s/^/x/kk:set tw=3gqq [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^aa [?25lfaaxxxoikedfaaxxxoikesdfaaxxxoikeasdfaaxxxoikexasdfaaxxxoikeasxxdfaaxxxoikeasxa;ofaaxxxoikeasdfaqweraxxxoikeaaxxxoikeyfaaxxxoikeydfaaxxxoikeysdfaaxxxoikeyasdfaaxxxoikeyxasdfaaxxxoikeyasxxdfaaxxxoikeyasxa;ofaaxxxoikeyasdfaqweraxxxoikey xxxxx xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx xxxxxxxxxxxxxxxxxx xxxxx xxxx, xxxx xxxx xxxx xxxx xxx xx xx xx xxxxxxx. xxxx xxxx. > xx xx, xxxx xxxx xxx xxxx xxx xxxxx xxx xxx xxxxxxx xxx xxxxx xxxxxx > xxxxxxx: xxxx xxxxxxx, xx xxxxxx xxxx xxxxxxxxxx aa aa aa aa bb bb bb bb cc cc cc cc[?12l[?25h[?25l :[?2004h.,.+2s/^/x/ 3 substitutions on 3 linesxaa aa aa aa xbb bb bb bb xcc cc cc cc [?12l[?25h[?25l:[?2004hset tw=3 [?12l[?25h[?25l 3 more lines aaaaaa3 more lines[?12l[?25h[?25l 3 fewer lines; before #2 0 seconds agoaa aa aa aa bb bb bb bb cc cc cc cc ~ [?12l[?25h [?25l:[?2004h[?12l[?25h?test for :left?,$w! test.out [?25l"test.out"[New] 111L, 2304C written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test15 = test61; then \ # if diff test.out test15.ok; \ # then echo flaky test ok first time; \ # else rm -rf test15.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test15.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test19.failed test.ok test.out X* viminfo cp test19.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test19.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test19.in" 33 lines, 692 charactersTests for "r" with 'smarttab' and 'expandtab' set/not set. Also test that dv_ works correctly STARTTEST :so small.vim :set smarttab expandtab ts=8 sw=4 :" make sure that backspace works, no matter what termcap is used :set t_kD=^Vx7f t_kb=^Vx08 /some r:set noexpandtab /other r :" Test replacing with Tabs and then backspacing to undo it 0wR^H^H^H^[ :" Test replacing with Tabs 0wR^[ :" Test that copyindent works with expandtab set :set expandtab smartindent copyindent ts=8 sw=8 sts=8 o{ x^[:set nosol /Second line/ fwdv_:?^start?,$w! test.out :qa! ENDTEST start textsome test text test text[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for "r" with 'smarttab' and 'expandtab' set/not set.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 19 lines, 447 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset smarttab expandtab ts=8 sw=4 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" make sure that backspace works, no matter what termcap is used [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset t_kD=^^? t_kb=^^H [?25lTests for "r" with 'smarttab' and 'expandtab' set/not set. Also test that dv_ works correctly STARTTEST :so small.vim :set smarttab expandtab ts=8 sw=4 :" make sure that backspace works, no matter what termcap is used :set t_kD=^Vx7f t_kb=^Vx08 /some r:set noexpandtab /other r :" Test replacing with Tabs and then backspacing to undo it 0wR^H^H^H^[ :" Test replacing with Tabs 0wR^[ :" Test that copyindent works with expandtab set :set expandtab smartindent copyindent ts=8 sw=8 sts=8 o{ x^[:set nosol /Second line/ fwdv_:?^start?,$w! test.out :qa! ENDTEST start textsome test text test text[?12l[?25h[?25l/[?2004h[?12l[?25hsome [?25l[?12l[?25h[?2004l[?2004h[?25l ome test text[?12l[?25h[?25l:[?2004h[?12l[?25hset noexpandtab [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hother [?25l other test text[?12l[?25h[?2004l[?2004h[?25l ther test text[?12l[?25h[?25l a cde[?12l[?25h[?25l :[?2004h[?12l[?25h" Test replacing with Tabs and then backspacing to undo it [?25l[?12l[?25h [?2004l[?2004h[?25l[?12l[?25h[?25l f ghi[?12l[?25h[?25l :[?2004h[?12l[?25h" Test replacing with Tabs [?25l[?12l[?25h [?2004l[?2004h[?25l hi[?12l[?25h[?25l test text[?12l[?25h[?25l :[?2004h[?12l[?25h" Test that copyindent works with expandtab set [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset expandtab smartindent copyindent ts=8 sw=8 sts=8 [?25l[?12l[?25h[?2004l[?2004h[?25l{x[?12l[?25h[?25l :[?2004h[?12l[?25hset nosol [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hSecond line/ [?25l Second line beginning with whitespace[?12l[?25h[?25l with whitespace[?12l[?25h[?25l :[?2004h[?12l[?25h?^start?,$w! test.out [?25l"test.out" [New File] 10 lines, 121 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test19 = test61; then \ # if diff test.out test19.ok; \ # then echo flaky test ok first time; \ # else rm -rf test19.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test19.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test20.failed test.ok test.out X* viminfo cp test20.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test20.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test20.in" 28 lines, 398 charactersTests Blockwise Visual when there are TABs before the text. First test for undo working properly when executing commands from a register. Also test this in an empty buffer. STARTTEST :so tiny.vim G0"ay$k@au :new @auY:quit! GP /start here$ "by$^Vjjlld /456$ ^Vjj"bP :/56$/,$-1w! test.out :qa! ENDTEST 123456 234567 345678 test text test tex start heresome texttest text test text Ox^[jAy^[kdd[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests Blockwise Visual when there are TABs before the text.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 11 lines, 107 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso tiny.vim [?25l[?12l[?25h[?2004l[?2004h[?25lx[?12l[?25h [?2004l[?2004h[?25ly[?12l[?25h[?25ly Ox^[jAy^[kdd[?12l[?25h[?25l 2 changes; before #1 0 seconds ago[?12l[?25h [?25l:[?2004h[?12l[?25hnew [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] qa!ENDTEST123456 234567 345678test text test tex start here some texttest test textOx^[jAy^[kdd test20.in [?12l[?25h[?2004l[?2004h[?25lx[+][?12l[?25h [?2004l[?2004h[?25ly[?12l[?25h[?25l ~ [?12l[?25h[?25l1 line less; before #1 0 seconds ago [?12l[?25h[?25l:[?2004h[?12l[?25hquit! [?25lTests Blockwise Visual when there are TABs before the text. First test for undo working properly when executing commands from a register.Also test this in an empty buffer.STARTTEST:so tiny.vimG0"ay$k@au:new@auY:quit!GP/start here$"by$^Vjjlld/456$^Vjj"bP/56$/,$-1w! test.out :qa!ENDTEST123456 234567 345678test text test tex start heresome test text test textOx^[jAy^[kdd[?12l[?25h[?25l[?12l[?25h[?25l Ox^[jAy^[kdd[?12l[?25h[?25l /[?2004h[?12l[?25hstart here$ [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l[?12l[?25h[?25ls[?12l[?25h[?25le[?12l[?25h[?25lt t[?12l[?25h[?25lat [?12l[?25h[?25lrt hereextex[?12l[?25h[?25l/[?2004h[?12l[?25h456$ [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l[?12l[?25h[?25l4 234[?12l[?25h[?25l5 345[?12l[?25h[?25l[?12l[?25h[?25lstart here56 234start here67 345start here78[?12l[?25h[?25l:[?2004h[?12l[?25h/56$/,$-1w! test.out [?25lsearch hit BOTTOM, continuing at TOP "test.out" [New File] 10 lines, 106 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test20 = test61; then \ # if diff test.out test20.ok; \ # then echo flaky test ok first time; \ # else rm -rf test20.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test20.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test22.failed test.ok test.out X* viminfo cp test22.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test22.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test22.in" 13 lines, 197 charactersTests for file with some lines ending in CTRL-M, some not^M ^M STARTTEST :set ta tx :e! :$-3,$w! test.out :qa! ENDTEST this lines ends in a^M this one doesn't this one does^M and the last one doesn't ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for file with some lines ending in CTRL-M, some not^M[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 4 lines, 38 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset ta tx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! [?25l"test22.in" 13 lines, 197 characters[?12l[?25h[?25l:[?2004h[?12l[?25h$-3,$w! test.out [?25l"test.out" [New File] 4 lines, 79 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test22 = test61; then \ # if diff test.out test22.ok; \ # then echo flaky test ok first time; \ # else rm -rf test22.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test22.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test23.failed test.ok test.out X* viminfo cp test23.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test23.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test23.in" 15 lines, 282 charactersTests for complicated + argument to :edit command STARTTEST :$-1w! Xfile1 :$w! Xfile2 :edit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w :w! test.out :e Xfile1 :w >> test.out :qa! ENDTEST The result should be in Xfile1: "fooPIPEbar", in Xfile2: "fooSLASHbar" foo|bar foo/bar ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for complicated + argument to :edit command[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 7 lines, 125 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25h$-1w! Xfile1 [?25l"Xfile1" [New File] 1 line, 8 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h$w! Xfile2 [?25l"Xfile2" [New File] 1 line, 8 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hedit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w [?25l"Xfile1" 1 line, 8 characters foo|bar "Xfile1" 1 line, 11 characters written "Xfile2" 1 line, 8 characters foo/bar "Xfile2" 1 line, 12 characters written Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hw! test.out [?25l"test.out" [New File] 1 line, 12 characters written Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25he Xfile1 [?25l"Xfile1" 1 line, 11 charactersfooPIPEbar ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "Xfile1" 1 line, 11 characters[?12l[?25h[?25l:[?2004h[?12l[?25hw >> test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test23 = test61; then \ # if diff test.out test23.ok; \ # then echo flaky test ok first time; \ # else rm -rf test23.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test23.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test24.failed test.ok test.out X* viminfo cp test24.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test24.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test24.in" 89 lines, 1301 charactersTests for regexp with backslash and other special characters inside [] Also test backslash for hex/octal numbered character. STARTTEST :set nocompatible viminfo+=nviminfo /[\x] x/[\t\]] x/[]y] x/[\]] x/[y^] x/[$y] x/[\x61] x/[\x60-\x64] xj0/[\x785] x/[\o143] x/[\o140-\o144] x/[\o417] x/\%x42 x/\%o103 x/[\x00] x :s/[\x00-\x10]//g :s/[\x-z]\+// :s/[\u-z]\{2,}// :s/\(a\)\+//[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for regexp with backslash and other special characters inside [][?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 51 lines, 519 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:s/^\(\h\w*\%(->\|\.\)\=\)\+=/XX/ :s/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/ :s/aaa/xyz/ :s/~/bcd/ :s/~\+/BB/ :" :?start?,$w! test.out :qa! ENDTEST start test \text test text test text test text test text ]test text test ]text test text test text te^st text test te$xt test text test taext test text x61 test tbext test text x60-x64 test 5text test text x78 5 testc text test text o143 tesdt text test text o140-o144 test7 text test text o41 7[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset nocompatible viminfo+=nviminfo [?25l[?12l[?25h[?25l/[?2004h[>c[[?12l[?25h\x] [?25l[?12l[?25h[?25ltext test text[?12l[?25h[?25l/[?2004h[?12l[?25h[\t\]] [?25l[?12l[?25h[?25ltext test tex[?12l[?25h[?25l/[?2004h[?12l[?25h[]y] [?25l[?12l[?25h[?25ltest text[?12l[?25h[?25l/[?2004h[?12l[?25h[\]] [?25l[?12l[?25h[?25ltext test text[?12l[?25h[?25l/[?2004h[?12l[?25h[y^] [?25l[?12l[?25h[?25lst text[?12l[?25h[?25l/[?2004h[?12l[?25h[$y] [?25l[?12l[?25h[?25lxt test text[?12l[?25h[?25l/[?2004h[?12l[?25h[\x61] [?25l[?12l[?25h[?25lext test text x61[?12l[?25h[?25l/[?2004h[?12l[?25h[\x60-\x64] [?25l[?12l[?25h[?25lext test text x60-x64[?12l[?25h [?25l/[?2004h[?12l[?25h[\x785] [?25l[?12l[?25h[?25ltext test text x78 5[?12l[?25h[?25l/[?2004h[?12l[?25h[\o143] [?25l[?12l[?25h[?25l text test text o143[?12l[?25h[?25l/[?2004h[?12l[?25h[\o140-\o144] [?25l[?12l[?25h[?25lt text test text o140-o14[?12l[?25h[?25l/[?2004h[?12l[?25h[\o417] [?25l[?12l[?25h[?25l text test text o41 7[?12l[?25h[?25l/[?2004h[?12l[?25h\%x42 [?25l test text tBest text \%x42[?12l[?25h[?25lest text \%x42[?12l[?25h[?25l /[?2004h[?12l[?25h\%o103 [?25l test text teCst text \%o103[?12l[?25h[?25lst text \%o103[?12l[?25h[?25l /[?2004h[?12l[?25h[\x00] [?25l test text ^@test text [\x00][?12l[?25h[?25ltest text [\x00][?12l[?25h[?25l test te^@xt t^Dest t^Pext [\x00-\x10][?12l[?25h[?25l :[?2004h[?12l[?25hs/[\x00-\x10]//g [?25l3 substitutions on 1 linext test text [\x00-\x10][?12l[?25h[?25l test \xyztext test text [\x-z][?12l[?25h[?25l :[?2004h[?12l[?25hs/[\x-z]\+// [?25ltext test text [\x-z][?12l[?25h[?25l test text tev\uyst text [\u-z][?12l[?25h[?25l :[?2004h[?12l[?25hs/[\u-z]\{2,}// [?25lst text [\u-z][?12l[?25h[?25l xx aaaaa xx a[?12l[?25h[?25l :[?2004h[?12l[?25hs/\(a\)\+// [?25l xx [?12l[?25h[?25l xx aaaaa xx a[?12l[?25h[?25l :[?2004h[?12l[?25hs/\(a*\)\+// [?25l[?12l[?25h[?25l xx aaaaa xx a[?12l[?25h[?25l :[?2004h[?12l[?25hs/\(a*\)*// [?25l[?12l[?25h[?25l xx aaaaa xx[?12l[?25h[?25l :[?2004h[?12l[?25hs/\(a\)\{2,3}/A/ [?25lAaa xx[?12l[?25h[?25l xx aaaaa xx[?12l[?25h[?25l :[?2004h[?12l[?25hs/\(a\)\{-2,3}/A/ [?25lAaaa x[?12l[?25h[?25l xx aaa12aa xx[?12l[?25h[?25l :[?2004h[?12l[?25hs/\(a\)*\(12\)\@>/A/ [?25lAaa xx[?12l[?25h[?25l xx foobar xbar xx[?12l[?25h[?25l :[?2004h[?12l[?25hs/\(foo\)\@\|\.\)\=\)\+=/XX/ [?25lXX [?12l[?25h[?25l hh= 77;[?12l[?25h[?25l :[?2004h[?12l[?25hs/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/ [?25lYY 77;[?12l[?25h[?25l aaa[?12l[?25h[?25l :[?2004h[?12l[?25hs/aaa/xyz/ [?25lxyz [?12l[?25h[?25l xyz[?12l[?25h[?25l :[?2004h[?12l[?25hs/~/bcd/ [?25lbcd [?12l[?25h[?25l bcdbcdbcd[?12l[?25h[?25l :[?2004h[?12l[?25hs/~\+/BB/ [?25lBB[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h?start?,$w! test.out [?25l"test.out" [New] 32L, 586C written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test24 = test61; then \ # if diff test.out test24.ok; \ # then echo flaky test ok first time; \ # else rm -rf test24.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test24.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test26.failed test.ok test.out X* viminfo cp test26.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test26.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test26.in" 44 lines, 750 charactersTest for :execute, :while and :if STARTTEST :so small.vim mt:let i = 0 :while i < 12 : let i = i + 1 : if has("ebcdic") : execute "normal o" . i . "\047" : else : execute "normal o" . i . "\033" : endif : if i % 2 : normal Ax^V^[ : if i == 9 : break : endif : if i == 5 : continue : else : let j = 9 : while j > 0 :if has("ebcdic") :execute "normal" j . "a" . j . "\x27" :else :execute "normal" j . "a" . j . "\x1b" :endif :let j = j - 1[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for :execute, :while and :if[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 39 lines, 696 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST: endwhile : endif : endif : if i == 9 : if has("ebcdic") : execute "normal Az\047" : else : execute "normal Az\033" : endif : endif :endwhile :unlet i j :'t,$w! test.out :qa! ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet i = 0 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hwhile i < 12 [?25l :[?2004h [?12l[?25h: let i = i + 1 [?25l:[?2004h [?12l[?25h: if has("ebcdic") [?25l:[?2004h [?12l[?25h: execute "normal o" . i . "\047" [?25l:[?2004h [?12l[?25h: else [?25l:[?2004h [?12l[?25h: execute "normal o" . i . "\033" [?2004l[?2004h [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: if i % 2 [?25l:[?2004h [?12l[?25h: normal Ax^^[ [?2004l[?2004h [?25l:[?2004h [?12l[?25h: if i == 9 [?25l:[?2004h [?12l[?25h: break [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: if i == 5 [?25l:[?2004h [?12l[?25h: continue [?25l:[?2004h [?12l[?25h: else [?25l:[?2004h [?12l[?25h: let j = 9 [?25l:[?2004h [?12l[?25h: while j > 0 [?25l:[?2004h[?12l[?25h: if has("ebcdic") [?25l:[?2004h[?12l[?25h: execute "normal" j . "a" . j . "\x27" [?25l:[?2004h[?12l[?25h: else [?25l:[?2004h[?12l[?25h: execute "normal" j . "a" . j . "\x1b" [?2004l[?2004h [?25l:[?2004h[?12l[?25h: endif [?25l:[?2004h[?12l[?25h: let j = j - 1 [?25l:[?2004h[?12l[?25h: endwhile [?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: if i == 9 [?25l:[?2004h [?12l[?25h: if has("ebcdic") [?25l:[?2004h [?12l[?25h: execute "normal Az\047" [?25l:[?2004h [?12l[?25h: else [?25l:[?2004h [?12l[?25h: execute "normal Az\033" [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h:endwhile [?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?2004l[?2004h[?25l:execute "normal" j . "a" . j . "\x1b" :endif :let j = j - 1 : endwhile : endif : endif : if i == 9 : if has("ebcdic") : execute "normal Az\047" : else : execute "normal Az\033" : endif : endif :endwhile :unlet i j :'t,$w! test.out :qa! ENDTEST 1x999999999888888887777777666666555554444333221 2 3x999999999888888887777777666666555554444333221 4 5x 6 7x999999999888888887777777666666555554444333221 8 9x[?12l[?25h[?25l :[?2004h[?12l[?25hunlet i j [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h't,$w! test.out [?25l"test.out" [New File] 10 lines, 159 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test26 = test61; then \ # if diff test.out test26.ok; \ # then echo flaky test ok first time; \ # else rm -rf test26.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test26.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test28.failed test.ok test.out X* viminfo cp test28.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test28.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test28.in" 23 lines, 364 charactersTest for sourcing a file with CTRL-V's at the end of the line STARTTEST :/firstline/+1,/lastline/-1w! Xtestfile :so Xtestfile Gmm__1^[^[__2^[__3^[^[__4^[__5^[:'m,$s/^@/0/g :'m,$w! test.out :qa! ENDTEST firstline map __1 afirst map __2 asecond map __3 athird map __4 afourth map __5 afifth map __1 asd^V map __2 asd^V^V map __3 asd^V^V map __4 asd^V^V^V map __5 asd^V^V^V lastline ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for sourcing a file with CTRL-V's at the end of the line[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 114 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25h/firstline/+1,/lastline/-1w! Xtestfile [?25l"Xtestfile" [New File] 10 lines, 148 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hso Xtestfile [?25l[?12l[?25h[?2004l[?2004h[?25lsd map __2 asd^[[?12l[?25h[?2004l[?2004h[?25lsecond[?12l[?25h[?2004ld [?2004h[?25lsd^[[?12l[?25h[?2004l^[ [?2004h[?25lsd^@map __5 asd^@[?12l[?25h[?2004l[?2004h[?25lfifth[?12l[?25h[?25l:[?2004h[?12l[?25h'm,$s/^@/0/g [?25l0map __5 asd0fifth[?12l[?25h[?25l:[?2004h[?12l[?25h'm,$w! test.out [?25l"test.out" [New File] 2 lines, 45 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test28 = test61; then \ # if diff test.out test28.ok; \ # then echo flaky test ok first time; \ # else rm -rf test28.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test28.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test29.failed test.ok test.out X* viminfo cp test29.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test29.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test29.in" 231 lines, 4278 charactersTest for joining lines and marks in them in compatible and nocompatible modes and with 'joinspaces' set or not and with 'cpoptions' flag 'j' set or not STARTTEST :so small.vim :set nocompatible viminfo+=nviminfo :set nojoinspaces :set cpoptions-=j /firstline/ j"td/^STARTTEST/-1 PJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j joinspaces j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions+=j j05lmx2j06lmy2k4Jy3l$p`xyl$p`yy2l$p:set cpoptions-=j nojoinspaces compatible j"tpJjJjJjJjJjJjJjJjJjJjJjJjJjJj4Jy3l$pjd/STARTTEST/-2 ENDTEST firstline asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for joining lines and marks in them[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 11 lines, 478 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nocompatible viminfo+=nviminfo [?25l[?12l[?25h[?25l:[?2004h[>cs[?12l[?25het nojoinspaces [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cpoptions-=j [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hfirstline/ [?25l[?12l[?25h [?25l/[?2004h[?12l[?25h^STARTTEST/-1 [?25l+-1 37 fewer linesSTARTTEST /^{/+1 :set comments=s1:/*,mb:*,ex:*/,:// :set nojoinspaces fo=j :set backspace=eol,start :.,+3join j4J:.,+2join[?12l[?25h[?25lmore linesasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf. asdf[?12l[?25h[?25l asdf. asdfasdfasdf.[?12l[?25h[?25l asdf. asdfasdf[?12l[?25h[?25l asdf. asdfasdfasdf.[?12l[?25h[?25l asdf.asdfasdf[?12l[?25h[?25l asdf.asdf asdfasdf.[?12l[?25h[?25l asdf asdfasdf.[?12l[?25h[?25l asdf asdfasdf[?12l[?25h[?25lf asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l zx cvn.[?12l[?25h zx cv[?25las dfg? hjkl iop![?12l[?25h hjkl i[?25l. as dfg? hjkl iop! ert zx cvn. as dfg?[?12l[?25h er[?25lt er[?12l[?25h zx cv[?25lrn[?12l[?25h[?25lnop[?12l[?25h[?25l :[?2004h[?12l[?25hset cpoptions+=j [?25l[?12l[?25h zx cv[?25l hjkl iop![?12l[?25h hjkl i[?25l. as dfg? hjkl iop! ertSTARTTEST[?12l[?25h er[?25lt er[?12l[?25h zx cv[?25lrn[?12l[?25h[?25lnop[?12l[?25h[?25l :[?2004h[?12l[?25hset cpoptions-=j joinspaces [?25l[?12l[?25h [?25l 37 more linesasdfasdf. [?12l[?25h[?25lasdf[?12l[?25h[?25l asdfasdf.[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf. [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf. [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf. [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf.[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf.[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25lf asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l zx cvn.[?12l[?25h zx cv[?25las dfg? hjkl iop![?12l[?25h hjkl i[?25l. as dfg? hjkl iop! ert zx cvn. as dfg?[?12l[?25h er[?25lt e[?12l[?25h zx cv[?25len[?12l[?25h[?25lnop[?12l[?25h[?25l :[?2004h[?12l[?25hset cpoptions+=j [?25l[?12l[?25h zx cv[?25l hjkl iop![?12l[?25h hjkl i[?25l. as dfg? hjkl iop! ertSTARTTEST[?12l[?25h er[?25lt er[?12l[?25h zx cv[?25lrn[?12l[?25h[?25lnop[?12l[?25h[?25l :[?2004h[?12l[?25hset cpoptions-=j nojoinspaces compatible [?25l[?12l[?25h [?25l 37 more linesasdfasdf. [?12l[?25h[?25lasdf[?12l[?25h[?25l asdfasdf.[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf. [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf. [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf. [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf.[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf.[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25lf asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf [?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l asdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l zx cvn.[?12l[?25h[?25l. as dfg? hjkl iop! ert[?12l[?25h[?25lt a[?12l[?25h[?25l zx cvn.[?12l[?25h[?25l /[?2004h[?12l[?25hSTARTTEST/-2 [?25l+-2 4 fewer lines[?12l[?25h[?25l/[?2004h^STARTTEST  STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 12 lines, 147 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set comments=s1:/*,mb:*,ex:*/,:// :set nojoinspaces fo=j :set backspace=eol,start :.,+3join j4J :.,+2join j3J :.,+2join j3J :.,+2join jj3J ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{[?12l[?25h[?25l :[?2004h[?12l[?25hset comments=s1:/*,mb:*,ex:*/,:// [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nojoinspaces fo=j [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset backspace=eol,start [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h.,+3join [?25l/* Make sure the previous comment leader is not removed. */ [?12l[?25h[?25l [?12l[?25h[?25l/* Make sure the previous comment leader is not removed. */ [?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h.,+2join [?25l// Should the next comment leader be left alone? Yes. [?12l[?25h[?25l [?12l[?25h[?25l// Should the next comment leader be left alone? Yes. [?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h.,+2join [?25l/* Here the comment leader should be left intact. */ // And so should this one. [?12l[?25h[?25l [?12l[?25h[?25l/* Here the comment leader should be left intact. */ // And so should this one. [?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h.,+2join [?25lif (condition) // Remove the next comment leader! OK, I will. [?12l[?25h[?25l action();[?12l[?25h[?25l [?12l[?25h[?25lif (condition) // Remove the next comment leader! OK, I will. [?12l[?25h[?25l action(); [?12l[?25h[?25l /[?2004h^STARTTEST } STARTTEST[?12l[?25h[?25l :" Test with backspace set to the non-compatible setting [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 18 lines, 364 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTESTAvim2^Gu^U^[ :set cpo-=< :inoremap Avim3^U^[ :iunmap Avim4^U^U^[ :" Test with backspace set to the compatible setting :set backspace= visualbell A vim5^[A^U^U^[ A vim6^[Azwei^Gu^U^[ :inoremap A vim7^U^U^[ :set compatible novisualbell ENDTEST 1 this shouldn't be deleted 2 this shouldn't be deleted 3 this shouldn't be deleted 4 this should be deleted 5 this shouldn't be deleted 6 this shouldn't be deleted 7 this shouldn't be deleted 8 this shouldn't be deleted (not touched yet) STARTTEST /^{/+1 :set comments=sO:*\ -,mO:*\ \ ,exO:*/ :set comments+=s1:/*,mb:*,ex:*/,:// :set comments+=s1:>#,mb:#,ex:#<,:<[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25h" Test with backspace set to the non-compatible setting [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset belloff=all [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^\d\+ this [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cp bs=2 [?25l[?12l[?25h[?2004l[?2004h[?25l[?12l[?25h[?2004ld [?25lvim2[?12l[?25h[?2004h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cpo-=< [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hinoremap [?25l[?12l[?25h[?2004l[?2004h[?25ld3[?12l[?25h[?25l:[?2004h[?12l[?25hiunmap [?25l[?12l[?25h[?2004l[?2004h[?25l[?12l[?25h [?25l:[?2004h[?12l[?25h" Test with backspace set to the compatible setting [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset backspace= visualbell [?25l[?12l[?25h[?2004l[?2004h[?25lvim5[?12l[?25h[?2004l[?2004h[?2004l[?2004h[?25ld vim6[?12l[?25h[?2004l6 [?25lzwei[?12l[?25h[?2004h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hinoremap [?25l[?12l[?25h[?2004l[?2004h[?25lvim7[?12l[?25h [?25l:[?2004h[?12l[?25hset compatible novisualbell [?25l[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 21 lines, 356 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:.,+8join j9J :.,+2join j3J :.,+2join j3J :.,+2join jj3J j:.,+2join jj3J j:.,+5join j6J oSome code!^M// Make sure backspacing does not remove this comment leader.^[0i^H^[ ENDTEST { /* * Make sure the previous comment leader is not removed. */ /* * Make sure the previous comment leader is not removed. */ /* List: * - item1 * foo bar baz[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset comments=sO:*\ -,mO:*\ \ ,exO:*/ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset comments+=s1:/*,mb:*,ex:*/,:// [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset comments+=s1:>#,mb:#,ex:#<,:< [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset cpoptions-=j joinspaces fo=j [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset backspace=eol,start [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h.,+3join [?25l/* Make sure the previous comment leader is not removed. */* foo bar baz * - item2 * foo bar baz[?12l[?25h [?25l/* Make sure the previous comment leader is not removed. */* foo bar baz */[?12l[?25h [?25l:[?2004h[?12l[?25h.,+8join [?25l/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz *//* List:- item1 foo bar baz * - item2 foo bar baz */[?12l[?25h [?25l/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */// Should the next comment leader be left alone? // Yes.// Should the next comment leader be left alone? // Yes./* Here the comment leader should be left intact. */[?12l[?25h [?25l:[?2004h[?12l[?25h.,+2join [?25lShould the next comment leader be left alone? Yes.// And so should this one.[?12l[?25h [?25lShould the next comment leader be left alone? Yes./* Here the comment leader should be left intact. */ // And so should this one.[?12l[?25h [?25l:[?2004h[?12l[?25h.,+2join [?25l* Here the comment leader should be left intact. */ // And so should this one.if (condition) // Remove the next comment leader![?12l[?25h [?25l* Here the comment leader should be left intact. */ // And so should this one.// OK, I will. action();[?12l[?25h [?25l:[?2004h[?12l[?25h.,+2join [?25lif (condition) // Remove the next comment leader! OK, I will. action();if (condition) // Remove the next comment leader![?12l[?25h [?25lif (condition) // Remove the next comment leader! OK, I will. action();[?12l[?25h [?25l [?12l[?25h[?25l :[?2004h[?12l[?25h.,+2join [?25lint i = 7 /* foo *// 3 // comment [?12l[?25h[?25l ;[?12l[?25h[?25l [?12l[?25h[?25lint i = 7 /* foo *// 3 // comment [?12l[?25h[?25l ; [?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h.,+5join [?25l># Note that the last character of the ending comment leader (left angle bracket) is a com@ ># Note that the last character of the ending comment leader (left angle bracket) is a commment leader itself. Make sure that this comment leader is not removed from the next line ##< < On this line a new comment is opened which spans 2 lines. This comment should retain iits comment leader.[?12l[?25h[?25l [?12l[?25h[?25l># Note that the last character of the ending comment leader (left angle bracket) is a com@ ># Note that the last character of the ending comment leader (left angle bracket) is a commment leader itself. Make sure that this comment leader is not removed from the next line ##< < On this line a new comment is opened which spans 2 lines. This comment should retain iits comment leader.[?12l[?25h[?25l [?12l[?25h[?2004l[?2004h[?25lSome code! // Make sure backspacing does not remove this comment leader.[?12l[?25h [?2004l[?2004h[?25l// Make sure backspacing does not remove this comment leader. }[?12l[?25h [?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l :g/^STARTTEST/.,/^ENDTEST/d [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 61 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST[?12l[?25h[?25l :?firstline?+1,$w! test.out[?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d [?25l75 fewer linesMake sure the previous comment leader is not removed. */* Make sure the previous comment leader is not removed. */ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz *// Should the next comment leaderalone? Yes.// Should the next comment leader be left alone? Yes./* Here the comment leader should be left intact. */ // And so should this one. /* Here the comment leader should be left intact. */ // And so should this one. if (condition) // Remove the next comment leader! OK, I will. action();if (condition) // Remove the next comment leader! OK, I will. action();int i = 7 /* foo *// 3 // comment ;int i = 7 /* foo *// 3 // comment ;># Note that the last character of the ending comment leader (left angle bracket) is a commment leader itself. Make sure that this comment leader is not removed from the next line ##< < On this line a new comment is opened which spans 2 lines. This comment should retain iits comment leader.># Note that the last character of the ending comment leader (left angle bracket) is a commment leader itself. Make sure that this comment leader is not removed from the next line ##< < On this line a new comment is opened which spans 2 lines. This comment should retain iits comment leader. Some code!// Make sure backspacing does not remove this comment leader. }[?12l[?25h[?25l:[?2004h[?12l[?25h?firstline?+1,$w! test.out [?25l"test.out" [New File] 97 lines, 3018 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test29 = test61; then \ # if diff test.out test29.ok; \ # then echo flaky test ok first time; \ # else rm -rf test29.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test29.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test31.failed test.ok test.out X* viminfo cp test31.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test31.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test31.in" 95 lines, 1832 charactersTest for commands that close windows and/or buffers: :quit :close :hide :only :sall :all :ball :buf :edit STARTTEST :so small.vim GA 1^[:$w! Xtest1 $r2:$w! Xtest2 $r3:$w! Xtest3 :n! Xtest1 Xtest2 A 1^[:set hidden :" test for working :n when hidden set; write "testtext 2" :n :w! test.out :" test for failing :rew when hidden not set; write "testtext 2 2" :set nohidden A 2^[:rew :w >>test.out :" test for working :rew when hidden set; write "testtext 1 1" :set hidden :rew[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for commands that close windows and/or buffers:[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 80 lines, 1697 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:sp Xtest4 GA 4^[:all! :1wincmd w :w >>test.out :" :" test ":q!" and hidden buffer. :bw! Xtest1 Xtest2 Xtest3 Xtest4 :sp Xtest1 :wincmd w :bw! :set modified :bot sp Xtest2 :set modified :bot sp Xtest3 :set modified :wincmd t :hide :q! :w >>test.out :q! :w >>test.out :q! :call append(line('$'), "Oh, Not finished yet.") :w >>test.out :qa! ENDTEST testtext[?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h [?2004l[?2004h[?25l1[?12l[?25h[?25l:[?2004h[?12l[?25h$w! Xtest1 [?25l"Xtest1" [New File] 1 line, 11 characters written[?12l[?25h[?25l2[?12l[?25h[?25l:[?2004h[?12l[?25h$w! Xtest2 [?25l"Xtest2" [New File] 1 line, 11 characters written[?12l[?25h[?25l3[?12l[?25h[?25l:[?2004h[?12l[?25h$w! Xtest3 [?25l"Xtest3" [New File] 1 line, 11 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hn! Xtest1 Xtest2 [?25l"Xtest1" 1 line, 11 characterstesttext 1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?2004l[?2004h[?25l1[?12l[?25h[?25l:[?2004h[?12l[?25hset hidden [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" test for working :n when hidden set; write "testtext 2" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hn [?25l"Xtest2" 1 line, 11 characters2[?12l[?25h[?25l:[?2004h[?12l[?25hw! test.out [?25l"test.out" [New File] 1 line, 11 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" test for failing :rew when hidden not set; write "testtext 2 2" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nohidden [?25l[?12l[?25h[?2004l[?2004h[?25l2[?12l[?25h[?25l:[?2004h[?12l[?25hrew [?25lE37: No write since last change (add ! to override)[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 13 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test for working :rew when hidden set; write "testtext 1 1" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset hidden [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hrew [?25l"Xtest1" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)1 1 [?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 13 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nohidden [?25l[?12l[?25h[?2004l[?2004h[?25l1[?12l[?25h[?25l:[?2004h[?12l[?25hsp [?25lXtest1 [+] testtext 1 1 1Xtest1 [+] [?12l[?25h[?25l:[?2004h[?12l[?25hn Xtest2 Xtest3 [?25l"Xtest2" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)2 22 [?12l[?25h[?25l:[?2004h[?12l[?25hall [?25l"Xtest3" 1 line, 11 characterstesttext 1 1 1 ~ ~ ~ ~ ~ ~ ~ Xtest1 [+] testtext 2 2 ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [?12l[?25h[?25l:[?2004h[?12l[?25h1wincmd w [?25lXtest1 [+] Xtest2 [+]  [?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 15 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test abandoning changed buffer, should be unloaded even when 'hidden' set [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" write "testtext 2 2" twice [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset hidden [?25l[?12l[?25h[?2004l[?2004h[?25l1 1[?12l[?25h[?25l:[?2004h[?12l[?25hq! [?25ltesttext 2 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 13 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hunhide [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 13 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nohidden [?25l[?12l[?25h[?2004l[?2004h[?25l2[?12l[?25h[?25l:[?2004h[?12l[?25hhide [?25l3~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test ":edit" failing in modified buffer when 'hidden' not set [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" write "testtext 3 3" [?25l[?12l[?25h[?2004l[?2004h[?25l3[?12l[?25h[?25l:[?2004h[?12l[?25he Xtest1 [?25lE37: No write since last change (add ! to override)[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 13 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset hidden [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he Xtest1 [?25l"Xtest1" 1 line, 11 characters1[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test ":close" not hiding when 'hidden' not set in modified buffer; [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" write "testtext 3 3 3" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xtest3 [?25l"Xtest3" [Modified] line 1 of 1 --100%-- col 1 (file 2 of 2)3 3Xtest3 [+] testtext 1Xtest1 [?12l[?25h[?25l:[?2004h[?12l[?25hset nohidden [?25l[?12l[?25h[?2004l[?2004h[?25l3[?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25lE37: No write since last change (add ! to override)[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 15 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" test ":close!" does hide when 'hidden' not set in modified buffer; [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" write "testtext 1" [?25l[?12l[?25h[?2004l[?2004h[?25l3 3[?12l[?25h[?25l:[?2004h[?12l[?25hclose! [?25l1~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset nohidden [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" test ":all!" hides changed buffer; write "testtext 2 2 2" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xtest4 [?25l"Xtest4" [New File]Xtest4 testtext 1Xtest1 [?12l[?25h[?2004l[?2004h[?25l 4[+][?12l[?25h[?25l:[?2004h[?12l[?25hall! [?25l"Xtest2" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2) "Xtest3" [Modified] line 1 of 1 --100%-- col 1 (file 2 of 2) Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25h1wincmd w [?25ltesttext 2 2 2 ~ 2 3 3 3 33 [+][?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 15 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" test ":q!" and hidden buffer. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hbw! Xtest1 Xtest2 Xtest3 Xtest4 [?25l"test31.in"95 lines, 1832 characters 4 buffers wiped out Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hsp Xtest1 [?25l"Xtest1" 1 line, 11 characterstesttext 1 ~ 1  :wincmd t:hide:q!:w >>test.out:q!:w >>test.out:q!:call append(line('$'), "Oh, Not finished yet."):w >>test.out:qa!ENDTESTtesttexttest31.in "Xtest1" 1 line, 11 characters[?12l[?25h[?25l:[?2004h[?12l[?25hwincmd w [?25lXtest1  test31.in [?12l[?25h[?25l:[?2004h[?12l[?25hbw! [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset modified [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hbot sp Xtest2 [?25l"Xtest2" 1 line, 11 charactersXtest1 [+] testtext 2Xtest2 [?12l[?25h[?25l:[?2004h[?12l[?25hset modified [?25l[+][?12l[?25h[?25l:[?2004h[?12l[?25hbot sp Xtest3 [?25l"Xtest3" 1 line, 11 characterstesttext 1 ~ ~ ~ ~ ~ ~ ~ Xtest1 [+] testtext 2 ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [?12l[?25h[?25l:[?2004h[?12l[?25hset modified [?25l[+][?12l[?25h[?25l:[?2004h[?12l[?25hwincmd t [?25lXtest1 [+] Xtest3 [+]  [?12l[?25h[?25l:[?2004h[?12l[?25hhide [?25ltesttext 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [+] [?12l[?25h[?25l:[?2004h[?12l[?25hq! [?25l3~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hq! [?25lE37: No write since last change E162: No write since last change for buffer "Xtest1"[?2004h Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" 1 line, 11 characters appended Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hq! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test31 = test61; then \ # if diff test.out test31.ok; \ # then echo flaky test ok first time; \ # else rm -rf test31.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test31.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test33.failed test.ok test.out X* viminfo cp test33.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test33.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test33.in" 34 lines, 616 charactersTest for 'lisp' If the lisp feature is not enabled, this will fail! STARTTEST :so small.vim :set lisp /^(defun =G:/^(defun/,$w! test.out :q! ENDTEST (defun html-file (base) (format nil "~(~A~).html" base)) (defmacro page (name title &rest body) (let ((ti (gensym))) `(with-open-file (*standard-output* (html-file ,name) :direction :output :if-exists :supersede) (let ((,ti ,title)) (as title ,ti) (with center (as h2 (string-upcase ,ti))) (brs 3) ,@body)))) ;;; Utilities for generating links[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for 'lisp'[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 63 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset lisp [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^(defun [?25l[?12l[?25h[?25l22 lines to indent... 23indented  (format nil "~(~A~).html" base)) (let ((ti (gensym))) `(with-open-file (*standard-output* (html-file ,name) :direction :output :if-exists :supersede) (let ((,ti ,title)) (as title ,ti) (with center (as h2 (string-upcase ,ti))) (brs 3) ,@body))))[?12l[?25h[?25l:[?2004h[?12l[?25h/^(defun/,$w! test.out [?25lsearch hit BOTTOM, continuing at TOP "test.out" [New File] 23 lines, 544 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hq! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test33 = test61; then \ # if diff test.out test33.ok; \ # then echo flaky test ok first time; \ # else rm -rf test33.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test33.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test34.failed test.ok test.out X* viminfo cp test34.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test34.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test34.in" 87 lines, 1833 charactersTest for user functions. Also test an mapping calling a function. Also test that a builtin function cannot be replaced. Also test for regression when calling arbitrary expression. STARTTEST :so small.vim :function Table(title, ...) : let ret = a:title : let idx = 1 : while idx <= a:0 : exe "let ret = ret . a:" . idx : let idx = idx + 1 : endwhile : return ret :endfunction :function Compute(n1, n2, divname) : if a:n2 == 0 : return "fail" : endif : exe "let g:" . a:divname . " = ". a:n1 / a:n2 : return "ok" :endfunction :func Expr1() : normal! v : return "111" :endfunc :func Expr2()[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for user functions.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 78 lines, 1621 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST---*--- (one (two [(one again^[:call append(line('$'), max([1, 2, 3])) :call extend(g:, {'max': function('min')}) :call append(line('$'), max([1, 2, 3])) :try : " Regression: the first line below used to throw ?E110: Missing ')'? : " Second is here just to prove that this line is correct when not skipping : " rhs of &&. : $put =(0&&(function('tr'))(1, 2, 3)) : $put =(1&&(function('tr'))(1, 2, 3)) :catch : $put ='!!! Unexpected exception:' : $put =v:exception :endtry :$-9,$w! test.out :delfunc Table :delfunc Compute :delfunc Expr1 :delfunc Expr2 :delfunc ListItem :delfunc ListReset :unlet retval counter :q! ENDTEST here[?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfunction Table(title, ...) [?25l :[?2004h [?12l[?25h: let ret = a:title [?25l:[?2004h [?12l[?25h: let idx = 1 [?25l:[?2004h [?12l[?25h: while idx <= a:0 [?25l:[?2004h [?12l[?25h: exe "let ret = ret . a:" . idx [?25l:[?2004h [?12l[?25h: let idx = idx + 1 [?25l:[?2004h [?12l[?25h: endwhile [?25l:[?2004h [?12l[?25h: return ret [?25l:[?2004h [?12l[?25h:endfunction [?25l---*--- (one (two [(one again^[:call append(line('$'), max([1, 2, 3])) :call extend(g:, {'max': function('min')}) :call append(line('$'), max([1, 2, 3])) :try : " Regression: the first line below used to throw ?E110: Missing ')'?[?12l[?25h[?25l :[?2004h[?12l[?25hfunction Compute(n1, n2, divname) [?25l :[?2004h [?12l[?25h: if a:n2 == 0 [?25l:[?2004h [?12l[?25h: return "fail" [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: exe "let g:" . a:divname . " = ". a:n1 / a:n2 [?25l:[?2004h [?12l[?25h: return "ok" [?25l:[?2004h [?12l[?25h:endfunction [?25l---*--- (one (two [(one again^[:call append(line('$'), max([1, 2, 3])) :call extend(g:, {'max': function('min')}) :call append(line('$'), max([1, 2, 3]))[?12l[?25h[?25l :[?2004h[?12l[?25hfunc Expr1() [?25l :[?2004h [?12l[?25h: normal! v [?25l:[?2004h [?12l[?25h: return "111" [?25l:[?2004h [?12l[?25h:endfunc [?25l---*--- (one (two[?12l[?25h[?25l :[?2004h[?12l[?25hfunc Expr2() [?25l :[?2004h [?12l[?25h: call search('XX', 'b') [?25l:[?2004h [?12l[?25h: return "222" [?25l:[?2004h [?12l[?25h:endfunc [?25l---*--- (one (two[?12l[?25h[?25l :[?2004h[?12l[?25hfunc ListItem() [?25l :[?2004h [?12l[?25h: let g:counter += 1 [?25l:[?2004h [?12l[?25h: return g:counter . '. ' [?25l:[?2004h [?12l[?25h:endfunc [?25l---*--- (one (two[?12l[?25h[?25l :[?2004h[?12l[?25hfunc ListReset() [?25l :[?2004h [?12l[?25h: let g:counter = 0 [?25l:[?2004h [?12l[?25h: return '' [?25l:[?2004h [?12l[?25h:endfunc [?25l---*--- (one (two[?12l[?25h[?25l :[?2004h[?12l[?25hfunc FuncWithRef(a) [?25l :[?2004h [?12l[?25h: unlet g:FuncRef [?25l:[?2004h [?12l[?25h: return a:a [?25l:[?2004h [?12l[?25h:endfunc [?25l---*--- (one (two[?12l[?25h[?25l :[?2004h[?12l[?25hlet g:FuncRef=function("FuncWithRef") [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet counter = 0 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hinoremap ( ListItem() [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hinoremap [ ListReset() [?25l[?12l[?25h[?25l:[?2004h[?12l[?25himap + Expr1() [?25l[?12l[?25h[?25l:[?2004h[?12l[?25himap * Expr2() [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet retval = "nop" [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^here [?25l[?12l[?25h[?25lher$[?2004l=[?2004h[?12l[?25hTable("xxx", 4, "asdf") [?25l=[?2004h[?12l[?25hCompute(45, 0, "retval") [?25l=[?2004h[?12l[?25hretval [?25l=[?2004h[?12l[?25hCompute(45, 5, "retval") [?25l=[?2004h[?12l[?25hretval [?25l=[?2004h[?12l[?25hg:FuncRef(333) [?25lError detected while processing function Expr1: line 1: E523: Not allowed here Press ENTER or type command to continue[?12l[?25h[?25l:call append(line('$'), max([1, 2, 3])) :try : " Regression: the first line below used to throw ?E110: Missing ')'? : " Second is here just to prove that this line is correct when not skipping : " rhs of &&. $put =(0&&(function('tr'))(1, 2, 3)) : $put =(1&&(function('tr'))(1, 2, 3)) :catch$put ='!!! Unexpected exception:'$put =v:exception :endtry$-9,$w! test.outdelfunc Table :delfunc Computedelfunc Expr1delfunc Expr2 :delfunc ListItemListReset :unlet retval counter :q!ENDTESTxxx4asdf fail nop ok 9 333 XX111-XX---222--- 1. one2. two[?12l[?25h[?2004h[?25l1. one again[?12l[?25h[?25l :[?2004h[?12l[?25hcall append(line('$'), max([1, 2, 3])) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall extend(g:, {'max': function('min')}) [?25lE704: Funcref variable name must start with a capital: max[?12l[?25h[?25l:[?2004h[?12l[?25hcall append(line('$'), max([1, 2, 3])) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25htry [?25l :[?2004h [?12l[?25h: " Regression: the first line below used to throw ?E110: Missing ')'? [?25l:[?2004h [?12l[?25h: " Second is here just to prove that this line is correct when not skipping [?25l:[?2004h [?12l[?25h: " rhs of &&. [?25l:[?2004h [?12l[?25h: $put =(0&&(function('tr'))(1, 2, 3)) [?25l:[?2004h [?12l[?25h: $put =(1&&(function('tr'))(1, 2, 3)) [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put ='!!! Unexpected exception:' [?25l:[?2004h [?12l[?25h: $put =v:exception [?25l:[?2004h [?12l[?25h:endtry [?25l: " rhs of &&. : $put =(0&&(function('tr'))(1, 2, 3)) : $put =(1&&(function('tr'))(1, 2, 3)) :catch : $put ='!!! Unexpected exception:' : $put =v:exception :endtry :$-9,$w! test.out :delfunc Table :delfunc Computedelfunc Expr1 :delfunc Expr2ListItemListReset :unlet retval counter :q!ENDTESTxxx4asdf fail nop ok 9 333 XX111-XX ---222--- 1. one 2. two1. one again 330[?12l[?25h[?25l :[?2004h[?12l[?25h$-9,$w! test.out [?25l"test.out" [New File] 10 lines, 81 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc Table [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc Compute [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc Expr1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc Expr2 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc ListItem [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc ListReset [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hunlet retval counter [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hq! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test34 = test61; then \ # if diff test.out test34.ok; \ # then echo flaky test ok first time; \ # else rm -rf test34.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test34.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test36.failed test.ok test.out X* viminfo cp test36.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test36.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test36.in" 108 lines, 2025 charactersTest character classes in regexp using regexpengine 0, 1, 2. STARTTEST /^start-here/+1 Y:s/\%#=0\d//g p:s/\%#=1\d//g p:s/\%#=2\d//g p:s/\%#=0[0-9]//g p:s/\%#=1[0-9]//g p:s/\%#=2[0-9]//g p:s/\%#=0\D//g p:s/\%#=1\D//g p:s/\%#=2\D//g p:s/\%#=0[^0-9]//g p:s/\%#=1[^0-9]//g p:s/\%#=2[^0-9]//g p:s/\%#=0\o//g p:s/\%#=1\o//g p:s/\%#=2\o//g p:s/\%#=0[0-7]//g p:s/\%#=1[0-7]//g p:s/\%#=2[0-7]//g p:s/\%#=0\O//g p:s/\%#=1\O//g p:s/\%#=2\O//g p:s/\%#=0[^0-7]//g p:s/\%#=1[^0-7]//g p:s/\%#=2[^0-7]//g[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest character classes in regexp using regexpengine 0, 1, 2.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 101 lines, 1850 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTESTp:s/\%#=2[a-z]//g p:s/\%#=0\L//g p:s/\%#=1\L//g p:s/\%#=2\L//g p:s/\%#=0[^a-z]//g p:s/\%#=1[^a-z]//g p:s/\%#=2[^a-z]//g p:s/\%#=0\u//g p:s/\%#=1\u//g p:s/\%#=2\u//g p:s/\%#=0[A-Z]//g p:s/\%#=1[A-Z]//g p:s/\%#=2[A-Z]//g p:s/\%#=0\U//g p:s/\%#=1\U//g p:s/\%#=2\U//g p:s/\%#=0[^A-Z]//g p:s/\%#=1[^A-Z]//g p:s/\%#=2[^A-Z]//g p:s/\%#=0\%204l^\t...//g p:s/\%#=1\%205l^\t...//g p:s/\%#=2\%206l^\t...//g :/^start-here/+1,$wq! test.out ENDTEST start-here^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^start-here/+1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hs/\%#=0\d//g [?25l10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\d//g [?25l10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\d//g [?25l10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[0-9]//g [?25l10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[0-9]//g [?25l10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[0-9]//g [?25l10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\D//g [?25l72 substitutions on 1 line0123456789~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\D//g [?25l72 substitutions on 1 line0123456789~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\D//g [?25l72 substitutions on 1 line0123456789~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^0-9]//g [?25l72 substitutions on 1 line0123456789~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^0-9]//g [?25l72 substitutions on 1 line0123456789~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^0-9]//g [?25l72 substitutions on 1 line0123456789~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\o//g [?25l8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\o//g [?25l8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\o//g [?25l8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[0-7]//g [?25l8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[0-7]//g [?25l8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[0-7]//g [?25l8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\O//g [?25l74 substitutions on 1 line01234567~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\O//g [?25l74 substitutions on 1 line01234567~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\O//g [?25l74 substitutions on 1 line01234567~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^0-7]//g [?25l74 substitutions on 1 line01234567~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^0-7]//g [?25l74 substitutions on 1 line01234567~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^0-7]//g [?25l74 substitutions on 1 line01234567~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\x//g [?25l22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\x//g [?25l22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\x//g [?25l22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[0-9A-Fa-f]//g [?25l22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[0-9A-Fa-f]//g [?25l22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[0-9A-Fa-f]//g [?25l22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\X//g [?25l60 substitutions on 1 line0123456789ABCDEFabcdef~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\X//g [?25l60 substitutions on 1 line0123456789ABCDEFabcdef~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\X//g [?25l60 substitutions on 1 line0123456789ABCDEFabcdef~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^0-9A-Fa-f]//g [?25l60 substitutions on 1 line0123456789ABCDEFabcdef~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^0-9A-Fa-f]//g [?25l60 substitutions on 1 line0123456789ABCDEFabcdef~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^0-9A-Fa-f]//g [?25l60 substitutions on 1 line0123456789ABCDEFabcdef~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\w//g [?25l36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\w//g [?25l36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\w//g [?25l36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[0-9A-Za-z_]//g [?25l36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[0-9A-Za-z_]//g [?25l36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[0-9A-Za-z_]//g [?25l36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\W//g [?25l46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\W//g [?25l46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\W//g [?25l46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^0-9A-Za-z_]//g [?25l46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^0-9A-Za-z_]//g [?25l46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^0-9A-Za-z_]//g [?25l46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\h//g [?25l26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\h//g [?25l26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\h//g [?25l26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[A-Za-z_]//g [?25l26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[A-Za-z_]//g [?25l26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[A-Za-z_]//g [?25l26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\H//g [?25l56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\H//g [?25l56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\H//g [?25l56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^A-Za-z_]//g [?25l56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^A-Za-z_]//g [?25l56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^A-Za-z_]//g [?25l56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\a//g [?25l25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\a//g [?25l25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\a//g [?25l25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[A-Za-z]//g [?25l25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[A-Za-z]//g [?25l25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[A-Za-z]//g [?25l25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\A//g [?25l57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\A//g [?25l57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\A//g [?25l57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^A-Za-z]//g [?25l57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^A-Za-z]//g [?25l57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^A-Za-z]//g [?25l57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\l//g [?25l13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\l//g [?25l13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\l//g [?25l13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[a-z]//g [?25l13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[a-z]//g [?25l13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[a-z]//g [?25l13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\L//g [?25l69 substitutions on 1 lineabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\L//g [?25l69 substitutions on 1 lineabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\L//g [?25l69 substitutions on 1 lineabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^a-z]//g [?25l69 substitutions on 1 lineabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^a-z]//g [?25l69 substitutions on 1 lineabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^a-z]//g [?25l69 substitutions on 1 lineabcdefghiwxyz~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\u//g [?25l12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\u//g [?25l12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\u//g [?25l12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[A-Z]//g [?25l12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[A-Z]//g [?25l12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[A-Z]//g [?25l12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\U//g [?25l70 substitutions on 1 lineABCDEFGHIXYZ~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\U//g [?25l70 substitutions on 1 lineABCDEFGHIXYZ~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\U//g [?25l70 substitutions on 1 lineABCDEFGHIXYZ~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0[^A-Z]//g [?25l70 substitutions on 1 lineABCDEFGHIXYZ~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1[^A-Z]//g [?25l70 substitutions on 1 lineABCDEFGHIXYZ~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2[^A-Z]//g [?25l70 substitutions on 1 lineABCDEFGHIXYZ~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=0\%204l^\t...//g [?25l!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=1\%205l^\t...//g [?25l!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l  ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[[¦±¼ÇÓé[?12l[?25h[?25l :[?2004h[?12l[?25hs/\%#=2\%206l^\t...//g [?25l!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé~ [?12l[?25h[?25l:[?2004h[?12l[?25h/^start-here/+1,$wq! test.out [?25lsearch hit BOTTOM, continuing at TOP[?2004l "test.out" [New File] 99 lines, 4269 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test36 = test61; then \ # if diff test.out test36.ok; \ # then echo flaky test ok first time; \ # else rm -rf test36.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test36.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test37.failed test.ok test.out X* viminfo cp test37.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test37.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test37.in" 116 lines, 3262 charactersTest for 'scrollbind'. Do not add a line below! STARTTEST :so small.vim :set noscrollbind :set scrollopt=ver,jump :set scrolloff=2 :set nowrap :set noequalalways :set splitbelow :" TEST using two windows open to one buffer, one extra empty window :split :new ^Wt: :resize 8 /^start of window 1$/ zt: :set scrollbind ^Wj: :resize 7 /^start of window 2$/ zt: :set scrollbind :" -- start of tests -- :" TEST scrolling down L5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3: :" TEST scrolling up ^WtH4k^WjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3k^WtH^WjHyy^Wbpr6^WtHyy^Wbpr7: :" TEST horizontal scrolling[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for 'scrollbind'. Do not add a line below![?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 72 lines, 1498 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST^Wt:set scb G^WjG:syncbind Hk^WtH^WjHyy^Wbp^Wtyy^Wbp: ^Wt:set noscb ggL^Wj:set noscb ggL:set scb ^Wt:set scb ^WtG^WjG^Wt:syncbind Hk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: ^WtH3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out" Write contents of this file :qa! ENDTEST start of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03 . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08 . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09 . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset noscrollbind [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollopt=ver,jump [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrolloff=2 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nowrap [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset noequalalways [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset splitbelow [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST using two windows open to one buffer, one extra empty window [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hsplit [?25lHk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: ^WtH3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out " Write contents of this file :qa!ENDTESTstart of window 1. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 test37.in Hk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: ^WtH3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out " Write contents of this file :qa!ENDTESTstart of window 11122330404 test37.in [?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l:w! test.out " Write contents of this file :qa!ENDTESTstart of window 1 test37.in ~ ~ ~ ~ ~ [No Name] [?12l[?25htest37.in [No Name]  [?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hresize 8 [?25l:" ***** done with tests ***** :w! test.out " Write contents of this file :qa!ENDTESTstart of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 test37.in ^WtH3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp::" ***** done with tests *****:w! test.out " Write contents of this file :qa!ENDTESTstart of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03[?12l[?25h[?25l/[?2004h[?12l[?25h^start of window 1$/ [?25l . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?12l[?25h[?25l. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03 . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollbind [?25l[?12l[?25htest37.in  test37.in [?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hresize 7 [?25l:w! test.out " Write contents of this file :qa!ENDTESTstart of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 test37.in ~ ~ ~ ~ [?12l[?25h[?25l/[?2004h[?12l[?25h^start of window 2$/ [?25lend of window 1start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 023 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03[?12l[?25h[?25l . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollbind [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" -- start of tests -- [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST scrolling down [?25l[?12l[?25h [?25l. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08 . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09 . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07 . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08 . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09[?12l[?25htest37.in  [No Name] [?25l . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[+][?12l[?25h[?25l0[?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25l . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[?12l[?25h[?25l1[?12l[?25htest37.in [No Name] [+]   [?25l. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15 end of window 1. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10 . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13 . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15[?12l[?25htest37.in  [No Name] [+] [?25l . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h[?25l2[?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25l . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?12l[?25h[?25l3[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST scrolling up [?25l[?12l[?25htest37.in [No Name] [+]  [?25l. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08440505060607070808090900[?12l[?25htest37.in  test37.in test37.in test37.in  test37.in  [No Name] [+] [?25l . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06[?12l[?25h[?25l4[?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25l . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06[?12l[?25h[?25l5[?12l[?25htest37.in [No Name] [+]  [?25lstart of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 . line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 [?12l[?25htest37.in test37.in  test37.in  test37.in test37.in  [No Name] [+] [?25l . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l6[?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25l . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?12l[?25h[?25l7[?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST horizontal scrolling [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollopt+=hor [?25l[?12l[?25h[?25l[?12l[?25htest37.in [No Name] [+]  [?25l 156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0256789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0356789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0556789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0656789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 2UTSRQPONMLKJIHGREDCBA9876543210 01UTSRQPONMLKJIHGREDCBA9876543210 02UTSRQPONMLKJIHGREDCBA9876543210 03UTSRQPONMLKJIHGREDCBA9876543210 04UTSRQPONMLKJIHGREDCBA9876543210 05UTSRQPONMLKJIHGREDCBA9876543210 06[?12l[?25htest37.in  [No Name] [+] [?25l56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?12l[?25h[?25l [?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25lUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25htest37.in [No Name] [+]  [?25l56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09101112131415UTSRQPONMLKJIHGREDCBA9876543210 09101112131415[?12l[?25h[?25l. line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09 . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15 end of window 1 . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09 . line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10 . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13 . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15[?12l[?25h[?25l[?12l[?25htest37.in  [No Name] [+] [?25l. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?12l[?25h[?25l [?12l[?25htest37.in [No Name] [+]   test37.in  [No Name] [+] [?25l. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollopt-=hor [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" ****** tests using two different buffers ***** [?25l[?12l[?25htest37.in [No Name] [+]  test37.in  test37.in [?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25lstart of window 20000000000[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset noscrollbind [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^start of window 2$/,/^end of window 2$/y [?25l18 lines yanked[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25ltest37.in ~ ~ ~ ~ ~ ~ ~ [No Name] [?12l[?25htest37.in [No Name]  test37.in  [No Name] [?25l4 more lines[+][?12l[?25h [?25l18 more linesstart of window 2. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25htest37.in [No Name] [+]  [?25l/[?2004h[?12l[?25h^start of window 1$/ [?25lsearch hit BOTTOM, continuing at TOPENDTESTstart of window 1010102020303[?12l[?25h[?25l . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollbind [?25l[?12l[?25htest37.in  [No Name] [+] [?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^start of window 2$/ [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04 . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollbind [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" -- start of tests -- [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST scrolling down [?25l[?12l[?25h [?25l. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08 . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07 . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08 . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09 . line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10[?12l[?25h[No Name] [+]  [No Name] [+] [?25l . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 [?12l[?25h[?25l0[?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25l . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 [?12l[?25h[?25l1[?12l[?25htest37.in [No Name] [+]   [?25l. line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13 . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[?12l[?25htest37.in  [No Name] [+] [?25l . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 [?12l[?25h[?25l2[?12l[?25h[No Name] [+] [No Name] [+]  [No Name] [+]  [No Name] [+] [?25l . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 [?12l[?25h[?25l3[?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST scrolling up [?25l[?12l[?25htest37.in [No Name] [+]  [?25l440505060607070808090900. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04 . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07 . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08[?12l[?25htest37.in  [No Name] [+] test37.in [No Name] [+]  test37.in  [No Name] [+] [?25l . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 [?12l[?25h[?25l4[?12l[?25h[No Name] [+] [No Name] [+]  [No Name] [+]  [No Name] [+] [?25l . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 [?12l[?25h[?25l5[?12l[?25h[No Name] [+] [No Name] [+]  [?25lstart of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 . line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 [?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [No Name] [+]  [No Name] [+] [?25l . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 [?12l[?25h[?25l6[?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25l . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 [?12l[?25h[?25l7[?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST horizontal scrolling [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollopt+=hor [?25l[?12l[?25h[?25l0 line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 10123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 2 line 1111 3ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 4 line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 5ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 622 70123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?12l[?25h[?25l. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 110ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 1 line 0505 20123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 3 line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 40123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 566 6ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 7 line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 [?12l[?25h[?25l [?12l[?25htest37.in [No Name] [+]  [?25l 156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0256789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0356789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0556789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 2UTSRQPONMLKJIHGREDCBA9876543210 01UTSRQPONMLKJIHGREDCBA9876543210 02UTSRQPONMLKJIHGREDCBA9876543210 03UTSRQPONMLKJIHGREDCBA9876543210 04UTSRQPONMLKJIHGREDCBA9876543210 05UTSRQPONMLKJIHGREDCBA9876543210 06UTSRQPONMLKJIHGREDCBA9876543210 07[?12l[?25htest37.in  [No Name] [+] [?25l56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?12l[?25h[?25l [?12l[?25h[No Name] [+] [No Name] [+]  [No Name] [+]  [No Name] [+] [?25lUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25h[No Name] [+] [No Name] [+]  [?25l56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09101112131415 UTSRQPONMLKJIHGREDCBA9876543210 0910111213141516[?12l[?25h[?25l. line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09 . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15 . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09 . line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10 . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13 . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[?12l[?25h[?25l[?12l[?25h[No Name] [+]  [No Name] [+] [?25l. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?12l[?25h[?25l [?12l[?25htest37.in [No Name] [+]   test37.in  [No Name] [+] [?25l. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset scrollopt-=hor [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TEST syncbind [?25l[?12l[?25htest37.in [No Name] [+]  [?25l:[?2004h[?12l[?25hset noscb [?25l[?12l[?25h[?25lTest for 'scrollbind'. Do not add a line below! STARTTEST:so small.vim:set noscrollbind:set scrollopt=ver,jump:set scrolloff=2:set nowrap[?12l[?25h test37.in  [No Name] [+] [?25l:[?2004h[?12l[?25hset noscb [?25l[?12l[?25h[?25lstart of window 201010202[?12l[?25h[?25l:[?2004h[?12l[?25hset scb [?25l[?12l[?25htest37.in [No Name] [+]  [?25l:[?2004h[?12l[?25hset scb [?25l[?12l[?25h[?25l. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 end of window 2end of test37.in (please don't delete this line) end of window 2 ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25lzt::set scrollbind:" -- start of tests --:" TEST scrolling downL5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3: :" TEST scrolling up ^WtH4k^WjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3k^WtH^WjHyy^Wbpr6^WtHyy^Wbpr7: test37.in  . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[No Name] [+] [?12l[?25h[?25l:[?2004h[?12l[?25hsyncbind [?25l[?12l[?25h[?25l/^start of window 2$/. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [No Name] [+]  [No Name] [+] [?25l . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 [?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [?25l :set scrollbind [?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25htest37.in [No Name] [+]  [?25l:[?2004h[?12l[?25hset noscb [?25l[?12l[?25h[?25lTest for 'scrollbind'. Do not add a line below! STARTTEST :so small.vimset noscrollbindset scrollopt=ver,jump :set scrolloff=2set nowrap[?12l[?25h test37.in  [No Name] [+] [?25l:[?2004h[?12l[?25hset noscb [?25l[?12l[?25h[?25lstart of window 2. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l:[?2004h[?12l[?25hset scb [?25l[?12l[?25htest37.in [No Name] [+]  [?25l:[?2004h[?12l[?25hset scb [?25l[?12l[?25h[?25l. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 end of window 2end of test37.in (please don't delete this line) end of window 2 ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25lzt::set scrollbind:" -- start of tests --:" TEST scrolling downL5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3: :" TEST scrolling up ^WtH4k^WjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3k^WtH^WjHyy^Wbpr6^WtHyy^Wbpr7: test37.in  . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[No Name] [+] [?12l[?25htest37.in [No Name] [+]  [?25l:[?2004h[?12l[?25hsyncbind [?25l[?12l[?25h[?25l/^start of window 2$/. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[?12l[?25htest37.in  [No Name] [+] test37.in [No Name] [+]  test37.in  [No Name] [+] [?25l :set scrollbind [?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [No Name] [+]  [No Name] [+] [?25l . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 [?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25htest37.in [No Name] [+]  [?25lzt: :set scrollbind ^Wj: :resize 7. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10 . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13[?12l[?25htest37.in  [No Name] [+] test37.in [No Name] [+]  test37.in  [No Name] [+] [?25l ^Wj: [?12l[?25htest37.in [No Name] [+]  test37.in  [No Name] [+] [No Name] [+]  [No Name] [+] [?25l . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 [?12l[?25h[?25l :[?2004h[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" ***** done with tests ***** [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! test.out " Write contents of this file [?25l"test.out" [New File] 33 lines, 1329 characters writtentest.out] [?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test37 = test61; then \ # if diff test.out test37.ok; \ # then echo flaky test ok first time; \ # else rm -rf test37.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test37.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test38.failed test.ok test.out X* viminfo cp test38.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test38.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test38.in" 35 lines, 455 charactersTest Virtual replace mode. STARTTEST :so small.vim :" make sure that backspace works, no matter what termcap is used :set t_kD=^Vx7f t_kb=^Vx08 ggdGa abcdefghi jk lmn opq rst ^Duvwxyz ^[gg:set ai :set bs=2 gR0^D 1 A BCDEFGHIJKL MNO PQR^[G:ka o0^D abcdefghi jk lmn opq rst ^Duvwxyz ^['ajgR0^D 1 A BCDEFGHIJ[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25l[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 29 lines, 407 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTESTKL MNO PQR^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^[:$ iab cdefghi jkl^[0gRAB......CDEFGHI.J^[o^[: iabcdefghijklmnopqrst^[0gRAB IJKLMNO QR^[:wq! test.out ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" make sure that backspace works, no matter what termcap is used [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset t_kD=^^? t_kb=^^H [?25lggdGa abcdefghi jk lmn opq rst ^Duvwxyz ^[gg:set ai :set bs=2 gR0^D 1 A BCDEFGHIJKL MNO PQR^[G:ka o0^D abcdefghi jk lmn opq rst ^Duvwxyz ^['ajgR0^D 1 A BCDEFGHIJKL MNO PQR^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^[:$ iab cdefghi jkl^[0gRAB......CDEFGHI.J^[o^[: iabcdefghijklmnopqrst^[0gRAB IJKLMNO QR^[:wq! test.out ENDTEST [?12l[?25h[?25lTest Virtual replace mode. STARTTEST :so small.vim :" make sure that backspace works, no matter what termcap is used :set t_kD=^Vx7f t_kb=^Vx08[?12l[?25h[?25l ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?12l[?25h[?2004l[?2004h[?25l abcdefghijk lmn opq rstuvwxyz[?12l[?25h[?25l:[?2004h[?12l[?25hset ai [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset bs=2 [?25l[?12l[?25h[?2004l[?2004h[?25l 1 A BCDEFGHIJ KL MNOPQR[?12l[?25h[?25l:[?2004h[?12l[?25hka [?25l[?12l[?25h[?2004l[?2004h[?25labcdefghijk lmn opq rstuvwxyz[?12l[?25h [?2004l[?2004h[?25l 1[?12l[?25h[?25l:[?2004h[?12l[?25h$ [?25l[?12l[?25h[?2004l[?2004h[?25lab cdefghi jkl[?12l[?25h [?2004l[?2004h[?25lAB......CDEFGHI.J[?12l[?25h[?2004l[?2004h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25h[?25l[?12l[?25h[?2004l[?2004h[?25labcdefghijklmnopqrst[?12l[?25h [?2004l[?2004h[?25lAB IJKLMNO QR[?12l[?25h[?25l:[?2004h[?12l[?25hwq! test.out [?25l[?2004l"test.out" [New File] 13 lines, 107 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test38 = test61; then \ # if diff test.out test38.ok; \ # then echo flaky test ok first time; \ # else rm -rf test38.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test38.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test39.failed test.ok test.out X* viminfo cp test39.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test39.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test39.in" 118 lines, 2435 charactersTest Visual block mode commands And test "U" in Visual mode, also on German sharp S. #define BO_ALL 0x0001 #define BO_BS0x0002 #define BO_CRSR 0x0004 STARTTEST :so small.vim :so mbyte.vim :" This only works when 'encoding' is "latin1", don't depend on the environment :set enc=latin1 /^abcde :" Test shift-right of a block jllll^Vjj>wll^Vjlll> :" Test shift-left of a block G$hhhh^Vkk< :" Test block-insert Gkl^VkkkIxyz^[ :" Test block-replace Gllll^Vkkklllrq :" Test block-change G$khhh^Vhhkkcmno^[ :$-4,$w! test.out :" Test block-insert using cursor keys for movement /^aaaa/ :exe ":norm! l\jjjlllI\\ \"[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25l[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 75 lines, 2061 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:" Test cursor position. When ve=block and Visual block mode and $gj :set ve=block :exe ":norm! 2k\$gj\" :let cpos=getpos("'>") :$put ='col:'.cpos[2].' off:'.cpos[3] :" :" block_insert when replacing spaces in front of the block with tabs :set ts=8 sts=4 sw=4 :4,7y Gp :exe ":norm! f0\2jI\\" :/^the/,$w >> test.out :qa! ENDTESTline1line2line3 aaaaaa bbbbbb cccccc dddddd xaaa bbbb cccc dddd[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hso mbyte.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" This only works when 'encoding' is "latin1", don't depend on the environment [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset enc=latin1 [?25l:" Test cursor position. When ve=block and Visual block mode and $gj :set ve=block :exe ":norm! 2k\$gj\" :let cpos=getpos("'>") :$put ='col:'.cpos[2].' off:'.cpos[3] :" :" block_insert when replacing spaces in front of the block with tabs :set ts=8 sts=4 sw=4 :4,7y Gp :exe ":norm! f0\2jI\\" :/^the/,$w >> test.out :qa! ENDTESTline1line2line3 aaaaaa bbbbbb cccccc dddddd xaaa bbbb cccc dddd[?12l[?25h[?25l/[?2004h[?12l[?25h^abcde [?25lyaaa ¿¿¿ bbb A23 4567 B23 4567 C23 4567 abcdefghijklm[?12l[?25h[?25l :[?2004h[?12l[?25h" Test shift-right of a block [?25l[?12l[?25h[?25l abcdefghijklm[?12l[?25habcd[?25l[?12l[?25h[?25l e abcdefghijklm abcd[?12l[?25h[?25l e abcdefghijklm abcd[?12l[?25h[?25l 3 lines >ed 1 time efghijklm abcd efghijklm abcd efghijklm[?12l[?25h ef[?25l[?12l[?25h[?25lg[?12l[?25h[?25lhg[?12l[?25h[?25lih[?12l[?25h[?25lji[?12l[?25h[?25l ghijklm ghijklm[?12l[?25h[?25l:[?2004h[?12l[?25h" Test shift-left of a block [?25l[?12l[?25h[?25l abcdefghijklm[?12l[?25h[?25l[?12l[?25h[?25li[?12l[?25h[?25l [?12l[?25h[?25l 3 lines jjjlllI\\ \" [?25l[?2004l[?2004h aaa bbb bbb ccc ccc ddd ddd[?12l[?25h[?25l:[?2004h[?12l[?25h/^aa/,/^$/w >> test.out [?25lsearch hit BOTTOM, continuing at TOP "test.out" 5 lines, 37 characters appended[?12l[?25h[?25l/[?2004h[?12l[?25hxaaa$/ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexe ":norm! \jjjI<>\p\" [?25l[?2004l[?2004h

xaaa

bbbb

cccc

dddd[?12l[?25h[?25l:[?2004h[?12l[?25h/xaaa$/,/^$/w >> test.out [?25lsearch hit BOTTOM, continuing at TOP "test.out" 5 lines, 33 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for Visual block was created with the last $ [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^A23$/ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexe ":norm! l\j$Aab\" [?25l[?2004l[?2004hab 4567ab[?12l[?25h[?25l:[?2004h[?12l[?25h.,/^$/w >> test.out [?25l"test.out" 3 lines, 14 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for Visual block was created with the middle $ (1) [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^B23$/ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexe ":norm! l\j$hAab\" [?25l[?2004l[?2004hab 4567ab[?12l[?25h[?25l:[?2004h[?12l[?25h.,/^$/w >> test.out [?25l"test.out" 3 lines, 15 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for Visual block was created with the middle $ (2) [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^C23$/ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexe ":norm! l\j$hhAab\" [?25l[?2004l[?2004hab 456ab7[?12l[?25h[?25l:[?2004h[?12l[?25h.,/^$/w >> test.out [?25l"test.out" 3 lines, 14 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for Visual block insert when virtualedit=all and utf-8 encoding [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ve=all enc=utf-8 [?25laaa aaa bbb bbb ccc ccc ddd ddd

xaaa

bbbb

cccc

dddd yaaa  bbb A23ab 4567ab B23 ab 4567ab C23ab 456ab7 axyzbcdefghijklm axyzqqqq mnoghijklm axyzqqqqef mnoghijklm axyzqqqqefgmnoklm abcdqqqqijklm[?12l[?25h[?25l:[?2004h[?12l[?25h/\t\tline [?25lsearch hit BOTTOM, continuing at TOPline1line2line3search hit BOTTOM, continuing at TOP[?12l[?25h[?25l:[?2004h[?12l[?25hexe ":norm! 07l\jjIx\" [?25l[?2004l[?2004hxxx[?12l[?25h[?25l:[?2004h[?12l[?25h.,/^$/w >> test.out [?25l"test.out" 4 lines, 49 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for Visual block append when virtualedit=all [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexe ":norm! 012l\jjAx\" [?25l[?2004l[?2004hx line1x line2x line3[?12l[?25h[?25l:[?2004h[?12l[?25hset ve= enc=latin1 [?25lx x line1x x line2x x line3 aaa aaa bbb bbb ccc ccc ddd ddd

xaaa

bbbb

cccc

dddd yaaa ¿¿¿ bbb A23ab 4567ab B23 ab 4567ab C23ab 456ab7 axyzbcdefghijklm[?12l[?25h[?25l:[?2004h[?12l[?25h.,/^$/w >> test.out [?25l"test.out" 4 lines, 70 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h" gUe must uppercase a whole word, also when ß changes to SS [?25l[?12l[?25h[?25laxyzqqqq mnoghijklm axyzqqqqef mnoghijklm axyzqqqqefgmnoklm abcdqqqqijklm[?12l[?25h[?2004l[?2004h[?25l the youtußeuu end[?12l[?25h[?25l the youtußeuu end [?12l[?25hthe [?25lYOUTUSSEUU end the [?12l[?25h the [?25l :[?2004h[?12l[?25h" gUfx must uppercase until x, inclusive. [?25l[?12l[?25h[?2004l[?2004h[?25l - youßtußexu -[?12l[?25h - y[?25lOUSSTUSSEXu - - y[?12l[?25h[?25l the youtußeuu end[?12l[?25h[?25l :[?2004h[?12l[?25h" VU must uppercase a whole line [?25l[?12l[?25h[?25l the youtußeuu end[?12l[?25h[?25lthe youtußeuu end [?12l[?25h[?25lTHE YOUTUSSEUU END [?12l[?25h [?25l :[?2004h[?12l[?25h" same, when it's the last line in the buffer [?25l[?12l[?25h[?25l[?12l[?25h[?25l the youtußeuu end[?12l[?25h[?2004l[?2004h[?25l111the youtußeuu end 11[?12l[?25h[?25l 111the youtußeuu end 11[?12l[?25h[?25l 111THE YOUTUSSEUU END [?12l[?25h[?25l~ [?12l[?25h[?25l111THE YOUTUSSEUU END the youtußeuu end[?12l[?25h [?25l :[?2004h[?12l[?25h" Uppercase two lines [?25l[?12l[?25h[?2004l[?2004h[?25l blah didoh dut[?12l[?25h[?25l doh dut [?12l[?25h[?25lblah di t[?12l[?25h[?25l BLAH DIDOH DUT[?12l[?25h[?25l the youtußeuu end[?12l[?25h[?25l :[?2004h[?12l[?25h" Uppercase part of two lines [?25l[?12l[?25h[?25l ~ [?12l[?25h[?25l the youtußeuu end[?12l[?25h[?25l the youtußeuu end[?12l[?25h[?2004l[?2004h[?25l333the youtußeuu end 33[?12l[?25h [?2004l[?2004h[?25l222the youtußeuu end 22[?12l[?25h2the yo[?25l[?12l[?25h[?25lutußeuu end 333the yo[?12l[?25h[?25lut[?12l[?25h[?25lUTUSSEUU END 333THE YOUTU[?12l[?25h[?25l :[?2004h[?12l[?25h" visual replace using Enter or NL [?25l[?12l[?25h [?2004l[?2004h[?25l123456789 123456789 123456789[?12l[?25h 12345[?25l[?12l[?25h[?25l66[?12l[?25h[?25l789[?12l[?25h[?25l789 12345 789 [?12l[?25h[?2004l[?2004h[?25l98765 98765 98765[?12l[?25h 98[?25l[?12l[?25h[?25l7 987 98[?12l[?25h[?25l^M65 98^M65 98^M65[?12l[?25h 98 [?2004l[?2004h[?25l123456789 123456789 123456789[?12l[?25h 12345[?25l[?12l[?25h[?25l66[?12l[?25h[?25l789[?12l[?25h[?25l789 12345 789 [?12l[?25h[?2004l[?2004h[?25l98765 98765 98765[?12l[?25h 98[?25l[?12l[?25h[?25l7 987 98[?12l[?25h[?25l^@65 98^@65 98^@65[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test cursor position. When ve=block and Visual block mode and $gj [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ve=block [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexe ":norm! 2k\$gj\" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet cpos=getpos("'>") [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put ='col:'.cpos[2].' off:'.cpos[3] [?25l col:4 off:0[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" block_insert when replacing spaces in front of the block with tabs [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ts=8 sts=4 sw=4 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h4,7y [?25l4 lines yanked[?12l[?25h[?25l 4 more lines 4 more lines[?12l[?25h[?25l #define BO_ALL 0x0001[?12l[?25h[?25l :[?2004h[?12l[?25hexe ":norm! f0\2jI\\" [?25l[?2004l[?2004h 0x0001 #define BO_BS0x0002 #define BO_CRSR0x0004[?12l[?25h[?25l :[?2004h[?12l[?25h/^the/,$w >> test.out [?25lsearch hit BOTTOM, continuing at TOP "test.out" 31 lines, 322 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test39 = test61; then \ # if diff test.out test39.ok; \ # then echo flaky test ok first time; \ # else rm -rf test39.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test39.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test40.failed test.ok test.out X* viminfo cp test40.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test40.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test40.in" 63 lines, 1536 charactersTest for "*Cmd" autocommands STARTTEST :so small.vim :/^start/,$w! Xxx" write lines below to Xxx :au BufReadCmd XtestA 0r Xxx|$del :e XtestA" will read text of Xxd instead :au BufWriteCmd XtestA call append(line("$"), "write") :w" will append a line to the file :r XtestA" should not read anything :" now we have: :" 1 start of Xxx :" 2test40 :" 3 end of Xxx :" 4 write :au FileReadCmd XtestB '[r Xxx :2r XtestB" will read Xxx below line 2 instead :" 1 start of Xxx :" 2test40 :" 3 start of Xxx :" 4test40 :" 5 end of Xxx :" 6 end of Xxx :" 7 write :au FileWriteCmd XtestC '[,']copy $ 4GA1^[ :4,5w XtestC" will copy lines 4 and 5 to the end :r XtestC" should not read anything[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for "*Cmd" autocommands[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1455 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:" 8test401 :" 9 end of Xxx :au FILEAppendCmd XtestD '[,']w! test.out :w >>XtestD" will write all lines to test.out :$r XtestD" should not read anything :$w >>test.out" append "end of Xxx" to test.out :au BufReadCmd XtestE 0r test.out|$del :sp XtestE" split window with test.out 5Goasdf^[^W^W:" :au BufWriteCmd XtestE w! test.out :wall" will write other window to test.out :" 1 start of Xxx :" 2test40 :" 3 start of Xxx :" 4test401 :" 5 end of Xxx :" 6 asdf :" 7 end of Xxx :" 8 write :" 9test401 :" 10 end of Xxx :" 11 end of Xxx :qa! ENDTEST start of Xxxtest40 end of Xxx[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^start/,$w! Xxx^I^I" write lines below to Xxx [?25l"Xxx" [New File] 3 lines, 32 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hau BufReadCmd XtestA 0r Xxx|$del [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he XtestA^I^I^I" will read text of Xxd instead [?25l"Xxx" 3 lines, 32 charactersstart of Xxx test40end of Xxx~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hau BufWriteCmd XtestA call append(line("$"), "write") [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw^I^I^I^I" will append a line to the file [?25lwrite[?12l[?25h[?25l:[?2004h[?12l[?25hr XtestA^I^I^I" should not read anything [?25lE484: Can't open file XtestA[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" now we have: [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 1^Istart of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 2^I^Itest40 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 3^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 4^Iwrite [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau FileReadCmd XtestB '[r Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h2r XtestB^I^I^I" will read Xxx below line 2 instead [?25l"Xxx" 3 lines, 32 charactersstart of Xxxtest40 end of Xxx[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 1^Istart of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 2^I^Itest40 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 3^Istart of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 4^I^Itest40 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 5^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 6^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 7^Iwrite [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau FileWriteCmd XtestC '[,']copy $ [?25l[?12l[?25h[?2004l[?2004h[?25ltest401[?12l[?25h[?25l:[?2004h[?12l[?25h4,5w XtestC^I^I^I" will copy lines 4 and 5 to the end [?25l test401end of Xxx[?12l[?25h[?25l:[?2004h[?12l[?25hr XtestC^I^I^I" should not read anything [?25lE484: Can't open file XtestC[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 1^Istart of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 2^I^Itest40 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 3^Istart of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 4^I^Itest401 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 5^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 6^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 7^Iwrite [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 8^I^Itest401 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 9^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau FILEAppendCmd XtestD '[,']w! test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>XtestD^I^I^I" will write all lines to test.out [?25l"test.out" [New File] 9 lines, 91 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h$r XtestD^I^I^I" should not read anything [?25lE484: Can't open file XtestD[?12l[?25h[?25l:[?2004h[?12l[?25h$w >>test.out^I^I^I" append "end of Xxx" to test.out [?25l"test.out" 1 line, 11 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hau BufReadCmd XtestE 0r test.out|$del [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hsp XtestE^I^I^I" split window with test.out [?25l"test.out" 10 lines, 102 charactersend of XxxXtestE end of Xxxend of Xxxwrite test401end of XxxXtestA [?12l[?25h[?2004l[?2004h[?25lasdf[+][?12l[?25hXtestE [+]  XtestA [?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufWriteCmd XtestE w! test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hwall^I^I^I^I" will write other window to test.out [?25l"test.out" 11 lines, 107 characters written [?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 1^Istart of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 2^I^Itest40 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 3^Istart of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 4^I^Itest401 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 5^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 6^Iasdf [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 7^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 8^Iwrite [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 9^I^Itest401 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 10^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h^I^I^I^I" 11^Iend of Xxx [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test40 = test61; then \ # if diff test.out test40.ok; \ # then echo flaky test ok first time; \ # else rm -rf test40.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test40.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test41.failed test.ok test.out X* viminfo cp test41.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test41.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test41.in" 24 lines, 421 charactersTest for writing and reading a file of over 100 Kbyte 1 line: "This is the start" 3001 lines: "This is the leader" 1 line: "This is the middle" 3001 lines: "This is the trailer" 1 line: "This is the end" STARTTEST :%d aThis is the start This is the leader This is the middle This is the trailer This is the end^[kY3000p2GY3000p :w! Xtest :%d :e! Xtest :.w! test.out 3003G:.w >>test.out 6005G:.w >>test.out :qa! ENDTEST ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for writing and reading a file of over 100 Kbyte[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 13 lines, 196 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25h%d [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?12l[?25h[?2004l[?2004h[?25lThis is the start This is the leaderThis is the middleThis is the trailerThis is the end[?12l[?25h[?25l3000 more linestrailer This is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailerThis is the trailer[?12l[?25h[?25lleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleader[?12l[?25h [?25l:[?2004h[?12l[?25hw! Xtest [?25l"Xtest" [New File] 6005 lines, 117092 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h%d [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest [?25l"Xtest" 6005 lines, 117092 charactersThis is the start This is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leaderThis is the leader[?12l[?25h[?25l:[?2004h[?12l[?25h.w! test.out [?25l"test.out" [New File] 1 line, 18 characters written[?12l[?25h[?25lThis is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the leader This is the middle This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer[?12l[?25h[?25l:[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 19 characters appended[?12l[?25h[?25lThis is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the end [?12l[?25h[?25l :[?2004h[?12l[?25h.w >>test.out [?25l"test.out" 1 line, 16 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test41 = test61; then \ # if diff test.out test41.ok; \ # then echo flaky test ok first time; \ # else rm -rf test41.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test41.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test42.failed test.ok test.out X* viminfo cp test42.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test42.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test42.in" 130 lines, 2368 charactersTest for writing and reading a file starting with a BOM STARTTEST :so mbyte.vim :set encoding=utf-8 :set fileencodings=ucs-bom,latin-1 :set ff=unix ffs=unix" This changes the file for DOS and MAC :" --- Write the test files :/^latin-1$/+1w! Xtest0 :/^utf-8$/+1w! Xtest1 :/^utf-8-err$/+1w! Xtest2 :/^ucs-2$/+1w! Xtest3 :/^ucs-2le$/+1w! Xtest4 :" Need to add a NUL byte after the NL byte :set bin :e! Xtest4" Ignore change from setting 'ff' o^V^@^[:set noeol :w :set ffs& nobinary" Allow default test42.in format :e # :set ff=unix" Format for files to write :/^ucs-4$/+1w! Xtest5 :/^ucs-4le$/+1w! Xtest6 :" Need to add three NUL bytes after the NL byte :set bin :e! Xtest6" ! for when setting 'ff' is a change o^V^@^V^@^V^@^[:set noeol :w[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for writing and reading a file starting with a BOM[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 111 lines, 2116 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:" --- Check the files written with BOM :set bin :e! test.out :$r Xtest0x :$r Xtest1x :$r Xtest2x :$r Xtest3x :$r Xtest4x :$r Xtest5x :$r Xtest6x :set nobin ff&" Write the file in default format :w! test.out :qa! ENDTEST latin-1 þþlatin-1 utf-8 utf-8 utf-8-err utf-8~@err ucs-2 þÿ^@u^@c^@s^@-^@2^@ ucs-2le ÿþu^@c^@s^@-^@2^@l^@e^@ ucs-4 ^@^@þÿ^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ ucs-4le[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso mbyte.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset encoding=utf-8 [?25l:" --- Check the files written with BOM :set bin :e! test.out :$r Xtest0x :$r Xtest1x :$r Xtest2x :$r Xtest3x :$r Xtest4x :$r Xtest5x :$r Xtest6x :set nobin ff&" Write the file in default format :w! test.out :qa! ENDTEST latin-1 latin-1 utf-8 utf-8 utf-8-err utf-8<80>err ucs-2 ^@u^@c^@s^@-^@2^@ ucs-2le u^@c^@s^@-^@2^@l^@e^@ ucs-4 ^@^@^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ ucs-4le[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencodings=ucs-bom,latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ff=unix ffs=unix " This changes the file for DOS and MAC [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Write the test files [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^latin-1$/+1w! Xtest0 [?25l"Xtest0" [New File] 1 line, 10 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h/^utf-8$/+1w! Xtest1 [?25l"Xtest1" [New File] 1 line, 9 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h/^utf-8-err$/+1w! Xtest2 [?25l"Xtest2" [New File] 1 line, 13 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h/^ucs-2$/+1w! Xtest3 [?25l"Xtest3" [New File] 1 line, 14 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h/^ucs-2le$/+1w! Xtest4 [?25l"Xtest4" [New File] 1 line, 17 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" Need to add a NUL byte after the NL byte [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset bin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest4 " Ignore change from setting 'ff' [?25l"Xtest4" 1 line, 17 charactersu^@c^@s^@-^@2^@l^@e^@~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?2004l [?2004h[?25l^@[?12l[?25h[?25l:[?2004h[?12l[?25hset noeol [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"Xtest4" [Incomplete last line] 2 lines, 18 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hset ffs& nobinary " Allow default test42.in format [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he # [?25l"test42.in" [converted] 130 lines, 2385 characters:set bin:e! test.out :$r Xtest0x:$r Xtest1x:$r Xtest2x:$r Xtest3x:$r Xtest4x:$r Xtest5x:$r Xtest6x:set nobin ff& " Write the file in default format:w! test.out:qa!ENDTESTlatin-1þþlatin-1utf-8utf-8utf-8-errutf-8<80>errucs-2þÿ^@u^@c^@s^@-^@2^@ucs-2leÿþu^@c^@s^@-^@2^@l^@e^@ucs-4^@^@þÿ^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ucs-4leÿþ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@[?12l[?25h[?25l:[?2004h[?12l[?25hset ff=unix " Format for files to write [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^ucs-4$/+1w! Xtest5 [?25l"Xtest5" [converted][New File] 1 line, 30 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h/^ucs-4le$/+1w! Xtest6 [?25l"Xtest6" [converted][New File] 1 line, 35 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" Need to add three NUL bytes after the NL byte [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset bin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest6 " ! for when setting 'ff' is a change [?25l"Xtest6" 1 line, 33 characters^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?2004l ~ [?2004h[?25l ^@^@^@[?12l[?25h[?25l:[?2004h[?12l[?25hset noeol [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"Xtest6" [Incomplete last line] 2 lines, 36 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hset nobin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he # [?25l"test42.in" [converted] 130 lines, 2385 characters:set bin:e! test.out :$r Xtest0x:$r Xtest1x:$r Xtest2x:$r Xtest3x:$r Xtest4x:$r Xtest5x:$r Xtest6x:set nobin ff& " Write the file in default format:w! test.out:qa!ENDTESTlatin-1þþlatin-1utf-8utf-8utf-8-errutf-8<80>errucs-2þÿ^@u^@c^@s^@-^@2^@ucs-2leÿþu^@c^@s^@-^@2^@l^@e^@ucs-4^@^@þÿ^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ucs-4leÿþ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check that editing a latin-1 file doesn't see a BOM [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest0 [?25l"Xtest0" [converted] 1 line, 12 charactersþþlatin-1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hredir! >test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencoding bomb? [?25l fileencoding=latin1 nobomb Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25lþþlatin-1 ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" [converted] 1 line, 12 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset bomb fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! Xtest0x [?25l"Xtest0x" [converted][New File] 1 line, 12 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check utf-8 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest1 [?25l"Xtest1" 1 line, 9 charactersutf-8[?12l[?25h[?25l:[?2004h[?12l[?25hredir >>test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencoding bomb? [?25l fileencoding=utf-8 bomb Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25lutf-8 ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" [converted] 1 line, 6 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=utf-8 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! Xtest1x [?25l"Xtest1x" [New File] 1 line, 9 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check utf-8 with an error (will fall back to latin-1) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest2 [?25l"Xtest2" [converted] 1 line, 17 charactersutf-8<80>err [?12l[?25h[?25l:[?2004h[?12l[?25hredir >>test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencoding bomb? [?25l fileencoding=latin1 nobomb Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25lutf-8<80>err ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" [converted] 1 line, 17 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=utf-8 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! Xtest2x [?25l"Xtest2x" [New File] 1 line, 17 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check ucs-2 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest3 [?25l"Xtest3" [converted] 1 line, 8 charactersucs-2[?12l[?25h[?25l:[?2004h[?12l[?25hredir >>test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencoding bomb? [?25l fileencoding=utf-16 bomb Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25lucs-2 ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" [converted] 1 line, 6 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=ucs-2 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! Xtest3x [?25l"Xtest3x" [converted][New File] 1 line, 8 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check ucs-2le [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest4 [?25l"Xtest4" [converted] 1 line, 10 charactersle [?12l[?25h[?25l:[?2004h[?12l[?25hredir >>test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencoding bomb? [?25l fileencoding=utf-16le bomb Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25lucs-2le ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" [converted] 1 line, 8 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=ucs-2le [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! Xtest4x [?25l"Xtest4x" [converted][New File] 1 line, 10 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check ucs-4 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest5 [?25l"Xtest5" [converted] 1 line, 10 characters4[?12l[?25h[?25l:[?2004h[?12l[?25hredir >>test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencoding bomb? [?25l fileencoding=ucs-4 bomb Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25lucs-4 ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" [converted] 1 line, 6 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=ucs-4 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! Xtest5x [?25l"Xtest5x" [converted][New File] 1 line, 10 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check ucs-4le [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! Xtest6 [?25l"Xtest6" [converted] 1 line, 12 charactersle [?12l[?25h[?25l:[?2004h[?12l[?25hredir >>test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fileencoding bomb? [?25l fileencoding=ucs-4le bomb Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25lucs-4le ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=latin-1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw >>test.out [?25l"test.out" [converted] 1 line, 8 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hset fenc=ucs-4le [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! Xtest6x [?25l"Xtest6x" [converted][New File] 1 line, 12 characters written[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" --- Check the files written with BOM [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset bin [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! test.out [?25l"test.out" 35 lines, 275 characters fileencoding=latin1nobomblatin-1 fileencoding=utf-8 bombutf-8 fileencoding=latin1nobombutf-8<80>err fileencoding=utf-16 bombucs-2 fileencoding=utf-16le bombucs-2le fileencoding=ucs-4[?12l[?25h[?25l:[?2004h[?12l[?25h$r Xtest0x [?25l"Xtest0x" 1 line, 10 charactersbomb ucs-4fileencoding=ucs-4le bomb ucs-4le latin-1[?12l[?25h[?25l :[?2004h[?12l[?25h$r Xtest1x [?25l"Xtest1x" 1 line, 9 characters utf-8[?12l[?25h[?25l :[?2004h[?12l[?25h$r Xtest2x [?25l"Xtest2x" 1 line, 17 characters utf-8<80>err[?12l[?25h[?25l :[?2004h[?12l[?25h$r Xtest3x [?25l"Xtest3x" 1 line, 14 characters ^@u^@c^@s^@-^@2^@[?12l[?25h[?25l :[?2004h[?12l[?25h$r Xtest4x [?25l"Xtest4x" [Incomplete last line] 2 lines, 18 characters u^@c^@s^@-^@2^@l^@e^@[?12l[?25h[?25l :[?2004h[?12l[?25h$r Xtest5x [?25l"Xtest5x" 1 line, 28 characters^@ ^@^@^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@[?12l[?25h[?25l :[?2004h[?12l[?25h$r Xtest6x [?25l"Xtest6x" [Incomplete last line] 2 lines, 36 characters ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@[?12l[?25h[?25l :[?2004h[?12l[?25hset nobin ff& " Write the file in default format [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw! test.out [?25l"test.out" 44 lines, 409 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test42 = test61; then \ # if diff test.out test42.ok; \ # then echo flaky test ok first time; \ # else rm -rf test42.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test42.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test43.failed test.ok test.out X* viminfo cp test43.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test43.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test43.in" 34 lines, 473 charactersTests for regexp with various magic settings. STARTTEST :so small.vim :set nocompatible viminfo+=nviminfo /^1 /a*b\{2}c\+/e x/\Md\*e\{2}f\+/e x:set nomagic /g\*h\{2}i\+/e x/\mj*k\{2}l\+/e x/\vm*n{2}o+/e x/\V^aa$ x:set magic /\v(a)(b)\2\1\1/e x/\V[ab]\(\[xy]\)\1 x:$ :set undolevels=100 dv?bar? Yup:" :?^1?,$w! test.out :qa! ENDTEST 1 a aa abb abbccc 2 d dd dee deefff 3 g gg ghh ghhiii 4 j jj jkk jkklll[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for regexp with various magic settings.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 19 lines, 268 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nocompatible viminfo+=nviminfo [?25l[?12l[?25h[?25l/[?2004h[>c^[?12l[?25h1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25ha*b\{2}c\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\Md\*e\{2}f\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nomagic [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hg\*h\{2}i\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\mj*k\{2}l\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\vm*n{2}o+/e [?25l 5 m mm mnn mnnooo[?12l[?25h[?25l[?12l[?25h[?25l /[?2004h[?12l[?25h\V^aa$ [?25l 6 x ^aa$ x[?12l[?25h[?25laa$ x[?12l[?25h[?25l :[?2004h[?12l[?25hset magic [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\v(a)(b)\2\1\1/e [?25l 7 (a)(b) abbaa[?12l[?25h[?25l[?12l[?25h[?25l /[?2004h[?12l[?25h\V[ab]\(\[xy]\)\1 [?25l 8 axx [ab]xx[?12l[?25h[?25lab]x[?12l[?25h[?25l :[?2004h[?12l[?25h$ [?25l9 foobar[?12l[?25h[?25l :[?2004h[?12l[?25hset undolevels=100 [?25l[?12l[?25h[?25l?[?2004h[?12l[?25hbar? [?25l~ [?12l[?25h[?25l 1 more line; before #2 0 seconds agobar[?12l[?25h[?25l 9 foo [?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h?^1?,$w! test.out [?25l"test.out" [New] 11L, 137C written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test43 = test61; then \ # if diff test.out test43.ok; \ # then echo flaky test ok first time; \ # else rm -rf test43.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test43.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test44.failed test.ok test.out X* viminfo cp test44.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test44.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test44.in" 81 lines, 1492 charactersTests for regexp with multi-byte encoding and various magic settings. Test matchstr() with a count and multi-byte chars. See test99 for exactly the same test with re=2. STARTTEST :so mbyte.vim :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo :set re=1 /^1 /a*b\{2}c\+/e x/\Md\*e\{2}f\+/e x:set nomagic /g\*h\{2}i\+/e x/\mj*k\{2}l\+/e x/\vm*n{2}o+/e x/\V^aa$ x:set magic /\v(a)(b)\2\1\1/e x/\V[ab]\(\[xy]\)\1 x:" Now search for multi-byte without composing char /ม x:" Now search for multi-byte with composing char /มà¹~H x:" find word by change of word class /ã~A¡\<ã~B«ã~C¨\>ã~A¯ x:" Test \%u, [\u] and friends :" c /\%u20ac[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for regexp with multi-byte encoding and various magic settings.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1023 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:e! test.out G:put =matchstr(\"×~P×~Q×~R×~S\", \".\", 0, 2) " ×~Q :put =matchstr(\"×~P×~Q×~R×~S\", \"..\", 0, 2) " ×~Q×~R :put =matchstr(\"×~P×~Q×~R×~S\", \".\", 0, 0) " ×~P :put =matchstr(\"×~P×~Q×~R×~S\", \".\", 4, -1) " ×~R :new :$put =['dog(a', 'cat('] /(/e+ "ayn:bd! :$put ='' G"ap :w! :qa! ENDTEST 1 a aa abb abbccc 2 d dd dee deefff 3 g gg ghh ghhiii 4 j jj jkk jkklll 5 m mm mnn mnnooo 6 x ^aa$ x 7 (a)(b) abbaa 8 axx [ab]xx 9 หมà¹~Hx อมx a อมx หมà¹~Hx b ã~A¡ã~B«ã~C¨ã~A¯ c x ¬â~B¬x d 天使x[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso mbyte.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo [?25l:e! test.out G:put =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿ :put =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿ :put =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿ :put =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿ :new :$put =['dog(a', 'cat('] /(/e+ "ayn:bd! :$put ='' G"ap :w! :qa! ENDTEST 1 a aa abb abbccc 2 d dd dee deefff 3 g gg ghh ghhiii 4 j jj jkk jkklll 5 m mm mnn mnnooo 6 x ^aa$ x 7 (a)(b) abbaa 8 axx [ab]xx 9 ¿¿x ¿¿x a ¿¿x ¿¿x b ¿?¿?¿?¿? c x ¬¿x d ¿?¿?x[?12l[?25h[?25l:[?2004h[>cset re=1 [?12l[?25h[?25l/[?2004h[?12l[?25h^1 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25ha*b\{2}c\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\Md\*e\{2}f\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nomagic [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hg\*h\{2}i\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\mj*k\{2}l\+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\vm*n{2}o+/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\V^aa$ [?25l[?12l[?25h[?25laa$ x[?12l[?25h[?25l:[?2004h[?12l[?25hset magic [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\v(a)(b)\2\1\1/e [?25l[?12l[?25h[?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\V[ab]\(\[xy]\)\1 [?25l[?12l[?25h[?25lab]x[?12l[?25h[?25l:[?2004h[?12l[?25h" Now search for multi-byte without composing char [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h¿ [?25l[?12l[?25h[?25lx[?12l[?25h[?25l:[?2004h[?12l[?25h" Now search for multi-byte with composing char [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h¿¿ [?25l[?12l[?25h[?25lx[?12l[?25h[?25l:[?2004h[?12l[?25h" find word by change of word class [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h¿?\<¿?¿?\>¿? [?25l[?12l[?25h[?25l¿?¿?¿?[?12l[?25h[?25l:[?2004h[?12l[?25h" Test \%u, [\u] and friends [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" c [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\%u20ac [?25l[?12l[?25h[?25lx[?12l[?25h[?25l:[?2004h[?12l[?25h" d [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h[\u4f7f\u5929]\+ [?25l[?12l[?25h[?25l¿?x [?12l[?25h[?25l:[?2004h[?12l[?25h" e [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\%U12345678 [?25l e ¿y[?12l[?25h[?25ly[?12l[?25h[?25l :[?2004h[?12l[?25h" f [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h[\U1234abcd\u1234\uabcd] [?25l f ¿z[?12l[?25h[?25lz[?12l[?25h[?25l :[?2004h[?12l[?25h" g [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\%d21879b [?25l g a¿?bb[?12l[?25h[?25lbb[?12l[?25h[?25l :[?2004h[?12l[?25h" j Test backwards search from a multi-byte char [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hx [?25l j 0123¿x[?12l[?25h[?25l[?12l[?25h[?25l ?[?2004h[?12l[?25h. [?25l[?12l[?25h[?25l¿[?12l[?25h[?25l:[?2004h[?12l[?25h" k [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet @w=':%s#comb[i]nations#¿¿¿¿mmm¿¿¿#g' [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h@w [?25l[?2004h k ¿¿m¿[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" l Test what 7.3.192 fixed [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^l [?25l l äö ü¿[?12l[?25h[?25l :[?2004h[?12l[?25hs/ \?/ /g [?25l5 substitutions on 1 line l ä ö ü¿[?12l[?25h[?25l:[?2004h[?12l[?25h?^1?,$w! test.out [?25l"test.out" [New] 19L, 250C written[?12l[?25h[?25l:[?2004h[?12l[?25he! test.out [?25l"test.out" 19L, 250C1 a aa abb abbcc2 d dd dee deeff 3 g gg ghh ghhii 4 j jj jkk jkkll 5 m mm mnn mnnoo 6 x aa$ x 7 (a)(b) abba 8 axx ab]xx 9 ¿¿x ¿x a ¿¿x ¿xb ¿?¿?¿?c x ¬xd ¿?xe yf zg abbj 012¿k ¿¿m¿ l ä ö ü¿~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿ [?25l¿[?12l[?25h[?25l:[?2004h[?12l[?25hput =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿ [?25l¿¿[?12l[?25h[?25l:[?2004h[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿ [?25l¿[?12l[?25h[?25l:[?2004h[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿ [?25l¿[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] d ¿?x e yf zg abbj 012¿k ¿¿m¿ l ä ö ü¿¿ ¿¿ ¿¿test.out [+] [?12l[?25h[?25l:[?2004h[?12l[?25h$put =['dog(a', 'cat('] [?25ldog(acat([+][?12l[?25h[?25l/[?2004h[?12l[?25h(/e+ [?25l/(/e+1 [?12l[?25h[?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l:[?2004h[?12l[?25hbd! [?25l1 a aa abb abbcc 2 d dd dee deeff 3 g gg ghh ghhii 4 j jj jkk jkkll5 m mm mnn mnnoo6 x aa$ x7 (a)(b) abba8 axx ab]xx9 ¿¿x ¿xa ¿¿x ¿xb ¿?¿?¿?c x ¬xd ¿?xe yf z g abb j 012¿k ¿¿m¿ l ä ö ü¿¿¿¿¿ ¿~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25h$put ='' [?25l[?12l[?25h[?25la cat([?12l[?25h [?25l:[?2004h[?12l[?25hw! [?25l"test.out" 25L, 271C written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test44 = test61; then \ # if diff test.out test44.ok; \ # then echo flaky test ok first time; \ # else rm -rf test44.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test44.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test45.failed test.ok test.out X* viminfo cp test45.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test45.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test45.in" 92 lines, 1979 charactersTests for folding. vim: set ft=vim : STARTTEST :so small.vim :set belloff=all :" We also need the +syntax feature here. :if !has("syntax") e! test.ok w! test.out qa! :endif :" basic test if a fold can be created, opened, moving to the end and closed /^1 zf2j:call append("$", "manual " . getline(foldclosed("."))) zo:call append("$", foldclosed(".")) ]z:call append("$", getline(".")) zc:call append("$", getline(foldclosed("."))) :" test folding with markers. :set fdm=marker fdl=1 fdc=3 /^5 :call append("$", "marker " . foldlevel(".")) [z:call append("$", foldlevel(".")) jo{{ ^[r{jj:call append("$", foldlevel(".")) kYpj:call append("$", foldlevel(".")) :" test folding with indent :set fdm=indent sw=2 /^2 b i ^[jI ^[:call append("$", "indent " . foldlevel("."))[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for folding. vim: set ft=vim :[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 75 lines, 1846 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:call append("$", foldlevel(".")) :/^last/+1,$w! test.out :delfun Flvl :new iTest fdm=indent and :move bug END line2Test fdm=indent STARTline3line4^[ :set fdm=indent :1m1 2jzc:m0 :%w >> test.out :qa! ENDTEST 1 aa 2 bb 3 cc 4 dd {{{ 5 ee {{{ }}} 6 ff }}} 7 gg 8 hh 9 ii a jj b kk last[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset belloff=all [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" We also need the +syntax feature here. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hif !has("syntax") [?25l :[?2004h [?12l[?25h e! test.ok [?25l:[?2004h [?12l[?25h w! test.out [?25l:[?2004h [?12l[?25h qa! [?25l:[?2004h [?12l[?25h:endif [?25l:call append("$", foldlevel(".")) :/^last/+1,$w! test.out :delfun Flvl :new[?12l[?25h[?25l:[?2004h[?12l[?25h" basic test if a fold can be created, opened, moving to the end and closed [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^1 [?25l[?12l[?25h[?25l+-- 3 lines: 1 aa------------------------------------------------------------------------4 dd {{{ 5 ee {{{ }}} 6 ff }}} 7 gg8 hh9 ii a jj b kk last ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", "manual " . getline(foldclosed("."))) [?25lmanual 1 aa[?12l[?25h[?25l1 aa2 bb3 cc4 dd {{{ 5 ee {{{ }}} 6 ff }}} 7 gg 8 hh 9 ii a jj b kklast[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldclosed(".")) [?25l[?12l[?25h [?25l:[?2004h[?12l[?25hcall append("$", getline(".")) [?25l[?12l[?25h[?25l+-- 3 lines: 1 aa------------------------------------------------------------------------4 dd {{{ 5 ee {{{ }}} 6 ff }}} 7 gg8 hh9 ii a jj b kk last manual 1 aa -1[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", getline(foldclosed("."))) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" test folding with markers. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fdm=marker fdl=1 fdc=3 [?25l :call append("$", foldlevel("."))  :/^last/+1,$w! test.out  :delfun Flvl  :new  iTest fdm=indent and :move bug END  line2   Test fdm=indent START   line3   line4^[  :set fdm=indent  :1m1  2jzc:m0  :%w >> test.out  :qa!  ENDTEST  1 aa 2 bb 3 cc- 4 dd {{{ |- 5 ee {{{ }}} | 6 ff }}}  7 gg  8 hh  9 ii  a jj  b kk last[?12l[?25h[?25l/[?2004h[?12l[?25h^5 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", "marker " . foldlevel(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldlevel(".")) [?25l[?12l[?25h[?2004l[?2004h[?25l{{ | 6 ff }}}[?12l[?25h[?25l-{| | | | | |[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldlevel(".")) [?25l[?12l[?25h[?25l6 ff }}}  7 gg  8 hh  9 ii  a jj[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldlevel(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" test folding with indent [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fdm=indent sw=2 [?25l-++--- 3 lines: Test fdm=indent START---------------------------------------------------:set fdm=indent:1m12jzc:m0%w >> test.out:qa!ENDTEST1 aa2 bb3 cc4 dd {{{5 ee {{{ }}}  {{{ 6 ff }}} 6 ff }}}  7 gg 8 hh9 iia jjb kklast[?12l[?25h[?25l/[?2004h[?12l[?25h^2 b [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?2004l[?2004h[?25l - 2 bb[?12l[?25h[?2004l[?2004h[?25l |- 3 cc[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", "indent " . foldlevel(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldlevel(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset sw& [?25l  Test fdm=indent START| line3| line4^[:set fdm=indent1m12jzc:m0:%w >> test.out:qa!ENDTEST   1 aa 2 bb 3 cc4 dd {{{5 ee {{{ }}}{{{6 ff }}}6 ff }}}7 gg8 hh9 iia jj[?12l[?25h[?25l:[?2004h[?12l[?25h" test syntax folding [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fdm=syntax fdl=0 [?25l [?12l[?25h[?25l:[?2004h[?12l[?25hsyn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3 [?25l++-- 8 lines: 4 dd --------------------------------------------------------------------a jjb kklastmanual 1 aa-13 cc1 aamarker 2[?12l[?25h[?25l:[?2004h[?12l[?25hsyn region Fd1 start="ee" end="ff" fold contained [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hsyn region Fd2 start="gg" end="hh" fold contained [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hsyn region Fd3 start="commentstart" end="commentend" fold contained [?25l[?12l[?25h[?25l 1  1  0  indent 2  1[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", "folding " . getline(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", getline(".")) [?25l[?12l[?25h[?2004l[?2004h[?25l --4 dd {{{commentstart ||5 ee {{{ }}} ||{{{||6 ff }}} ||6 ff }}}||7 gg ||8 hh ||9 ii ||a jj||b kk ||last ||manual 1 aa ||-1||3 cc[?12l[?25h[?2004l[?2004h[?25l commentend- |- | [?12l[?25h[?25l:[?2004h[?12l[?25hset fdl=1 [?25l++--- 3 lines: 5 ee ------------------------------------------------------------------- 6 ff }}}++--- 2 lines: 7 gg--------------------------------------------------------------------9 ii a jj  b kk  lastmanual 1 aa-13 cc1 aamarker 21[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", getline(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset fdl=0 [?25l++-- 8 lines: 4 dd commentstart commentend-------------------------------------------- a jj b kk last manual 1 aa-13 cc1 aarker 2110indent[?12l[?25h[?25l -4 dd {{{commentstart commentend|-5 ee {{{ }}} ||{{{||6 ff }}} |6 ff }}}|-7 gg ||8 hh |9 iia jjb kklastmanual 1 aa-13 cc[?12l[?25h[?25l line2  Test fdm=indent START  line3  line4^[  :set fdm=indent  :1m1  2jzc:m0  :%w >> test.out  :qa!  ENDTEST  1 aa   2 bb   3 cc - 4 dd {{{commentstart commentend |- 5 ee {{{ }}} || {{{ || 6 ff }}} | 6 ff }}} |- 7 gg || 8 hh | 9 ii  a jj  b kk  last  manual 1 aa  -1  3 cc[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", getline(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" test expression folding [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfun Flvl() [?25l :[?2004h [?12l[?25h let l = getline(v:lnum) [?25l:[?2004h [?12l[?25h if l =~ "bb$" [?25l:[?2004h [?12l[?25h return 2 [?25l:[?2004h [?12l[?25h elseif l =~ "gg$" [?25l:[?2004h [?12l[?25h return "s1" [?25l:[?2004h [?12l[?25h elseif l =~ "ii$" [?25l:[?2004h [?12l[?25h return ">2" [?25l:[?2004h [?12l[?25h elseif l =~ "kk$" [?25l:[?2004h [?12l[?25h return "0" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h return "=" [?25l:[?2004h [?12l[?25hendfun [?25l line2  Test fdm=indent START  line3  line4^[  :set fdm=indent  :1m1  2jzc:m0  :%w >> test.out  :qa!  ENDTEST  1 aa[?12l[?25h[?25l:[?2004h[?12l[?25hset fdm=expr fde=Flvl() [?25l++-- 11 lines: 2 bb---------------------------------------------------------------------b kk last manual 1 aa -1 3 cc 1 aa marker 2  1 10indent 21++-- 4 lines: folding 9 ii-------------------------------------------------------------~ ~ [?12l[?25h[?25l/[?2004h[?12l[?25hbb$ [?25lsearch hit BOTTOM, continuing at TOP-- 2 bb|| 3 cc ||4 dd {{{commentstart commentend ||5 ee {{{ }}} ||{{{ ||6 ff }}} ||6 ff }}} ||7 gg|8 hh |++--- 2 lines: 9 ii--------------------------------------------------------------------b kklastmanual 1 aa  -13 cc1 aa[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", "expr " . foldlevel(".")) [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hhh$ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldlevel(".")) [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hii$ [?25l-9 ii||a jjb kklastmanual 1 aa-13 cc[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldlevel(".")) [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hkk$ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall append("$", foldlevel(".")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^last/+1,$w! test.out [?25l"test.out" [New File] 18 lines, 96 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hdelfun Flvl [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] -- 2 bb 3 cc4 dd {{{commentstart commentend5 ee {{{ }}}{{{6 ff }}}|6 ff }}}|7 gg 8 hh |-9 ii ||a jjb kklast test45.in [+] [?12l[?25h[?2004l[?2004h[?25lTest fdm=indent and :move bug ENDline2 Test fdm=indent START line3 line4[+][?12l[?25h[?25l:[?2004h[?12l[?25hset fdm=indent [?25l++-- 3 lines: Test fdm=indent START----------------------------------------------------~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25h1m1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hm0 [?25l3 lines moved++-- 3 lines: Test fdm=indent START----------------------------------------------------Test fdm=indent and :move bug END  line2[?12l[?25h[?25l:[?2004h[?12l[?25h%w >> test.out [?25l"test.out" 5 lines, 77 characters appendedtest.out [+]] [?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test45 = test61; then \ # if diff test.out test45.ok; \ # then echo flaky test ok first time; \ # else rm -rf test45.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test45.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test48.failed test.ok test.out X* viminfo cp test48.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test48.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test48.in" 83 lines, 1658 charactersThis is a test of 'virtualedit'. STARTTEST :so small.vim :set noswf :set ve=all -dgg :" :" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword". :" Repeating CTRL-N fixes it. (Mary Ellen Foster) 2/w C^N^[ :" :" Using "C" then then moves the last remaining character to the next :" line. (Mary Ellen Foster) j^/are C^Mare belong to vim^[ :" :" When past the end of a line that ends in a single character "b" skips :" that word. ^$15lbC7^[ :" :" Make sure 'i' works $4li<-- should be 3 ' '^[ :" :" Make sure 'C' works $4lC<-- should be 3 ' '^[ :"[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lThis is a test of 'virtualedit'.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 61 lines, 1442 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:set display=uhex ^xxxxxxi[This line should contain only the text between the brackets.]^[ :set display= :" :" Test for ^Y/^E due to bad w_virtcol value, reported by :" Roy . ^O^[3li^E^[4li^E^[4li^E <-- should show the name of a noted text editor^[ ^o^[4li^Y^[4li^Y^[4li^Y <-- and its version number^[-dd :" :" Test for yanking and pasting using the small delete register gg/^foo dewve"-p :wq! test.out ENDTEST foo, bar keyword keyw all your base are belong to us 1 2 3 4 5 6 'i' 'C' 'a' 'A' 'D' this is a test this is a test this is a test "r" "r"[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset noswf [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ve=all [?25l[?12l[?25h[?25l65 fewer linesa^Vb^Msd abcv6efi.him0kl ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 65 fewer lines[?12l[?25h [?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword". [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Repeating CTRL-N fixes it. (Mary Ellen Foster) [?25l[?12l[?25h[?25l/[?2004h[?12l[?25hw [?25l[?12l[?25h[?25l$[?2004lScanning tags. The only match[?2004hword[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Using "C" then then moves the last remaining character to the next [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" line. (Mary Ellen Foster) [?25l[?12l[?25h [?25l/[?2004h[?12l[?25hare [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l$[?2004l[?2004hare belong to vim 1 2 3 4 5 6 'i 'C 'a 'A 'D'this is a test "r" a^Vb^Msdabcv6efi.him0kl[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" When past the end of a line that ends in a single character "b" skips [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" that word. [?25l[?12l[?25h [?25l$[?2004l[?2004h7[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Make sure 'i' works [?25l[?12l[?25h 'i' [?2004l[?2004h[?25l<-- should be 3 ' '[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Make sure 'C' works [?25l[?12l[?25h 'C' [?25l$[?2004l[?2004h<-- should be 3 ' '[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Make sure 'a' works [?25l[?12l[?25h 'a' [?2004l[?2004h[?25l <-- should be 4 ' '[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Make sure 'A' works [?25l[?12l[?25h 'A' [?2004l[?2004h[?25l<-- should be 0 ' '[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Make sure 'D' works [?25l[?12l[?25h 'D' [?2004l[?2004h[?25l<-- 'D' should be intact[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for yank bug reported by Mark Waggoner. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ve=block [?25l[?12l[?25h [?25l[?12l[?25h[?25laaa[?12l[?25h[?25laaablock of 4 lines yanked[?12l[?25h[?25l3 more linesa aa [?12l[?25h [?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test "r" beyond the end of the line [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ve=all [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^"r" [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h"r" [?25lx[?12l[?25h[?2004l[?2004h[?25lx<-- should be 'x'[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test "r" on a tab [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Note that for this test, 'ts' must be 8 (the default). [?25l[?12l[?25h "r" [?25lx[?12l[?25h[?2004l[?2004h[?25lx <-- should be ' x '[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test to make sure 'x' can delete control characters [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset display=uhex [?25l<16>b<0d>sd[?12l[?25h [?25l<16>b<0d>sd[?12l[?25h[?25lb<0d>sd[?12l[?25h[?25l<0d>sd[?12l[?25h[?25lsd[?12l[?25h[?25ld[?12l[?25h[?25l[?12l[?25h[?2004l[?2004h[?25l[This line should contain only the text between the brackets.][?12l[?25h[?25l:[?2004h[?12l[?25hset display= [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for ^Y/^E due to bad w_virtcol value, reported by [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Roy . [?25l[?12l[?25h [?2004l[?2004h[?25l[?12l[?25h [?2004l[?2004h[?25lv[?12l[?25hv [?2004l[?2004h[?25li[?12l[?25hi [?2004l[?2004h[?25lm <-- should show the name of a noted text editor[?12l[?25h [?2004l[?2004h[?25l[?12l[?25h [?2004l[?2004h[?25l6[?12l[?25h6 [?2004l[?2004h[?25l.[?12l[?25h. [?2004l[?2004h[?25l0 <-- and its version number[?12l[?25h[?25l ~ [?12l[?25h  [?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for yanking and pasting using the small delete register [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^foo [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l, bar[?12l[?25h, [?25l[?12l[?25h[?25lba[?12l[?25h[?25l[?12l[?25h[?25lfoo[?12l[?25h keyw[?25l:[?2004h[?12l[?25hwq! test.out [?25l[?2004l"test.out" [New File] 23 lines, 479 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test48 = test61; then \ # if diff test.out test48.ok; \ # then echo flaky test ok first time; \ # else rm -rf test48.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test48.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test51.failed test.ok test.out X* viminfo cp test51.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test51.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test51.in" 36 lines, 809 charactersTests for ":highlight". vim: set ft=vim : STARTTEST :so small.vim :" basic test if ":highlight" doesn't crash :highlight :hi Search :" test setting colors. :" test clearing one color and all doesn't generate error or warning :hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibgg=Cyan :hi Group2 term= cterm= :hi Group3 term=underline cterm=bold :redir! >test.out :hi NewGroup :hi Group2 :hi Group3 :hi clear NewGroup :hi NewGroup :hi Group2 :hi Group2 NONE :hi Group2 :hi clear :hi Group3 :hi Crash term='asdf :redir END :" filter ctermfg and ctermbg, the numbers depend on the terminal :e! test.out[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for ":highlight". vim: set ft=vim :[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 31 lines, 747 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:%s/ctermfg=\d*/ctermfg=2/ :%s/ctermbg=\d*/ctermbg=3/ :" filter out possibly translated error message :%s/E475: [^:]*:/E475:/ :" fix the fileformat :set ff& :wq! ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" basic test if ":highlight" doesn't crash [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hhighlight [?25l SpecialKey xxx term=bold ctermfg=4 guifg=Blue EndOfBuffer xxx links to NonText NonTextxxx term=bold ctermfg=12 gui=bold guifg=Blue Directory xxx term=bold ctermfg=4 guifg=Blue ErrorMsgxxx term=standout ctermfg=15 ctermbg=1 guifg=White guibg=Red IncSearch xxx term=reverse cterm=reverse gui=reverse Searchxxx term=reverse ctermbg=11 guibg=Yellow MoreMsgxxx term=bold ctermfg=2 gui=bold guifg=SeaGreen ModeMsgxxx term=bold cterm=bold gui=bold LineNrxxx term=underline ctermfg=130 guifg=Brown CursorLineNr xxx term=bold ctermfg=130 gui=bold guifg=Brown Questionxxx term=standout ctermfg=2 gui=bold guifg=SeaGreen StatusLine xxx term=bold,reverse cterm=bold,reverse gui=bold,reverse StatusLineNC xxx term=reverse cterm=reverse gui=reverse VertSplit xxx term=reverse cterm=reverse gui=reverse Titlexxx term=bold ctermfg=5 gui=bold guifg=Magenta Visualxxx term=reverse ctermbg=7 guibg=LightGrey VisualNOS xxx cleared WarningMsg xxx term=standout ctermfg=1 guifg=Red WildMenuxxx term=standout ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow Foldedxxx term=standout ctermfg=4 ctermbg=248 guifg=DarkBlue guibg=LightGrey FoldColumn xxx term=standout ctermfg=4 ctermbg=248 guifg=DarkBlue guibg=Grey DiffAddxxx term=bold ctermbg=81 guibg=LightBlue DiffChange xxx term=bold ctermbg=225 guibg=LightMagenta DiffDelete xxx term=bold ctermfg=12 ctermbg=159 gui=bold guifg=Blue guibg=LightCyan DiffTextxxx term=reverse cterm=bold ctermbg=9 gui=bold guibg=Red SignColumn xxx term=standout ctermfg=4 ctermbg=248 guifg=DarkBlue guibg=Grey Concealxxx ctermfg=7 ctermbg=242 guifg=LightGrey guibg=DarkGrey SpellBadxxx term=reverse ctermbg=224 gui=undercurl guisp=Red SpellCapxxx term=reverse ctermbg=81 gui=undercurl guisp=Blue SpellRare xxx term=reverse ctermbg=225 gui=undercurl guisp=Magenta SpellLocal xxx term=underline ctermbg=14 gui=undercurl guisp=DarkCyan Pmenuxxx ctermfg=0 ctermbg=225 guibg=LightMagenta PmenuSelxxx ctermfg=0 ctermbg=7 guibg=Grey PmenuSbar xxx ctermbg=248 guibg=Grey PmenuThumb xxx ctermbg=0 guibg=Black TabLinexxx term=underline cterm=underline ctermfg=0 ctermbg=7 gui=underline guibg=LightGrey TabLineSel xxx term=bold cterm=bold gui=bold TabLineFill xxx term=reverse cterm=reverse gui=reverse CursorColumn xxx term=reverse ctermbg=7 guibg=Grey90 CursorLine xxx term=underline cterm=underline guibg=Grey90 ColorColumn xxx term=reverse ctermbg=224 guibg=LightRed MatchParen xxx term=reverse ctermbg=14 guibg=Cyan Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Search [?25l Searchxxx term=reverse ctermbg=11 guibg=Yellow Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25h" test setting colors. [?25l:hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibgg=Cyan :hi Group2 term= cterm= :hi Group3 term=underline cterm=bold :redir! >test.out :hi NewGroup :hi Group2 :hi Group3 :hi clear NewGroup :hi NewGroup :hi Group2 :hi Group2 NONE :hi Group2 :hi clear :hi Group3 :hi Crash term='asdf :redir END :" filter ctermfg and ctermbg, the numbers depend on the terminal :e! test.out :%s/ctermfg=\d*/ctermfg=2/ :%s/ctermbg=\d*/ctermbg=3/ :" filter out possibly translated error message :%s/E475: [^:]*:/E475:/ :" fix the fileformat :set ff& :wq! ENDTEST [?12l[?25h[?25l :[?2004h[?12l[?25h" test clearing one color and all doesn't generate error or warning [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hhi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guib g=Cyan [?25lE418: Illegal value: guifg=#00ff00Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Group2 term= cterm= [?25lE418: Illegal value: cterm= Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Group3 term=underline cterm=bold [?25l:hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibgg=Cyan[?12l[?25h[?25l :[?2004h[?12l[?25hredir! >test.out [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hhi NewGroup [?25l NewGroupxxx term=bold cterm=italic ctermfg=4 ctermbg=248 Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Group2 [?25l Group2xxx cleared Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Group3 [?25l Group3xxx term=underline cterm=bold Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi clear NewGroup [?25l:hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibgg=Cyan :hi Group2 term= cterm= :hi Group3 term=underline cterm=bold :redir! >test.out :hi NewGroup[?12l[?25h[?25l :[?2004h[?12l[?25hhi NewGroup [?25l NewGroupxxx cleared Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Group2 [?25l Group2xxx cleared Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Group2 NONE [?25l:hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibgg=Cyan :hi Group2 term= cterm= :hi Group3 term=underline cterm=bold[?12l[?25h[?25l :[?2004h[?12l[?25hhi Group2 [?25l Group2xxx cleared Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi clear [?25l:hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibgg=Cyan :hi Group2 term= cterm= :hi Group3 term=underline cterm=bold :redir! >test.out :hi NewGroup :hi Group2 :hi Group3 :hi clear NewGroup :hi NewGroup :hi Group2 :hi Group2 NONE :hi Group2 :hi clear :hi Group3 :hi Crash term='asdf :redir END :" filter ctermfg and ctermbg, the numbers depend on the terminal :e! test.out :%s/ctermfg=\d*/ctermfg=2/ :%s/ctermbg=\d*/ctermbg=3/ :" filter out possibly translated error message :%s/E475: [^:]*:/E475:/ :" fix the fileformat :set ff& :wq! ENDTEST [?12l[?25h[?25l :[?2004h[?12l[?25hhi Group3 [?25l Group3xxx cleared Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hhi Crash term='asdf [?25lE475: Invalid argument: term='asdf Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25l:hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibgg=Cyan :hi Group2 term= cterm=[?12l[?25h[?25l :[?2004h[?12l[?25h" filter ctermfg and ctermbg, the numbers depend on the terminal [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! test.out [?25l"test.out" 20 lines, 291 charactersNewGroup xxx term=bold cterm=italic ctermfg=4 ctermbg=248Group2 xxx clearedGroup3 xxx term=underline cterm=boldNewGroup xxx clearedGroup2 xxx clearedGroup2 xxx clearedGroup3 xxx clearedE475: Invalid argument: term='asdf ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25h%s/ctermfg=\d*/ctermfg=2/ [?25l2 [?12l[?25h[?25l:[?2004h[?12l[?25h%s/ctermbg=\d*/ctermbg=3/ [?25l3[?12l[?25h[?25l:[?2004h[?12l[?25h" filter out possibly translated error message [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h%s/E475: [^:]*:/E475:/ [?25lterm='asdf[?12l[?25h[?25l:[?2004h[?12l[?25h" fix the fileformat [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ff& [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hwq! [?25l[?2004l"test.out" 20 lines, 271 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test51 = test61; then \ # if diff test.out test51.ok; \ # then echo flaky test ok first time; \ # else rm -rf test51.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test51.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test53.failed test.ok test.out X* viminfo cp test53.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test53.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test53.in" 75 lines, 1763 charactersTests for string and html text objects. vim: set ft=vim : Note that the end-of-line moves the cursor to the next test line. Also test match() and matchstr() STARTTEST :so small.vim /^start:/ da" 0va'a'rx 02f`da` 0fXdi" 03f'vi'ry :set quoteescape=+*- di` $F"va"oha"i"rz :" /^ first match)[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for string and html text objects. vim: set ft=vim :[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 47 lines, 1237 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:put =match('abc', '$', 2, 1) " 3 :put =match('abc', '$', 3, 1) " 3 :put =match('abc', '$', 4, 1) " -1 :put =match('abc', '\zs', 0, 1) " 0 :put =match('abc', '\zs', 0, 2) " 1 :put =match('abc', '\zs', 0, 3) " 2 :put =match('abc', '\zs', 0, 4) " 3 :put =match('abc', '\zs', 0, 5) " -1 :put =match('abc', '\zs', 1, 1) " 1 :put =match('abc', '\zs', 2, 1) " 2 :put =match('abc', '\zs', 3, 1) " 3 :put =match('abc', '\zs', 4, 1) " -1 :/^start:/,/^end:/wq! test.out ENDTEST start: "wo\"rd\\" foo 'foo' 'bar' 'piep' bla bla `quote` blah out " in "noXno" "'" 'blah' rep 'buh' bla `s*`d-`+++`l**` b`la voo "nah" sdf " asdf" sdf " sdf" sd -asdfXasdfasdf- -asdXasdfasdf- -asdfXasdfasdf- -asdXasdfasdf-[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^start:/ [?25l[?12l[?25h[?25lfo[?12l[?25h [?25l[?12l[?25h[?25l'foo'[?12l[?25h[?25l 'bar'[?12l[?25h[?25l xxxxxxxxxxxx [?12l[?25h [?25lblah[?12l[?25h [?25l"[?12l[?25h [?25l[?12l[?25h[?25l' rep[?12l[?25h[?25lyyyyy[?12l[?25h[?25l:[?2004h[?12l[?25hset quoteescape=+*- [?25l[?12l[?25h[?25l` b`la[?12l[?25h[?25l[?12l[?25h[?25l" sdf"[?12l[?25h[?25l" [?12l[?25h[?25l"[?12l[?25h[?25l asdf" sdf [?12l[?25h[?25lah" sdf " voo "[?12l[?25h[?25lzzzzzzzzzzzzzzzzzzzzzzzzzzzz voo "[?12l[?25h [?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^asdf-[?12l[?25h [?25l-[?12l[?25h -[?25lasdf-[?12l[?25h [?25l --[?12l[?25h[?25l -[?12l[?25h[?25l[?12l[?25h[?25l [?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hput =matchstr(\"abcd\", \".\", 0, 2) " b [?25l b[?12l[?25h[?25l :[?2004h[?12l[?25hput =matchstr(\"abcd\", \"..\", 0, 2) " bc [?25l bc[?12l[?25h[?25l :[?2004h[?12l[?25hput =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match) [?25l c[?12l[?25h[?25l :[?2004h[?12l[?25hput =matchstr(\"abcd\", \".\", 0, -1) " a [?25l a[?12l[?25h[?25l :[?2004h[?12l[?25hput =match(\"abcd\", \".\", 0, 5) " -1 [?25l -1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match(\"abcd\", \".\", 0, -1) " 0 [?25l 0[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '.', 0, 1) " 0 [?25l 0[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '.', 0, 2) " 1 [?25l 1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '.', 0, 3) " 2 [?25l 2[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '.', 0, 4) " -1 [?25l -1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '.', 1, 1) " 1 [?25l 1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '.', 2, 1) " 2 [?25l 2[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '.', 3, 1) " -1 [?25l -1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '$', 0, 1) " 3 [?25l 3[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '$', 0, 2) " -1 [?25l -1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '$', 1, 1) " 3 [?25l 3[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '$', 2, 1) " 3 [?25l 3[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '$', 3, 1) " 3 [?25l 3[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '$', 4, 1) " -1 [?25l -1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 0, 1) " 0 [?25l 0[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 0, 2) " 1 [?25l 1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 0, 3) " 2 [?25l 2[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 0, 4) " 3 [?25l 3[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 0, 5) " -1 [?25l -1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 1, 1) " 1 [?25l 1[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 2, 1) " 2 [?25l 2[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 3, 1) " 3 [?25l 3[?12l[?25h[?25l :[?2004h[?12l[?25hput =match('abc', '\zs', 4, 1) " -1 [?25l -1[?12l[?25h[?25l :[?2004h[?12l[?25h/^start:/,/^end:/wq! test.out [?25lsearch hit BOTTOM, continuing at TOP[?2004l "test.out" [New File] 45 lines, 284 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test53 = test61; then \ # if diff test.out test53.ok; \ # then echo flaky test ok first time; \ # else rm -rf test53.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test53.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test55.failed test.ok test.out X* viminfo cp test55.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test55.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test55.in" 586 lines, 12256 charactersTests for List and Dictionary types. vim: set ft=vim : STARTTEST :so small.vim :fun Test(...) :lang C :" Creating List directly with different types :let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},] :$put =string(l) :$put =string(l[-1]) :$put =string(l[-4]) :try : $put =string(l[-5]) :catch : $put =v:exception[:14] :endtry :" List slices :$put =string(l[:]) :$put =string(l[1:]) :$put =string(l[:-2]) :$put =string(l[0:8]) :$put =string(l[8:-1]) :" :" List identity :let ll = l :let lx = copy(l) :try : $put =(l == ll) . (l isnot ll) . (l is ll) . (l == lx) . (l is lx) . (l isnot lx)[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for List and Dictionary types. vim: set ft=vim :[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 580 lines, 12170 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:$put =string(d) :" :" test for range assign :let l = [0] :let l[:] = [1, 2] :$put =string(l) :endfun :" :call Test(1, 2, [3, 4], {5: 6}) " This may take a while :" :delfunc Test :unlet dict :call garbagecollect(1) :" :" test for patch 7.3.637 :let a = 'No error caught' :try|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry o^R=a^M^[:" :lang C :redir => a :try|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry :redir END o^R=a^M^[:" :" :/^start:/,$wq! test.out ENDTEST start:[?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfun Test(...) [?25l :[?2004h [?12l[?25h:lang C [?25l:[?2004h [?12l[?25h:" Creating List directly with different types [?25l:[?2004h [?12l[?25h:let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25h:$put =string(l[-1]) [?25l:[?2004h [?12l[?25h:$put =string(l[-4]) [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h: $put =string(l[-5]) [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put =v:exception[:14] [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:" List slices [?25l:[?2004h [?12l[?25h:$put =string(l[:]) [?25l:[?2004h [?12l[?25h:$put =string(l[1:]) [?25l:[?2004h [?12l[?25h:$put =string(l[:-2]) [?25l:[?2004h [?12l[?25h:$put =string(l[0:8]) [?25l:[?2004h [?12l[?25h:$put =string(l[8:-1]) [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" List identity [?25l:[?2004h [?12l[?25h:let ll = l [?25l:[?2004h [?12l[?25h:let lx = copy(l) [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h: $put =(l == ll) . (l isnot ll) . (l is ll) . (l == lx) . (l is lx) . (l isnot lx) [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put =v:exception [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" Creating Dictionary directly with different types [?25l:[?2004h [?12l[?25h:let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},} [?25l:[?2004h [?12l[?25h:$put =string(d) . d.1 [?25l:[?2004h [?12l[?25h:$put =string(sort(keys(d))) [?25l:[?2004h [?12l[?25h:$put =string (values(d)) [?25l:[?2004h [?12l[?25h:for [key, val] in items(d) [?25l:[?2004h [?12l[?25h: $put =key . ':' . string(val) [?25l:[?2004h [?12l[?25h: unlet key val [?25l:[?2004h [?12l[?25h:endfor [?25l:[?2004h [?12l[?25h:call extend (d, {3:33, 1:99}) [?25l:[?2004h [?12l[?25h:call extend(d, {'b':'bbb', 'c':'ccc'}, "keep") [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h: call extend(d, {3:333,4:444}, "error") [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put =v:exception[:15] . v:exception[-1:-1] [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:$put =string(d) [?25l:[?2004h [?12l[?25h:call filter(d, 'v:key =~ ''[ac391]''') [?25l:[?2004h [?12l[?25h:$put =string(d) [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" Dictionary identity [?25l:[?2004h [?12l[?25h:let dd = d [?25l:[?2004h [?12l[?25h:let dx = copy(d) [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h: $put =(d == dd) . (d isnot dd) . (d is dd) . (d == dx) . (d is dx) . (d isnot dx) [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put =v:exception [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" removing items with :unlet [?25l:[?2004h [?12l[?25h:unlet l[2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25h:let l = range(8) [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h:unlet l[:3] [?25l:[?2004h [?12l[?25h:unlet l[1:] [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h:$put =v:exception [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:unlet d.c [?25l:[?2004h [?12l[?25h:unlet d[-1] [?25l:[?2004h [?12l[?25h:$put =string(d) [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" removing items out of range: silently skip items that don't exist [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[2:1] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[2:2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[2:3] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[2:4] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[2:5] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[-1:2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[-2:2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[-3:2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[-4:2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[-5:2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25hlet l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:unlet l[-6:2] [?25l:[?2004h [?12l[?25h:$put =string(l) [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" assignment to a list [?25l:[?2004h [?12l[?25h:let l = [0, 1, 2, 3] [?25l:[?2004h [?12l[?25h:let [va, vb] = l[2:3] [?25l:[?2004h [?12l[?25h:$put =va [?25l:[?2004h [?12l[?25h:$put =vb [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h: let [va, vb] = l [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put =v:exception[:14] [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h: let [va, vb] = l[1:1] [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put =v:exception[:14] [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" manipulating a big Dictionary (hashtable.c has a border of 1000 entries) [?25l:[?2004h [?12l[?25h:let d = {} [?25l:[?2004h [?12l[?25h:for i in range(1500) [?25l:[?2004h [?12l[?25h: let d[i] = 3000 - i [?25l:[?2004h [?12l[?25h:endfor [?25l:[?2004h [?12l[?25h:$put =d[0] . ' ' . d[100] . ' ' . d[999] . ' ' . d[1400] . ' ' . d[1499] [?25l:[?2004h [?12l[?25h:try [?25l:[?2004h [?12l[?25h: let n = d[1500] [?25l:[?2004h [?12l[?25h:catch [?25l:[?2004h [?12l[?25h: $put =substitute(v:exception, '\v(.{14}).*( \d{4}).*', '\1\2', '') [?25l:[?2004h [?12l[?25h:endtry [?25l:[?2004h [?12l[?25h:" lookup each items [?25l:[?2004h [?12l[?25h:for i in range(1500) [?25l:[?2004h [?12l[?25h: if d[i] != 3000 - i [?25l:[?2004h [?12l[?25h: $put =d[i] [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h:endfor [?25l:[?2004h [?12l[?25h: let i += 1 [?25l:[?2004h [?12l[?25h:" delete even items [?25l:[?2004h [?12l[?25h:while i >= 2 [?25l:[?2004h [?12l[?25h: let i -= 2 [?25l:[?2004h [?12l[?25h: unlet d[i] [?25l:[?2004h [?12l[?25h:endwhile [?25l:[?2004h [?12l[?25h:$put =get(d, 1500 - 100, 'NONE') . ' ' . d[1] [?25l:[?2004h [?12l[?25h:" delete odd items, checking value, one intentionally wrong [?25l:[?2004h [?12l[?25h:let d[33] = 999 [?25l:[?2004h [?12l[?25h:let i = 1 [?25l:[?2004h [?12l[?25h:while i < 1500 [?25l:[?2004h [?12l[?25h: if d[i] != 3000 - i [?25l:[?2004h [?12l[?25h: $put =i . '=' . d[i] [?25l:[?2004h [?12l[?25h: else [?25l:[?2004h [?12l[?25h: unlet d[i] [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: let i += 2 [?25l:[?2004h [?12l[?25h:endwhile [?25l:[?2004h [?12l[?25h:$put =string(d) " must be almost empty now [?25l:[?2004h [?12l[?25h:unlet d [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" Dictionary function [?25l:[?2004h [?12l[?25h:let dict = {} [?25l:[?2004h [?12l[?25h:func dict.func(a) dict [?25l:[?2004h [?12l[?25h: $put =a:a . len(self.data) [?25l:[?2004h [?12l[?25h:endfunc [?25l:[?2004h [?12l[?25h:let dict.data = [1,2,3] [?25l:[?2004h [?12l[?25h:call dict.func("len: ") [?25l:[?2004h [?12l[?25h:let x = dict.func("again: ") [?25l:[?2004h [?12l[?25h:let Fn = dict.func [?25l:[?2004h [?12l[?25h:call Fn('xxx') [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" Function in script-local List or Dict [?25l:[?2004h [?12l[?25h:let g:dict = {} [?25l:[?2004h [?12l[?25h:function g:dict.func() dict [?25l:[?2004h [?12l[?25h: $put ='g:dict.func'.self.foo[1].self.foo[0]('asdf') [?25l:[?2004h [?12l[?25h:endfunc [?25l:[?2004h [?12l[?25h:let g:dict.foo = ['-', 2, 3] [?25l:[?2004h [?12l[?25h:call insert(g:dict.foo, function('strlen')) [?25l:[?2004h [?12l[?25h:call g:dict.func() [?25l:[?2004h [?12l[?25h:" [?25l:[?2004h [?12l[?25h:" Nasty: remove func from Dict that's being called (works) [?25l:[?2004h [?12l[?25h:let d = {1:1} [?25l:[?2004h [?12l[?25h:func d.func(a) [?25l:[?2004h[?12l[?25h: return "a:". a:a [?25l:[?2004h[?12l[?25h:endfunc [?25l:[?2004h[?12l[?25h:$put =d.func(string(remove(d, 'func'))) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" Nasty: deepcopy() dict that refers to itself (fails when noref used) [?25l:[?2004h[?12l[?25h:let d = {1:1, 2:2} [?25l:[?2004h[?12l[?25h:let l = [4, d, 6] [?25l:[?2004h[?12l[?25h:let d[3] = l [?25l:[?2004h[?12l[?25h:let dc = deepcopy(d) [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: let dc = deepcopy(d, 1) [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:14] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:let l2 = [0, l, l, 3] [?25l:[?2004h[?12l[?25h:let l[1] = l2 [?25l:[?2004h[?12l[?25h:let l3 = deepcopy(l2) [?25l:[?2004h[?12l[?25h:$put ='same list: ' . (l3[1] is l3[2]) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" Locked variables [?25l:[?2004h[?12l[?25h:for depth in range(5) [?25l:[?2004h[?12l[?25h: $put ='depth is ' . depth [?25l:[?2004h[?12l[?25h: for u in range(3) [?25l:[?2004h[?12l[?25h: unlet l [?25l:[?2004h[?12l[?25h: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}] [?25l:[?2004h[?12l[?25h: exe "lockvar " . depth . " l" [?25l:[?2004h[?12l[?25h: if u == 1 [?25l:[?2004h[?12l[?25h: exe "unlockvar l" [?25l:[?2004h[?12l[?25h: elseif u == 2 [?25l:[?2004h[?12l[?25h: exe "unlockvar " . depth . " l" [?25l:[?2004h[?12l[?25h: endif [?25l:[?2004h[?12l[?25h: let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l [1][1][0]").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]") [?25l:[?2004h[?12l[?25h: $put =ps [?25l:[?2004h[?12l[?25h: let ps = '' [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: let l[1][1][0] = 99 [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: let l[1][1] = [99] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: let l[1] = [99] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: let l[2]['6'][7] = 99 [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: let l[2][6] = {99: 99} [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: let l[2] = {99: 99} [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: let l = [99] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: $put =ps [?25l:[?2004h[?12l[?25h: endfor [?25l:[?2004h[?12l[?25h:endfor [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" Unletting locked variables [?25l:[?2004h[?12l[?25h:$put ='Unletting:' [?25l:[?2004h[?12l[?25h:for depth in range(5) [?25l:[?2004h[?12l[?25h: $put ='depth is ' . depth [?25l:[?2004h[?12l[?25h: for u in range(3) [?25l:[?2004h[?12l[?25h: unlet l [?25l:[?2004h[?12l[?25h: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}] [?25l:[?2004h[?12l[?25h: exe "lockvar " . depth . " l" [?25l:[?2004h[?12l[?25h: if u == 1 [?25l:[?2004h[?12l[?25h: exe "unlockvar l" [?25l:[?2004h[?12l[?25h: elseif u == 2 [?25l:[?2004h[?12l[?25h: exe "unlockvar " . depth . " l" [?25l:[?2004h[?12l[?25h: endif [?25l:[?2004h[?12l[?25h: let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l [1][1][0]").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]") [?25l:[?2004h[?12l[?25h: $put =ps [?25l:[?2004h[?12l[?25h: let ps = '' [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: unlet l[2]['6'][7] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: unlet l[2][6] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: unlet l[2] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: unlet l[1][1][0] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: unlet l[1][1] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: unlet l[1] [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: unlet l [?25l:[?2004h[?12l[?25h: let ps .= 'p' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: let ps .= 'F' [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h: $put =ps [?25l:[?2004h[?12l[?25h: endfor [?25l:[?2004h[?12l[?25h:endfor [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" Locked variables and :unlet or list / dict functions [?25l:[?2004h[?12l[?25h:$put ='Locks and commands or functions:' [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='No :unlet after lock on dict:' [?25l:[?2004h[?12l[?25h:unlet! d [?25l:[?2004h[?12l[?25h:let d = {'a': 99, 'b': 100} [?25l:[?2004h[?12l[?25h:lockvar 1 d [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: unlet d.a [?25l:[?2004h[?12l[?25h: $put ='did :unlet' [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:16] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:$put =string(d) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put =':unlet after lock on dict item:' [?25l:[?2004h[?12l[?25h:unlet! d [?25l:[?2004h[?12l[?25h:let d = {'a': 99, 'b': 100} [?25l:[?2004h[?12l[?25h:lockvar d.a [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: unlet d.a [?25l:[?2004h[?12l[?25h: $put ='did :unlet' [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:16] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:$put =string(d) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='filter() after lock on dict item:' [?25l:[?2004h[?12l[?25h:unlet! d [?25l:[?2004h[?12l[?25h:let d = {'a': 99, 'b': 100} [?25l:[?2004h[?12l[?25h:lockvar d.a [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: call filter(d, 'v:key != "a"') [?25l:[?2004h[?12l[?25h: $put ='did filter()' [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:16] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:$put =string(d) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='map() after lock on dict:' [?25l:[?2004h[?12l[?25h:unlet! d [?25l:[?2004h[?12l[?25h:let d = {'a': 99, 'b': 100} [?25l:[?2004h[?12l[?25h:lockvar 1 d [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: call map(d, 'v:val + 200') [?25l:[?2004h[?12l[?25h: $put ='did map()' [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:16] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:$put =string(d) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='No extend() after lock on dict item:' [?25l:[?2004h[?12l[?25h:unlet! d [?25l:[?2004h[?12l[?25h:let d = {'a': 99, 'b': 100} [?25l:[?2004h[?12l[?25h:lockvar d.a [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: $put =string(extend(d, {'a': 123})) [?25l:[?2004h[?12l[?25h: $put ='did extend()' [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:14] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:$put =string(d) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='No remove() of write-protected scope-level variable:' [?25l:[?2004h[?12l[?25h:fun! Tfunc(this_is_a_loooooooooong_parameter_name) [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: $put =string(remove(a:, 'this_is_a_loooooooooong_parameter_name')) [?25l:[?2004h[?12l[?25h: $put ='did remove()' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:14] [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h:endfun [?25l:[?2004h[?12l[?25h:call Tfunc('testval') [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='No extend() of write-protected scope-level variable:' [?25l:[?2004h[?12l[?25h:fun! Tfunc(this_is_a_loooooooooong_parameter_name) [?25l:[?2004h[?12l[?25h: try [?25l:[?2004h[?12l[?25h: $put =string(extend(a:, {'this_is_a_loooooooooong_parameter_name': 12 34})) [?25l:[?2004h[?12l[?25h: $put ='did extend()' [?25l:[?2004h[?12l[?25h: catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:14] [?25l:[?2004h[?12l[?25h: endtry [?25l:[?2004h[?12l[?25h:endfun [?25l:[?2004h[?12l[?25h:call Tfunc('testval') [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='No :unlet of variable in locked scope:' [?25l:[?2004h[?12l[?25h:let b:testvar = 123 [?25l:[?2004h[?12l[?25h:lockvar 1 b: [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: unlet b:testvar [?25l:[?2004h[?12l[?25h: $put ='b:testvar was :unlet: '. (!exists('b:testvar')) [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:16] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:unlockvar 1 b: [?25l:[?2004h[?12l[?25h:unlet! b:testvar [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:$put ='No :let += of locked list variable:' [?25l:[?2004h[?12l[?25h:let l = ['a', 'b', 3] [?25l:[?2004h[?12l[?25h:lockvar 1 l [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: let l += ['x'] [?25l:[?2004h[?12l[?25h: $put ='did :let +=' [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:14] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:unlet l [?25l:[?2004h[?12l[?25h:let l = [1, 2, 3, 4] [?25l:[?2004h[?12l[?25h:lockvar! l [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:unlockvar l[1] [?25l:[?2004h[?12l[?25h:unlet l[0:1] [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:unlet l[1:2] [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:unlockvar l[1] [?25l:[?2004h[?12l[?25h:let l[0:1] = [0, 1] [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:let l[1:2] = [0, 1] [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:unlet l [?25l:[?2004h[?12l[?25h:" :lockvar/islocked() triggering script autoloading [?25l:[?2004h[?12l[?25h:set rtp+=./sautest [?25l:[?2004h[?12l[?25h:lockvar g:footest#x [?25l:[?2004h[?12l[?25h:unlockvar g:footest#x [?25l:[?2004h[?12l[?25h:$put ='locked g:footest#x:'.islocked('g:footest#x') [?25l:[?2004h[?12l[?25h:$put ='exists g:footest#x:'.exists('g:footest#x') [?25l:[?2004h[?12l[?25h:$put ='g:footest#x: '.g:footest#x [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" a:000 function argument [?25l:[?2004h[?12l[?25h:" first the tests that should fail [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: let a:000 = [1, 2] [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put ='caught a:000' [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: let a:000[0] = 9 [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put ='caught a:000[0]' [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: let a:000[2] = [9, 10] [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put ='caught a:000[2]' [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: let a:000[3] = {9: 10} [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put ='caught a:000[3]' [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:" now the tests that should pass [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: let a:000[2][1] = 9 [?25l:[?2004h[?12l[?25h: call extend(a:000[2], [5, 6]) [?25l:[?2004h[?12l[?25h: let a:000[3][5] = 8 [?25l:[?2004h[?12l[?25h: let a:000[3]['a'] = 12 [?25l:[?2004h[?12l[?25h: $put =string(a:000) [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put ='caught ' . v:exception [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" reverse(), sort(), uniq() [?25l:[?2004h[?12l[?25h:let l = ['-0', 'A11', 2, 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8 ', [0, 1, 2], 1.5] [?25l:[?2004h[?12l[?25h:$put =string(uniq(copy(l))) [?25l:[?2004h[?12l[?25h:$put =string(reverse(l)) [?25l:[?2004h[?12l[?25h:$put =string(reverse(reverse(l))) [?25l:[?2004h[?12l[?25h:$put =string(sort(l)) [?25l:[?2004h[?12l[?25h:$put =string(reverse(sort(l))) [?25l:[?2004h[?12l[?25h:$put =string(sort(reverse(sort(l)))) [?25l:[?2004h[?12l[?25h:$put =string(uniq(sort(l))) [?25l:[?2004h[?12l[?25h:let l=[7, 9, 'one', 18, 12, 22, 'two', 10.0e-16, -1, 'three', 0xff, 0.22, ' four'] [?25l:[?2004h[?12l[?25h:$put =string(sort(copy(l), 'n')) [?25l:[?2004h[?12l[?25h:let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Ba r', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []] [?25l:[?2004h[?12l[?25h:$put =string(sort(copy(l), 1)) [?25l:[?2004h[?12l[?25h:$put =string(sort(copy(l), 'i')) [?25l:[?2004h[?12l[?25h:$put =string(sort(copy(l))) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" splitting a string to a List [?25l:[?2004h[?12l[?25h:$put =string(split(' aa bb ')) [?25l:[?2004h[?12l[?25h:$put =string(split(' aa bb ', '\W\+', 0)) [?25l:[?2004h[?12l[?25h:$put =string(split(' aa bb ', '\W\+', 1)) [?25l:[?2004h[?12l[?25h:$put =string(split(' aa bb ', '\W', 1)) [?25l:[?2004h[?12l[?25h:$put =string(split(':aa::bb:', ':', 0)) [?25l:[?2004h[?12l[?25h:$put =string(split(':aa::bb:', ':', 1)) [?25l:[?2004h[?12l[?25h:$put =string(split('aa,,bb, cc,', ',\s*', 1)) [?25l:[?2004h[?12l[?25h:$put =string(split('abc', '\zs')) [?25l:[?2004h[?12l[?25h:$put =string(split('abc', '\zs', 1)) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" compare recursively linked list and dict [?25l:[?2004h[?12l[?25h:let l = [1, 2, 3, 4] [?25l:[?2004h[?12l[?25h:let d = {'1': 1, '2': l, '3': 3} [?25l:[?2004h[?12l[?25h:let l[1] = d [?25l:[?2004h[?12l[?25h:$put =(l == l) [?25l:[?2004h[?12l[?25h:$put =(d == d) [?25l:[?2004h[?12l[?25h:$put =(l != deepcopy(l)) [?25l:[?2004h[?12l[?25h:$put =(d != deepcopy(d)) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" compare complex recursively linked list and dict [?25l:[?2004h[?12l[?25h:let l = [] [?25l:[?2004h[?12l[?25h:call add(l, l) [?25l:[?2004h[?12l[?25h:let dict4 = {"l": l} [?25l:[?2004h[?12l[?25h:call add(dict4.l, dict4) [?25l:[?2004h[?12l[?25h:let lcopy = deepcopy(l) [?25l:[?2004h[?12l[?25h:let dict4copy = deepcopy(dict4) [?25l:[?2004h[?12l[?25h:$put =(l == lcopy) [?25l:[?2004h[?12l[?25h:$put =(dict4 == dict4copy) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" Pass the same List to extend() [?25l:[?2004h[?12l[?25h:let l = [1, 2, 3, 4, 5] [?25l:[?2004h[?12l[?25h:call extend(l, l) [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" Pass the same Dict to extend() [?25l:[?2004h[?12l[?25h:let d = { 'a': {'b': 'B'}} [?25l:[?2004h[?12l[?25h:call extend(d, d) [?25l:[?2004h[?12l[?25h:$put =string(d) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" Pass the same Dict to extend() with "error" [?25l:[?2004h[?12l[?25h:try [?25l:[?2004h[?12l[?25h: call extend(d, d, "error") [?25l:[?2004h[?12l[?25h:catch [?25l:[?2004h[?12l[?25h: $put =v:exception[:15] . v:exception[-1:-1] [?25l:[?2004h[?12l[?25h:endtry [?25l:[?2004h[?12l[?25h:$put =string(d) [?25l:[?2004h[?12l[?25h:" [?25l:[?2004h[?12l[?25h:" test for range assign [?25l:[?2004h[?12l[?25h:let l = [0] [?25l:[?2004h[?12l[?25h:let l[:] = [1, 2] [?25l:[?2004h[?12l[?25h:$put =string(l) [?25l:[?2004h[?12l[?25h:endfun [?25l:$put =string(d) :" :" test for range assign :let l = [0] :let l[:] = [1, 2] :$put =string(l) :endfun :" :call Test(1, 2, [3, 4], {5: 6}) " This may take a while :" :delfunc Test :unlet dict :call garbagecollect(1) :" :" test for patch 7.3.637 :let a = 'No error caught' :try|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry o^R=a^M^[:" :lang C :redir => a :try|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry :redir END o^R=a^M^[:" :" :/^start:/,$wq! test.out ENDTEST start:[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall Test(1, 2, [3, 4], {5: 6}) " This may take a while [?25lError detected while processing function Test: line 76: E684: list index out of range: 1 line 91: E684: list index out of range: 2 line 271: E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" E108: No such variable: "l" line 441: E741: Value is locked: l[0:1] line 443: E741: Value is locked: l[1:2] line 446: E741: Value is locked: l[0:1] = [0, 1] line 448: E741: Value is locked: l[1:2] = [0, 1] Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]] [-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] ['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] ['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] ['BAR', 'Bar', 'FOO', 'FOOBAR', 'Foo', 'bar', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}] ['aa', 'bb'] ['aa', 'bb'] ['', 'aa', 'bb', ''] ['', '', 'aa', '', 'bb', '', ''] ['aa', '', 'bb'] ['', 'aa', '', 'bb', ''] ['aa', '', 'bb', 'cc', ''] ['a', 'b', 'c'] ['', 'a', '', 'b', '', 'c', ''] 1 1 0 0 1 1 [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] {'a': {'b': 'B'}} Vim(call):E737: a {'a': {'b': 'B'}} [1, 2] [?12l[?25h[?25l :[?2004h[?12l[?25hdelfunc Test [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hunlet dict [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall garbagecollect(1) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" test for patch 7.3.637 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet a = 'No error caught' [?25l[?12l[?25h[?25l:[?2004h[?12l[?25htry|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry [?25l[?12l[?25h[?2004l[?25l=[?2004h[?12l[?25ha [?2004h[?25l Vim(foldopen):E490:[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlang C [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hredir => a [?25l[?12l[?25h[?25l:[?2004h[?12l[?25htry|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry [?25lError detected while processing : E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hredir END [?25l[-1, 'one', 'two', 'three', 'four', 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255] ['bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 2[?12l[?25h[?2004l[?25l =[?2004h[?12l[?25ha [?2004h[?25lError detected while processing : E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^start:/,$wq! test.out [?25lsearch hit BOTTOM, continuing at TOP[?2004l "test.out" [New File] 197 lines, 3821 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test55 = test61; then \ # if diff test.out test55.ok; \ # then echo flaky test ok first time; \ # else rm -rf test55.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test55.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test56.failed test.ok test.out X* viminfo cp test56.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test56.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test56.in" 21 lines, 457 charactersTest for script-local function. vim: set ft=vim : STARTTEST :so small.vim :" :set nocp viminfo+=nviminfo :/^start:/+1,/^end:/-1w! Xtest.vim :source Xtest.vim _x :$-1,$wq! test.out ENDTEST start: fun DoLast() call append(line('$'), "last line") endfun fun s:DoNothing() call append(line('$'), "nothing line") endfun nnoremap _x :call DoNothing()call DoLast()delfunc DoNNothingdelfunc DoLast end: ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for script-local function. vim: set ft=vim :[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 7 lines, 120 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nocp viminfo+=nviminfo [?25l[?12l[?25h[?25l:[?2004h[>c/[?12l[?25h^start:/+1,/^end:/-1w! Xtest.vim [?25l"Xtest.vim" [New] 7L, 251C written[?12l[?25h[?25l:[?2004h[?12l[?25hsource Xtest.vim [?25l[?12l[?25h[?25l:[?2004hcall 4_DoNothing()|call 4_DoLast()|delfunc 4_DoNothing|delfunc 4_DoL ast Press ENTER or type command to continue[?12l[?25h[?25lTest for script-local function. vim: set ft=vim :nothing linelast line[?12l[?25h[?25l:[?2004h[?12l[?25h$-1,$wq! test.out [?25l[?2004l"test.out" [New] 2L, 23C written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test56 = test61; then \ # if diff test.out test56.ok; \ # then echo flaky test ok first time; \ # else rm -rf test56.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test56.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test57.failed test.ok test.out X* viminfo cp test57.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test57.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test57.in" 545 lines, 4110 charactersTests for :sort command. vim: set ft=vim : STARTTEST :so small.vim :" :/^t01:/+1,/^t02/-1sort :/^t02:/+1,/^t03/-1sort n :/^t03:/+1,/^t04/-1sort x :/^t04:/+1,/^t05/-1sort u :/^t05:/+1,/^t06/-1sort! :/^t06:/+1,/^t07/-1sort! n :/^t07:/+1,/^t08/-1sort! u :/^t08:/+1,/^t09/-1sort o :/^t09:/+1,/^t10/-1sort! x :/^t10:/+1,/^t11/-1sort/./ :/^t11:/+1,/^t12/-1sort/../ :/^t12:/+1,/^t13/-1sort/../u :/^t13:/+1,/^t14/-1sort/./n :/^t14:/+1,/^t15/-1sort/./r :/^t15:/+1,/^t16/-1sort/../r :/^t16:/+1,/^t17/-1sort/./rn :/^t17:/+1,/^t18/-1sort/\d/ :/^t18:/+1,/^t19/-1sort/\d/r :/^t19:/+1,/^t20/-1sort/\d/n :/^t20:/+1,/^t21/-1sort/\d/rn :/^t21:/+1,/^t22/-1sort/\d\d/ :/^t22:/+1,/^t23/-1sort/\d\d/n :/^t23:/+1,/^t24/-1sort/\d\d/x[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for :sort command. vim: set ft=vim :[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 33 lines, 920 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:/^t24:/+1,/^t25/-1sort/\d\d/r :/^t25:/+1,/^t26/-1sort/\d\d/rn :/^t26:/+1,/^t27/-1sort/\d\d/rx :/^t27:/+1,/^t28/-1sort no :/^t28:/+1,/^t29/-1sort b :/^t29:/+1,/^t30/-1sort b :/^t30:/+1,/^t31/-1sort f :/^t01:/,$wq! test.out ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/^t01:/+1,/^t02/-1sort [?25lt01: alphebetical[?12l[?25h[?25l :[?2004h[?12l[?25h/^t02:/+1,/^t03/-1sort n [?25la122 a123 a321 ab abc b123 b321 b321 b321b b322b c123d c321d t02: numeric abc ab a-24 x-22 0 a122 a123 b123 c123d 123b a321[?12l[?25h[?25l:[?2004h[?12l[?25h/^t03:/+1,/^t04/-1sort x [?25lb321 c321d b321 b321b b322b t03: hexadecimal[?12l[?25h[?25l :[?2004h[?12l[?25h/^t04:/+1,/^t05/-1sort u [?25labc 123b a122 a123 a321 b123 b321 b321 b321b b322b c123d c321d t04: alpha, unique 123b a a122 a123 a321 ab abc b123 b321 b321b b322b c123d c321d t05: alpha, reverse[?12l[?25h[?25l:[?2004h[?12l[?25h/^t05:/+1,/^t06/-1sort! [?25l c321d[?12l[?25h[?25l :[?2004h[?12l[?25h/^t06:/+1,/^t07/-1sort! n [?25lb321 b321 b123 abc ab a321 a123 a122 a 123b t06: numeric, reverse b322b b321b b321 c321d b321 a321 123b c123d b123 a123 a122 a ab[?12l[?25h[?25l:[?2004h[?12l[?25h/^t07:/+1,/^t08/-1sort! u [?25labc t07: unique, reverse c321d[?12l[?25h[?25l :[?2004h[?12l[?25h/^t08:/+1,/^t09/-1sort o [?25lb322b b321b b321 b123 abc ab a321 a123 a122 a 123b t08: octal abc ab a a122 a123 b123 c123d 123b a321 b321 c321d b321 b321b[?12l[?25h[?25l:[?2004h[?12l[?25h/^t09:/+1,/^t10/-1sort! x [?25lb322b t09: reverse, hexadecimal c321d[?12l[?25h[?25l :[?2004h[?12l[?25h/^t10:/+1,/^t11/-1sort/./ [?25lb321 b321 b123 a321 a123 a122 123b abc ab a t10: alpha, skip first character a a122 a123 b123 123b c123d a321 b321 b321 b321b c321d b322b ab[?12l[?25h[?25l:[?2004h[?12l[?25h/^t11:/+1,/^t12/-1sort/../ [?25labc t11: alpha, skip first 2 characters ab[?12l[?25h[?25l :[?2004h[?12l[?25h/^t12:/+1,/^t13/-1sort/../u [?25la321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d abc t12: alpha, unique, skip first 2 characters ab a a321 b321 b321b c321d a122 b322b a123 b123 123b c123d abc t13: numeric, skip first character[?12l[?25h[?25l:[?2004h[?12l[?25h/^t13:/+1,/^t14/-1sort/./n [?25l abc[?12l[?25h[?25l :[?2004h[?12l[?25h/^t14:/+1,/^t15/-1sort/./r [?25la122 a123 b123 c123d 123b a321 b321 c321d b321 b321b b322b t14: alpha, sort on first character123b abc ab a a321 a123 a122 b321 b123 b322b b321 b321b c123d[?12l[?25h[?25l:[?2004h[?12l[?25h/^t15:/+1,/^t16/-1sort/../r [?25lc321d t15: alpha, sort on first 2 characters a[?12l[?25h[?25l :[?2004h[?12l[?25h/^t16:/+1,/^t17/-1sort/./rn [?25la123 a122 a321 abc ab b123 b321 b322b b321 b321b c123d c321d t16: numeric, sort on first character abc ab a a321 a123 a122 b321 b123 c123d 123b c321d b322b b321 b321b[?12l[?25h[?25l:[?2004h[?12l[?25h/^t17:/+1,/^t18/-1sort/\d/ [?25lt17: alpha, skip past first digit abc[?12l[?25h[?25l :[?2004h[?12l[?25h/^t18:/+1,/^t19/-1sort/\d/r [?25la321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d t18: alpha, sort on first digit abc ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321[?12l[?25h[?25l:[?2004h[?12l[?25h/^t19:/+1,/^t20/-1sort/\d/n [?25lb321b t19: numeric, skip past first digit abc[?12l[?25h[?25l :[?2004h[?12l[?25h/^t20:/+1,/^t21/-1sort/\d/rn [?25la321 b321 c321d b321 b321b a122 b322b a123 b123 c123d 123b t20: numeric, sort on first digit abc ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321[?12l[?25h[?25l:[?2004h[?12l[?25h/^t21:/+1,/^t22/-1sort/\d\d/ [?25lb321b t21: alpha, skip past first 2 digits abc[?12l[?25h[?25l :[?2004h[?12l[?25h/^t22:/+1,/^t23/-1sort/\d\d/n [?25la321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d t22: numeric, skip past first 2 digits abc ab a a321 b321 c321d b321 b321b a122 b322b a123 b123 c123d[?12l[?25h[?25l:[?2004h[?12l[?25h/^t23:/+1,/^t24/-1sort/\d\d/x [?25l123b t23: hexadecimal, skip past first 2 digits abc[?12l[?25h[?25l :[?2004h[?12l[?25h/^t24:/+1,/^t25/-1sort/\d\d/r [?25la321 b321 b321 a122 a123 b123 b321b c321d b322b 123b c123d t24: alpha, sort on first 2 digits abc ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321[?12l[?25h[?25l:[?2004h[?12l[?25h/^t25:/+1,/^t26/-1sort/\d\d/rn [?25lb321b t25: numeric, sort on first 2 digits abc[?12l[?25h[?25l :[?2004h[?12l[?25h/^t26:/+1,/^t27/-1sort/\d\d/rx [?25la123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t26: hexadecimal, sort on first 2 digits abc ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321[?12l[?25h[?25l:[?2004h[?12l[?25h/^t27:/+1,/^t28/-1sort no [?25lE474: Invalid argument[?12l[?25h[?25l:[?2004h[?12l[?25h/^t28:/+1,/^t29/-1sort b [?25la123 a122 b321 b123 c123d 123b c321d b322b b321 b321b t28: binary 0b000000 0b001000 0b010000 0b100000 0b100010 0b100010 0b100100 0b101000 0b101000 0b101001 0b101001 0b101010 0b101100[?12l[?25h[?25l:[?2004h[?12l[?25h/^t29:/+1,/^t30/-1sort b [?25l0b111000 t29: binary with leading characters[?12l[?25h[?25l :[?2004h[?12l[?25h/^t30:/+1,/^t31/-1sort f [?25l0b000000 a0b001000 0b010000 ab0b100000 0b100010 0b100010 0b100100 0b101000 0b101000 0b101001 a0b101001 0b101010 b0b101100 b0b111000 t30: float[?12l[?25h[?25l :[?2004h[?12l[?25h/^t01:/,$wq! test.out [?25lsearch hit BOTTOM, continuing at TOP[?2004l "test.out" [New File] 501 lines, 3105 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test57 = test61; then \ # if diff test.out test57.ok; \ # then echo flaky test ok first time; \ # else rm -rf test57.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test57.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test60.failed test.ok test.out X* viminfo cp test60.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test60.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test60.in" 601 lines, 13116 charactersTests for the exists() and has() functions. vim: set ft=vim ts=8 sw=2 : STARTTEST :so small.vim :function! RunTest(str, result) if exists(a:str) == a:resultecho "OK" elseecho "FAILED: Checking for " . a:str endif endfunction :function! TestExists() augroup myagroupautocmd! BufEnter*.my echo "myfile edited"autocmd! FuncUndefined UndefFun exec "fu UndefFun()\nendfu" augroup END set rtp+=./sautestlet test_cases = []" valid autocmd group let test_cases += [['#myagroup', 1]] " valid autocmd group with garbage let test_cases += [['#myagroup+b', 0]] " Valid autocmd group and event let test_cases += [['#myagroup#BufEnter', 1]] " Valid autocmd group, event and pattern let test_cases += [['#myagroup#BufEnter#*.my', 1]][?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for the exists() and has() functions. vim: set ft=vim ts=8 sw=2 :[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 596 lines, 13023 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTESTecho 'a:2: 0'if !exists('a:2')echo "OK"elseecho "FAILED"endif endfunctioncall TestFuncArg("arg1", "arg2")echo ' g:footest#x =' g:footest#x echo ' footest#F()' footest#F() echo 'UndefFun()' UndefFun()redir END endfunction :call TestExists() :" :delfunc TestExists :delfunc RunTest :delfunc TestFuncArg :edit! test.out :set ff=unix :w :qa! :while getchar(1) | call getchar() | endwhile ENDTEST [?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfunction! RunTest(str, result) [?25l :[?2004h [?12l[?25h if exists(a:str) == a:result [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED: Checking for " . a:str [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25hendfunction [?25lecho 'a:2: 0'if !exists('a:2')echo "OK"elseecho "FAILED"endif[?12l[?25h[?25l :[?2004h[?12l[?25hfunction! TestExists() [?25l :[?2004h [?12l[?25h augroup myagroup [?25l:[?2004h [?12l[?25h^Iautocmd! BufEnter *.my echo "myfile edited" [?25l:[?2004h [?12l[?25h^Iautocmd! FuncUndefined UndefFun exec "fu UndefFun()\nendfu" [?25l:[?2004h [?12l[?25h augroup END [?25l:[?2004h [?12l[?25h set rtp+=./sautest [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h let test_cases = [] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " valid autocmd group [?25l:[?2004h [?12l[?25h let test_cases += [['#myagroup', 1]] [?25l:[?2004h [?12l[?25h " valid autocmd group with garbage [?25l:[?2004h [?12l[?25h let test_cases += [['#myagroup+b', 0]] [?25l:[?2004h [?12l[?25h " Valid autocmd group and event [?25l:[?2004h [?12l[?25h let test_cases += [['#myagroup#BufEnter', 1]] [?25l:[?2004h [?12l[?25h " Valid autocmd group, event and pattern [?25l:[?2004h [?12l[?25h let test_cases += [['#myagroup#BufEnter#*.my', 1]] [?25l:[?2004h [?12l[?25h " Valid autocmd event [?25l:[?2004h [?12l[?25h let test_cases += [['#BufEnter', 1]] [?25l:[?2004h [?12l[?25h " Valid autocmd event and pattern [?25l:[?2004h [?12l[?25h let test_cases += [['#BufEnter#*.my', 1]] [?25l:[?2004h [?12l[?25h " Non-existing autocmd group or event [?25l:[?2004h [?12l[?25h let test_cases += [['#xyzagroup', 0]] [?25l:[?2004h [?12l[?25h " Non-existing autocmd group and valid autocmd event [?25l:[?2004h [?12l[?25h let test_cases += [['#xyzagroup#BufEnter', 0]] [?25l:[?2004h [?12l[?25h " Valid autocmd group and event with no matching pattern [?25l:[?2004h [?12l[?25h let test_cases += [['#myagroup#CmdwinEnter', 0]] [?25l:[?2004h [?12l[?25h " Valid autocmd group and non-existing autocmd event [?25l:[?2004h [?12l[?25h let test_cases += [['#myagroup#xyzacmd', 0]] [?25l:[?2004h [?12l[?25h " Valid autocmd group and event and non-matching pattern [?25l:[?2004h [?12l[?25h let test_cases += [['#myagroup#BufEnter#xyzpat', 0]] [?25l:[?2004h [?12l[?25h " Valid autocmd event and non-matching pattern [?25l:[?2004h [?12l[?25h let test_cases += [['#BufEnter#xyzpat', 0]] [?25l:[?2004h [?12l[?25h " Empty autocmd group, event and pattern [?25l:[?2004h [?12l[?25h let test_cases += [['###', 0]] [?25l:[?2004h [?12l[?25h " Empty autocmd group and event or empty event and pattern [?25l:[?2004h [?12l[?25h let test_cases += [['##', 0]] [?25l:[?2004h [?12l[?25h " Valid autocmd event [?25l:[?2004h [?12l[?25h let test_cases += [['##FileReadCmd', 1]] [?25l:[?2004h [?12l[?25h " Non-existing autocmd event [?25l:[?2004h [?12l[?25h let test_cases += [['##MySpecialCmd', 0]] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing and working option (long form) [?25l:[?2004h [?12l[?25h let test_cases += [['&textwidth', 1]] [?25l:[?2004h [?12l[?25h " Existing and working option (short form) [?25l:[?2004h [?12l[?25h let test_cases += [['&tw', 1]] [?25l:[?2004h [?12l[?25h " Existing and working option with garbage [?25l:[?2004h [?12l[?25h let test_cases += [['&tw-', 0]] [?25l:[?2004h [?12l[?25h " Global option [?25l:[?2004h [?12l[?25h let test_cases += [['&g:errorformat', 1]] [?25l:[?2004h [?12l[?25h " Local option [?25l:[?2004h [?12l[?25h let test_cases += [['&l:errorformat', 1]] [?25l:[?2004h [?12l[?25h " Negative form of existing and working option (long form) [?25l:[?2004h [?12l[?25h let test_cases += [['&nojoinspaces', 0]] [?25l:[?2004h [?12l[?25h " Negative form of existing and working option (short form) [?25l:[?2004h [?12l[?25h let test_cases += [['&nojs', 0]] [?25l:[?2004h [?12l[?25h " Non-existing option [?25l:[?2004h [?12l[?25h let test_cases += [['&myxyzoption', 0]] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing and working option (long form) [?25l:[?2004h [?12l[?25h let test_cases += [['+incsearch', 1]] [?25l:[?2004h [?12l[?25h " Existing and working option with garbage [?25l:[?2004h [?12l[?25h let test_cases += [['+incsearch!1', 0]] [?25l:[?2004h [?12l[?25h " Existing and working option (short form) [?25l:[?2004h [?12l[?25h let test_cases += [['+is', 1]] [?25l:[?2004h [?12l[?25h " Existing option that is hidden. [?25l:[?2004h [?12l[?25h let test_cases += [['+autoprint', 0]] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing environment variable [?25l:[?2004h [?12l[?25h let $EDITOR_NAME = 'Vim Editor' [?25l:[?2004h [?12l[?25h let test_cases += [['$EDITOR_NAME', 1]] [?25l:[?2004h [?12l[?25h " Non-existing environment variable [?25l:[?2004h [?12l[?25h let test_cases += [['$NON_ENV_VAR', 0]] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid internal function [?25l:[?2004h [?12l[?25h let test_cases += [['*bufnr', 1]] [?25l:[?2004h [?12l[?25h " Valid internal function with () [?25l:[?2004h [?12l[?25h let test_cases += [['*bufnr()', 1]] [?25l:[?2004h [?12l[?25h " Non-existing internal function [?25l:[?2004h [?12l[?25h let test_cases += [['*myxyzfunc', 0]] [?25l:[?2004h [?12l[?25h " Valid internal function with garbage [?25l:[?2004h [?12l[?25h let test_cases += [['*bufnr&6', 0]] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid user defined function [?25l:[?2004h [?12l[?25h let test_cases += [['*TestExists', 1]] [?25l:[?2004h [?12l[?25h " Non-existing user defined function [?25l:[?2004h [?12l[?25h let test_cases += [['*MyxyzFunc', 0]] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Function that may be created by FuncUndefined event [?25l:[?2004h [?12l[?25h let test_cases += [['*UndefFun', 0]] [?25l:[?2004h [?12l[?25h " Function that may be created by script autoloading [?25l:[?2004h [?12l[?25h let test_cases += [['*footest#F', 0]] [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h redir! > test.out [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h for [test_case, result] in test_cases [?25l:[?2004h [?12l[?25h echo test_case . ": " . result [?25l:[?2004h [?12l[?25h call RunTest(test_case, result) [?25l:[?2004h [?12l[?25h endfor [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid internal command (full match) [?25l:[?2004h [?12l[?25h echo ':edit: 2' [?25l:[?2004h [?12l[?25h if exists(':edit') == 2 [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid internal command (full match) with garbage [?25l:[?2004h [?12l[?25h echo ':edit/a: 0' [?25l:[?2004h [?12l[?25h if exists(':edit/a') == 0 [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid internal command (partial match) [?25l:[?2004h [?12l[?25h echo ':q: 1' [?25l:[?2004h [?12l[?25h if exists(':q') == 1 [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing internal command [?25l:[?2004h [?12l[?25h echo ':invalidcmd: 0' [?25l:[?2004h [?12l[?25h if !exists(':invalidcmd') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " User defined command (full match) [?25l:[?2004h [?12l[?25h command! MyCmd :echo 'My command' [?25l:[?2004h [?12l[?25h echo ':MyCmd: 2' [?25l:[?2004h [?12l[?25h if exists(':MyCmd') == 2 [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " User defined command (partial match) [?25l:[?2004h [?12l[?25h command! MyOtherCmd :echo 'Another command' [?25l:[?2004h [?12l[?25h echo ':My: 3' [?25l:[?2004h [?12l[?25h if exists(':My') == 3 [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Command modifier [?25l:[?2004h [?12l[?25h echo ':rightbelow: 2' [?25l:[?2004h [?12l[?25h if exists(':rightbelow') == 2 [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing user defined command (full match) [?25l:[?2004h [?12l[?25h delcommand MyCmd [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h echo ':MyCmd: 0' [?25l:[?2004h [?12l[?25h if !exists(':MyCmd') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing user defined command (partial match) [?25l:[?2004h [?12l[?25h delcommand MyOtherCmd [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h echo ':My: 0' [?25l:[?2004h [?12l[?25h if !exists(':My') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid local variable [?25l:[?2004h [?12l[?25h let local_var = 1 [?25l:[?2004h [?12l[?25h echo 'local_var: 1' [?25l:[?2004h [?12l[?25h if exists('local_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid local variable with garbage [?25l:[?2004h [?12l[?25h let local_var = 1 [?25l:[?2004h [?12l[?25h echo 'local_var%n: 0' [?25l:[?2004h [?12l[?25h if !exists('local_var%n') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing local variable [?25l:[?2004h [?12l[?25h unlet local_var [?25l:[?2004h [?12l[?25h echo 'local_var: 0' [?25l:[?2004h [?12l[?25h if !exists('local_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing autoload variable that may be autoloaded [?25l:[?2004h [?12l[?25h echo 'footest#x: 0' [?25l:[?2004h [?12l[?25h if !exists('footest#x') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid local list [?25l:[?2004h [?12l[?25h let local_list = ["blue", "orange"] [?25l:[?2004h [?12l[?25h echo 'local_list: 1' [?25l:[?2004h [?12l[?25h if exists('local_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid local list item [?25l:[?2004h [?12l[?25h echo 'local_list[1]: 1' [?25l:[?2004h [?12l[?25h if exists('local_list[1]') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid local list item with garbage [?25l:[?2004h [?12l[?25h echo 'local_list[1]+5: 0' [?25l:[?2004h [?12l[?25h if !exists('local_list[1]+5') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Invalid local list item [?25l:[?2004h [?12l[?25h echo 'local_list[2]: 0' [?25l:[?2004h [?12l[?25h if !exists('local_list[2]') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing local list [?25l:[?2004h [?12l[?25h unlet local_list [?25l:[?2004h [?12l[?25h echo 'local_list: 0' [?25l:[?2004h [?12l[?25h if !exists('local_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Valid local dictionary [?25l:[?2004h [?12l[?25h let local_dict = {"xcord":100, "ycord":2} [?25l:[?2004h [?12l[?25h echo 'local_dict: 1' [?25l:[?2004h [?12l[?25h if exists('local_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing local dictionary [?25l:[?2004h [?12l[?25h unlet local_dict [?25l:[?2004h [?12l[?25h echo 'local_dict: 0' [?25l:[?2004h [?12l[?25h if !exists('local_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing local curly-brace variable [?25l:[?2004h [?12l[?25h let str = "local" [?25l:[?2004h [?12l[?25h let curly_{str}_var = 1 [?25l:[?2004h [?12l[?25h echo 'curly_' . str . '_var: 1' [?25l:[?2004h [?12l[?25h if exists('curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing local curly-brace variable [?25l:[?2004h [?12l[?25h unlet curly_{str}_var [?25l:[?2004h [?12l[?25h echo 'curly_' . str . '_var: 0' [?25l:[?2004h [?12l[?25h if !exists('curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing global variable [?25l:[?2004h [?12l[?25h let g:global_var = 1 [?25l:[?2004h [?12l[?25h echo 'g:global_var: 1' [?25l:[?2004h [?12l[?25h if exists('g:global_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing global variable with garbage [?25l:[?2004h [?12l[?25h echo 'g:global_var-n: 1' [?25l:[?2004h [?12l[?25h if !exists('g:global_var-n') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing global variable [?25l:[?2004h [?12l[?25h unlet g:global_var [?25l:[?2004h [?12l[?25h echo 'g:global_var: 0' [?25l:[?2004h [?12l[?25h if !exists('g:global_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing global list [?25l:[?2004h [?12l[?25h let g:global_list = ["blue", "orange"] [?25l:[?2004h [?12l[?25h echo 'g:global_list: 1' [?25l:[?2004h [?12l[?25h if exists('g:global_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing global list [?25l:[?2004h [?12l[?25h unlet g:global_list [?25l:[?2004h [?12l[?25h echo 'g:global_list: 0' [?25l:[?2004h [?12l[?25h if !exists('g:global_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing global dictionary [?25l:[?2004h [?12l[?25h let g:global_dict = {"xcord":100, "ycord":2} [?25l:[?2004h [?12l[?25h echo 'g:global_dict: 1' [?25l:[?2004h [?12l[?25h if exists('g:global_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing global dictionary [?25l:[?2004h [?12l[?25h unlet g:global_dict [?25l:[?2004h [?12l[?25h echo 'g:global_dict: 0' [?25l:[?2004h [?12l[?25h if !exists('g:global_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing global curly-brace variable [?25l:[?2004h [?12l[?25h let str = "global" [?25l:[?2004h [?12l[?25h let g:curly_{str}_var = 1 [?25l:[?2004h [?12l[?25h echo 'g:curly_' . str . '_var: 1' [?25l:[?2004h [?12l[?25h if exists('g:curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing global curly-brace variable [?25l:[?2004h [?12l[?25h unlet g:curly_{str}_var [?25l:[?2004h [?12l[?25h echo 'g:curly_' . str . '_var: 0' [?25l:[?2004h [?12l[?25h if !exists('g:curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing window variable [?25l:[?2004h [?12l[?25h echo 'w:window_var: 1' [?25l:[?2004h [?12l[?25h let w:window_var = 1 [?25l:[?2004h [?12l[?25h if exists('w:window_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing window variable [?25l:[?2004h [?12l[?25h unlet w:window_var [?25l:[?2004h [?12l[?25h echo 'w:window_var: 0' [?25l:[?2004h [?12l[?25h if !exists('w:window_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing window list [?25l:[?2004h [?12l[?25h let w:window_list = ["blue", "orange"] [?25l:[?2004h [?12l[?25h echo 'w:window_list: 1' [?25l:[?2004h [?12l[?25h if exists('w:window_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing window list [?25l:[?2004h [?12l[?25h unlet w:window_list [?25l:[?2004h [?12l[?25h echo 'w:window_list: 0' [?25l:[?2004h [?12l[?25h if !exists('w:window_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing window dictionary [?25l:[?2004h [?12l[?25h let w:window_dict = {"xcord":100, "ycord":2} [?25l:[?2004h [?12l[?25h echo 'w:window_dict: 1' [?25l:[?2004h [?12l[?25h if exists('w:window_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing window dictionary [?25l:[?2004h [?12l[?25h unlet w:window_dict [?25l:[?2004h [?12l[?25h echo 'w:window_dict: 0' [?25l:[?2004h [?12l[?25h if !exists('w:window_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing window curly-brace variable [?25l:[?2004h [?12l[?25h let str = "window" [?25l:[?2004h [?12l[?25h let w:curly_{str}_var = 1 [?25l:[?2004h [?12l[?25h echo 'w:curly_' . str . '_var: 1' [?25l:[?2004h [?12l[?25h if exists('w:curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing window curly-brace variable [?25l:[?2004h [?12l[?25h unlet w:curly_{str}_var [?25l:[?2004h [?12l[?25h echo 'w:curly_' . str . '_var: 0' [?25l:[?2004h [?12l[?25h if !exists('w:curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing buffer variable [?25l:[?2004h [?12l[?25h echo 'b:buffer_var: 1' [?25l:[?2004h [?12l[?25h let b:buffer_var = 1 [?25l:[?2004h [?12l[?25h if exists('b:buffer_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing buffer variable [?25l:[?2004h [?12l[?25h unlet b:buffer_var [?25l:[?2004h [?12l[?25h echo 'b:buffer_var: 0' [?25l:[?2004h [?12l[?25h if !exists('b:buffer_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing buffer list [?25l:[?2004h [?12l[?25h let b:buffer_list = ["blue", "orange"] [?25l:[?2004h [?12l[?25h echo 'b:buffer_list: 1' [?25l:[?2004h [?12l[?25h if exists('b:buffer_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing buffer list [?25l:[?2004h [?12l[?25h unlet b:buffer_list [?25l:[?2004h [?12l[?25h echo 'b:buffer_list: 0' [?25l:[?2004h [?12l[?25h if !exists('b:buffer_list') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing buffer dictionary [?25l:[?2004h [?12l[?25h let b:buffer_dict = {"xcord":100, "ycord":2} [?25l:[?2004h [?12l[?25h echo 'b:buffer_dict: 1' [?25l:[?2004h [?12l[?25h if exists('b:buffer_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing buffer dictionary [?25l:[?2004h [?12l[?25h unlet b:buffer_dict [?25l:[?2004h [?12l[?25h echo 'b:buffer_dict: 0' [?25l:[?2004h [?12l[?25h if !exists('b:buffer_dict') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing buffer curly-brace variable [?25l:[?2004h [?12l[?25h let str = "buffer" [?25l:[?2004h [?12l[?25h let b:curly_{str}_var = 1 [?25l:[?2004h [?12l[?25h echo 'b:curly_' . str . '_var: 1' [?25l:[?2004h [?12l[?25h if exists('b:curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing buffer curly-brace variable [?25l:[?2004h [?12l[?25h unlet b:curly_{str}_var [?25l:[?2004h [?12l[?25h echo 'b:curly_' . str . '_var: 0' [?25l:[?2004h [?12l[?25h if !exists('b:curly_{str}_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Script-local tests [?25l:[?2004h [?12l[?25h source test60.vim [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Existing Vim internal variable [?25l:[?2004h [?12l[?25h echo 'v:version: 1' [?25l:[?2004h [?12l[?25h if exists('v:version') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Non-existing Vim internal variable [?25l:[?2004h [?12l[?25h echo 'v:non_exists_var: 0' [?25l:[?2004h [?12l[?25h if !exists('v:non_exists_var') [?25l:[?2004h [?12l[?25h^Iecho "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h^Iecho "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h " Function arguments [?25l:[?2004h [?12l[?25h function TestFuncArg(func_arg, ...) [?25l:[?2004h [?12l[?25h echo 'a:func_arg: 1' [?25l:[?2004h [?12l[?25h if exists('a:func_arg') [?25l:[?2004h [?12l[?25h echo "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h echo "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h echo 'a:non_exists_arg: 0' [?25l:[?2004h [?12l[?25h if !exists('a:non_exists_arg') [?25l:[?2004h [?12l[?25h echo "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h echo "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h echo 'a:1: 1' [?25l:[?2004h [?12l[?25h if exists('a:1') [?25l:[?2004h [?12l[?25h echo "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h echo "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h echo 'a:2: 0' [?25l:[?2004h [?12l[?25h if !exists('a:2') [?25l:[?2004h [?12l[?25h echo "OK" [?25l:[?2004h [?12l[?25h else [?25l:[?2004h [?12l[?25h echo "FAILED" [?25l:[?2004h [?12l[?25h endif [?25l:[?2004h [?12l[?25h endfunction [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h call TestFuncArg("arg1", "arg2") [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h echo ' g:footest#x =' g:footest#x [?25l:[?2004h [?12l[?25h echo ' footest#F()' footest#F() [?25l:[?2004h [?12l[?25h echo 'UndefFun()' UndefFun() [?25l:[?2004h [?12l[?25h [?25l:[?2004h [?12l[?25h redir END [?25l:[?2004h [?12l[?25hendfunction [?25lecho 'a:2: 0'if !exists('a:2')echo "OK"elseecho "FAILED"endif endfunctioncall TestFuncArg("arg1", "arg2")echo ' g:footest#x =' g:footest#x echo ' footest#F()' footest#F() echo 'UndefFun()' UndefFun()redir END endfunction :call TestExists() :" :delfunc TestExists :delfunc RunTest :delfunc TestFuncArg :edit! test.out :set ff=unix :w :qa! :while getchar(1) | call getchar() | endwhile ENDTEST [?12l[?25h[?25l :[?2004h[?12l[?25hcall TestExists() [?25l#myagroup: 1 OK #myagroup+b: 0 OK #myagroup#BufEnter: 1 OK #myagroup#BufEnter#*.my: 1 OK #BufEnter: 1 OK #BufEnter#*.my: 1 OK #xyzagroup: 0 OK #xyzagroup#BufEnter: 0 OK #myagroup#CmdwinEnter: 0 OK #myagroup#xyzacmd: 0 OK #myagroup#BufEnter#xyzpat: 0 OK #BufEnter#xyzpat: 0 OK ###: 0 OK ##: 0 OK ##FileReadCmd: 1 OK ##MySpecialCmd: 0 OK &textwidth: 1 OK &tw: 1 OK &tw-: 0 OK &g:errorformat: 1 OK &l:errorformat: 1 OK &nojoinspaces: 0 OK &nojs: 0 OK &myxyzoption: 0 OK +incsearch: 1 OK +incsearch!1: 0 OK +is: 1 OK +autoprint: 0 OK $EDITOR_NAME: 1 OK $NON_ENV_VAR: 0 OK *bufnr: 1 OK *bufnr(): 1 OK *myxyzfunc: 0 OK *bufnr&6: 0 OK *TestExists: 1 OK *MyxyzFunc: 0 OK *UndefFun: 0 OK *footest#F: 0 OK :edit: 2 OK :edit/a: 0 OK :q: 1 OK :invalidcmd: 0 OK :MyCmd: 2 OK :My: 3 OK :rightbelow: 2 OK :MyCmd: 0 OK :My: 0 OK local_var: 1 OK local_var%n: 0 OK local_var: 0 OK footest#x: 0 OK local_list: 1 OK local_list[1]: 1 OK local_list[1]+5: 0 OK local_list[2]: 0 OK local_list: 0 OK local_dict: 1 OK local_dict: 0 OK curly_local_var: 1 OK curly_local_var: 0 OK g:global_var: 1 OK g:global_var-n: 1 OK g:global_var: 0 OK g:global_list: 1 OK g:global_list: 0 OK g:global_dict: 1 OK g:global_dict: 0 OK g:curly_global_var: 1 OK g:curly_global_var: 0 OK w:window_var: 1 OK w:window_var: 0 OK w:window_list: 1 OK w:window_list: 0 OK w:window_dict: 1 OK w:window_dict: 0 OK w:curly_window_var: 1 OK w:curly_window_var: 0 OK b:buffer_var: 1 OK b:buffer_var: 0 OK b:buffer_list: 1 OK b:buffer_list: 0 OK b:buffer_dict: 1 OK b:buffer_dict: 0 OK b:curly_buffer_var: 1 OK b:curly_buffer_var: 0 OK s:script_var: 1 OK s:script_var: 0 OK s:script_list: 1 OK s:script_list: 0 OK s:script_dict: 1 OK s:script_dict: 0 OK s:curly_script_var: 1 OK s:curly_script_var: 0 OK *s:my_script_func: 1 OK *s:my_script_func: 0 OK v:version: 1 OK v:non_exists_var: 0 OK a:func_arg: 1 OK a:non_exists_arg: 0 OK a:1: 1 OK a:2: 0 OK g:footest#x = 1 footest#F() 0 UndefFun() 0 Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25lecho 'a:2: 0'if !exists('a:2')echo "OK"elseecho "FAILED"endif endfunctioncall TestFuncArg("arg1", "arg2")echo ' g:footest#x =' g:footest#x echo ' footest#F()' footest#F() echo 'UndefFun()' UndefFun()redir END endfunction :call TestExists() :" :delfunc TestExists :delfunc RunTest :delfunc TestFuncArg :edit! test.out :set ff=unix :w :qa! :while getchar(1) | call getchar() | endwhile ENDTEST [?12l[?25h[?25l :[?2004h[?12l[?25hdelfunc TestExists [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc RunTest [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hdelfunc TestFuncArg [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hedit! test.out [?25l"test.out" [Incomplete last line] 206 lines, 1940 characters#myagroup: 1OK#myagroup+b: 0 OK#myagroup#BufEnter: 1 OK#myagroup#BufEnter#*.my: 1 OK#BufEnter: 1 OK#BufEnter#*.my: 1OK#xyzagroup: 0 OK#xyzagroup#BufEnter: 0 OK#myagroup#CmdwinEnter: 0 OK#myagroup#xyzacmd: 0 OK#myagroup#BufEnter#xyzpat: 0 OK#BufEnter#xyzpat: 0 OK###: 0OK##: 0[?12l[?25h[?25l:[?2004h[?12l[?25hset ff=unix [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"test.out" 206 lines, 1941 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test60 = test61; then \ # if diff test.out test60.ok; \ # then echo flaky test ok first time; \ # else rm -rf test60.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test60.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test64.failed test.ok test.out X* viminfo cp test64.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test64.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test64.in" 654 lines, 27565 charactersTest for regexp patterns without multi-byte support. See test95 for multi-byte tests. A pattern that gives the expected result produces OK, so that we know it was actually tried. STARTTEST :so small.vim :" tl is a List of Lists with: :" regexp engine :" regexp pattern :" text to test the pattern on :" expected match (optional) :" expected submatch 1 (optional) :" expected submatch 2 (optional) :" etc. :" When there is no match use only the first two items. :let tl = [] :" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :"""" Previously written tests """""""""""""""""""""""""""""""" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :" :call add(tl, [2, 'ab', 'aab', 'ab']) :call add(tl, [2, 'b', 'abcdef', 'b']) :call add(tl, [2, 'bc*', 'abccccdef', 'bcccc']) :call add(tl, [2, 'bc\{-}', 'abccccdef', 'b']) :call add(tl, [2, 'bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd'])[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for regexp patterns without multi-byte support.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 621 lines, 27090 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:" Check for detecting error :set regexpengine=2 :for pat in [' \ze*', ' \zs*'] : try : let l = matchlist('x x', pat) : $put ='E888 NOT detected for ' . pat : catch : $put ='E888 detected for ' . pat : endtry :endfor :" :""""" Write the results """"""""""""" :/\%#=1^Results/,$wq! test.out ENDTEST Substitute here: Ta 5 Ac 7 Behind: asdfasd\zs.', 'aword. ', '.']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\s\+\ze\[/\|\s\zs\s\+', 'is [a t', ' ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" Tests for \@= and \& features [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'abc\@=', 'abc', 'ab']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'abc\@=cd', 'abcd', 'abcd']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'abc\@=', 'ababc', 'ab']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" will never match, no matter the input text [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'abcd\@=e', 'abcd']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" will never match [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'abcd\@=e', 'any text in here ... ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\v(abc)@=..', 'xabcd', 'ab', 'abc']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(.*John\)\@=.*Bob', 'here is John, and here is B']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(John.*\)\@=.*Bob', 'John is Bobs friend', 'John is Bob', 'John is Bo bs friend']) [?25l:" Check for detecting error[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\<\S\+\())\)\@=', '$((i=i+1))', 'i=i+1', '))']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '.*John\&.*Bob', 'here is John, and here is B']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '.*John\&.*Bob', 'John is Bobs friend', 'John is Bob']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\v(test1)@=.*yep', 'this is a test1, yep it is', 'test1, yep', 'test1' ])[?25l:" Check for detecting error[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\(bar\)\@!', 'foobar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\(bar\)\@!', 'foo bar', 'foo']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'if \(\(then\)\@!.\)*$', ' if then else']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'if \(\(then\)\@!.\)*$', ' if else ', 'if else ', ' ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(foo\)\@!bar', 'foobar', 'bar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(foo\)\@!...bar', 'foobar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' bar foo ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo bar ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo xxx ', 'foo']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '[ ]\@!\p\%([ ]\@!\p\)*:', 'implicit mappings:', 'mappings:']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '[ ]\@!\p\([ ]\@!\p\)*:', 'implicit mappings:', 'mappings:', 's']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'm\k\+_\@=\%(_\@!\k\)\@<=\k\+e', 'mx__xe', 'mx__xe']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%(\U\@<=S\k*\|S\l\)R', 'SuR', 'SuR']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" Combining different tests and features [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '[[:alpha:]]\{-2,6}', '787abcdiuhsasiuhb4', 'ab']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '', 'abcd', '']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\v(())', 'any possible text', '']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\v%(ab(xyz)c)', ' abxyzc ', 'abxyzc', 'xyz']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\v(test|)empty', 'tesempty', 'empty', '']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\v(a|aa)(a|aa)', 'aaa', 'aa', 'a', 'a']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" \%u and friends [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%d32', 'yes no', ' ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%o40', 'yes no', ' ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%x20', 'yes no', ' ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%u0020', 'yes no', ' ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%U00000020', 'yes no', ' ']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%d0', "yes\x0ano", "\x0a"]) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h""""" \%[abc] [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'fobar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobar', 'foobar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'fooxx', 'foo']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobxx', 'foob']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobaxx', 'fooba']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobarxx', 'foobar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]x', 'foobxx', 'foobx']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'foo\%[bar]x', 'foobarxx', 'foobarx']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%[bar]x', 'barxx', 'barx']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%[bar]x', 'bxx', 'bx']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%[bar]x', 'xxx', 'x']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'b\%[[ao]r]', 'bar bor', 'bar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'b\%[[]]r]', 'b]r bor', 'b]r']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '@\%[\w\-]*', '[@pandoc]', '@pandoc']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" Alternatives, must use first longest match [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'goo\|go', 'google', 'goo']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\', 'foobar']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" complicated look-behind match [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(r\@<=\|\w\@ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(a*\)\@>a', 'aaaa']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(.\{-}\)\(\)\@>$', 'abc', 'abc', 'abc', '']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" TODO: BT engine does not restore submatch after failure [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa']) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" "\_" prepended negated collection matches EOL [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\_[^8-9]\+', "asfi\n9888", "asfi\n"]) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\_[^a]\+', "asfi\n9888", "sfi\n9888"]) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" Requiring lots of states. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}', " 12345678- 1234-1234-1234-123456789012 ", "12345678-1234-1234-1234-123456789012", "1234-"]) [?25l:" Check for detecting error[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" Skip adding state twice [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=', "#if FOO", "#if", ' F OO']) [?25l:" Check for detecting error[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h""" Test \%V atom [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\%>70vGesamt', 'Jean-Michel Charlier & Victor Hubinon\Gesamtausgabe [S alleck] Buck Danny {Jean-Michel Charlier & Victor Hubinon}\Gesamtausgabe', 'Gesamt']) [?25l:" Check for detecting error[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" Run the tests [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfor t in tl [?25l :[?2004h [?12l[?25h: let re = t[0] [?25l:[?2004h [?12l[?25h: let pat = t[1] [?25l:[?2004h [?12l[?25h: let text = t[2] [?25l:[?2004h [?12l[?25h: let matchidx = 3 [?25l:[?2004h [?12l[?25h: for engine in [0, 1, 2] [?25l:[?2004h [?12l[?25h: if engine == 2 && re == 0 || engine == 1 && re == 1 [?25l:[?2004h [?12l[?25h: continue [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: let ®expengine = engine [?25l:[?2004h [?12l[?25h: try [?25l:[?2004h [?12l[?25h: let l = matchlist(text, pat) [?25l:[?2004h [?12l[?25h: catch [?25l:[?2004h [?12l[?25h: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"' [?25l:[?2004h [?12l[?25h: endtry [?25l:[?2004h [?12l[?25h:" check the match itself [?25l:[?2004h [?12l[?25h: if len(l) == 0 && len(t) > matchidx [?25l:[?2004h [?12l[?25h: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"' [?25l:[?2004h [?12l[?25h: elseif len(l) > 0 && len(t) == matchidx [?25l:[?2004h [?12l[?25h: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match' [?25l:[?2004h [?12l[?25h: elseif len(t) > matchidx && l[0] != t[matchidx] [?25l:[?2004h [?12l[?25h: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"' [?25l:[?2004h [?12l[?25h: else [?25l:[?2004h [?12l[?25h: $put ='OK ' . engine . ' - ' . pat [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: if len(l) > 0 [?25l:[?2004h [?12l[?25h:" check all the nine submatches [?25l:[?2004h [?12l[?25h: for i in range(1, 9) [?25l:[?2004h[?12l[?25h: if len(t) <= matchidx + i [?25l:[?2004h[?12l[?25h: let e = '' [?25l:[?2004h[?12l[?25h: else [?25l:[?2004h[?12l[?25h: let e = t[matchidx + i] [?25l:[?2004h[?12l[?25h: endif [?25l:[?2004h[?12l[?25h: if l[i] != e [?25l:[?2004h[?12l[?25h: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"' [?25l:[?2004h[?12l[?25h: endif [?25l:[?2004h[?12l[?25h: endfor [?25l:[?2004h [?12l[?25h: unlet i [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: endfor [?25l:[?2004h [?12l[?25h:endfor [?25lOK 1 - \(a*\)\@>a OK 2 - \(a*\)\@>a OK 0 - \(a*\)\@>b OK 1 - \(a*\)\@>b OK 2 - \(a*\)\@>b OK 0 - ^\(.\{-}b\)\@>. OK 1 - ^\(.\{-}b\)\@>. OK 2 - ^\(.\{-}b\)\@>. OK 0 - \(.\{-}\)\(\)\@>$ OK 1 - \(.\{-}\)\(\)\@>$ OK 2 - \(.\{-}\)\(\)\@>$ OK 0 - \(a*\)\@>a\|a\+ OK 2 - \(a*\)\@>a\|a\+ OK 0 - \_[^8-9]\+ OK 1 - \_[^8-9]\+ OK 2 - \_[^8-9]\+ OK 0 - \_[^a]\+ OK 1 - \_[^a]\+ OK 2 - \_[^a]\+ OK 0 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12} OK 1 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12} OK 2 - [0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12} OK 0 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 1 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 2 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 0 - \%>70vGesamt OK 1 - \%>70vGesamt OK 2 - \%>70vGesamt [?12l[?25h[?25l :[?2004h[?12l[?25hunlet t tl e l [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""""" multi-line tests """""""""""""""""""" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet tl = [] [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" back references [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '^.\(.\).\_..\1.', ['aaa', 'aaa', 'b'], ['XX', 'b']]) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\v.*\/(.*)\n.*\/\1$', ['./Dir1/Dir2/zyxwvuts.txt', './Dir1/Dir2/abcdef gh.bat', '', './Dir1/Dir2/file1.txt', './OtherDir1/OtherDir2/file1.txt'], ['./Dir1/Dir2/zy xwvuts.txt', './Dir1/Dir2/abcdefgh.bat', '', 'XX']]) [?25lOK 1 - \(a*\)\@>a OK 2 - \(a*\)\@>a[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" line breaks [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\S.*\nx', ['abc', 'def', 'ghi', 'xjk', 'lmn'], ['abc', 'def', 'XXjk', 'lmn']]) [?25lOK 1 - \(a*\)\@>a[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check that \_[0-9] matching EOL does not break a following \> [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\ (25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>', ['', 'localnet/192.168.0.1', ' '], ['', 'localnet/XX', '']]) [?25lOK 1 - \(a*\)\@>a OK 2 - \(a*\)\@>a[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check a pattern with a line break and ^ and $ [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']]) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(tl, [2, '\(^.\+\n\)\1', [' dog', ' dog', 'asdf'], ['XXasdf']]) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h"""" Run the multi-line tests [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put ='multi-line tests' [?25l multi-line tests[?12l[?25h[?25l :[?2004h[?12l[?25hfor t in tl [?25l :[?2004h [?12l[?25h: let re = t[0] [?25l:[?2004h [?12l[?25h: let pat = t[1] [?25l:[?2004h [?12l[?25h: let before = t[2] [?25l:[?2004h [?12l[?25h: let after = t[3] [?25l:[?2004h [?12l[?25h: for engine in [0, 1, 2] [?25l:[?2004h [?12l[?25h: if engine == 2 && re == 0 || engine == 1 && re ==1 [?25l:[?2004h [?12l[?25h: continue [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: let ®expengine = engine [?25l:[?2004h [?12l[?25h: new [?25l:[?2004h [?12l[?25h: call setline(1, before) [?25l:[?2004h [?12l[?25h: exe '%s/' . pat . '/XX/' [?25l:[?2004h [?12l[?25h: let result = getline(1, '$') [?25l:[?2004h [?12l[?25h: q! [?25l:[?2004h [?12l[?25h: if result != after [?25l:[?2004h [?12l[?25h: $put ='ERROR: pat: \"' . pat . '\", text: \"' . string(before) . '\", expec ted: \"' . string(after) . '\", got: \"' . string(result) . '\"' [?25l:[?2004h [?12l[?25h: else [?25l:[?2004h [?12l[?25h: $put ='OK ' . engine . ' - ' . pat [?25l:[?2004h [?12l[?25h: endif [?25l:[?2004h [?12l[?25h: endfor [?25l:[?2004h [?12l[?25h:endfor [?25lOK 0 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 1 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 2 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 0 - \%>70vGesamt OK 1 - \%>70vGesamt OK 2 - \%>70vGesamt multi-line tests OK 0 - ^.\(.\).\_..\1. OK 1 - ^.\(.\).\_..\1. OK 2 - ^.\(.\).\_..\1. OK 0 - \v.*\/(.*)\n.*\/\1$ OK 1 - \v.*\/(.*)\n.*\/\1$ OK 2 - \v.*\/(.*)\n.*\/\1$ OK 0 - \S.*\nx OK 1 - \S.*\nx OK 2 - \S.*\nx OK 0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 1 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 2 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 0 - a\n^b$\n^c1 - a\n^b$\n^c2 - a\n^b$\n^c0 - \(^.\+\n\)\1 OK 1 - \(^.\+\n\)\1 OK 2 - \(^.\+\n\)\1[?12l[?25h[?25l :[?2004h[?12l[?25hunlet t tl [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check that using a pattern on two lines doesn't get messed up by using [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" matchstr() with \ze in between. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset re=0 [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^Substitute here [?25lsearch hit BOTTOM, continuing at TOP:for pat in [' \ze*', ' \zs*'] : try : let l = matchlist('x x', pat) : $put ='E888 NOT detected for ' . pat : catch : $put ='E888 detected for ' . pat : endtry :endfor :" :""""" Write the results """"""""""""" :/\%#=1^Results/,$wq! test.out ENDTEST Substitute here: Ta 5 Ac 7 Behind: asdfasdTa 5 Ac 7 [?12l[?25h[?25l/[?2004h[?12l[?25h^Substitute here [?25lsearch hit BOTTOM, continuing at TOP[?12l[?25h[?25l:[?2004h[?12l[?25h.+1,.+2yank [?25l[?12l[?25h[?25lOK 0 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 1 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 2 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 0 - \%>70vGesamt OK 1 - \%>70vGesamt OK 2 - \%>70vGesamt multi-line tests OK 0 - ^.\(.\).\_..\1. OK 1 - ^.\(.\).\_..\1. OK 2 - ^.\(.\).\_..\1. OK 0 - \v.*\/(.*)\n.*\/\1$ OK 1 - \v.*\/(.*)\n.*\/\1$ OK 2 - \v.*\/(.*)\n.*\/\1$ OK 0 - \S.*\nx OK 1 - \S.*\nx OK 2 - \S.*\nx OK 0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 1 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 2 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 0 - a\n^b$\n^c OK 1 - a\n^b$\n^c OK 2 - a\n^b$\n^c OK 0 - \(^.\+\n\)\1 OK 1 - \(^.\+\n\)\1 OK 2 - \(^.\+\n\)\1 [?12l[?25h[?2004l[?2004h[?25l [?12l[?25h[?25l Ta 5 [?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check a pattern with a look beind crossing a line boundary [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^Behind: [?25lsearch hit BOTTOM, continuing at TOP: catch : $put ='E888 detected for ' . pat : endtry :endfor :" :""""" Write the results """"""""""""" :/\%#=1^Results/,$wq! test.out ENDTEST Substitute here: Ta 5 Ac 7 Behind: asdfasd70vGesamt OK 1 - \%>70vGesamt OK 2 - \%>70vGesamt multi-line tests OK 0 - ^.\(.\).\_..\1. OK 1 - ^.\(.\).\_..\1. OK 2 - ^.\(.\).\_..\1. OK 0 - \v.*\/(.*)\n.*\/\1$ OK 1 - \v.*\/(.*)\n.*\/\1$ OK 2 - \v.*\/(.*)\n.*\/\1$ OK 0 - \S.*\nx OK 1 - \S.*\nx OK 2 - \S.*\nx OK 0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 1 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 2 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 0 - a\n^b$\n^c OK 1 - a\n^b$\n^c OK 2 - a\n^b$\n^c OK 0 - \(^.\+\n\)\1 OK 1 - \(^.\+\n\)\1 OK 2 - \(^.\+\n\)\1 Ta 5 Ac 7 [?12l[?25h[?2004l[?2004h[?25l [?12l[?25h[?25l xxstart3 [?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check matching Visual area [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^Visual: [?25lsearch hit BOTTOM, continuing at TOPSubstitute here: Ta 5 Ac 7 Behind: asdfasd[?12l[?25hs/\%Ve/E/g [?25l3 substitutions on 1 linexE thE thE [?12l[?25h [?25landaxand andaxand [?12l[?25h[?25l:[?2004h'<,'>[?12l[?25hs/\%Va/A/g [?25l6 substitutions on 1 lineAndAxAnd AndAxAnd[?12l[?25h ooo[?25l[?12l[?25h[?25lxofor foro[?12l[?25h[?25lx oooxofor foro[?12l[?25h[?25l:[?2004h'<,'>[?12l[?25hs/\%Vo/O/g [?25l8 substitutions on 2 linesxOfOr fOrOx oooxOfOr fOrO [?12l[?25h[?25l:[?2004h[?12l[?25h/^Visual/+1,/^Visual/+4yank [?25lsearch hit BOTTOM, continuing at TOP 4 lines yanked[?12l[?25h[?25lOK 2 - \%>70vGesamt multi-line tests OK 0 - ^.\(.\).\_..\1. OK 1 - ^.\(.\).\_..\1. OK 2 - ^.\(.\).\_..\1. OK 0 - \v.*\/(.*)\n.*\/\1$ OK 1 - \v.*\/(.*)\n.*\/\1$ OK 2 - \v.*\/(.*)\n.*\/\1$ OK 0 - \S.*\nx OK 1 - \S.*\nx OK 2 - \S.*\nx OK 0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 1 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 2 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 0 - a\n^b$\n^c OK 1 - a\n^b$\n^c OK 2 - a\n^b$\n^c OK 0 - \(^.\+\n\)\1 OK 1 - \(^.\+\n\)\1 OK 2 - \(^.\+\n\)\1 Ta 5 Ac 7 xxstart3 [?12l[?25h[?2004l[?2004h[?25l [?12l[?25h[?25l 4 more lines thexE thE thExethe4 more lines[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check matching marks [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^Marks: [?25lsearch hit BOTTOM, continuing at TOPasdfasd's.*\%<'e../here/ [?25lhereasdf[?12l[?25h asdf dfsa dfsadf[?25l:[?2004h[?12l[?25h.-4,.+6s/.\%>'s\_.*\%<'e../again/ [?25l asdfagainasdfOK 0 - bc\{-}[?12l[?25h[?25l:[?2004h[?12l[?25h/^Marks:/+1,/^Marks:/+3yank [?25lsearch hit BOTTOM, continuing at TOP 3 lines yanked[?12l[?25h[?25lOK 0 - \v.*\/(.*)\n.*\/\1$ OK 1 - \v.*\/(.*)\n.*\/\1$ OK 2 - \v.*\/(.*)\n.*\/\1$ OK 0 - \S.*\nx OK 1 - \S.*\nx OK 2 - \S.*\nx OK 0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 1 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 2 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 0 - a\n^b$\n^c OK 1 - a\n^b$\n^c OK 2 - a\n^b$\n^c OK 0 - \(^.\+\n\)\1 OK 1 - \(^.\+\n\)\1 OK 2 - \(^.\+\n\)\1 Ta 5 Ac 7 xxstart3 thexE thE thExethe AndAxAnd AndAxAnd oooxOfOr fOrOxooo oooxOfOr fOrOxooo [?12l[?25h[?2004l[?2004h[?25l [?12l[?25h[?25l 3 more lines asdfhereasdf3 more lines[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check patterns matching cursor position. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfunc! Postest() [?25l :[?2004h [?12l[?25h new [?25l:[?2004h [?12l[?25h call setline(1, ['ffooooo', 'boboooo', 'zoooooo', 'koooooo', 'moooooo', "\t\t\tfoo", 'abababababababfoo', 'bababababababafoo', '********_', ' xxxxxxxxxxxx xxxx xxxxx x xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxx x xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxx xxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxx xxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx']) [?25l:[?2004h [?12l[?25h call setpos('.', [0, 1, 0, 0]) [?25l:[?2004h [?12l[?25h s/\%>3c.//g [?25l:[?2004h [?12l[?25h call setpos('.', [0, 2, 4, 0]) [?25l:[?2004h [?12l[?25h s/\%#.*$//g [?25l:[?2004h [?12l[?25h call setpos('.', [0, 3, 0, 0]) [?25l:[?2004h [?12l[?25h s/\%<3c./_/g [?25l:[?2004h [?12l[?25h %s/\%4l\%>5c./_/g [?25l:[?2004h [?12l[?25h %s/\%6l\%>25v./_/g [?25l:[?2004h [?12l[?25h %s/\%>6l\%3c./!/g [?25l:[?2004h [?12l[?25h %s/\%>7l\%12c./?/g [?25l:[?2004h [?12l[?25h %s/\%>7l\%<9l\%>5v\%<8v./#/g [?25l:[?2004h [?12l[?25h $s/\%(|\u.*\)\@<=[^|\t]\+$//ge [?25l:[?2004h [?12l[?25h 1,$yank [?25l:[?2004h [?12l[?25h quit! [?25l:[?2004h [?12l[?25hendfunc [?25lOK 2 - \v.*\/(.*)\n.*\/\1$ OK 0 - \S.*\nx OK 1 - \S.*\nx OK 2 - \S.*\nx OK 0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 1 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 2 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 0 - a\n^b$\n^c OK 1 - a\n^b$\n^c OK 2 - a\n^b$\n^c OK 0 - \(^.\+\n\)\1 OK 1 - \(^.\+\n\)\1 OK 2 - \(^.\+\n\)\1 Ta 5 Ac 7 xxstart3 thexE thE thExethe AndAxAnd AndAxAnd oooxOfOr fOrOxooo oooxOfOr fOrOxooo asdfhereasdf [?12l[?25h[?25l1 - \S.*\nx2 OK 0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|22\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\> OK 122\ OK 222\ OK 0 - a\n^b$\n^cOK 1 - a\n^b$\n^c2 OK 0 - \(^.\+\n\)\1 OK 1 - \(^.\+\n\)\1 OK 2Ta 5 Ac 7xxstart3thexE thE thExethe AndAxAnd AndAxAnd oooxOfOr fOrOxooooooxOfOr fOrOxoooasdfhereasdfasdfagainasdf[?12l[?25h[?2004l[?2004h[?25l -0-[?12l[?25h[?25l :[?2004h[?12l[?25hset re=0 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall Postest() [?25l4 substitutions on 4 lines 10 lines yanked Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hput [?25l10 more lines Press ENTER or type command to continue[?12l[?25h[?25lxxstart3 thexE thE thExetheAndAxAnd AndAxAndoooxOfOr fOrOxooooooxOfOr fOrOxoooasdfhereasdfasdfagainasdf-0-ffobob __oooookoooo__moooooo f__ ab!babababababfoo ba!ab##abab?bafoo**!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?12l[?25h[?2004l[?2004h[?25l -1-[?12l[?25h[?25l :[?2004h[?12l[?25hset re=1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall Postest() [?25l4 substitutions on 4 lines 10 lines yanked Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hput [?25l10 more lines Press ENTER or type command to continue[?12l[?25h[?25lf__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -1- ffo bob__ooooo koooo__ moooooo f__ ab!bababababab ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxx xxxxx  xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxxxx xx x  xxxxxxxxx  xxxx x xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxx xxxxxxx xxxxxxx  xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx  xxx xxxx xxxx xx xxxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?12l[?25h[?2004l[?2004h[?25l -2-[?12l[?25h[?25l :[?2004h[?12l[?25hset re=2 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall Postest() [?25l4 substitutions on 4 lines 10 lines yanked Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25hput [?25l10 more lines Press ENTER or type command to continue[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25lf__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxx xxxxx  xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxxxx xx x  xxxxxxxxx  xxxx x xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxx xxxxxxx xxxxxxx  xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx  xxx xxxx xxxx xx xxxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -2- ffo bob__ooooo koooo__ moooooo f__ ab!bababababab ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxx xxxxx  xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxxxx xx x  xxxxxxxxx  xxxx x xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxx xxxxxxx xxxxxxx  xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx  xxx xxxx xxxx xx xxxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?12l[?25h[?25l:[?2004h[?12l[?25h" start and end of buffer [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h\%^ [?25lsearch hit BOTTOM, continuing at TOPTest for regexp patterns without multi-byte support. See test95 for multi-byte tests. A pattern that gives the expected result produces OK, so that we know it was actually tried. STARTTEST :so small.vim :" tl is a List of Lists with: :" regexp engine :" regexp pattern :" text to test the pattern on :" expected match (optional) :" expected submatch 1 (optional) :" expected submatch 2 (optional) :" etc. :" When there is no match use only the first two items. :let tl = [] :" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :"""" Previously written tests """""""""""""""""""""""""""""""" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :" :call add(tl, [2, 'ab', 'aab', 'ab']) :call add(tl, [2, 'b', 'abcdef', 'b']) :call add(tl, [2, 'bc*', 'abccccdef', 'bcccc']) :call add(tl, [2, 'bc\{-}', 'abccccdef', 'b']) :call add(tl, [2, 'bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd']) search hit BOTTOM, continuing at TOP[?12l[?25h[?25lf__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -2- ffo bob __ooooo koooo__ moooooof__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?12l[?25h[?2004l[?2004h[?25l [?12l[?25h[?25lTest[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25lOK 0 - \v(a*)+ OK 1 - \v(a*)+ OK 2 - \v(a*)+ OK 0 - \v((ab)+)+ OK 1 - \v((ab)+)+ OK 2 - \v((ab)+)+ OK 0 - \v(((ab)+)+)+ OK 1 - \v(((ab)+)+)+ OK 2 - \v(((ab)+)+)+ OK 0 - \v(((ab)+)+)+ OK 1 - \v(((ab)+)+)+ OK 2 - \v(((ab)+)+)+ OK 0 - \v(a{0,2})+ OK 1 - \v(a{0,2})+ OK 2 - \v(a{0,2})+ OK 0 - \v(a*)+ OK 1 - \v(a*)+ OK 2 - \v(a*)+ OK 0 - \v((a*)+)+ OK 1 - \v((a*)+)+ OK 2 - \v((a*)+)+ OK 0 - \v((ab)*)+ OK 1 - \v((ab)*)+ OK 2 - \v((ab)*)+ OK 0 - \va{1,3} OK 1 - \va{1,3} OK 2 - \va{1,3} OK 0 - \va{2,3}[?12l[?25h[?25l/[?2004h[?12l[?25h\%^.. [?25lsearch hit BOTTOM, continuing at TOPTest for regexp patterns without multi-byte support. See test95 for multi-byte tests. A pattern that gives the expected result produces OK, so that we know it was actually tried. STARTTEST :so small.vim :" tl is a List of Lists with: :" regexp engine :" regexp pattern :" text to test the pattern on :" expected match (optional) :" expected submatch 1 (optional) :" expected submatch 2 (optional) :" etc. :" When there is no match use only the first two items. :let tl = [] :" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :"""" Previously written tests """""""""""""""""""""""""""""""" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :" :call add(tl, [2, 'ab', 'aab', 'ab']) :call add(tl, [2, 'b', 'abcdef', 'b']) :call add(tl, [2, 'bc*', 'abccccdef', 'bcccc']) :call add(tl, [2, 'bc\{-}', 'abccccdef', 'b']) :call add(tl, [2, 'bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd']) search hit BOTTOM, continuing at TOP[?12l[?25h[?25lab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -2- ffo bob __ooooo koooo__ moooooof__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx Test [?12l[?25h[?2004l[?2004h[?25l [?12l[?25h[?25lTest[?12l[?25h[?2004l[?2004h[?25lt END[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25lOK 1 - \v(a*)+ OK 2 - \v(a*)+ OK 0 - \v((ab)+)+ OK 1 - \v((ab)+)+ OK 2 - \v((ab)+)+ OK 0 - \v(((ab)+)+)+ OK 1 - \v(((ab)+)+)+ OK 2 - \v(((ab)+)+)+ OK 0 - \v(((ab)+)+)+ OK 1 - \v(((ab)+)+)+ OK 2 - \v(((ab)+)+)+ OK 0 - \v(a{0,2})+ OK 1 - \v(a{0,2})+ OK 2 - \v(a{0,2})+ OK 0 - \v(a*)+ OK 1 - \v(a*)+ OK 2 - \v(a*)+ OK 0 - \v((a*)+)+ OK 1 - \v((a*)+)+ OK 2 - \v((a*)+)+ OK 0 - \v((ab)*)+ OK 1 - \v((ab)*)+ OK 2 - \v((ab)*)+ OK 0 - \va{1,3} OK 1 - \va{1,3} OK 2 - \va{1,3} OK 0 - \va{2,3} OK 1 - \va{2,3}[?12l[?25h[?25l/[?2004h[?12l[?25h\%$ [?25lba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -2- ffo bob __ooooo koooo__ moooooof__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx Test Test END[?12l[?25h[?25lSTARTTEST :so small.vim :" tl is a List of Lists with: :" regexp engine :" regexp pattern :" text to test the pattern on :" expected match (optional) :" expected submatch 1 (optional) :" expected submatch 2 (optional) :" etc. :" When there is no match use only the first two items. :let tl = [] :" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :"""" Previously written tests """""""""""""""""""""""""""""""" :"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" :" :call add(tl, [2, 'ab', 'aab', 'ab']) :call add(tl, [2, 'b', 'abcdef', 'b']) :call add(tl, [2, 'bc*', 'abccccdef', 'bcccc']) :call add(tl, [2, 'bc\{-}', 'abccccdef', 'b']) :call add(tl, [2, 'bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd']) :call add(tl, [2, 'bc*', 'abbdef', 'b']) :call add(tl, [2, 'c*', 'ccc', 'ccc']) :call add(tl, [2, 'bc*', 'abdef', 'b']) :call add(tl, [2, 'c*', 'abdef', '']) :call add(tl, [2, 'bc\+', 'abccccdef', 'bcccc']) :call add(tl, [2, 'bc\+', 'abdef']) "no match[?12l[?25h[?25l/[?2004h[?12l[?25h..\%$ [?25lba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx -2- ffo bob __ooooo koooo__ moooooof__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx Test Test END[?12l[?25h [?2004l[?2004h[?25l [?12l[?25h[?25lEN[?12l[?25h[?2004l[?2004h[?25l [?12l[?25h[?25lE[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Check for detecting error [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset regexpengine=2 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfor pat in [' \ze*', ' \zs*'] [?25l :[?2004h [?12l[?25h: try [?25l:[?2004h [?12l[?25h: let l = matchlist('x x', pat) [?25l:[?2004h [?12l[?25h: $put ='E888 NOT detected for ' . pat [?25l:[?2004h [?12l[?25h: catch [?25l:[?2004h [?12l[?25h: $put ='E888 detected for ' . pat [?25l:[?2004h [?12l[?25h: endtry [?25l:[?2004h [?12l[?25h:endfor [?25l-2- ffo bob __ooooo koooo__ moooooof__ ab!babababababfoo ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxx xxxxx xxxxxxx xx xxxx xxxxxxxx xxxx xxxxxxxxxxx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxx xxxx xxx xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxxx xxxxxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx TestTest ENDENEE888 detected for \ze*E888 detected for \zs*~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h""""" Write the results """"""""""""" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h/\%#=1^Results/,$wq! test.out [?25lsearch hit BOTTOM, continuing at TOP[?2004l "test.out" [New File] 1107 lines, 22167 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test64 = test61; then \ # if diff test.out test64.ok; \ # then echo flaky test ok first time; \ # else rm -rf test64.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test64.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test65.failed test.ok test.out X* viminfo cp test65.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test65.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test65.in" 95 lines, 2153 charactersTest for floating point and logical operators. STARTTEST :so small.vim :if !has("float") : e! test.ok : wq! test.out :endif :" :$put =printf('%f', 123.456) :$put =printf('%e', 123.456) :$put =printf('%g', 123.456) :" check we don't crash on division by zero :echo 1.0 / 0.0 :$put ='+=' :let v = 1.234 :let v += 6.543 :$put =printf('%g', v) :let v = 1.234 :let v += 5 :$put =printf('%g', v) :let a = 5 :let a += 3.333 :$put =string(a) :$put ='==' :let v = 1.234 :$put =v == 1.234 :$put =v == 1.2341[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for floating point and logical operators.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 89 lines, 2067 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:$put ='trunc' :$put =printf('%g', trunc(1.456)) :$put =printf('%g', trunc(-5.456)) :$put =printf('%g', trunc(4.000)) :$put ='float2nr' :$put =float2nr(123.456) :$put =float2nr(-123.456) :$put ='AND' :$put =and(127, 127) :$put =and(127, 16) :$put =and(127, 128) :$put ='OR' :$put =or(16, 7) :$put =or(8, 7) :$put =or(0, 123) :$put ='XOR' :$put =xor(127, 127) :$put =xor(127, 16) :$put =xor(127, 128) :$put ='invert' :$put =and(invert(127), 65535) :$put =and(invert(16), 65535) :$put =and(invert(128), 65535) :$put =invert(1.0) :/^Results/,$wq! test.out ENDTEST Results of test65:[?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hif !has("float") [?25l :[?2004h [?12l[?25h: e! test.ok [?25l:[?2004h [?12l[?25h: wq! test.out [?25l:[?2004h [?12l[?25h:endif [?25l:$put ='trunc' :$put =printf('%g', trunc(1.456)) :$put =printf('%g', trunc(-5.456))[?12l[?25h[?25l :[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put =printf('%f', 123.456) [?25l 123.456000[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%e', 123.456) [?25l 1.234560e+02[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', 123.456) [?25l 123.456[?12l[?25h[?25l :[?2004h[?12l[?25h" check we don't crash on division by zero [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hecho 1.0 / 0.0 [?25linf[?12l[?25h[?25l:[?2004h[?12l[?25h$put ='+=' [?25l +=[?12l[?25h[?25l :[?2004h[?12l[?25hlet v = 1.234 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet v += 6.543 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put =printf('%g', v) [?25l 7.777[?12l[?25h[?25l :[?2004h[?12l[?25hlet v = 1.234 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet v += 5 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put =printf('%g', v) [?25l 6.234[?12l[?25h[?25l :[?2004h[?12l[?25hlet a = 5 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet a += 3.333 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put =string(a) [?25l 8.333[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='==' [?25l ==[?12l[?25h[?25l :[?2004h[?12l[?25hlet v = 1.234 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h$put =v == 1.234 [?25l 1[?12l[?25h[?25l :[?2004h[?12l[?25h$put =v == 1.2341 [?25l 0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='add-subtract' [?25l add-subtract[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', 4 + 1.234) [?25l 5.234[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', 1.234 - 8) [?25l -6.766[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='mult-div' [?25l mult-div[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', 4 * 1.234) [?25l 4.936[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', 4.0 / 1234) [?25l 0.003241[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='dict' [?25l dict[?12l[?25h[?25l :[?2004h[?12l[?25h$put =string({'x': 1.234, 'y': -2.0e20}) [?25l {'x': 1.234, 'y': -2.0e20}[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='list' [?25l list[?12l[?25h[?25l :[?2004h[?12l[?25h$put =string([-123.4, 2.0e-20]) [?25l [-123.4, 2.0e-20][?12l[?25h[?25l :[?2004h[?12l[?25h$put ='abs' [?25l abs[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%d', abs(1456)) [?25l 1456[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%d', abs(-4)) [?25l 4[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%d', abs([1, 2, 3])) [?25lE745: Using a List as a Number[?2004l[?2004h -1[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', abs(14.56)) [?25l 14.56[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', abs(-54.32)) [?25l 54.32[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='ceil' [?25l ceil[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', ceil(1.456)) [?25l 2.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', ceil(-5.456)) [?25l -5.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', ceil(-4.000)) [?25l -4.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='floor' [?25l floor[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', floor(1.856)) [?25l 1.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', floor(-5.456)) [?25l -6.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', floor(4.0)) [?25l 4.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='log10' [?25l log10[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', log10(1000)) [?25l 3.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', log10(0.01000)) [?25l -2.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='pow' [?25l pow[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', pow(3, 3.0)) [?25l 27.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', pow(2, 16)) [?25l 65536.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='round' [?25l round[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', round(0.456)) [?25l 0.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', round(4.5)) [?25l 5.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', round(-4.50)) [?25l -5.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='sqrt' [?25l sqrt[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', sqrt(100)) [?25l 10.0[?12l[?25h[?25l :[?2004h[?12l[?25hecho sqrt(-4.01) [?25lnan[?12l[?25h[?25l:[?2004h[?12l[?25h$put ='str2float' [?25l str2float[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', str2float('1e40')) [?25l 1.0e40[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='trunc' [?25l trunc[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', trunc(1.456)) [?25l 1.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', trunc(-5.456)) [?25l -5.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =printf('%g', trunc(4.000)) [?25l 4.0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='float2nr' [?25l float2nr[?12l[?25h[?25l :[?2004h[?12l[?25h$put =float2nr(123.456) [?25l 123[?12l[?25h[?25l :[?2004h[?12l[?25h$put =float2nr(-123.456) [?25l -123[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='AND' [?25l AND[?12l[?25h[?25l :[?2004h[?12l[?25h$put =and(127, 127) [?25l 127[?12l[?25h[?25l :[?2004h[?12l[?25h$put =and(127, 16) [?25l 16[?12l[?25h[?25l :[?2004h[?12l[?25h$put =and(127, 128) [?25l 0[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='OR' [?25l OR[?12l[?25h[?25l :[?2004h[?12l[?25h$put =or(16, 7) [?25l 23[?12l[?25h[?25l :[?2004h[?12l[?25h$put =or(8, 7) [?25l 15[?12l[?25h[?25l :[?2004h[?12l[?25h$put =or(0, 123) [?25l 123[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='XOR' [?25l XOR[?12l[?25h[?25l :[?2004h[?12l[?25h$put =xor(127, 127) [?25l 0[?12l[?25h[?25l :[?2004h[?12l[?25h$put =xor(127, 16) [?25l 111[?12l[?25h[?25l :[?2004h[?12l[?25h$put =xor(127, 128) [?25l 255[?12l[?25h[?25l :[?2004h[?12l[?25h$put ='invert' [?25l invert[?12l[?25h[?25l :[?2004h[?12l[?25h$put =and(invert(127), 65535) [?25l 65408[?12l[?25h[?25l :[?2004h[?12l[?25h$put =and(invert(16), 65535) [?25l 65519[?12l[?25h[?25l :[?2004h[?12l[?25h$put =and(invert(128), 65535) [?25l 65407[?12l[?25h[?25l :[?2004h[?12l[?25h$put =invert(1.0) [?25lE805: Using a Float as a Number[?2004l[?2004h 0[?12l[?25h[?25l :[?2004h[?12l[?25h/^Results/,$wq! test.out [?25lsearch hit BOTTOM, continuing at TOP[?2004l "test.out" [New File] 73 lines, 430 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test65 = test61; then \ # if diff test.out test65.ok; \ # then echo flaky test ok first time; \ # else rm -rf test65.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test65.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test66.failed test.ok test.out X* viminfo cp test66.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test66.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test66.in" 33 lines, 509 charactersTest for visual block shift and tab characters. STARTTEST :so small.vim /^one fe^V4jR^[ugvr1:'<,'>w! test.out /^abcdefgh ^V4jI ^[j<<11|D 7|a^[ 7|a^[ 7|a^[4k13|^V4j< :$-5,$w >> test.out :$-4,$s/\s\+//g ^V4kI ^[j<< 7|a^[ 7|a^[ 7|a^[4k13|^V4j3< :$-4,$w >> test.out :qa! ENDTEST one two three one two three one two three one two three one two three[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25l[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 16 lines, 234 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^one [?25l[?12l[?25hon[?25l[?12l[?25h[?25le one one one on[?12l[?25h[?25l 4 fewer lines[?2004l[?2004habcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz[?12l[?25h[?25lmore lines; before #1 0 seconds agoone two three one two three one two threeone two threeone two three[?12l[?25h[?25le one one one on[?12l[?25h[?25l1 on1 on1 on1 on1[?12l[?25h[?25l:[?2004h[?12l[?25h'<,'>w! test.out [?25l"test.out" [New File] 5 lines, 70 characters written[?12l[?25h[?25l/[?2004h[?12l[?25h^abcdefgh [?25l abcdefghijklmnopqrstuvwxyz[?12l[?25h[?25l[?12l[?25h[?25la abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz [?12l[?25h[?25la a a a[?2004l[?2004h abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz[?12l[?25h [?25labcdefghijklmnopqrstuvwxyz[?12l[?25h[?25l[?12l[?25h[?2004l[?2004h[?25lc defghijklmnopqrstuvwxyz[?12l[?25h[?2004l[?2004h[?25lc defghijklmnopqrstuvwxyz[?12l[?25h[?2004l[?2004h[?25lc defghijklmnopqrstuvwxyz[?12l[?25h[?25l[?12l[?25h[?25li  [?12l[?25h[?25l 5 lines > test.out [?25l"test.out"6 lines, 151 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25h$-4,$s/\s\+//g [?25l7 substitutions on 4 linesabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz[?12l[?25h[?25l[?12l[?25h[?25la a a a[?12l[?25h[?25l a a a a[?2004l[?2004h abcdefghijklmnopqrstuvwxyz abcdefghij abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz[?12l[?25h [?25labcdefghij[?12l[?25h ab[?2004l[?2004h[?25lc defghijklmnopqrstuvwxyz[?12l[?25h[?2004l[?2004h[?25lc defghijklmnopqrstuvwxyz[?12l[?25h[?2004l[?2004h[?25lc defghijklmnopqrstuvwxyz[?12l[?25h[?25l[?12l[?25h[?25li  [?12l[?25h[?25l 5 lines > test.out [?25l"test.out"5 lines, 147 characters appended[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test66 = test61; then \ # if diff test.out test66.ok; \ # then echo flaky test ok first time; \ # else rm -rf test66.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test66.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test67.failed test.ok test.out X* viminfo cp test67.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test67.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test67.in" 33 lines, 1110 charactersTest that groups and patterns are tested correctly when calling exists() for autocommands. STARTTEST :so small.vim :let results=[] :augroup auexists :augroup END :call add(results, "##BufEnter: " . exists("##BufEnter")) :call add(results, "#BufEnter: " . exists("#BufEnter")) :au BufEnter * let g:entered=1 :call add(results, "#BufEnter: " . exists("#BufEnter")) :call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) :augroup auexists :au BufEnter * let g:entered=1 :augroup END :call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) :call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) :au BufEnter *.test let g:entered=1 :call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) :edit testfile.test :call add(results, "#BufEnter#: " . exists("#BufEnter#")) :au BufEnter let g:entered=1 :call add(results, "#BufEnter#: " . exists("#BufEnter#")) :edit testfile2.test :call add(results, "#BufEnter#: " . exists("#BufEnter#")) :e! test.out :call append(0, results)[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest that groups and patterns are tested correctly when calling exists() for[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 27 lines, 999 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:$d :w :qa! ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet results=[] [?25l[?12l[?25h[?25l:[?2004h[?12l[?25haugroup auexists [?25l[?12l[?25h[?25l:[?2004h[?12l[?25haugroup END [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "##BufEnter: " . exists("##BufEnter")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#BufEnter: " . exists("#BufEnter")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufEnter * let g:entered=1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#BufEnter: " . exists("#BufEnter")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25haugroup auexists [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufEnter * let g:entered=1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25haugroup END [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufEnter *.test let g:entered=1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hedit testfile.test [?25l"testfile.test" [New File]~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#BufEnter#: " . exists("#BufEnter#")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hau BufEnter let g:entered=1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#BufEnter#: " . exists("#BufEnter#")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hedit testfile2.test [?25l"testfile2.test" [New File][?12l[?25h[?25l:[?2004h[?12l[?25hcall add(results, "#BufEnter#: " . exists("#BufEnter#")) [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he! test.out [?25l"test.out" [New File][?12l[?25h[?25l:[?2004h[?12l[?25hcall append(0, results) [?25l##BufEnter: 1 #BufEnter: 0 #BufEnter: 1 #auexists#BufEnter: 0 #auexists#BufEnter: 1 #BufEnter#*.test: 0 #BufEnter#*.test: 1 #BufEnter#: 0 #BufEnter#: 1 #BufEnter#: 0[?12l[?25h[?25l:[?2004h[?12l[?25h$d [?25l~ [?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"test.out" [New File] 10 lines, 190 characters written[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test67 = test61; then \ # if diff test.out test67.ok; \ # then echo flaky test ok first time; \ # else rm -rf test67.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test67.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test68.failed test.ok test.out X* viminfo cp test68.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test68.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test68.in" 131 lines, 1004 charactersTest for text formatting. Results of test68: STARTTEST :so small.vim /^{/+1 :set noai tw=2 fo=t gRa b^[ ENDTEST { } STARTTEST /^{/+1 :set ai tw=2 fo=tw gqgqjjllab^[ ENDTEST { a b a }[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for text formatting.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 4 lines, 48 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset noai tw=2 fo=t [?25l[?12l[?25h[?2004l[?2004h[?25la b[?12l[?25h [?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 38 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset ai tw=2 fo=tw [?25l[?12l[?25h[?25lb[?12l[?25h a [?2004l[?2004h[?25l b[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 4 lines, 34 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=3 fo=t gqgqo a ^V^A^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ a ^A[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=3 fo=t [?25l[?12l[?25h[?25l ^A[?12l[?25h[?2004l[?2004h[?25la ^A [?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 58 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=2 fo=tcq1 comments=:# gqgqjgqgqo a b #a b^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ a b[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=2 fo=tcq1 comments=:# [?25l[?12l[?25h[?25l #a b[?12l[?25h[?2004l[?2004h[?25la b #a b[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 46 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=5 fo=tcn comments=:# A b^[jA b^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ 1 a[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=5 fo=tcn comments=:# [?25l[?12l[?25h[?2004l[?2004h[?25l b[?12l[?25h[?25l # 1 a[?12l[?25h[?2004l[?2004h[?25l # b[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+3 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 35 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=5 fo=t2a si i ^[A_^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+3 [?25l{ x a b[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=5 fo=t2a si [?25l[?12l[?25h[?2004l[?2004h[?25l b[?12l[?25h[?2004l[?2004h[?25l b_[?12l[?25h[?25l c[?12l[?25h[?25l /[?2004h^STARTTEST } STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 40 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=5 fo=qn comments=:# gwap ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ # 1 a b[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=5 fo=qn comments=:# [?25l[?12l[?25h[?25l[?12l[?25h[?25l # b[?12l[?25h[?25l /[?2004h^STARTTEST } STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 40 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=5 fo=q2 comments=:# gwap ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ # x[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=5 fo=q2 comments=:# [?25l[?12l[?25h[?25l# x a [?12l[?25h[?25l # b[?12l[?25h[?25l /[?2004h^STARTTEST } STARTTEST[?12l[?25h[?25l /^{/+2 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 26 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw& fo=a I^^^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+2 [?25l{ 1aa 2bb[?12l[?25h[?25l :[?2004h[?12l[?25hset tw& fo=a [?25l[?12l[?25h[?2004l[?2004h[?25l1aa ^^2bb }STARTTEST[?12l[?25h [?25l/[?2004h^STARTTEST [?12l[?25h[?25l /mno pqr/[?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 69 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:setl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/ A vwx yz^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25hmno pqr/ [?25l/* abc def ghi jkl * mno pqr stu[?12l[?25h[?25l :[?2004h[?12l[?25hsetl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/ [?25l[?12l[?25h[?2004l[?2004h[?25l * vwx yz[?12l[?25h[?25l */[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^#/ [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 47 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:setl tw=12 fo=tqnc comments=:# A foobar^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^#/ [?25l # 1 xxxxx[?12l[?25h[?25l :[?2004h[?12l[?25hsetl tw=12 fo=tqnc comments=:# [?25l[?12l[?25h[?2004l[?2004h[?25l # foobar[?12l[?25h[?25l [?12l[?25h[?25l /[?2004h^STARTTEST  STARTTEST[?12l[?25h[?25l :g/^STARTTEST/.,/^ENDTEST/d [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 56 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST[?12l[?25h[?25l :1;/^Results/,$wq! test.out[?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d [?25l63 fewer lines}{ # 1 a# b}{ # x a# b}{ 1aa ^^2bb }/* abc def ghi jkl * mno pqr stu * vwx yz */# 1 xxxxx # foobar[?12l[?25h[?25l:[?2004h[?12l[?25h1;/^Results/,$wq! test.out [?25l[?2004l"test.out" [New File] 77 lines, 281 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test68 = test61; then \ # if diff test.out test68.ok; \ # then echo flaky test ok first time; \ # else rm -rf test68.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test68.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test69.failed test.ok test.out X* viminfo cp test69.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test69.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test69.in" 192 lines, 2185 charactersTest for multi-byte text formatting. Also test, that 'mps' with multibyte chars works. And test "ra" on multi-byte characters. Also test byteidx() and byteidxcomp() STARTTEST :so mbyte.vim :set encoding=utf-8 ENDTEST Results of test69: STARTTEST /^{/+1 :set tw=2 fo=t gqgqjgqgqo XYZ abc XYZ^[ ENDTEST { XYZ abc XYZ } STARTTEST /^{/+1 :set tw=1 fo=tm[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTest for multi-byte text formatting.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 2 lines, 34 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso mbyte.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset encoding=utf-8 [?25lTest for multi-byte text formatting. Also test, that 'mps' with multibyte chars works. And test "ra" on multi-byte characters. Also test byteidx() and byteidxcomp() STARTTEST :so mbyte.vim :set encoding=utf-8 ENDTEST Results of test69: STARTTEST /^{/+1 :set tw=2 fo=t gqgqjgqgqo XYZ abc XYZ^[ ENDTEST { XYZ abc XYZ } STARTTEST /^{/+1 :set tw=1 fo=tm[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 58 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset tw=2 fo=t [?25l[?12l[?25h [?25lXYZ[?12l[?25h[?2004l[?25l}[?12l[?25h[?25lX[?12l[?25h[?25lï¼¹[?12l[?25h[?25lZ abc }[?12l[?25h[?25l X[?12l[?25h[?25lï¼¹[?12l[?25h[?2004h[?25lZ[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 8 lines, 80 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=1 fo=tm gqgqjgqgqjgqgqjgqgqjgqgqo X Xa X a XY X ï¼¹^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ X[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=1 fo=tm [?25l[?12l[?25h[?25l Xa[?12l[?25h[?25l a[?12l[?25h[?25l X a [?12l[?25h[?25l a[?12l[?25h[?25l XY [?12l[?25h[?25l ï¼¹ [?12l[?25h[?25l X ï¼¹ [?12l[?25h[?25l ï¼¹ [?12l[?25h[?2004l[?25l[?12l[?25h[?25l X [?12l[?25h[?25lX a [?12l[?25h[?25lX a [?12l[?25h[?25lX[?12l[?25h[?25lï¼¹ [?12l[?25h[?25lX [?12l[?25h[?2004h[?25l ï¼¹ [?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 13 lines, 140 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=2 fo=tm gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo X Xa X a XY X ï¼¹ aX abX abcX abX c abXY^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ X[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=2 fo=tm [?25l[?12l[?25h[?25l Xa[?12l[?25h[?25l a[?12l[?25h[?25l X a [?12l[?25h[?25l a[?12l[?25h[?25l XY [?12l[?25h[?25l ï¼¹ [?12l[?25h[?25l X ï¼¹ [?12l[?25h[?25l ï¼¹ [?12l[?25h[?25l aX [?12l[?25h[?25l X [?12l[?25h[?25l abX [?12l[?25h[?25l X [?12l[?25h[?25l abcX [?12l[?25h[?25l X [?12l[?25h[?25l abX c [?12l[?25h[?25lX c[?12l[?25h[?25l abXY [?12l[?25h[?25lX ï¼¹ [?12l[?25h[?2004l[?25l[?12l[?25h[?25l X [?12l[?25h[?25lX a [?12l[?25h[?25lX a [?12l[?25h[?25lX[?12l[?25h[?25lï¼¹ [?12l[?25h[?25lX [?12l[?25h[?25lï¼¹ a[?12l[?25h[?25lX ab[?12l[?25h[?25lX abc[?12l[?25h[?25lX ab[?12l[?25h[?25lX c ab[?12l[?25h[?25l X[?12l[?25h[?2004h[?25l ï¼¹ [?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 47 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set ai tw=2 fo=tm gqgqjgqgqo X Xa^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ X[?12l[?25h[?25l :[?2004h[?12l[?25hset ai tw=2 fo=tm [?25l[?12l[?25h [?25l Xa[?12l[?25h[?25l a[?12l[?25h[?2004l[?25l[?12l[?25h[?25l X [?12l[?25h[?2004h[?25l X a[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 53 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set noai tw=2 fo=tm gqgqjgqgqo X Xa^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ X[?12l[?25h[?25l :[?2004h[?12l[?25hset noai tw=2 fo=tm [?25l[?12l[?25h [?25l Xa[?12l[?25h[?25l a[?12l[?25h[?2004l[?25l[?12l[?25h[?25l X [?12l[?25h[?2004h[?25l X a[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 13 lines, 169 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=2 fo=cqm comments=n:X gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo X Xa Xaï¼¹ XY XYZ X ï¼¹ X YZ XX XXa XXY^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ X[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=2 fo=cqm comments=n:X [?25l[?12l[?25h[?25l Xa[?12l[?25h[?25l Xaï¼¹ [?12l[?25h[?25l XY [?12l[?25h[?25l XY [?12l[?25h[?25l XYZ [?12l[?25h[?25l XZ [?12l[?25h[?25l X ï¼¹ [?12l[?25h[?25l X YZ [?12l[?25h[?25l X Z [?12l[?25h[?25l XX [?12l[?25h[?25l XXa [?12l[?25h[?25l XXY [?12l[?25h[?2004l[?25l[?12l[?25h[?25l X [?12l[?25h[?25l Xa [?12l[?25h[?25lXa[?12l[?25h[?25lXY [?12l[?25h[?25lX[?12l[?25h[?25l ï¼¹ [?12l[?25h[?25lX[?12l[?25h[?25lï¼¹[?12l[?25h[?25lXZ [?12l[?25h[?25lX [?12l[?25h[?25l ï¼¹ [?12l[?25h[?25lX [?12l[?25h[?25lï¼¹[?12l[?25h[?25lX Z [?12l[?25h[?25lX[?12l[?25h[?25l X [?12l[?25h[?25lX[?12l[?25h[?25l Xa [?12l[?25h[?25lX[?12l[?25h[?25lX[?12l[?25h[?2004h[?25lï¼¹[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 30 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set tw=2 fo=tm RXa^[ ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{[?12l[?25h[?25l :[?2004h[?12l[?25hset tw=2 fo=tm [?25l[?12l[?25h[?2004l[?2004h[?25l X a[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^{/+1 [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 34 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:set mps+=^Vu2018:^Vu2019 d% ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^{/+1 [?25l{ ‘two three ’four[?12l[?25h[?25l :[?2004h[?12l[?25hset mps+=^‘:^’ [?25l[?12l[?25h[?25l four[?12l[?25h[?25l }[?12l[?25h[?25l /[?2004h^STARTTEST  STARTTEST[?12l[?25h[?25l /^ra test [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 16 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTESTjVjra ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^ra test [?25l ra test[?12l[?25h[?25l ï½bbï½ [?12l[?25h[?25lbbï½ [?12l[?25h[?25l ï½ ï½ï½b [?12l[?25h[?25laaaaaaa [?12l[?25h [?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l :set whichwrap+=h [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 4 lines, 43 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST/^x dh :set whichwrap-=h ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hset whichwrap+=h [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^x [?25láx[?12l[?25h[?25lx[?12l[?25h [?25l :[?2004h[?12l[?25hset whichwrap-=h [?25l[?12l[?25h[?25l/[?2004h^STARTTEST  STARTTEST[?12l[?25h[?25l :let a = '.é.' " one char of two bytes [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 9 lines, 548 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:let b = '.eÌ.' " normal e with composing char /^byteidx :put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)]) :put =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)]) /^byteidxcomp :put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)]) :let b = '.eÌ.' :put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)]) ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hlet a = '.é.' " one char of two bytes [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet b = '.eeÌ.' " normal e with composing char [?25l[?12l[?25h[?25l/[?2004h[?12l[?25h^byteidx [?25l byteidx[?12l[?25h[?25l :[?2004h[?12l[?25hput =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)]) [?25l [0, 1, 3, 4, -1][?12l[?25h[?25l :[?2004h[?12l[?25hput =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)]) [?25l [0, 1, 4, 5, -1][?12l[?25h[?25l /[?2004h[?12l[?25h^byteidxcomp [?25l byteidxcomp[?12l[?25h[?25l :[?2004h[?12l[?25hput =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)]) [?25lSTARTTEST :set whichwrap+=h /^xdh:set whichwrap-=h ENDTESTáxSTARTTEST :let a = '.é.' " one char of two bytesb = '.eÌ.' " normal e with composing char /^byteidx:put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)])bbbbb /^byteidxcomp:put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)]):let b = '.eÌ.'put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)])ENDTESTbyteidx [0, 1, 3, 4, -1]4, 5 byteidxcomp[0, 1, 3, 4, -1][?12l[?25h[?25l :[?2004h[?12l[?25hlet b = '.eeÌ.' [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hput =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)]) [?25l:set whichwrap+=h /^xdh:set whichwrap-=h ENDTESTáxSTARTTEST :let a = '.é.' " one char of two bytesb = '.eÌ.' " normal e with composing char /^byteidx:put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)])bbbbb /^byteidxcomp:put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)]):let b = '.eÌ.'put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)])ENDTESTbyteidx [0, 1, 3, 4, -1]4, 5 byteidxcomp[0, 1, 3, 4, -1]2, 4, 5, -1][?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l /^substitute [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 75 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST:let y = substitute('123', '\zs', 'a', 'g') | put =y ENDTEST[?12l[?25h[?25l [?12l[?25h[?25l :[?2004hso! Xdotest [?12l[?25h[?25l/[?2004h[?12l[?25h^substitute [?25l substitute[?12l[?25h[?25l :[?2004h[?12l[?25hlet y = substitute('123', '\zs', 'a', 'g') | put =y [?25l a1aï¼’a3a[?12l[?25h[?25l /[?2004h^STARTTEST STARTTEST[?12l[?25h[?25l :g/^STARTTEST/.,/^ENDTEST/d [?12l[?25h[?25l :[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 56 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l /ENDTEST[?12l[?25h[?25l :1;/^Results/,$wq! test.out[?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d [?25l104 fewer linesXa}{ four}ra test aaaaaaaáxbyteidx[0, 1, 3, 4, -1] [0, 1, 4, 5, -1]byteidxcomp [0, 1, 3, 4, -1] [0, 1, 2, 4, 5, -1]substitute a1aï¼’a3a[?12l[?25h[?25l:[?2004h[?12l[?25h1;/^Results/,$wq! test.out [?25l[?2004l"test.out" [New File] 166 lines, 730 characters written [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test69 = test61; then \ # if diff test.out test69.ok; \ # then echo flaky test ok first time; \ # else rm -rf test69.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test69.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test70.failed test.ok test.out X* viminfo cp test70.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test70.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test70.in" 63 lines, 1501 charactersSmoke test for MzScheme interface and mzeval() function STARTTEST :so mzscheme.vim :set nocompatible viminfo+=nviminfo :function! MzRequire() :redir => l:mzversion :mz (version) :redir END :if strpart(l:mzversion, 1, 1) < "4" :" MzScheme versions < 4.x: :mz (require (prefix vim- vimext)) :else :" newer versions: :mz (require (prefix-in vim- 'vimext)) :mz (require r5rs) :endif :endfunction :silent call MzRequire() :mz (define l '("item0" "dictionary with list OK" "item2")) :mz (define h (make-hash)) :mz (hash-set! h "list" l) /^1 :" change buffer contents :mz (vim-set-buff-line (vim-eval "line('.')") "1 changed line 1") :" scalar test :let tmp_string = mzeval('"string"') :let tmp_1000 = mzeval('1000')[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lSmoke test for MzScheme interface and mzeval() function[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1398 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:let tmp = mzeval("h")["list"][1] :/^2/put =tmp :" circular list (at the same time test lists containing lists) :mz (set-car! (cddr l) l) :let l2 = mzeval("h")["list"] :if l2[2] == l2 :let res = "OK" :else :let res = "FAILED: " . l2[2] :endif :call setline(search("^3"), "circular test " . res) :" funcrefs :mz (define vim:max (vim-eval "function('max')")) :mz (define m (vim:max '(1 100 8))) :let m = mzeval('m') :if m == 100 :let fref_res = "OK" :else :let fref_res = "FAILED: " . m :end :call append(line('$'), 'funcrefs '. fref_res) :?^1?,$w! test.out :qa! ENDTEST 1 line 1 2 line 2 3 line 3[?12l[?25h [?25l:[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso mzscheme.vim [?25l"test.ok" 6 lines, 94 characters "test.out" [New File] 6 lines, 94 characters written [?2004l [?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test70 = test61; then \ # if diff test.out test70.ok; \ # then echo flaky test ok first time; \ # else rm -rf test70.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test70.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test73.failed test.ok test.out X* viminfo cp test73.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test73.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test73.in" 170 lines, 3664 charactersTests for find completion. STARTTEST :so small.vim :set belloff=all :" Do all test in a separate window to avoid E211 when we recursively :" delete the Xfind directory during cleanup :" :" This will cause a few errors, do it silently. :set visualbell :set nocp viminfo+=nviminfo :" :" On windows a stale "Xfind" directory may exist, remove it so that :" we start from a clean state. :call delete("Xfind", "rf") :new :let cwd=getcwd() :let test_out = cwd . '/test.out' :call mkdir('Xfind') :cd Xfind :set path= :find :exec "w! " . test_out :close :new :set path=. :find :exec "w >>" . test_out[?12l[?25h[?25l:[?2004h[?12l[?25hset cp [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^ Mnj0:so! Xdotest^^Mdotest [?25lTests for find completion.[?12l[?25h[?25l/[?2004h^STARTTEST [?12l[?25h [?25l:[?2004hset ff=unix cpo-=A [?12l[?25h[?25l:[?2004h.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 165 lines, 3617 characters written[?12l[?25h[?25l:[?2004hset ff& cpo+=A [?12l[?25h[?25l/ENDTEST:" Check for correct handling of shorten_fname()'s behavior on windows :exec "cd " . cwd . "/Xfind/in" :find file :exec "w >>" . test_out :" Test for relative to current buffer 'path' item :exec "cd " . cwd . "/Xfind/" :set path=./path :" Open the file where Jimmy Hoffa is found :e in/file.txt :" Find the file containing 'E.T.' in the Xfind/in/path directory :find file :exec "w >>" . test_out :" :" Test that completion works when path=.,, :" :set path=.,, :" Open Jimmy Hoffa file :e in/file.txt :exec "w >>" . test_out :" Search for the file containing Holy Grail in same directory as in/path.txt :find stu :exec "w >>" . test_out :q :exec "cd " . cwd :call delete("Xfind", "rf") :qa! ENDTEST [?12l[?25h [?25l :[?2004hso! Xdotest [?12l[?25h[?25l:[?2004h[?12l[?25hso small.vim [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset belloff=all [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Do all test in a separate window to avoid E211 when we recursively [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" delete the Xfind directory during cleanup [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" This will cause a few errors, do it silently. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset visualbell [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset nocp viminfo+=nviminfo [?25l[?12l[?25h[?25l:[?2004h[>c"[?12l[?25h [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" On windows a stale "Xfind" directory may exist, remove it so that [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" we start from a clean state. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall delete("Xfind", "rf") [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] set path=.,, :" Open Jimmy Hoffa file :e in/file.txtxec "w >>" . test_out :" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwd :call delete("Xfind", "rf") :qa!ENDTESTtest73.in [?12l[?25h[?25l:[?2004h[?12l[?25hlet cwd=getcwd() [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hlet test_out = cwd . '/test.out' [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('Xfind') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd Xfind [?25l/sources/vim80/src/testdir/Xfind/sources/vim80/src/testdir/test73.in[?12l[?25h[?25l:[?2004h[?12l[?25hset path= [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind ...[?25l[?12l[?25h [?25lE345: Can't find file "" in path[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w! " . test_out [?25l"/sources/vim80/src/testdir/test.out" [New] 0L, 0C written/sources/vim80/src/testdir/test.out[?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25l:" Check for correct handling of shorten_fname()'s behavior on windows :exec "cd " . cwd . "/Xfind/in":find file :exec "w >>" . test_out:" Test for relative to current buffer 'path' item:exec "cd " . cwd . "/Xfind/":set path=./path:" Open the file where Jimmy Hoffa is found:e in/file.txt:" Find the file containing 'E.T.' in the Xfind/in/path directory:find file :exec "w >>" . test_out:":" Test that completion works when path=.,,"set path=.,," Open Jimmy Hoffa file :e in/file.txtexec "w >>" . test_out" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwdcall delete("Xfind", "rf") :qa!ENDTEST[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] set path=.,, :" Open Jimmy Hoffa file :e in/file.txtxec "w >>" . test_out :" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwd :call delete("Xfind", "rf") :qa!ENDTEST/sources/vim80/src/testdir/test73.in [?12l[?25h[?25l:[?2004h[?12l[?25hset path=. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind ...[?25l[?12l[?25h [?25lE32: No file name[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 0L, 0C appended[?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25l:" Check for correct handling of shorten_fname()'s behavior on windows :exec "cd " . cwd . "/Xfind/in":find file :exec "w >>" . test_out:" Test for relative to current buffer 'path' item:exec "cd " . cwd . "/Xfind/":set path=./path:" Open the file where Jimmy Hoffa is found:e in/file.txt:" Find the file containing 'E.T.' in the Xfind/in/path directory:find file :exec "w >>" . test_out:":" Test that completion works when path=.,,"set path=.,," Open Jimmy Hoffa file :e in/file.txtexec "w >>" . test_out" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwdcall delete("Xfind", "rf") :qa!ENDTEST[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] set path=.,, :" Open Jimmy Hoffa file :e in/file.txtxec "w >>" . test_out :" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwd :call delete("Xfind", "rf") :qa!ENDTEST/sources/vim80/src/testdir/test73.in [?12l[?25h[?25l:[?2004h[?12l[?25hset path=.,, [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind ...[?25l[?12l[?25h [?25lE32: No file name[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 0L, 0C appended[?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25l:" Check for correct handling of shorten_fname()'s behavior on windows :exec "cd " . cwd . "/Xfind/in":find file :exec "w >>" . test_out:" Test for relative to current buffer 'path' item:exec "cd " . cwd . "/Xfind/":set path=./path:" Open the file where Jimmy Hoffa is found:e in/file.txt:" Find the file containing 'E.T.' in the Xfind/in/path directory:find file :exec "w >>" . test_out:":" Test that completion works when path=.,,"set path=.,," Open Jimmy Hoffa file :e in/file.txtexec "w >>" . test_out" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwdcall delete("Xfind", "rf") :qa!ENDTEST[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] set path=.,, :" Open Jimmy Hoffa file :e in/file.txtxec "w >>" . test_out :" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwd :call delete("Xfind", "rf") :qa!ENDTEST/sources/vim80/src/testdir/test73.in [?12l[?25h[?25l:[?2004h[?12l[?25hset path=./** [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind ...[?25l[?12l[?25h [?25lE32: No file name[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 0L, 0C appended[?12l[?25h[?25l:[?2004h[?12l[?25hclose [?25l:" Check for correct handling of shorten_fname()'s behavior on windows :exec "cd " . cwd . "/Xfind/in":find file :exec "w >>" . test_out:" Test for relative to current buffer 'path' item:exec "cd " . cwd . "/Xfind/":set path=./path:" Open the file where Jimmy Hoffa is found:e in/file.txt:" Find the file containing 'E.T.' in the Xfind/in/path directory:find file :exec "w >>" . test_out:":" Test that completion works when path=.,,"set path=.,," Open Jimmy Hoffa file :e in/file.txtexec "w >>" . test_out" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwdcall delete("Xfind", "rf") :qa!ENDTEST[?12l[?25h[?25l:[?2004h[?12l[?25hnew [?25l~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] set path=.,, :" Open Jimmy Hoffa file :e in/file.txtxec "w >>" . test_out :" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwd :call delete("Xfind", "rf") :qa!ENDTEST/sources/vim80/src/testdir/test73.in [?12l[?25h[?25l:[?2004h[?12l[?25h" We shouldn't find any file at this point, test.out must be empty. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('in') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd in [?25l/sources/vim80/src/testdir/Xfind/in[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('path') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexec "cd " . cwd [?25l/sources/vim80/src/testdirtest73.in [?12l[?25h[?25l:[?2004h[?12l[?25he Xfind/file.txt [?25l"Xfind/file.txt" [New File]Xfind/file.txt[?12l[?25h[?25l-- INSERT --Holy Grail[+][?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"Xfind/file.txt" [New] 1L, 11C written [?12l[?25h[?25l:[?2004h[?12l[?25he Xfind/in/file.txt [?25l"Xfind/in/file.txt" [New File]in/file.txt[?12l[?25h[?25l-- INSERT --Jimmy Hoffa[+][?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"Xfind/in/file.txt" [New] 1L, 12C written [?12l[?25h[?25l:[?2004h[?12l[?25he Xfind/in/stuff.txt [?25l"Xfind/in/stuff.txt" [New File]stuff.txt[?12l[?25h[?25l-- INSERT --Another Holy Grail[+][?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"Xfind/in/stuff.txt" [New] 1L, 19C written [?12l[?25h[?25l:[?2004h[?12l[?25he Xfind/in/path/file.txt [?25l"Xfind/in/path/file.txt" [New File]path/file.txt[?12l[?25h[?25l-- INSERT --E.T.[+][?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"Xfind/in/path/file.txt" [New] 1L, 5C written [?12l[?25h[?25l:[?2004h[?12l[?25hset path=Xfind/** [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h [?25l"Xfind/file.txt" 1L, 11CHoly Grailfile.txtf [?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h...[?25lin/file.txt[?12l[?25h [?25l"Xfind/in/file.txt" 1L, 12CJimmy Hoffain/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h...[?25lin/file.txt[?12l[?25h...[?25lpath/file.txt[?12l[?25h [?25l"Xfind/in/path/file.txt" 1L, 5CE.T.path/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Rerun the previous three find completions, using fullpath in 'path' [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexec "set path=" . cwd . "/Xfind/**" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h [?25l"Xfind/file.txt" 1L, 11CHoly Grailfile.txtf [?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h...[?25lin/file.txt[?12l[?25h [?25l"Xfind/in/file.txt" 1L, 12CJimmy Hoffain/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h...[?25lin/file.txt[?12l[?25h...[?25lpath/file.txt[?12l[?25h [?25l"Xfind/in/path/file.txt" 1L, 5CE.T.path/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Same steps again, using relative and fullpath items that point to the same [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" recursive location. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" This is to test that there are no duplicates in the completion list. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexec "set path+=Xfind/**" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h [?25l"Xfind/file.txt" 1L, 11CHoly Grailfile.txtf [?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h...[?25lin/file.txt[?12l[?25h [?25l"Xfind/in/file.txt" 1L, 12CJimmy Hoffain/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h...[?25lin/file.txt[?12l[?25h...[?25lpath/file.txt[?12l[?25h [?25l"Xfind/in/path/file.txt" 1L, 5CE.T.path/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./Xfind/file.txt[?12l[?25h...[?25lin/file.txt[?12l[?25h [?25l"Xfind/in/file.txt" 1L, 12CJimmy Hoffafile.txte [?12l[?25h[?25l:[?2004h[?12l[?25h" Test find completion for directory of current buffer, which at this point [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" is Xfind/in/file.txt. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset path=. [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind st...[?25luff.txt[?12l[?25h [?25l"Xfind/in/stuff.txt" 1L, 19CAnother Holy Grailstuff.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 19C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test find completion for empty path item ",," which is the current directory [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd Xfind [?25l/sources/vim80/src/testdir/Xfindin/stuff.txtf /sources/vim80/src/testdir/test73.in[?12l[?25h[?25l:[?2004h[?12l[?25hset path=,, [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind f...[?25lile.txt[?12l[?25h...[?25l[?12l[?25h [?25l"file.txt" 1L, 11CHoly Grailfile.txt. [?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test shortening of [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" foo/x/bar/voyager.txt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" foo/y/bar/voyager.txt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" When current directory is above foo/ they should be shortened to (in order [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" of appearance): [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" x/bar/voyager.txt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" y/bar/voyager.txt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('foo') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd foo [?25l/sources/vim80/src/testdir/Xfind/foo/sources/vim80/src/testdir/Xfind/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('x') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('y') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd x [?25l/sources/vim80/src/testdir/Xfind/foo/x[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('bar') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd .. [?25l/sources/vim80/src/testdir/Xfind/foo[?12l[?25h[?25l:[?2004h[?12l[?25hcd y [?25l/sources/vim80/src/testdir/Xfind/foo/y[?12l[?25h[?25l:[?2004h[?12l[?25hcall mkdir('bar') [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd .. [?25l/sources/vim80/src/testdir/Xfind/foo[?12l[?25h[?25l:[?2004h[?12l[?25hcd .. [?25l/sources/vim80/src/testdir/Xfindfile.txt/ [?12l[?25h[?25l:[?2004h[?12l[?25h" We should now be in the Xfind directory [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he foo/x/bar/voyager.txt [?25l"foo/x/bar/voyager.txt" [New File]oo/x/bar/voyager.txt[?12l[?25h[?25l-- INSERT --Voyager 1[+][?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"foo/x/bar/voyager.txt" [New] 1L, 10C written [?12l[?25h[?25l:[?2004h[?12l[?25he foo/y/bar/voyager.txt [?25l"foo/y/bar/voyager.txt" [New File]y/[?12l[?25h[?25l-- INSERT --Voyager 2[+][?12l[?25h[?25l:[?2004h[?12l[?25hw [?25l"foo/y/bar/voyager.txt" [New] 1L, 10C written [?12l[?25h[?25l:[?2004h[?12l[?25hexec "set path=" . cwd . "/Xfind/**" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind voyager...[?25lx/bar/voyager.txt[?12l[?25h [?25l"foo/x/bar/voyager.txt" 1L, 10C1x/[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind voyager...[?25lx/bar/voyager.txt[?12l[?25h...[?25ly[?12l[?25h [?25l"foo/y/bar/voyager.txt" 1L, 10C2y/[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" When current directory is .../foo/y/bar they should be shortened to (in [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" order of appearance): [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" ./voyager.txt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" x/bar/voyager.txt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd foo [?25l/sources/vim80/src/testdir/Xfind/fooy/bar/voyager.txt. [?12l[?25h[?25l:[?2004h[?12l[?25hcd y [?25l/sources/vim80/src/testdir/Xfind/foo/ybar/voyager.txt [?12l[?25h[?25l:[?2004h[?12l[?25hcd bar [?25l/sources/vim80/src/testdir/Xfind/foo/y/barvoyager.txt. [?12l[?25h[?25l:[?2004h[?12l[?25hfind voyager...[?25l./voyager.txt[?12l[?25h [?25l"voyager.txt" 1L, 10C[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >> " . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind voyager...[?25l./voyager.txt[?12l[?25h...[?25lx/bar/voyager.txt[?12l[?25h [?25l"/sources/vim80/src/testdir/Xfind/foo/x/bar/voyager.txt" 1L, 10C1/sources/vim80/src/testdir/Xfind/foo/x/bar/voyager.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >> " . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Check the opposite too: [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hcd .. [?25l/sources/vim80/src/testdir/Xfind/foo/y[?12l[?25h[?25l:[?2004h[?12l[?25hcd .. [?25l/sources/vim80/src/testdir/Xfind/foox/bar/voyager.txtc [?12l[?25h[?25l:[?2004h[?12l[?25hcd x [?25l/sources/vim80/src/testdir/Xfind/foo/xbar/voyager.txt [?12l[?25h[?25l:[?2004h[?12l[?25hcd bar [?25l/sources/vim80/src/testdir/Xfind/foo/x/barvoyager.txt. [?12l[?25h[?25l:[?2004h[?12l[?25hfind voyager...[?25l./voyager.txt[?12l[?25h [?25l"voyager.txt" 1L, 10C[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >> " . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?12l[?25h[?25l:[?2004h[?12l[?25hfind voyager...[?25l./voyager.txt[?12l[?25h...[?25ly/bar/voyager.txt[?12l[?25h [?25l"/sources/vim80/src/testdir/Xfind/foo/y/bar/voyager.txt" 1L, 10C2/sources/vim80/src/testdir/Xfind/foo/y/bar/voyager.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >> " . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Check for correct handling of shorten_fname()'s behavior on windows [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexec "cd " . cwd . "/Xfind/in" [?25l/sources/vim80/src/testdir/Xfind/in[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25l./file.txt[?12l[?25h [?25l"file.txt" 1L, 12CJimmy Hoffafile.txt/ [?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Test for relative to current buffer 'path' item [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hexec "cd " . cwd . "/Xfind/" [?25l/sources/vim80/src/testdir/Xfindin/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hset path=./path [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Open the file where Jimmy Hoffa is found [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he in/file.txt [?25l"in/file.txt" 1L, 12C[?12l[?25h[?25l:[?2004h[?12l[?25h" Find the file containing 'E.T.' in the Xfind/in/path directory [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind file...[?25ltxt[?12l[?25h [?25l"in/path/file.txt" 1L, 5CE.T.path/file.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Test that completion works when path=.,, [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hset path=.,, [?25l[?12l[?25h[?25l:[?2004h[?12l[?25h" Open Jimmy Hoffa file [?25l[?12l[?25h[?25l:[?2004h[?12l[?25he in/file.txt [?25l"in/file.txt" 1L, 12CJimmy Hoffafile.txte [?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?12l[?25h[?25l:[?2004h[?12l[?25h" Search for the file containing Holy Grail in same directory as in/path.txt [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hfind stu...[?25lff.txt[?12l[?25h [?25l"in/stuff.txt" 1L, 19CAnother Holy Grailstuff.txt[?12l[?25h[?25l:[?2004h[?12l[?25hexec "w >>" . test_out [?25l"/sources/vim80/src/testdir/test.out" 1L, 19C appended[?12l[?25h[?25l:[?2004h[?12l[?25hq [?25l:" Check for correct handling of shorten_fname()'s behavior on windows :exec "cd " . cwd . "/Xfind/in":find file :exec "w >>" . test_out:" Test for relative to current buffer 'path' item:exec "cd " . cwd . "/Xfind/":set path=./path:" Open the file where Jimmy Hoffa is found:e in/file.txt:" Find the file containing 'E.T.' in the Xfind/in/path directory:find file :exec "w >>" . test_out:":" Test that completion works when path=.,,"set path=.,," Open Jimmy Hoffa file :e in/file.txtexec "w >>" . test_out" Search for the file containing Holy Grail in same directory as in/path.txt :find stu exec "w >>" . test_out :qexec "cd " . cwdcall delete("Xfind", "rf") :qa!ENDTEST[?12l[?25h[?25l:[?2004h[?12l[?25hexec "cd " . cwd [?25l/sources/vim80/src/testdir[?12l[?25h[?25l:[?2004h[?12l[?25hcall delete("Xfind", "rf") [?25l[?12l[?25h[?25l:[?2004h[?12l[?25hqa! [?25l[?2004l[?2004l[?1l>[?12l[?25h[?1049l# For flaky tests retry one time. No tests at the moment. #@/bin/sh -c "if test -f test.out -a test73 = test61; then \ # if diff test.out test73.ok; \ # then echo flaky test ok first time; \ # else rm -rf test73.failed test.out X* viminfo; \ # VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test73.in; \ # fi \ # fi" # Check if the test.out file matches test.ok. rm -rf X* test.ok viminfo rm -rf test75.failed test.ok test.out X* viminfo cp test75.ok test.ok # Sleep a moment to avoid that the xterm title is messed up. # 200 msec is sufficient, but only modern sleep supports a fraction of # a second, fall back to a second if it fails. VIMRUNTIME=../../runtime; export VIMRUNTIME; ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -s dotest.in test75.in [?2004h[?1049h[?1h=[?2004h[?12;25h[?12l[?25h[?25l"test75.in" 41 lines, 1000 charactersTests for maparg(). Also test utf8 map with a 0x80 byte. STARTTEST :so small.vim :so mbyte.vim :set cpo-=< :set encoding=utf8 :" Test maparg() with a string result :map foo isfoo :vnoremap