Tue Aug 15 15:26:46 CDT 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 [?25h[?8c[?25h[?0c[?25l[?1c"af.po" "af.po" 5393 lines, 133397 characters OK [?25h[?0c touch af.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ca.po [?25h[?8c[?25h[?0c[?25l[?1c"ca.po" "ca.po" 6201 lines, 161830 characters OK [?25h[?0c touch ca.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq cs.po [?25h[?8c[?25h[?0c[?25l[?1c"cs.po" "cs.po" 4664 lines, 111014 characters OK [?25h[?0c touch cs.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq de.po [?25h[?8c[?25h[?0c[?25l[?1c"de.po" "de.po" 6117 lines, 156572 characters OK [?25h[?0c touch de.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq en_GB.po [?25h[?8c[?25h[?0c[?25l[?1c"en_GB.po" "en_GB.po" 290 lines, 8951 characters OK [?25h[?0c touch en_GB.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq eo.po [?25h[?8c[?25h[?0c[?25l[?1c"eo.po" "eo.po" 7037 lines, 181672 characters OK [?25h[?0c touch eo.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq es.po [?25h[?8c[?25h[?0c[?25l[?1c"es.po" "es.po" 8280 lines, 203813 characters OK [?25h[?0c touch es.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq fi.po [?25h[?8c[?25h[?0c[?25l[?1c"fi.po" "fi.po" 6959 lines, 178335 characters OK [?25h[?0c touch fi.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq fr.po [?25h[?8c[?25h[?0c[?25l[?1c"fr.po" "fr.po" 7316 lines, 200113 characters OK [?25h[?0c touch fr.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ga.po [?25h[?8c[?25h[?0c[?25l[?1c"ga.po" "ga.po" 7434 lines, 193547 characters OK [?25h[?0c touch ga.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq it.po [?25h[?8c[?25h[?0c[?25l[?1c"it.po" "it.po" 6949 lines, 179597 characters OK [?25h[?0c touch it.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.po [?25h[?8c[?25h[?0c[?25l[?1c"ja.po" "ja.po" 6990 lines, 203194 characters OK [?25h[?0c touch ja.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ko.po [?25h[?8c[?25h[?0c[?25l[?1c"ko.po" "ko.po" 6447 lines, 155536 characters OK [?25h[?0c touch ko.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ko.UTF-8.po [?25h[?8c[?25h[?0c[?25l[?1c"ko.UTF-8.po" "ko.UTF-8.po" 6447 lines, 171433 characters OK [?25h[?0c touch ko.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq nb.po [?25h[?8c[?25h[?0c[?25l[?1c"nb.po" "nb.po" 6166 lines, 150557 characters OK [?25h[?0c touch nb.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq nl.po [?25h[?8c[?25h[?0c[?25l[?1c"nl.po" "nl.po" 5852 lines, 135176 characters OK [?25h[?0c touch nl.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq no.po [?25h[?8c[?25h[?0c[?25l[?1c"no.po" "no.po" 6166 lines, 150557 characters OK [?25h[?0c touch no.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.po [?25h[?8c[?25h[?0c[?25l[?1c"pl.po" "pl.po" 6905 lines, 175274 characters OK [?25h[?0c touch pl.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pt_BR.po [?25h[?8c[?25h[?0c[?25l[?1c"pt_BR.po" "pt_BR.po" 6236 lines, 160821 characters OK [?25h[?0c touch pt_BR.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ru.po [?25h[?8c[?25h[?0c[?25l[?1c"ru.po" "ru.po" 6939 lines, 227889 characters OK [?25h[?0c touch ru.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sk.po [?25h[?8c[?25h[?0c[?25l[?1c"sk.po" "sk.po" 5821 lines, 147387 characters OK [?25h[?0c touch sk.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sv.po [?25h[?8c[?25h[?0c[?25l[?1c"sv.po" "sv.po" 6148 lines, 149141 characters OK [?25h[?0c touch sv.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq uk.po [?25h[?8c[?25h[?0c[?25l[?1c"uk.po" "uk.po" 7236 lines, 224452 characters OK [?25h[?0c touch uk.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq vi.po [?25h[?8c[?25h[?0c[?25l[?1c"vi.po" "vi.po" 5196 lines, 143932 characters OK [?25h[?0c touch vi.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.UTF-8.po [?25h[?8c[?25h[?0c[?25l[?1c"zh_CN.UTF-8.po" "zh_CN.UTF-8.po" 6140 lines, 147457 characters OK [?25h[?0c touch zh_CN.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.po [?25h[?8c[?25h[?0c[?25l[?1c"zh_CN.po" "zh_CN.po" 6140 lines, 136476 characters OK [?25h[?0c touch zh_CN.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_TW.UTF-8.po [?25h[?8c[?25h[?0c[?25l[?1c"zh_TW.UTF-8.po" "zh_TW.UTF-8.po" 5282 lines, 127286 characters OK [?25h[?0c touch zh_TW.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_TW.po [?25h[?8c[?25h[?0c[?25l[?1c"zh_TW.po" "zh_TW.po" 5275 lines, 117353 characters OK [?25h[?0c touch zh_TW.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq cs.cp1250.po [?25h[?8c[?25h[?0c[?25l[?1c"cs.cp1250.po" "cs.cp1250.po" 4664 lines, 111022 characters OK [?25h[?0c touch cs.cp1250.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.sjis.po [?25h[?8c[?25h[?0c[?25l[?1c"ja.sjis.po" "ja.sjis.po" 6990 lines, 179251 characters OK [?25h[?0c touch ja.sjis.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.euc-jp.po [?25h[?8c[?25h[?0c[?25l[?1c"ja.euc-jp.po" "ja.euc-jp.po" 6990 lines, 179135 characters OK [?25h[?0c touch ja.euc-jp.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.cp1250.po [?25h[?8c[?25h[?0c[?25l[?1c"pl.cp1250.po" "pl.cp1250.po" 6905 lines, 175270 characters OK [?25h[?0c touch pl.cp1250.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.UTF-8.po [?25h[?8c[?25h[?0c[?25l[?1c"pl.UTF-8.po" "pl.UTF-8.po" 6905 lines, 178060 characters OK [?25h[?0c touch pl.UTF-8.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ru.cp1251.po [?25h[?8c[?25h[?0c[?25l[?1c"ru.cp1251.po" "ru.cp1251.po" 6939 lines, 179582 characters OK [?25h[?0c touch ru.cp1251.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sk.cp1250.po [?25h[?8c[?25h[?0c[?25l[?1c"sk.cp1250.po" "sk.cp1250.po" 5821 lines, 147383 characters OK [?25h[?0c touch sk.cp1250.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq uk.cp1251.po [?25h[?8c[?25h[?0c[?25l[?1c"uk.cp1251.po" "uk.cp1251.po" 7236 lines, 181515 characters OK [?25h[?0c touch uk.cp1251.ck ../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.cp936.po [?25h[?8c[?25h[?0c[?25l[?1c"zh_CN.cp936.po" "zh_CN.cp936.po" 6139 lines, 136462 characters OK [?25h[?0c touch 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 [?25h[?8c[?25h[?0c[?25l[?1c"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. 0D:w! small.vim :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 ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 35 lines, 1133 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0c" If columns or lines are too small, create wrongtermsize. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" (Some tests will fail. When columns and/or lines are small) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cif &lines < 24 || &columns < 80 | sp another | w! wrongtermsize | qa! | endif [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Write a single line to test.out to check if testing works at all. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c%d [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?25h[?0c[?25l[?1cthis is a test[?25h[?0c[?25l[?1c:[?25h[?0cw! test.out [?25l[?1c"test.out" [New File] 1 line, 15 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test. [?25l[?1c[?25h[?0c [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! small.vim [?25l[?1c"small.vim" [New File] 1 line, 1 character written[?25h[?0c[?25l[?1c:[?25h[?0cw! tiny.vim [?25l[?1c"tiny.vim" [New File] 1 line, 1 character written[?25h[?0c[?25l[?1ce! test.ok w! test.outqa![?25h[?0c[?25l[?1c:[?25h[?0cw! mbyte.vim [?25l[?1c"mbyte.vim" [New File] 4 lines, 28 characters written[?25h[?0c[?25l[?1c:[?25h[?0cw! mzscheme.vim [?25l[?1c"mzscheme.vim" [New File] 4 lines, 28 characters written[?25h[?0c[?25l[?1c:[?25h[?0cw! lua.vim [?25l[?1c"lua.vim" [New File] 4 lines, 28 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" If +multi_byte feature supported, make mbyte.vim empty. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cif has("multi_byte") | sp another | w! mbyte.vim | q | endif [?25l[?1c"another" [New File] "mbyte.vim" 0 lines, 0 characters writtene! test.ok[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" If +mzscheme feature supported, make mzscheme.vim empty. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cif has("mzscheme") | sp another | w! mzscheme.vim | q | endif [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" If +lua feature supported, make lua.vim empty. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cif has("lua") | sp another | w! lua.vim | q | endif [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" If +eval feature supported quit here, leaving tiny.vim and small.vim empty. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Otherwise write small.vim to skip the test. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cif 1 | q! | endif [?25l[?1c[?25h[?0crm -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 [?25h[?8c[?25h[?0c[?25l[?1c"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; } {if (test){cmd1;cmd2;} } {if (test){cmd1;else} } {while (this)if (test)cmd1;cmd2; } {while (this)if (test)cmd1;elsecmd2; } {if (test){cmd;}[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 125 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nocompatible viminfo+=nviminfo modeline [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cedit " read modeline [?25l[?1c"test3.in"2344L, 23156Cif (test)cmd1;cmd2;if (test)cmd1;elsecmd2;if (test){cmd1;cmd2;}if (test){cmd1;else}while (this)if (test)cmd1;cmd2;while (this)if (test)cmd1;elsecmd2;if (test){cmd;}[?25h[?0c[?25l[?1c/[?25h[?0cstart of AUTO [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cend of AUTO [?25l[?1c956 lines to indent... 9500 850 750 650 550 450 350 250 150 50 lines to indent... 957 lines indented [?25h[?0c[?25l[?1c/^STARTTEST } void func() { switch (foo) {case (bar):if (baz())quux();break;case (shmoo):if (!bar){}case (foo1):switch (bar){case baz: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" */ } STARTTEST :set nocin /comments joabout life^[/happens jothere^[/below oline^[/this Ohello^[ ENDTEST { /** Testing for comments, without 'cin' set*/ /* * what happens here? */[?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 4L, 101C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset tw=0 noai fo=croq [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet &wm = &columns - 20 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cserious/e [?25l[?1c[?25h[?0c[?25l[?1c-- INSERT --* about life, the * universe, and the * rest important big[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 6L, 78C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset nocin [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0ccomments [?25l[?1c[?25h[?0c[?25l[?1c -- INSERT --about life[?25h[?0c[?25l[?1c /[?25h[?0chappens [?25l[?1c/* * what happens here?[?25h[?0c[?25l[?1c */[?25h[?0c[?25l[?1c -- INSERT -- there[?25h[?0c[?25l[?1c /[?25h[?0cbelow [?25l[?1c/*the end of the comment, try inserting a line below */[?25h[?0c[?25l[?1c -- INSERT -- line[?25h[?0c[?25l[?1c /[?25h[?0cthis [?25l[?1c/* how aboutthis one */[?25h[?0c[?25l[?1c -- INSERT --hello[?25h[?0c[?25l[?1c this one */[?25h[?0c[?25l[?1c /^STARTTEST } STARTTEST[?25h[?0c[?25l[?1c :set cin [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 18C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/vec2 ==[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cin [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cvec2 [?25l[?1c{ var = this + that + vec[0] * vec[0]+ vec[1] * vec[1]+ vec2[2] * vec[2];[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c :set cin [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 5L, 51C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1:set cino=}4 /testing1 k2==/testing2 k2==[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset cino=}4 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0ctesting1 [?25l[?1c{asdf asdflkajds f; if (tes & ting) {asdf asdf asdf ;asdfa sdf asdf;} testing1;[?25h[?0c [?25l[?1c /[?25h[?0ctesting2 [?25l[?1cif (tes & ting) {asdf asdf asdf ;asdfa sdf asdf;} testing2;[?25h[?0c [?25l[?1c /^STARTTEST } STARTTEST[?25h[?0c[?25l[?1c :set cin [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 4L, 36C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1:set cino=(0,)20 /main =][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0,)20 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cmain [?25l[?1cmain ( int first_par, /*[?25h[?0c[?25l[?1c 19 lines to indent... 20indented [?25h[?0c[?25l[?1c * Comment for[?25h[?0c[?25l[?1c /^STARTTEST * first par*/int second_par /** Comment for* second par*/) { func( first_par, /** Comment for* first par*/second_par /** Comment for* second par*/); } STARTTEST[?25h[?0c[?25l[?1c :set cin [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 4L, 36C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1:set cino=es,n0s /main =][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset cino=es,n0s [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cmain [?25l[?1cmain(void)[?25h[?0c[?25l[?1c 8 lines to indent... 9indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST /* Make sure that cino=X0s is not parsed like cino=Xs. */ if (cond)foo(); else {bar(); } } STARTTEST[?25h[?0c[?25l[?1c :set cin [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 26C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1:set cino= ]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset cino= [?25l[?1c[?25h[?0c[?25l[?1c{[?25h[?0c[?25l[?1c 11 lines to indent... 12indented [?25h[?0c[?25l[?1c do[?25h[?0c[?25l[?1c /^STARTTEST {if (){if ()asdf;elseasdf;} } while (); cmd;/* this should go under the } */ } STARTTEST[?25h[?0c[?25l[?1c ]]=][ [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 1L, 6C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1[?25h[?0c[?25l[?1c ENDTEST[?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 8 lines to indent... 9indented [?25h[?0c[?25l[?1c if ( k() ) {[?25h[?0c[?25l[?1c /^STARTTEST l();} else { /* Start (two words) end */m(); }n(); } STARTTEST[?25h[?0c[?25l[?1c :set cino={s,e-s [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 ]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino={s,e-s [?25l[?1c[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 7 lines to indent... 8indented  {[?25h[?0c[?25l[?1c if ( k() )[?25h[?0c[?25l[?1c /^STARTTEST {l();} else { /* Start (two words) end */m();} n(); /* should be under the if () */ } STARTTEST[?25h[?0c[?25l[?1c :set cino={s,fs [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 25C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 ]]=/ foo[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino={s,fs [?25l[?1c[?25h[?0c[?25l[?1cvoid bar(void) {[?25h[?0c[?25l[?1c /[?25h[?0c foo [?25l[?1c30 lines to indent... 31indented  {[?25h[?0c[?25l[?1c/^STARTTEST static array[2][2] ={{ 1, 2 },{ 3, 4 },}while (a){foo(&a);}{int a;{a = a + 1;}} b = a; } void func(void) { a = 1;{b = 2;} c = 3; d = 4; } /* foo */ STARTTEST[?25h[?0c[?25l[?1c :set cino= [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 25C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/while ohere^[[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino= [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cwhile [?25l[?1ca() { do { a = a +a; } while ( a );/* add text under this line */[?25h[?0c[?25l[?1c -- INSERT -- here[?25h[?0c[?25l[?1c if ( a ) i[?25h[?0c[?25l[?1c /^STARTTEST a; } STARTTEST[?25h[?0c[?25l[?1c :set cino= com= [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 109C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/comment olabel2: b();^Mlabel3 /* post */:^M/* pre */ label4:^Mf(/*com*/);^Mif (/*com*/)^Mcmd();^[[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino= com= [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0ccomment [?25l[?1ca() { label1:/* hmm */// comment[?25h[?0c[?25l[?1c -- INSERT --label2: b(); label3 /* post */: /* pre */ label4:f(/*com*/);if (/*com*/)cmd();[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c :set comments& comments^=s:/*,m:**,ex:*/ [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 53C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/simple =5j[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset comments& comments^=s:/*,m:**,ex:*/ [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0csimple [?25l[?1c/* * A simple comment[?25h[?0c[?25l[?1c 5 lines to indent... 6indented * A simple comment[?25h[?0c[?25l[?1c */[?25h[?0c[?25l[?1c /^STARTTEST /* ** A different comment */ STARTTEST[?25h[?0c[?25l[?1c :set cino=c0 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 70C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1:set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=c0 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset comments& comments-=s1:/* comments^=s0:/* [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 4 lines to indent... 5indented [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c /^STARTTEST /*********A comment. *********/ } STARTTEST[?25h[?0c[?25l[?1c :set cino=c0,C1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 73C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1:set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=c0,C1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset comments& comments-=s1:/* comments^=s0:/* [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 4 lines to indent... 5indented [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c /^STARTTEST /********* A comment. *********/ } STARTTEST[?25h[?0c[?25l[?1c :set cino= [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 17C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 ]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino= [?25l[?1c[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 5 lines to indent... 6indented [?25h[?0c[?25l[?1c c = c1 &&[?25h[?0c[?25l[?1c /^STARTTEST (c2 ||c3) && c4; } STARTTEST[?25h[?0c[?25l[?1c :set cino=(s [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(s [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 5 lines to indent... 6indented [?25h[?0c[?25l[?1c c = c1 &&[?25h[?0c[?25l[?1c /^STARTTEST (c2 ||c3) && c4; } STARTTEST[?25h[?0c[?25l[?1c :set cino=(s,U1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(s,U1 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 5 lines to indent... 6indented [?25h[?0c[?25l[?1c c = c1 &&[?25h[?0c[?25l[?1c /^STARTTEST (c2 ||c3) && c4; } STARTTEST[?25h[?0c[?25l[?1c :set cino=(0 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 4 lines to indent... 5indented [?25h[?0c[?25l[?1c if ( c1[?25h[?0c[?25l[?1c /^STARTTEST && ( c2|| c3))foo; } STARTTEST[?25h[?0c[?25l[?1c :set cino=(0,w1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0,w1 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 4 lines to indent... 5indented [?25h[?0c[?25l[?1c if ( c1[?25h[?0c[?25l[?1c /^STARTTEST && ( c2|| c3))foo; } STARTTEST[?25h[?0c[?25l[?1c :set cino=(s [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(s [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 8 lines to indent... 9indented [?25h[?0c[?25l[?1c c = c1 && ([?25h[?0c[?25l[?1c /^STARTTEST c2 ||c3) && c4; if (c1 && c2)foo; } STARTTEST[?25h[?0c[?25l[?1c :set cino=(s,m1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(s,m1 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 8 lines to indent... 9indented [?25h[?0c[?25l[?1c c = c1 && ([?25h[?0c[?25l[?1c /^STARTTEST c2 ||c3 ) && c4; if (c1 && c2 )foo; } STARTTEST[?25h[?0c[?25l[?1c :set cino=b1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=b1 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 9 lines to indent... 10 lines indented [?25h[?0c[?25l[?1c switch (x)[?25h[?0c[?25l[?1c /^STARTTEST {case 1:a = b;break;default:a = 0;break; } } STARTTEST[?25h[?0c[?25l[?1c :set cino=(0,W5 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 26C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0,W5 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 10 lines to indent... 11indented [?25h[?0c[?25l[?1c invokeme([?25h[?0c[?25l[?1c /^STARTTEST argu,ment); invokeme(argu,ment); invokeme(argu,ment); } STARTTEST[?25h[?0c[?25l[?1c :set cino=/6 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=/6 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c 3 lines to indent... 4indented [?25h[?0c[?25l[?1c statement;[?25h[?0c[?25l[?1c /^STARTTEST // comment 1// comment 2 } STARTTEST[?25h[?0c[?25l[?1c :set cino= [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 34C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-12kdd]]/comment 1/+1 ==[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino= [?25l[?1c[?25h[?0c[?25l[?1c==ENDTEST[?25h[?0c[?25l[?1cvoid f() {[?25h[?0c[?25l[?1c /[?25h[?0ccomment 1/+1 [?25l[?1cstatement;// comment 1 // comment 2[?25h[?0c[?25l[?1c // comment 2[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c :set cino=g0 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=g0 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cclass CAbc {[?25h[?0c[?25l[?1c 6 lines to indent... 7indented [?25h[?0c[?25l[?1c int Test() { return FALSE; }[?25h[?0c[?25l[?1c /^STARTTEST public: // comment void testfall(); protected: void testfall(); }; STARTTEST[?25h[?0c[?25l[?1c :set cino=(0,gs,hs [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 29C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0,gs,hs [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cclass Foo : public Bar {[?25h[?0c[?25l[?1c 5 lines to indent... 6indented [?25h[?0c[?25l[?1c public:[?25h[?0c[?25l[?1c /^STARTTEST virtual void method1(void) = 0;virtual void method2(int arg1,int arg2,int arg3) = 0; }; STARTTEST[?25h[?0c[?25l[?1c :set cino=+20 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 24C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=+20 [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1cvoid foo() {[?25h[?0c[?25l[?1c 4 lines to indent... 5indented [?25h[?0c[?25l[?1c if (a)[?25h[?0c[?25l[?1c /^STARTTEST { } elseasdf; } STARTTEST[?25h[?0c[?25l[?1c :set cino=(0,W2s [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd]]=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0,W2s [?25l[?1c[?25h[?0c[?25l[?1c2kdd]]=][ENDTEST[?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c 34 lines to indent... 35indented [?25h[?0c[?25l[?1c averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd([?25h[?0c[?25l[?1c /^STARTTEST );/* those are ugly, but consequent */func()->asd(asdasdf,averylongfunctionname(abc,dec)->averylongfunctionname(asdfadsf,asdfasdf,asdfasdf,),func(asdfadf,asdfasdf),asdasdf);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 2kdd2j=][ ENDTEST void func(int a #if defined(FOO), int b, int c #endif) { } STARTTEST :set cino=(0 2kdd2j=][ ENDTEST void[?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=M1 [?25l[?1c[?25h[?0c[?25l[?1c func(int a[?25h[?0c[?25l[?1c4 lines to indent... 5indented [?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 26C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0,ts [?25l[?1c[?25h[?0c[?25l[?1c #if defined(FOO)[?25h[?0c [?25l[?1c7 lines to indent... 8indented [?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=(0 [?25l[?1c[?25h[?0c[?25l[?1c , int b[?25h[?0c [?25l[?1c8 lines to indent... 9indented  void, int b[?25h[?0c [?25l[?1c/^STARTTEST , int c #endif ) { } STARTTEST[?25h[?0c[?25l[?1c :set cino& [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 22C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd2j=7][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino& [?25l[?1c[?25h[?0c[?25l[?1c2kdd2j=7][ ENDTEST[?25h[?0c [?25l[?1c 69 lines to indent... 50 7indented [?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c /^STARTTEST { int tab[] = {1, 2,3, 4,5, 6};printf("Don't you dare indent this line incorrectly!\n"); }void func4(a, b,c) int a; int b; int c; { }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");switch (foo) {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=][[?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino& [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset cino+=l1 [?25l[?1c[?25h[?0c[?25l[?1c ENDTEST[?25h[?0c [?25l[?1c22 lines to indent... 23indented  printf("But don't break the indentation of this instruction\n"); break;[?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 21C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino& [?25l[?1c[?25h[?0c[?25l[?1c2kdd2j=][ENDTEST[?25h[?0c [?25l[?1c 6 lines to indent... 7indented [?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c /^STARTTEST { cout << "a"<< "b"<< ") :"<< "c"; } STARTTEST[?25h[?0c[?25l[?1c :set com=s1:/*,m:*,ex:*/ [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 38C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 ]]3jofoo();^[[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset com=s1:/*,m:*,ex:*/ [?25l[?1c[?25h[?0c[?25l[?1cvoid func(void) {[?25h[?0c[?25l[?1c/** This is a comment.*/[?25h[?0c[?25l[?1c -- INSERT -- foo();[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c :set cino& [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 21C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd2j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino& [?25l[?1c[?25h[?0c[?25l[?1c2kdd2j=][ENDTEST[?25h[?0c [?25l[?1c 8 lines to indent... 9indented [?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c /^STARTTEST { for (int i = 0; i < 10; ++i)if (i & 1) {foo(1);} elsefoo(0); baz(); } STARTTEST[?25h[?0c[?25l[?1c :set cino=k2s,(0 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd3j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=k2s,(0 [?25l[?1c[?25h[?0c[?25l[?1c2kdd3j=][ENDTEST[?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c 23 lines to indent... 24indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))foo; if (c1 &&(c2 || c3)) { }if ( c1&& ( c2|| c3))foo; func( c1&& ( c2|| c3))foo; } STARTTEST[?25h[?0c[?25l[?1c :set cino=k2s,(s [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd3j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=k2s,(s [?25l[?1c[?25h[?0c[?25l[?1c2kdd3j=][ENDTEST[?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c 23 lines to indent... 24indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))foo; if (c1 &&(c2 || c3)) { }if ( c1&& ( c2|| c3))foo; func( c1&& ( c2|| c3))foo; } STARTTEST[?25h[?0c[?25l[?1c :set cino=k2s,(s,U1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 30C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd3j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=k2s,(s,U1 [?25l[?1c[?25h[?0c[?25l[?1c2kdd3j=][ENDTEST[?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c 24 lines to indent... 25indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))foo; if (c1 &&(c2 || c3)) { } if (c123456789&& (c22345|| c3))printf("foo\n");c = c1 &&(c2 ||c3) && c4; } STARTTEST[?25h[?0c[?25l[?1c :set cino=k2s,(0,W4 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 30C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd3j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=k2s,(0,W4 [?25l[?1c[?25h[?0c[?25l[?1c2kdd3j=][ENDTEST[?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c 29 lines to indent... 30indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))foo; if (c1 &&(c2 || c3)) { } if (c123456789&& (c22345|| c3))printf("foo\n");if ( c1&& ( c2|| c3))foo;a_long_line(argument,argument); a_short_line(argument,argument); } STARTTEST[?25h[?0c[?25l[?1c :set cino=k2s,u2 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd3j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=k2s,u2 [?25l[?1c[?25h[?0c[?25l[?1c2kdd3j=][ENDTEST[?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c 18 lines to indent... 19indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))foo; if (c1 &&(c2 || c3)) { } if (c123456789&& (c22345|| c3))printf("foo\n"); } STARTTEST[?25h[?0c[?25l[?1c :set cino=k2s,(0,w1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 30C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd3j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=k2s,(0,w1 [?25l[?1c[?25h[?0c[?25l[?1c2kdd3j=][ENDTEST[?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c 27 lines to indent... 28indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))foo; if (c1 &&(c2 || c3)) { } if (c123456789&& (c22345|| c3))printf("foo\n");if ( c1&& ( c2|| c3))foo; func( c1&& ( c2|| c3))foo; } STARTTEST[?25h[?0c[?25l[?1c :set cino=k2,(s [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 26C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1 2kdd3j=][[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=k2,(s [?25l[?1c[?25h[?0c[?25l[?1c2kdd3j=][ENDTEST[?25h[?0c[?25l[?1c void func(void)[?25h[?0c[?25l[?1c 14 lines to indent... 15indented [?25h[?0c[?25l[?1c {[?25h[?0c[?25l[?1c /^STARTTEST if (condition1&& condition2)action(); function(argument1&& argument2);if (c1 && (c2 ||c3))foo; if (c1 &&(c2 || c3)) { } } STARTTEST[?25h[?0c[?25l[?1c :set cino=N-s [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 47C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/^NAMESPACESTART =/^NAMESPACEEND[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=N-s [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^NAMESPACESTART [?25l[?1cNAMESPACESTART[?25h[?0c[?25l[?1c /[?25h[?0c^NAMESPACEEND [?25l[?1c81 lines to indent... 50 82indented [?25h[?0c[?25l[?1c/^STARTTEST 111111111111111111; namespace test2 { 22222222222222222; } } /* invalid namespaces use block indent */ namespace test test2 { 111111111111111111111; } namespace11111111111 { 111111111111; } namespace() { 1111111111111; } namespace() { 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", x: 4, "y": 5 } } JSEND STARTTEST :set cino=j1,J1 /^JSSTART =/^JSEND ENDTEST JSSTART var foo = [ 1, 2, 3 ];[?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=j1,J1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSSTART [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSEND [?25l[?1c12 lines to indent... 13indented  foo: { that: this, some: ok, }, "bar":{ a : 2, b: "123abc", x: 4, "y": 5 }[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=j1,J1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSSTART [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSEND [?25l[?1c5 lines to indent... 6indented  1, 2, 3[?25h[?0c[?25l[?1c/^STARTTEST JSEND STARTTEST[?25h[?0c[?25l[?1c :set cino=j1,J1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/^JSSTART =/^JSEND[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=j1,J1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSSTART [?25l[?1cJSSTART[?25h[?0c[?25l[?1c /[?25h[?0c^JSEND [?25l[?1c7 lines to indent... 8indented [?25h[?0c[?25l[?1c/^STARTTEST function bar() { var foo = [1,2,3 ]; } JSEND STARTTEST[?25h[?0c[?25l[?1c :set cino=j1,J1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/^JSSTART =/^JSEND[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=j1,J1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSSTART [?25l[?1cJSSTART[?25h[?0c[?25l[?1c /[?25h[?0c^JSEND [?25l[?1c58 lines to indent... 509indented [?25h[?0c[?25l[?1c/^STARTTEST callback: function(){return true;}}, options||{})); }$.fn[class_name]=function() {var _arguments=arguments;return this.each(function(){var options=$(this).data(class_name+'_public');if (!options) {init.apply(this,_arguments);} else {var method=public_method[_arguments[0]];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 ], callback: function(){ return true; } }, options||{})); } JSEND STARTTEST :set cino=j1,J1 /^JSSTART =/^JSEND ENDTEST JSSTART (function($){ function init(options) { $(this).data(class_name+'_public',$.extend({},{[?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=j1,J1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSSTART [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSEND [?25l[?1c14 lines to indent... 15indented  $(this).data(class_name+'_public',$.extend({},{ foo: 'bar', bar: 2, foobar: [ 1, 2, 3 ], callback: function(){ return true; } }, options||{}));[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 35C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=j1,J1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSSTART [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSEND [?25l[?1c16 lines to indent... 17indented  function init(options) { $(this).data(class_name+'_public',$.extend({},{[?25h[?0c[?25l[?1c/^STARTTEST foo: 'bar',bar: 2,foobar: [1,2,3],callback: function(){return true;}}, options||{})); } })(jQuery); JSEND STARTTEST[?25h[?0c[?25l[?1c :set cino=j1,J1,+2 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 38C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1/^JSSTART =/^JSEND[?25h[?0c[?25l[?1c ENDTEST [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cino=j1,J1,+2 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^JSSTART [?25l[?1cJSSTART[?25h[?0c[?25l[?1c /[?25h[?0c^JSEND [?25l[?1c149 lines to indent... 100 50 lines to indent... 150 lines indented [?25h[?0c[?25l[?1c/^STARTTEST c,d,e,f,g,h,i; }) ]; // 9 var a = [ 0 + 5 * 9 * 'a', 'b', 0 + 5 * 9 * 'c', 'd', 'e', 'f', 'g', 'h', 'i' ]; // 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 + \ 2 + \ 4 /* end of define */ STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/start of AUTO/,$wq! test.out ENDTEST[?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 48C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset cin cino& [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cstart of define [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cend of define [?25l[?1c11 lines to indent... 12indented  BBB\ CCC 1 + \ 2 + \ 4[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 61C written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/+-1[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cg/^STARTTEST/.,/^ENDTEST/d [?25l[?1c227 fewer lines3];}// 8var x = [ (function(){ var a, b,c, d, e, f, g, h, i; })];// 9var a = [ 0 +5 *9 *a 'b 0 + 5 * 9 * 'c', 'd' 'e' 'f' 'g' 'h' 'i'];// 10var a, b, c, d, e, f, g,h, i;JSEND/* start of define */ {}AAA BBB\CCC#define CNT \1 + \ 2 + \ 4/* end of define */[?25h[?0c[?25l[?1c:[?25h[?0c1;/start of AUTO/,$wq! test.out [?25l[?1c"test.out" [New] 2096L, 20188C written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 vim: set noai :this is a testthis is a testthis is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 20 lines, 678 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nocompatible viminfo+=nviminfo [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufEnter Xxx brew [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cstart of [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c.,/end of/w! Xxx " write test file Xxx [?25l[?1c"Xxx" [New] 7L, 124C written[?25h[?0c[?25l[?1c:[?25h[?0cset ai modeline modelines=3 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0csp Xxx " split to Xxx, autocmd will do :brew [?25l[?1c"Xxx" 7L, 124Ctest4.in :au! 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 XxxG:r Xxx " include Xxx in the current file:set fo+=r " issue #57 do not move cursor on when autoindent is setGo# abcdef^[2hi^Od0^[o# abcdef^[2hi^Od0^[::?startstart?,$w! test.out:qa!ENDTESTstartstartstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a testend of test file Xxxtest4.in test4.in" line 1 of 34 --2%-- col 1[?25h[?0c[?25l[?1cthis is a testthis is a test end of test file Xxx[?25h[?0c[?25l[?1c?[?25h[?0cthis is a [?25l[?1c[?25h[?0c[?25l[?1c-- INSERT -- this should be auto-indented[+]this should be auto-indented[+][?25h[?0c[?25l[?1c end of test file Xxx[?25h[?0c[?25l[?1c:[?25h[?0c " Append text with autoindent to this file [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau! BufEnter Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cbuf Xxx " go to Xxx, no autocmd anymore [?25l[?1c"Xxx" 7L, 124Cstart of test file Xxx vim: set noai : this is a test this is a test this is a test this is a testend of test file Xxx~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx [?25h[?0c[?25l[?1c?[?25h[?0cthis is a [?25l[?1c[?25h[?0c[?25l[?1c-- INSERT --this should be in column 1[+][?25h[?0c[?25l[?1c:[?25h[?0cwq " append text without autoindent to Xxx [?25l[?1c"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 file:au! BufEnter Xxx:buf Xxx " go to Xxx, no autocmd anymoreG?this is aothis should be in column 1^[:wq " append text without autoindent to XxxG:r Xxx " include Xxx in the current file:set fo+=r " issue #57 do not move cursor on when autoindent is setGo# abcdef^[2hi^Od0^[o# abcdef^[2hi^Od0^[::?startstart?,$w! test.out:qa!ENDTESTstartstartstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a test this should be auto-indentedend of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cr Xxx " include Xxx in the current file [?25l[?1c"Xxx" 8L, 151Cstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a testthis should be in column 1end of test file Xxx[?25h[?0c[?25l[?1c:[?25h[?0cset fo+=r " issue #57 do not move cursor on when autoindent is set [?25l[?1c[?25h[?0c[?25l[?1c-- INSERT --# abcdef[?25h[?0c[?25l[?1c-- INSERT -- -- (insert) --# def[?25h[?0c[?25l[?1cINSERT --defo[?25h[?0cd[?25l[?1c[?25h[?0c[?25l[?1c-- INSERT --# abcdef[?25h[?0c[?25l[?1c-- INSERT -- -- (insert) --[?25h[?0c[?25l[?1cINSERT --def:[?25h[?0cd[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c:[?25h[?0c?startstart?,$w! test.out [?25l[?1c"test.out" [New] 20L, 330C written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 16 lines, 664 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufLeave Xxx bwipe [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cstart of [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c.,/end of/w! Xxx " write test file Xxx [?25l[?1c"Xxx" [New File] 7 lines, 124 characters written[?25h[?0c[?25l[?1c:[?25h[?0csp Xxx " split to Xxx [?25l[?1c"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 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 oneithis is another test line^[:w >>test.out: " append an extra line to the output file:qa!ENDTESTstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a testend of test file Xxxtest5.in [?25h[?0c[?25l[?1c:[?25h[?0cbwipe " delete buffer Xxx, now we're back here [?25l[?1cTest 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 contents:bwipe test.out " delete alternate buffer:au bufleave test5.in bwipe:bwipe! " delete current buffer, get an empty oneithis is another test line^[:w >>test.out: " append an extra line to the output file:qa!ENDTESTstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a testend of test file Xxx~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "test5.in" line 23 of 29 --79%-- col 1[?25h[?0c[?25l[?1c?[?25h[?0cthis is a [?25l[?1c[?25h[?0c[?25l[?1cthis is some more text[?25h[?0c[?25l[?1c:[?25h[?0c " Append some text to this file [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c?start?,$w! test.out " Write current file contents [?25l[?1c"test.out" [New File] 8 lines, 147 characters written[?25h[?0c[?25l[?1c:[?25h[?0cbwipe test.out " delete alternate buffer [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau bufleave test5.in bwipe [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cbwipe! " delete current buffer, get an empty one [?25l[?1cError 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[?25h[?0c[?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1cthis is another test line[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 26 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c " append an extra line to the output file [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 508 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^start of [?25l[?1c[?25h[?0c[?25l[?1c1[?25h[?0c[?25l[?1c:[?25h[?0c.,/end of/w! Xxx1 " write test file Xxx1 [?25l[?1c"Xxx1" [New File] 4 lines, 77 characters written[?25h[?0c[?25l[?1c:[?25h[?0csp Xxx1 [?25l[?1c"Xxx1" 4 lines, 77 charactersstart of test file Xxx1this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx1 $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!ENDTESTstart of test file Xxx1 this is a test this is a testend of test file Xxxtest7.in [+] [?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1cTest 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: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!ENDTESTstart of test file Xxx1 this is a test this is a testend of test file Xxx~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c2[?25h[?0c[?25l[?1c:[?25h[?0c.,/end of/w! Xxx2 " write test file Xxx2 [?25l[?1c"Xxx2" [New File] 4 lines, 77 characters written[?25h[?0c[?25l[?1c:[?25h[?0csp Xxx2 [?25l[?1c"Xxx2" 4 lines, 77 charactersstart of test file Xxx2this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx2 $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!ENDTESTstart of test file Xxx2 this is a test this is a testend of test file Xxxtest7.in [+] [?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1cTest 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: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!ENDTESTstart of test file Xxx2 this is a test this is a testend of test file Xxx~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c3[?25h[?0c[?25l[?1c:[?25h[?0c.,/end of/w! Xxx3 " write test file Xxx3 [?25l[?1c"Xxx3" [New File] 4 lines, 77 characters written[?25h[?0c[?25l[?1c:[?25h[?0csp Xxx3 [?25l[?1c"Xxx3" 4 lines, 77 charactersstart of test file Xxx3this is a test this is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx3 $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!ENDTESTstart of test file Xxx3 this is a test this is a testend of test file Xxxtest7.in [+] [?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1cTest 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: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!ENDTESTstart of test file Xxx3 this is a test this is a testend of test file Xxx~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cau BufReadPost Xxx2 bwipe [?25l[?1c[?25h[?0c[?25l[?1c4[?25h[?0c[?25l[?1c:[?25h[?0cball " open window for all args, close Xxx2 [?25l[?1c"Xxx1"4 lines, 77 characters "Xxx2" 4 lines, 77 characters Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0c.,$w! test.out " Write contents of this file [?25l[?1c"test.out" [New File] 4 lines, 77 characters written Press ENTER or type command to continue[?25h[?0c[?25l[?1c$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 Xxx4this is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ test7.in [+] start of test file Xxx1this is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx1 [?25h[?0ctest7.in [+] Xxx1 [?25l[?1c:[?25h[?0cw >>test.out " Append contents of second window (Xxx1) [?25l[?1c"test.out" 4 lines, 77 characters appended[?25h[?0ctest7.in [+] Xxx1 [?25l[?1c:[?25h[?0c/^start of/,$w >>test.out " Append contents of last window (this file) [?25l[?1csearch hit BOTTOM, continuing at TOP"test.out" 4 lines, 77 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 endfunc :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 start of Xxxtest end of Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 37 lines, 1054 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufWritePre Xxx1 bunload [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufWritePre Xxx2 bwipe [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^start of [?25l[?1c[?25h[?0c[?25l[?1c1[?25h[?0c[?25l[?1c:[?25h[?0c.,/end of/w! Xxx1 " write test file Xxx1 [?25l[?1c"Xxx1" [New File] 3 lines, 31 characters written[?25h[?0c[?25l[?1c2[?25h[?0c[?25l[?1c:[?25h[?0c.,/end of/w! Xxx2 " write test file Xxx2 [?25l[?1c"Xxx2" [New File] 3 lines, 31 characters written[?25h[?0c[?25l[?1c:[?25h[?0ce! Xxx2 " edit Xxx2 [?25l[?1c"Xxx2" 3 lines, 31 charactersstart of Xxx2 testend of Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cbdel test8.in^I^I" delete this file from the buffer list [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce Xxx1 " edit Xxx1 [?25l[?1c"Xxx1" 3 lines, 31 characters1 [?25h[?0c[?25l[?1c:[?25h[?0cw " write it, will unload it and give an error msg [?25l[?1c"Xxx2"3 lines, 31 characters E203: Autocommands deleted or unloaded buffer to be written Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cw! test.out " Write contents of this file [?25l[?1c"test.out" [New File] 3 lines, 31 characters written Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0ce! Xxx2 " start editing Xxx2 [?25l[?1c"Xxx2" 3 lines, 31 charactersstart of Xxx2test end of Xxx"Xxx2" 3 lines, 31 characters[?25h[?0c[?25l[?1c:[?25h[?0cbwipe test.out " remove test.out from the buffer list [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw " write it, will delete the buffer and give an error msg [?25l[?1c"Xxx1"3 lines, 31 characters E203: Autocommands deleted or unloaded buffer to be written Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out " Append contents of this file [?25l[?1c"test.out" 3 lines, 31 characters appended Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cau! BufWritePre [?25l[?1cstart of Xxx1test end of Xxx[?25h[?0c[?25l[?1c:[?25h[?0cfunc CloseAll() [?25l[?1c : [?25h[?0c let i = 0 [?25l[?1c: [?25h[?0c while i <= bufnr('$') [?25l[?1c: [?25h[?0c if i != bufnr('%') && bufloaded(i) [?25l[?1c: [?25h[?0c exe i . "bunload" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c let i += 1 [?25l[?1c: [?25h[?0c endwhile [?25l[?1c: [?25h[?0cendfunc [?25l[?1cstart of Xxx1test end of Xxx ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cfunc WriteToOut() [?25l[?1c : [?25h[?0c edit! test.out [?25l[?1c: [?25h[?0c $put ='VimLeave done' [?25l[?1c: [?25h[?0c write [?25l[?1c: [?25h[?0cendfunc [?25l[?1cstart of Xxx1test end of Xxx ~ [?25h[?0c[?25l[?1c:[?25h[?0cset viminfo='100,nviminfo [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufUnload * call CloseAll() [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau VimLeave * call WriteToOut() [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce small.vim [?25l[?1cError detected while processing function CloseAll: line 4: E16: Invalid range: 0bunload "small.vim" 1 line, 1 character Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0csp mbyte.vim [?25l[?1c"mbyte.vim" 0 lines, 0 characters~ ~ ~ mbyte.vim small.vim "mbyte.vim" 0 lines, 0 characters[?25h[?0c[?25l[?1c:[?25h[?0cq [?25l[?1cError detected while processing function CloseAll: line 4: E16: Invalid range: 0bunload  "test.out" 6 lines, 62 characters "test.out" 7 lines, 76 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 117 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufLeave test9.in bwipe yy [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce yy [?25l[?1cE143: Autocommands unexpectedly deleted new buffer yy[?25h[?0c[?25l[?1c:[?25h[?0c/^start of/,$w! test.out " Write contents of this file [?25l[?1c"test.out" [New File] 2 lines, 42 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ]maC^[:.w >>test.out [maD^[:.w >>test.out k2[maE^[:.w >>test.out 3[maF^[:.w >>test.out ]MaG^[:.w >>test.out j2]MaH^[:.w >>test.out ]M]MaI^[:.w >>test.out 2[MaJ^[:.w >>test.out k[MaK^[:.w >>test.out 3[MaL^[:.w >>test.out :" /^foobar :let startline = line('.') :call search('foobar', 'c') :call append(line('$'), line('.') - startline) j:call search('^$', 'c') :call append(line('$'), line('.') - startline) :call search('^$', 'bc') :call append(line('$'), line('.') - startline) /two :call search('.', 'c') :call append(line('$'), getline('.')[col('.') - 1:]) :" /^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![?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 57 lines, 1158 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset belloff=all [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cStart cursor here [?25l[?1c- Bug in "vPPPP" on this text (Webb):{cmd;{cmd; /* <-- Start cursor here */[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c{ cmd; /* <-- Start cursor here */ { } }[?25h[?0c[?25l[?1c cmd; }[?25h[?0c[?25l[?1c 6 fewer lines }Piece of Java{ tt m1 { t1;[?25h[?0c[?25l[?1c:[?25h[?0c?Bug?,/Piece/-2w! test.out [?25l[?1c"test.out" [New File] 3 lines, 44 characters written[?25h[?0c[?25l[?1c/[?25h[?0c^- Bug [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c:[?25h[?0cs/u/~u~/ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cs/i/~u~/ [?25l[?1cuuun "vPPPP" on this text (Webb): [?25h[?0c[?25l[?1c:[?25h[?0cs/o/~~~/ [?25l[?1cuuuuuuuuun this text (Webb): [?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 48 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cif has("ebcdic") [?25l[?1c : [?25h[?0c: let tt = "o\193\xc2\o303 \90a\xfg\o578\" [?25l[?1c: [?25h[?0c:else [?25l[?1c: [?25h[?0c: let tt = "o\65\x42\o103 \33a\xfg\o78\" [?25l[?1c: [?25h[?0c:endif [?25l[?1cvaBiBD:?Bug?,/Piece/-2w! test.out /^- Bug :s/u/~u~/ :s/i/~u~/[?25h[?0c[?25l[?1c:[?25h[?0cexe "normal " . tt [?25l[?1cABC !a^Og^G8[?25h[?0c[?25l[?1c:[?25h[?0cunlet tt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset vb [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^Piece [?25l[?1c[?25h[?0c[?25l[?1c{A[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 10 characters appended[?25h[?0c[?25l[?1c t1;[?25h[?0c[?25l[?1c} e1tt m2 {[?25h[?0c[?25l[?1c{B[?25h[?0c[?25l[?1c :[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 10 characters appended[?25h[?0c[?25l[?1ct2;} e2tt m3 {[?25h[?0c[?25l[?1c{C[?25h[?0c[?25l[?1c :[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 10 characters appended[?25h[?0c[?25l[?1c{DC[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c{EA[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c{F[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 3 characters appended[?25h[?0c[?25l[?1c}G e1[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 7 characters appended[?25h[?0c [?25l[?1cif (x){t3;}} e3[?25h[?0c[?25l[?1c}H e3[?25h[?0c[?25l[?1c :[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 7 characters appended[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c}I[?25h[?0c[?25l[?1c :[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 3 characters appended[?25h[?0c[?25l[?1c}JH e3[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 8 characters appended[?25h[?0c[?25l[?1c}K e2[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 7 characters appended[?25h[?0c[?25l[?1c{LF[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 4 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^foobar [?25l[?1cfoobar[?25h[?0c[?25l[?1c :[?25h[?0clet startline = line('.') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall search('foobar', 'c') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append(line('$'), line('.') - startline) [?25l[?1c[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0ccall search('^$', 'c') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append(line('$'), line('.') - startline) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall search('^$', 'bc') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append(line('$'), line('.') - startline) [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0ctwo [?25l[?1csubstitute foo asdf one two[?25h[?0c[?25l[?1c :[?25h[?0ccall search('.', 'c') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append(line('$'), getline('.')[col('.') - 1:]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^substitute [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c:[?25h[?0cs/foo/bar/ [?25l[?1cbar [?25h[?0c[?25l[?1c:[?25h[?0c$put =@/ [?25l[?1csearch() 0 1 1 two foo[?25h[?0c[?25l[?1c /[?25h[?0c^substitute [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c:[?25h[?0ckeeppatterns s/asdf/xyz/ [?25l[?1cxyz[?25h[?0c[?25l[?1c:[?25h[?0c$put =@/ [?25l[?1c ^substitute[?25h[?0c[?25l[?1c /[?25h[?0c^substitute [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c:[?25h[?0c$put =@0 [?25l[?1c substitute bar xyz[?25h[?0c[?25l[?1c /[?25h[?0cbar /e [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put =@0 [?25l[?1c substitute bar xyz[?25h[?0c[?25l[?1c :[?25h[?0ckeeppatterns /xyz [?25l[?1c[?25h[?0c[?25l[?1c /bar /exyz[?25h[?0c[?25l[?1c:[?25h[?0c/^search()/,$w >>test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" 9 lines, 58 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :leftaafaadfaasdfaaasdfaaxasdfaa asxxdfaatest for :centeraafaafd asdfdfaasdfaafd asdfasdfaaxasdfaasdfasdfasdfasdfasdf asxxdfaatest for :rightaafaadfaasdfaaasdfaaxasdfaaasxxdfaaasxa;ofaaasdfaqweraaaxfaaxdfaaxsdfaaxasdfaaxxasdfaaxasxxdfaaxasxa;ofaaxasdfaqweraxaaxxfaaxxdfaaxx[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 401 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset tw=65 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^\s*test for :left/,/^\s*test for :center/ left [?25l[?1csearch hit BOTTOM, continuing at TOPtest for :lefta afa adfa asdfaaasdfa axasdfaatest for :cente[?25h[?0c[?25l[?1c:[?25h[?0c/^\s*test for :center/,/^\s*test for :right/ center [?25l[?1c test for :center  aa fa afd asdf  dfaa sdfa afd asdf  asdfaaxasdfa  asxxdfaa test for :right[?25h[?0c[?25l[?1c:[?25h[?0c/^\s*test for :right/,/^xxx/-1 right [?25l[?1c test for :right  aa  faa  dfaa  sdfaa  asdfaa  xasdfaa  asxxdfaa  asxa;ofaa  asdfaqwera  aax  faax  dfaax  sdfaax  asdfaax  xasdfaax  asxxdfaax  asxa;ofaax  asdfaqwerax  aaxx  faaxx  dfaaxx[?25h[?0c[?25l[?1c:[?25h[?0cset fo+=tcroql tw=72 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cxxxxxxxx$ [?25l[?1cdfaaxxxsdfaaxxxasdfaaxxxxasdfaaxxxasxxdfaaxxxasxa;ofaaxxxasdfaqweraxxxaaxxxofaaxxxodfaaxxxosdfaaxxxoasdfaaxxxoxasdfaaxxxoasxxdfaaxxxoasxa;ofaaxxxoasdfaqweraxxxoaaxxxoifaaxxxoidfaaxxxoisdfaaxxxoiasdfaaxxxoixasdfaaxxxoiasxxdfaaxxxoiasxa;ofaaxxxoiasdfaqweraxxxoiaaxxxoikfaaxxxoikdfaaxxxoiksdfaaxxxoikasdfaaxxxoikxasdfaaxxxoikasxxdfaaxxxoikasxa;ofaaxxxoikasdfaqweraxxxoikaaxxxoikefaaxxxoikedfaaxxxoikesdfaaxxxoikeasdfaaxxxoikexasdfaaxxxoikeasxxdfaaxxxoikeasxa;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[?25h[?0c [?25l[?1c  xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xxxx xxxxxxx. xxxx xxxx.xxxxxxx: xxxx xxxxxxx, xx xxxx xxxxxxx~ [?25h[?0c [?25l[?1c:[?25h[?0cset nocp viminfo+=nviminfo [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" undo/redo here to make the next undo only work on the following changes [?25l[?1c[?25h[?0c[?25l[?1c1 more line; before #1 0 seconds agoTests 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 :leftaafaadfaasdfaaasdfaaxasdfaa asxxdfaatest for :centeraafaafd asdfdfaasdfaafd asdfasdfaaxasdfaasdfasdfasdfasdfasdf asxxdfaatest for :rightaafaadfaasdfaaasdfaaxasdfaaasxxdfaaasxa;ofaaasdfaqweraaaxfaaxdfaaxsdfaaxasdfaaxxasdfaaxasxxdfaaxasxa;ofaaxasdfaqweraxaaxxfaaxxdfaaxx[?25h[?0c[?25l[?1c1 line less; after #1 0 seconds agotest for :lefta afa adfa asdfaaasdfa axasdfaa test for :center  aa fa afd asdf  dfaa sdfa afd asdf  asdfaaxasdfa  asxxdfaa test for :right  aa  faa  dfaa  sdfaa  asdfaa  xasdfaa  asxxdfaa  asxa;ofaa  asdfaqwera  aax  faax  dfaax  sdfaax  asdfaax  xasdfaax  asxxdfaax  asxa;ofaax  asdfaqwerax  aaxx  faaxx  dfaaxx[?25h[?0c [?25l[?1c:[?25h[?0cmap gg :.,.+2s/^/x/kk:set tw=3gqq [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^aa [?25l[?1cfaaxxxdfaaxxxsdfaaxxxasdfaaxxxxasdfaaxxxasxxdfaaxxxasxa;ofaaxxxasdfaqweraxxxaaxxxofaaxxxodfaaxxxosdfaaxxxoasdfaaxxxoxasdfaaxxxoasxxdfaaxxxoasxa;ofaaxxxoasdfaqweraxxxoaaxxxoifaaxxxoidfaaxxxoisdfaaxxxoiasdfaaxxxoixasdfaaxxxoiasxxdfaaxxxoiasxa;ofaaxxxoiasdfaqweraxxxoiaaxxxoikfaaxxxoikdfaaxxxoiksdfaaxxxoikasdfaaxxxoikxasdfaaxxxoikasxxdfaaxxxoikasxa;ofaaxxxoikasdfaqweraxxxoikaaxxxoikefaaxxxoikedfaaxxxoikesdfaaxxxoikeasdfaaxxxoikexasdfaaxxxoikeasxxdfaaxxxoikeasxa;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[?25h[?0c[?25l[?1c :.,.+2s/^/x/ 3 substitutions on 3 linesxaa aa aa aa xbb bb bb bb xcc cc cc cc [?25h[?0c[?25l[?1c:set tw=3 [?25h[?0c[?25l[?1c 3 more lines aaaaaa3 more lines[?25h[?0c[?25l[?1c 3 fewer lines; before #2 0 seconds agoaa aa aa aa bb bb bb bb cc cc cc cc ~ [?25h[?0c [?25l[?1c:[?25h[?0c?test for :left?,$w! test.out [?25l[?1c"test.out"[New] 111L, 2304C written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 textother test text a cde f ghi test text Second line beginning with whitespace ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 19 lines, 447 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset smarttab expandtab ts=8 sw=4 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" make sure that backspace works, no matter what termcap is used [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset t_kD=^^? t_kb=^^H [?25l[?1cTests 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 textother test text a cde f ghi test text Second line beginning with whitespace ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c/[?25h[?0csome [?25l[?1c[?25h[?0c[?25l[?1c ome test text[?25h[?0c[?25l[?1c:[?25h[?0cset noexpandtab [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cother [?25l[?1c[?25h[?0c[?25l[?1c ther test text[?25h[?0c[?25l[?1c:[?25h[?0c" Test replacing with Tabs and then backspacing to undo it [?25l[?1c[?25h[?0c [?25l[?1c[?25h[?0c [?25l[?1c:[?25h[?0c" Test replacing with Tabs [?25l[?1c[?25h[?0c [?25l[?1c hi[?25h[?0c[?25l[?1c:[?25h[?0c" Test that copyindent works with expandtab set [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset expandtab smartindent copyindent ts=8 sw=8 sts=8 [?25l[?1c[?25h[?0c[?25l[?1c{x[?25h[?0c[?25l[?1c:[?25h[?0cset nosol [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cSecond line/ [?25l[?1c[?25h[?0c[?25l[?1c with whitespace[?25h[?0c[?25l[?1c:[?25h[?0c?^start?,$w! test.out [?25l[?1c"test.out" [New File] 10 lines, 121 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 11 lines, 107 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso tiny.vim [?25l[?1c[?25h[?0c[?25l[?1cx[?25h[?0c [?25l[?1cy[?25h[?0c[?25l[?1c ~ [?25h[?0c[?25l[?1c2 changes; before #1 0 seconds ago[?25h[?0c [?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] :/56$/,$-1w! test.out:qa!ENDTEST123456234567345678test text test tex start here some text test texttest textOx^[jAy^[kddtest20.in [?25h[?0c[?25l[?1cx[+][?25h[?0c [?25l[?1cy[?25h[?0c[?25l[?1c ~ [?25h[?0c[?25l[?1c1 line less; before #1 0 seconds ago [?25h[?0c[?25l[?1c:[?25h[?0cquit! [?25l[?1cTests 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!ENDTEST123456234567345678test text test tex start here some text test texttest textOx^[jAy^[kdd~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c[?25h[?0c [?25l[?1c/[?25h[?0cstart here$ [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1cs[?25h[?0c[?25l[?1ce[?25h[?0c[?25l[?1ct t[?25h[?0c[?25l[?1cat [?25h[?0c[?25l[?1crt hereextex[?25h[?0c[?25l[?1c/[?25h[?0c456$ [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c4 234[?25h[?0c[?25l[?1c5 345[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1cstart here56 234start here67 345start here78[?25h[?0c[?25l[?1c:[?25h[?0c/56$/,$-1w! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 10 lines, 106 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 4 lines, 38 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset ta tx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! [?25l[?1c"test22.in" 13 lines, 197 characters[?25h[?0c[?25l[?1c:[?25h[?0c$-3,$w! test.out [?25l[?1c"test.out" [New File] 4 lines, 79 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 7 lines, 125 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0c$-1w! Xfile1 [?25l[?1c"Xfile1" [New File] 1 line, 8 characters written[?25h[?0c[?25l[?1c:[?25h[?0c$w! Xfile2 [?25l[?1c"Xfile2" [New File] 1 line, 8 characters written[?25h[?0c[?25l[?1c:[?25h[?0cedit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w [?25l[?1c"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[?25h[?0c[?25l[?1c:[?25h[?0cw! test.out [?25l[?1c"test.out" [New File] 1 line, 12 characters written Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0ce Xfile1 [?25l[?1c"Xfile1" 1 line, 11 charactersfooPIPEbar ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "Xfile1" 1 line, 11 characters[?25h[?0c[?25l[?1c:[?25h[?0cw >> test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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\)\+// :s/\(a*\)\+// :s/\(a*\)*// :s/\(a\)\{2,3}/A/ :s/\(a\)\{-2,3}/A/ :s/\(a\)*\(12\)\@>/A/ :s/\(foo\)\@\|\.\)\=\)\+=/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[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 51 lines, 519 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset nocompatible viminfo+=nviminfo [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c[\x] [?25l[?1c[?25h[?0c[?25l[?1ctext test text[?25h[?0c[?25l[?1c/[?25h[?0c[\t\]] [?25l[?1c[?25h[?0c[?25l[?1ctext test tex[?25h[?0c[?25l[?1c/[?25h[?0c[]y] [?25l[?1c[?25h[?0c[?25l[?1ctest text[?25h[?0c[?25l[?1c/[?25h[?0c[\]] [?25l[?1c[?25h[?0c[?25l[?1ctext test text[?25h[?0c[?25l[?1c/[?25h[?0c[y^] [?25l[?1c[?25h[?0c[?25l[?1cst text[?25h[?0c[?25l[?1c/[?25h[?0c[$y] [?25l[?1c[?25h[?0c[?25l[?1cxt test text[?25h[?0c[?25l[?1c/[?25h[?0c[\x61] [?25l[?1c test taext test text x61[?25h[?0c[?25l[?1cext test text x61[?25h[?0c[?25l[?1c /[?25h[?0c[\x60-\x64] [?25l[?1c test tbext test text x60-x64[?25h[?0c[?25l[?1cext test text x60-x64[?25h[?0c[?25l[?1c test 5text test text x78 5[?25h[?0c [?25l[?1c /[?25h[?0c[\x785] [?25l[?1c[?25h[?0c[?25l[?1ctext test text x78 5[?25h[?0c[?25l[?1c/[?25h[?0c[\o143] [?25l[?1c testc text test text o143[?25h[?0c[?25l[?1c text test text o143[?25h[?0c[?25l[?1c /[?25h[?0c[\o140-\o144] [?25l[?1c tesdt text test text o140-o144[?25h[?0c[?25l[?1ct text test text o140-o14[?25h[?0c[?25l[?1c /[?25h[?0c[\o417] [?25l[?1c test7 text test text o41 7[?25h[?0c[?25l[?1c text test text o41 7[?25h[?0c[?25l[?1c /[?25h[?0c\%x42 [?25l[?1c test text tBest text \%x42[?25h[?0c[?25l[?1cest text \%x42[?25h[?0c[?25l[?1c /[?25h[?0c\%o103 [?25l[?1c test text teCst text \%o103[?25h[?0c[?25l[?1cst text \%o103[?25h[?0c[?25l[?1c /[?25h[?0c[\x00] [?25l[?1c test text ^@test text [\x00][?25h[?0c[?25l[?1ctest text [\x00][?25h[?0c[?25l[?1c test te^@xt t^Dest t^Pext [\x00-\x10][?25h[?0c[?25l[?1c :[?25h[?0cs/[\x00-\x10]//g [?25l[?1c3 substitutions on 1 linext test text [\x00-\x10][?25h[?0c[?25l[?1c test \xyztext test text [\x-z][?25h[?0c[?25l[?1c :[?25h[?0cs/[\x-z]\+// [?25l[?1ctext test text [\x-z][?25h[?0c[?25l[?1c test text tev\uyst text [\u-z][?25h[?0c[?25l[?1c :[?25h[?0cs/[\u-z]\{2,}// [?25l[?1cst text [\u-z][?25h[?0c[?25l[?1c xx aaaaa xx a[?25h[?0c[?25l[?1c :[?25h[?0cs/\(a\)\+// [?25l[?1c xx [?25h[?0c[?25l[?1c xx aaaaa xx a[?25h[?0c[?25l[?1c :[?25h[?0cs/\(a*\)\+// [?25l[?1c[?25h[?0c[?25l[?1c xx aaaaa xx a[?25h[?0c[?25l[?1c :[?25h[?0cs/\(a*\)*// [?25l[?1c[?25h[?0c[?25l[?1c xx aaaaa xx[?25h[?0c[?25l[?1c :[?25h[?0cs/\(a\)\{2,3}/A/ [?25l[?1cAaa xx[?25h[?0c[?25l[?1c xx aaaaa xx[?25h[?0c[?25l[?1c :[?25h[?0cs/\(a\)\{-2,3}/A/ [?25l[?1cAaaa x[?25h[?0c[?25l[?1c xx aaa12aa xx[?25h[?0c[?25l[?1c :[?25h[?0cs/\(a\)*\(12\)\@>/A/ [?25l[?1cAaa xx[?25h[?0c[?25l[?1c xx foobar xbar xx[?25h[?0c[?25l[?1c :[?25h[?0cs/\(foo\)\@\|\.\)\=\)\+=/XX/ [?25l[?1cXX [?25h[?0c[?25l[?1c hh= 77;[?25h[?0c[?25l[?1c :[?25h[?0cs/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/ [?25l[?1cYY 77;[?25h[?0c[?25l[?1c aaa[?25h[?0c[?25l[?1c :[?25h[?0cs/aaa/xyz/ [?25l[?1cxyz [?25h[?0c[?25l[?1c xyz[?25h[?0c[?25l[?1c :[?25h[?0cs/~/bcd/ [?25l[?1cbcd [?25h[?0c[?25l[?1c bcdbcdbcd[?25h[?0c[?25l[?1c :[?25h[?0cs/~\+/BB/ [?25l[?1cBB[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c?start?,$w! test.out [?25l[?1c"test.out" [New] 32L, 586C written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 : 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 39 lines, 696 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet i = 0 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cwhile i < 12 [?25l[?1c : [?25h[?0c: let i = i + 1 [?25l[?1c: [?25h[?0c: if has("ebcdic") [?25l[?1c: [?25h[?0c: execute "normal o" . i . "\047" [?25l[?1c: [?25h[?0c: else [?25l[?1c: [?25h[?0c: execute "normal o" . i . "\033" [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: if i % 2 [?25l[?1c: [?25h[?0c: normal Ax^^[  [?25l[?1c: [?25h[?0c: if i == 9 [?25l[?1c: [?25h[?0c: break [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: if i == 5 [?25l[?1c: [?25h[?0c: continue [?25l[?1c: [?25h[?0c: else [?25l[?1c: [?25h[?0c: let j = 9 [?25l[?1c: [?25h[?0c: while j > 0 [?25l[?1c:[?25h[?0c: if has("ebcdic") [?25l[?1c:[?25h[?0c: execute "normal" j . "a" . j . "\x27" [?25l[?1c:[?25h[?0c: else [?25l[?1c:[?25h[?0c: execute "normal" j . "a" . j . "\x1b" [?25l[?1c:[?25h[?0c: endif [?25l[?1c:[?25h[?0c: let j = j - 1 [?25l[?1c:[?25h[?0c: endwhile [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: if i == 9 [?25l[?1c: [?25h[?0c: if has("ebcdic") [?25l[?1c: [?25h[?0c: execute "normal Az\047" [?25l[?1c: [?25h[?0c: else [?25l[?1c: [?25h[?0c: execute "normal Az\033" [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c:endwhile [?25l[?1cTest 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 : endwhile : endif : endif : if i == 9 : if has("ebcdic")1x99999999988888888777777766666655555444433322123x99999999988888888777777766666655555444433322145x67x99999999988888888777777766666655555444433322189x[?25h[?0c[?25l[?1c:[?25h[?0cunlet i j [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c't,$w! test.out [?25l[?1c"test.out" [New File] 10 lines, 159 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 114 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0c/firstline/+1,/lastline/-1w! Xtestfile [?25l[?1c"Xtestfile" [New File] 10 lines, 148 characters written[?25h[?0c[?25l[?1c:[?25h[?0cso Xtestfile [?25l[?1c[?25h[?0c[?25l[?1csd map __2 asd^[[?25h[?0c[?25l[?1csecond[?25h[?0cd [?25l[?1csd^[[?25h[?0c^[ [?25l[?1csd^@map __5 asd^@[?25h[?0c[?25l[?1cfifth[?25h[?0c[?25l[?1c:[?25h[?0c'm,$s/^@/0/g [?25l[?1c0map __5 asd0fifth[?25h[?0c[?25l[?1c:[?25h[?0c'm,$w! test.out [?25l[?1c"test.out" [New File] 2 lines, 45 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf zx cvn. as dfg? hjkl iop! ert zx cvn. as dfg? hjkl iop! ert STARTTEST /^{/+1 :set comments=s1:/*,mb:*,ex:*/,:// :set nojoinspaces fo=j :set backspace=eol,start :.,+3join j4J[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 11 lines, 478 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nocompatible viminfo+=nviminfo [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nojoinspaces [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset cpoptions-=j [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cfirstline/ [?25l[?1c[?25h[?0c [?25l[?1c/[?25h[?0c^STARTTEST/-1 [?25l[?1c+-1 37 fewer lines:.,+2join j3J :.,+2join j3J :.,+2join jj3J ENDTEST { /* * Make sure the previous comment leader is not removed. */ /* * Make sure the previous comment leader is not removed. */ // 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. */ // 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();37 fewer lines[?25h[?0c[?25l[?1cmore linesasdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf zx cvn. as dfg? hjkl iop! ert zx cvn. as dfg? hjkl iop! ert37 more lines[?25h[?0c[?25l[?1c asdf. asdf:.,+2join[?25h[?0c[?25l[?1c asdf. asdfj3J[?25h[?0c[?25l[?1c asdf. asdf:.,+2join[?25h[?0c[?25l[?1c asdf.asdfj3J[?25h[?0c[?25l[?1c asdf.asdf:.,+2join[?25h[?0c[?25l[?1c asdf.asdfjj3J[?25h[?0c[?25l[?1c asdf.asdfENDTEST[?25h[?0c[?25l[?1c asdf asdf[?25h[?0c[?25l[?1c asdf asdf{[?25h[?0c[?25l[?1c asdf asdf[?25h[?0c[?25l[?1c asdfasdf/*[?25h[?0c[?25l[?1c asdfasdf* Make sure the previous comment leader is not removed.[?25h[?0c[?25l[?1c asdfasdf*/[?25h[?0c[?25l[?1c asdfasdf[?25h[?0c zx cv hjkl i[?25l[?1czx cvn. as dfg? hjkl iop! ert/* * Make sure the previous comment leader is not removed. */[?25h[?0c er[?25l[?1ct er[?25h[?0c zx cv[?25l[?1crn[?25h[?0c[?25l[?1cnop[?25h[?0c[?25l[?1c:[?25h[?0cset cpoptions+=j [?25l[?1c[?25h[?0c zx cv hjkl i[?25l[?1czx cvn. as dfg? hjkl iop! ert// Should the next comment leader be left alone? // Yes.[?25h[?0c er[?25l[?1ct er[?25h[?0c zx cv[?25l[?1crn[?25h[?0c[?25l[?1cnop[?25h[?0c[?25l[?1c:[?25h[?0cset cpoptions-=j joinspaces [?25l[?1c[?25h[?0c [?25l[?1c37 more linesasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdf asdfasdf asdfasdfasdf[?25h[?0c[?25l[?1c asdf. asdfasdf[?25h[?0c[?25l[?1c asdf. asdfzx cvn.[?25h[?0c[?25l[?1c asdf. asdfas dfg?[?25h[?0c[?25l[?1c asdf.asdfhjkl iop![?25h[?0c[?25l[?1c asdf.asdfert[?25h[?0c[?25l[?1c asdf.asdfzx cvn.[?25h[?0c[?25l[?1c asdf.asdfas dfg?[?25h[?0c[?25l[?1c asdf asdfhjkl iop![?25h[?0c[?25l[?1c asdf asdfert[?25h[?0c[?25l[?1c asdf asdf[?25h[?0c[?25l[?1c asdfasdfSTARTTEST[?25h[?0c[?25l[?1c asdfasdf/^{/+1[?25h[?0c[?25l[?1c asdfasdf:set comments=s1:/*,mb:*,ex:*/,://[?25h[?0c[?25l[?1c asdfasdf:set nojoinspaces fo=j[?25h[?0c zx cv hjkl i[?25l[?1czx cvn. as dfg? hjkl iop! ert:set backspace=eol,start :.,+3join j4J[?25h[?0c er[?25l[?1ct e[?25h[?0c zx cv[?25l[?1cen[?25h[?0c[?25l[?1cnop[?25h[?0c[?25l[?1c:[?25h[?0cset cpoptions+=j [?25l[?1c[?25h[?0c zx cv hjkl i[?25l[?1czx cvn. as dfg? hjkl iop! ert:.,+2join j3J :.,+2join[?25h[?0c er[?25l[?1ct er[?25h[?0c zx cv[?25l[?1crn[?25h[?0c[?25l[?1cnop[?25h[?0c[?25l[?1c:[?25h[?0cset cpoptions-=j nojoinspaces compatible [?25l[?1c[?25h[?0c [?25l[?1c37 more linesasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf. asdfasdfasdf. asdf[?25h[?0c[?25l[?1c asdf. asdfasdfasdf.[?25h[?0c[?25l[?1c asdf. asdfasdf[?25h[?0c[?25l[?1c asdf. asdfasdfasdf.[?25h[?0c[?25l[?1c asdf.asdfasdf[?25h[?0c[?25l[?1c asdf.asdfasdfasdf[?25h[?0c[?25l[?1c asdf.asdfasdf[?25h[?0c[?25l[?1c asdf.asdf asdfasdf[?25h[?0c[?25l[?1cf asdf asdfasdf[?25h[?0c[?25l[?1c asdf asdfasdf[?25h[?0c[?25l[?1c asdf[?25h[?0c[?25l[?1c asdfasdf[?25h[?0c[?25l[?1c asdf[?25h[?0c[?25l[?1c asdfasdf[?25h[?0c[?25l[?1c asdf[?25h[?0c[?25l[?1c asdfasdf[?25h[?0c[?25l[?1c asdf[?25h[?0c[?25l[?1c asdfasdf[?25h[?0c[?25l[?1c asdf[?25h[?0c[?25l[?1c zx cvn.[?25h[?0c[?25l[?1c. as dfg? hjkl iop! ert[?25h[?0c[?25l[?1ct a[?25h[?0c[?25l[?1c zx cvn.[?25h[?0c[?25l[?1c /[?25h[?0cSTARTTEST/-2 [?25l[?1c+-2 4 fewer lines[?25h[?0c[?25l[?1c/^STARTTEST  STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 12 lines, 147 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set comments=s1:/*,mb:*,ex:*/,:// :set nojoinspaces fo=j :set backspace=eol,start :.,+3join j4J :.,+2join j3J :.,+2join j3J :.,+2join jj3J ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{[?25h[?0c[?25l[?1c :[?25h[?0cset comments=s1:/*,mb:*,ex:*/,:// [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nojoinspaces fo=j [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset backspace=eol,start [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c.,+3join [?25l[?1c/* Make sure the previous comment leader is not removed. */ [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c/* Make sure the previous comment leader is not removed. */ [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+2join [?25l[?1c// Should the next comment leader be left alone? Yes. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c// Should the next comment leader be left alone? Yes. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+2join [?25l[?1c/* Here the comment leader should be left intact. */ // And so should this one. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c/* Here the comment leader should be left intact. */ // And so should this one. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+2join [?25l[?1cif (condition) // Remove the next comment leader! OK, I will. [?25h[?0c[?25l[?1c action();[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1cif (condition) // Remove the next comment leader! OK, I will. [?25h[?0c[?25l[?1c action(); [?25h[?0c[?25l[?1c /^STARTTEST } STARTTEST[?25h[?0c[?25l[?1c :" Test with backspace set to the non-compatible setting [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 18 lines, 364 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set belloff=all /^\d\+ this :set cp bs=2 Avim1^U^[ Avim2^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[?25h[?0c[?25l[?1c 1 this shouldn't be deleted [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0c" Test with backspace set to the non-compatible setting [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset belloff=all [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^\d\+ this [?25l[?1c 2 this shouldn't be deleted[?25h[?0c[?25l[?1c :[?25h[?0cset cp bs=2 [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c 3 this shouldn't be deleted[?25h[?0cd [?25l[?1cvim2[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c 4 this should be deleted[?25h[?0c[?25l[?1c :[?25h[?0cset cpo-=< [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cinoremap [?25l[?1c[?25h[?0c[?25l[?1cd3[?25h[?0c[?25l[?1c 5 this shouldn't be deleted[?25h[?0c[?25l[?1c :[?25h[?0ciunmap [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c 6 this shouldn't be deleted[?25h[?0c[?25l[?1c :[?25h[?0c" Test with backspace set to the compatible setting [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset backspace= visualbell [?25l[?1c[?25h[?0c[?25l[?1cvim5[?25h[?0c[?25l[?1c 7 this shouldn't be deleted[?25h[?0c[?25l[?1cd vim6[?25h[?0c6 [?25l[?1czwei[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c 8 this shouldn't be deleted (not touched yet)[?25h[?0c[?25l[?1c :[?25h[?0cinoremap [?25l[?1c[?25h[?0c[?25l[?1cvim7[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0cset compatible novisualbell [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST  STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 21 lines, 356 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set comments=sO:*\ -,mO:*\ \ ,exO:*/ :set comments+=s1:/*,mb:*,ex:*/,:// :set comments+=s1:>#,mb:#,ex:#<,:< :set cpoptions-=j joinspaces fo=j :set backspace=eol,start :.,+3join j4J :.,+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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{[?25h[?0c[?25l[?1c :[?25h[?0cset comments=sO:*\ -,mO:*\ \ ,exO:*/ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset comments+=s1:/*,mb:*,ex:*/,:// [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset comments+=s1:>#,mb:#,ex:#<,:< [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset cpoptions-=j joinspaces fo=j [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset backspace=eol,start [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c.,+3join [?25l[?1c/* Make sure the previous comment leader is not removed. */ [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c/* Make sure the previous comment leader is not removed. */ [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+8join [?25l[?1c/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */ [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */ [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+2join [?25l[?1c// Should the next comment leader be left alone? Yes. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c// Should the next comment leader be left alone? Yes. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+2join [?25l[?1c/* Here the comment leader should be left intact. */ // And so should this one. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c/* Here the comment leader should be left intact. */ // And so should this one. [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+2join [?25l[?1cif (condition) // Remove the next comment leader! OK, I will. [?25h[?0c[?25l[?1c action();[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1cif (condition) // Remove the next comment leader! OK, I will. [?25h[?0c[?25l[?1c action(); [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+2join [?25l[?1cint i = 7 /* foo *// 3 // comment [?25h[?0c[?25l[?1c ;[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1cint i = 7 /* foo *// 3 // comment [?25h[?0c[?25l[?1c ; [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c.,+5join [?25l[?1c># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment@  ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new commentis opened which spans 2 lines. This comment should retain its comment leader.[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new comment@  ># Note that the last character of the ending comment leader (left angle bracket) is a comment leader itself. Make sure that this comment leader is not removed from the next line #< < On this line a new commentis opened which spans 2 lines. This comment should retain its comment leader.[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1cSome code! // Make sure backspacing does not remove this comment leader.[?25h[?0c [?25l[?1c// Make sure backspacing does not remove this comment leader. }[?25h[?0c [?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c :g/^STARTTEST/.,/^ENDTEST/d [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 61 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST[?25h[?0c[?25l[?1c :?firstline?+1,$w! test.out[?25h[?0c [?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cg/^STARTTEST/.,/^ENDTEST/d [?25l[?1c75 fewer lines~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0c?firstline?+1,$w! test.out [?25l[?1c"test.out" [New File] 97 lines, 3018 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :w >>test.out :" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" :set nohidden A 1^[:sp :n Xtest2 Xtest3 :all :1wincmd w :w >>test.out :" test abandoning changed buffer, should be unloaded even when 'hidden' set :" write "testtext 2 2" twice :set hidden A 1^[:q! :w >>test.out :unhide :w >>test.out :" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" :set nohidden A 2^[:hide :w >>test.out :" test ":edit" failing in modified buffer when 'hidden' not set :" write "testtext 3 3" A 3^[:e Xtest1 :w >>test.out :" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" :set hidden :e Xtest1 :w >>test.out :" test ":close" not hiding when 'hidden' not set in modified buffer; :" write "testtext 3 3 3" :sp Xtest3 :set nohidden A 3^[:close :w >>test.out :" test ":close!" does hide when 'hidden' not set in modified buffer; :" write "testtext 1" A 3^[:close![?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 80 lines, 1697 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST:w >>test.out :set nohidden :" test ":all!" hides changed buffer; write "testtext 2 2 2" :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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c testtext[?25h[?0c[?25l[?1c1[?25h[?0c[?25l[?1c :[?25h[?0c$w! Xtest1 [?25l[?1c"Xtest1" [New File] 1 line, 11 characters written[?25h[?0c[?25l[?1c2[?25h[?0c[?25l[?1c:[?25h[?0c$w! Xtest2 [?25l[?1c"Xtest2" [New File] 1 line, 11 characters written[?25h[?0c[?25l[?1c3[?25h[?0c[?25l[?1c:[?25h[?0c$w! Xtest3 [?25l[?1c"Xtest3" [New File] 1 line, 11 characters written[?25h[?0c[?25l[?1c:[?25h[?0cn! Xtest1 Xtest2 [?25l[?1c"Xtest1" 1 line, 11 characterstesttext 1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c1[?25h[?0c[?25l[?1c:[?25h[?0cset hidden [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" test for working :n when hidden set; write "testtext 2" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cn [?25l[?1c"Xtest2" 1 line, 11 characters2[?25h[?0c[?25l[?1c:[?25h[?0cw! test.out [?25l[?1c"test.out" [New File] 1 line, 11 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" test for failing :rew when hidden not set; write "testtext 2 2" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nohidden [?25l[?1c[?25h[?0c[?25l[?1c2[?25h[?0c[?25l[?1c:[?25h[?0crew [?25l[?1cE37: No write since last change (add ! to override)[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 13 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test for working :rew when hidden set; write "testtext 1 1" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset hidden [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0crew [?25l[?1c"Xtest1" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)1 1 [?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 13 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nohidden [?25l[?1c[?25h[?0c[?25l[?1c1[?25h[?0c[?25l[?1c:[?25h[?0csp [?25l[?1cXtest1 [+] testtext 1 1 1Xtest1 [+] [?25h[?0c[?25l[?1c:[?25h[?0cn Xtest2 Xtest3 [?25l[?1c"Xtest2" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)2 22[?25h[?0c[?25l[?1c:[?25h[?0call [?25l[?1c"Xtest3" 1 line, 11 characterstesttext 1 1 1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest1 [+] testtext 2 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [?25h[?0c[?25l[?1c:[?25h[?0c1wincmd w [?25l[?1cXtest1 [+] Xtest2 [+] [?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 15 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test abandoning changed buffer, should be unloaded even when 'hidden' set [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" write "testtext 2 2" twice [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset hidden [?25l[?1c[?25h[?0c[?25l[?1c1 1[?25h[?0c[?25l[?1c:[?25h[?0cq! [?25l[?1ctesttext 2 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 13 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cunhide [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 13 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nohidden [?25l[?1c[?25h[?0c[?25l[?1c2[?25h[?0c[?25l[?1c:[?25h[?0chide [?25l[?1c3~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test ":edit" failing in modified buffer when 'hidden' not set [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" write "testtext 3 3" [?25l[?1c[?25h[?0c[?25l[?1c3[?25h[?0c[?25l[?1c:[?25h[?0ce Xtest1 [?25l[?1cE37: No write since last change (add ! to override)[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 13 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset hidden [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce Xtest1 [?25l[?1c"Xtest1" 1 line, 11 characters1[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test ":close" not hiding when 'hidden' not set in modified buffer; [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" write "testtext 3 3 3" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0csp Xtest3 [?25l[?1c"Xtest3" [Modified] line 1 of 1 --100%-- col 1 (file 2 of 2)3 3Xtest3 [+] testtext 1Xtest1 [?25h[?0c[?25l[?1c:[?25h[?0cset nohidden [?25l[?1c[?25h[?0c[?25l[?1c3[?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1cE37: No write since last change (add ! to override)[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 15 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" test ":close!" does hide when 'hidden' not set in modified buffer; [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" write "testtext 1" [?25l[?1c[?25h[?0c[?25l[?1c3 3[?25h[?0c[?25l[?1c:[?25h[?0cclose! [?25l[?1c1~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset nohidden [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" test ":all!" hides changed buffer; write "testtext 2 2 2" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0csp Xtest4 [?25l[?1c"Xtest4" [New File]Xtest4 testtext 1Xtest1 [?25h[?0c[?25l[?1c 4[+][?25h[?0c[?25l[?1c:[?25h[?0call! [?25l[?1c"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[?25h[?0c[?25l[?1c:[?25h[?0c1wincmd w [?25l[?1ctesttext 2 2 2 ~ 23 3 3 33 [+][?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 15 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" test ":q!" and hidden buffer. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cbw! Xtest1 Xtest2 Xtest3 Xtest4 [?25l[?1c"test31.in"95 lines, 1832 characters 4 buffers wiped out Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0csp Xtest1 [?25l[?1c"Xtest1" 1 line, 11 characterstesttext 1 ~ 1  :w >>test.out:set nohidden:" test ":all!" hides changed buffer; write "testtext 2 2 2":sp Xtest4GA 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!ENDTESTtesttexttest31.in "Xtest1" 1 line, 11 characters[?25h[?0c[?25l[?1c:[?25h[?0cwincmd w [?25l[?1cXtest1 test31.in [?25h[?0c[?25l[?1c:[?25h[?0cbw! [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset modified [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cbot sp Xtest2 [?25l[?1c"Xtest2" 1 line, 11 charactersXtest1 [+] testtext 2Xtest2 [?25h[?0c[?25l[?1c:[?25h[?0cset modified [?25l[?1c[+][?25h[?0c[?25l[?1c:[?25h[?0cbot sp Xtest3 [?25l[?1c"Xtest3" 1 line, 11 characterstesttext 1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest1 [+] testtext 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [?25h[?0c[?25l[?1c:[?25h[?0cset modified [?25l[?1c[+][?25h[?0c[?25l[?1c:[?25h[?0cwincmd t [?25l[?1cXtest1 [+] Xtest3 [+] [?25h[?0c[?25l[?1c:[?25h[?0chide [?25l[?1ctesttext 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 [+] [?25h[?0c[?25l[?1c:[?25h[?0cq! [?25l[?1c3~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cq! [?25l[?1cE37: No write since last change E162: No write since last change for buffer "Xtest1" Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" 1 line, 11 characters appended Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cq! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 (defmacro with-link (dest &rest body) `(progn (format t "" (html-file ,dest)) ,@body (princ ""))) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 63 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset lisp [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^(defun [?25l[?1c[?25h[?0c[?25l[?1c22 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)))) `(progn (format t "" (html-file ,dest)) ,@body (princ "")))[?25h[?0c[?25l[?1c:[?25h[?0c/^(defun/,$w! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 23 lines, 544 characters written[?25h[?0c[?25l[?1c:[?25h[?0cq! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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() : call search('XX', 'b') : return "222" :endfunc :func ListItem() : let g:counter += 1 : return g:counter . '. ' :endfunc :func ListReset() : let g:counter = 0 : return '' :endfunc :func FuncWithRef(a) : unlet g:FuncRef : return a:a :endfunc :let g:FuncRef=function("FuncWithRef") :let counter = 0 :inoremap ( ListItem() :inoremap [ ListReset() :imap + Expr1() :imap * Expr2() :let retval = "nop" /^here C^R=Table("xxx", 4, "asdf") ^R=Compute(45, 0, "retval") ^R=retval ^R=Compute(45, 5, "retval") ^R=retval ^R=g:FuncRef(333) XX+-XX ---*--- (one (two [(one again^[:call append(line('$'), max([1, 2, 3])) :call extend(g:, {'max': function('min')})[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 78 lines, 1621 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST: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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfunction Table(title, ...) [?25l[?1c : [?25h[?0c: let ret = a:title [?25l[?1c: [?25h[?0c: let idx = 1 [?25l[?1c: [?25h[?0c: while idx <= a:0 [?25l[?1c: [?25h[?0c: exe "let ret = ret . a:" . idx [?25l[?1c: [?25h[?0c: let idx = idx + 1 [?25l[?1c: [?25h[?0c: endwhile [?25l[?1c: [?25h[?0c: return ret [?25l[?1c: [?25h[?0c:endfunction [?25l[?1c:endfunction :func Expr1() : normal! v : return "111" :endfunc :func Expr2() : call search('XX', 'b') : return "222"[?25h[?0c[?25l[?1c :[?25h[?0cfunction Compute(n1, n2, divname) [?25l[?1c : [?25h[?0c: if a:n2 == 0 [?25l[?1c: [?25h[?0c: return "fail" [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: exe "let g:" . a:divname . " = ". a:n1 / a:n2 [?25l[?1c: [?25h[?0c: return "ok" [?25l[?1c: [?25h[?0c:endfunction [?25l[?1c:endfunction :func Expr1() : normal! v : return "111" :endfunc :func Expr2()[?25h[?0c[?25l[?1c :[?25h[?0cfunc Expr1() [?25l[?1c : [?25h[?0c: normal! v [?25l[?1c: [?25h[?0c: return "111" [?25l[?1c: [?25h[?0c:endfunc [?25l[?1c:endfunction :func Expr1() : normal! v[?25h[?0c[?25l[?1c :[?25h[?0cfunc Expr2() [?25l[?1c : [?25h[?0c: call search('XX', 'b') [?25l[?1c: [?25h[?0c: return "222" [?25l[?1c: [?25h[?0c:endfunc [?25l[?1c:endfunction :func Expr1() : normal! v[?25h[?0c[?25l[?1c :[?25h[?0cfunc ListItem() [?25l[?1c : [?25h[?0c: let g:counter += 1 [?25l[?1c: [?25h[?0c: return g:counter . '. ' [?25l[?1c: [?25h[?0c:endfunc [?25l[?1c:endfunction :func Expr1() : normal! v[?25h[?0c[?25l[?1c :[?25h[?0cfunc ListReset() [?25l[?1c : [?25h[?0c: let g:counter = 0 [?25l[?1c: [?25h[?0c: return '' [?25l[?1c: [?25h[?0c:endfunc [?25l[?1c:endfunction :func Expr1() : normal! v[?25h[?0c[?25l[?1c :[?25h[?0cfunc FuncWithRef(a) [?25l[?1c : [?25h[?0c: unlet g:FuncRef [?25l[?1c: [?25h[?0c: return a:a [?25l[?1c: [?25h[?0c:endfunc [?25l[?1c:endfunction :func Expr1() : normal! v[?25h[?0c[?25l[?1c :[?25h[?0clet g:FuncRef=function("FuncWithRef") [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet counter = 0 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cinoremap ( ListItem() [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cinoremap [ ListReset() [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cimap + Expr1() [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cimap * Expr2() [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet retval = "nop" [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^here [?25l[?1c here[?25h[?0c[?25l[?1cher$ =[?25h[?0cTable("xxx", 4, "asdf") [?25l[?1c=[?25h[?0cCompute(45, 0, "retval") [?25l[?1c=[?25h[?0cretval [?25l[?1c=[?25h[?0cCompute(45, 5, "retval") [?25l[?1c=[?25h[?0cretval [?25l[?1c=[?25h[?0cg:FuncRef(333) [?25l[?1cError detected while processing function Expr1: line 1: E523: Not allowed here Press ENTER or type command to continue[?25h[?0c[?25l[?1c: call search('XX', 'b') : return "222" :endfunc :func ListItem() : let g:counter += 1 : return g:counter . '. ' :endfuncfunc ListReset() : let g:counter = 0 : return ''endfuncfunc FuncWithRef(a) : unlet g:FuncRef : return a:aendfunclet g:FuncRef=function("FuncWithRef") :let counter = 0inoremap ( ListItem() :inoremap [ ListReset() :imap + Expr1() :imap * Expr2()retval = "nop" /^heC^R=Table("xxx", 4, "asdf") ^R=Compute(45, 0, "retval") ^R=retval ^R=Compute(45, 5, "retval") ^R=retval g:FuncRef(333)XX+-XX---*---(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.outdelfunc Table :delfunc Computedelfunc Expr1delfunc Expr2 :delfunc ListItemListReset :unlet retval counter :q!ENDTESTxxx4asdf fail nop ok 9 333 XX111-XX---222--- 1. one2. two[?25h[?0c[?25l[?1c1. one again[?25h[?0c[?25l[?1c :[?25h[?0ccall append(line('$'), max([1, 2, 3])) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall extend(g:, {'max': function('min')}) [?25l[?1cE704: Funcref variable name must start with a capital: max[?25h[?0c[?25l[?1c:[?25h[?0ccall append(line('$'), max([1, 2, 3])) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ctry [?25l[?1c : [?25h[?0c: " Regression: the first line below used to throw ?E110: Missing ')'? [?25l[?1c: [?25h[?0c: " Second is here just to prove that this line is correct when not skipping [?25l[?1c: [?25h[?0c: " rhs of &&. [?25l[?1c: [?25h[?0c: $put =(0&&(function('tr'))(1, 2, 3)) [?25l[?1c: [?25h[?0c: $put =(1&&(function('tr'))(1, 2, 3)) [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put ='!!! Unexpected exception:' [?25l[?1c: [?25h[?0c: $put =v:exception [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: let g:counter += 1 : return g:counter . '. ' :endfunc :func ListReset() : let g:counter = 0 : return '' :endfunc :func FuncWithRef(a) : unlet g:FuncRefa:a :let g:FuncRef=function("FuncWithRef") :let counter = 0inoremap ( ListItem() :inoremap [ ListReset() :imap + Expr1()imap * Expr2() :let retval = "nop"/^heC^R=Table("xxx", 4, "asdf") ^R=Compute(45, 0, "retval") ^R=retval ^R=Compute(45, 5, "retval") retvalg:FuncRef(333)XX+-XX---*---(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:'v:exceptionendtry$-9,$w! test.out :delfunc Tabledelfunc Computedelfunc Expr1 :delfunc Expr2ListItemListReset :unlet retval counter :q!ENDTESTxxx4asdf fail nop ok 9 333 XX111-XX ---222--- 1. one 2. two1. one again 330[?25h[?0c[?25l[?1c :[?25h[?0c$-9,$w! test.out [?25l[?1c"test.out" [New File] 10 lines, 81 characters written[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc Table [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc Compute [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc Expr1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc Expr2 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc ListItem [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc ListReset [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cunlet retval counter [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cq! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 p:s/\%#=0\x//g p:s/\%#=1\x//g p:s/\%#=2\x//g p:s/\%#=0[0-9A-Fa-f]//g p:s/\%#=1[0-9A-Fa-f]//g p:s/\%#=2[0-9A-Fa-f]//g p:s/\%#=0\X//g p:s/\%#=1\X//g p:s/\%#=2\X//g p:s/\%#=0[^0-9A-Fa-f]//g p:s/\%#=1[^0-9A-Fa-f]//g p:s/\%#=2[^0-9A-Fa-f]//g p:s/\%#=0\w//g p:s/\%#=1\w//g p:s/\%#=2\w//g p:s/\%#=0[0-9A-Za-z_]//g p:s/\%#=1[0-9A-Za-z_]//g p:s/\%#=2[0-9A-Za-z_]//g p:s/\%#=0\W//g p:s/\%#=1\W//g p:s/\%#=2\W//g p:s/\%#=0[^0-9A-Za-z_]//g p:s/\%#=1[^0-9A-Za-z_]//g p:s/\%#=2[^0-9A-Za-z_]//g p:s/\%#=0\h//g p:s/\%#=1\h//g p:s/\%#=2\h//g p:s/\%#=0[A-Za-z_]//g p:s/\%#=1[A-Za-z_]//g p:s/\%#=2[A-Za-z_]//g p:s/\%#=0\H//g p:s/\%#=1\H//g p:s/\%#=2\H//g p:s/\%#=0[^A-Za-z_]//g p:s/\%#=1[^A-Za-z_]//g p:s/\%#=2[^A-Za-z_]//g[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 101 lines, 1850 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTESTp:s/\%#=0\a//g p:s/\%#=1\a//g p:s/\%#=2\a//g p:s/\%#=0[A-Za-z]//g p:s/\%#=1[A-Za-z]//g p:s/\%#=2[A-Za-z]//g p:s/\%#=0\A//g p:s/\%#=1\A//g p:s/\%#=2\A//g p:s/\%#=0[^A-Za-z]//g p:s/\%#=1[^A-Za-z]//g p:s/\%#=2[^A-Za-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\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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^start-here/+1 [?25l[?1cstart-here^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\d//g [?25l[?1c10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\d//g [?25l[?1c10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\d//g [?25l[?1c10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[0-9]//g [?25l[?1c10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[0-9]//g [?25l[?1c10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[0-9]//g [?25l[?1c10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\D//g [?25l[?1c72 substitutions on 1 line0123456789[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\D//g [?25l[?1c72 substitutions on 1 line0123456789[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\D//g [?25l[?1c72 substitutions on 1 line0123456789[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^0-9]//g [?25l[?1c72 substitutions on 1 line0123456789[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^0-9]//g [?25l[?1c72 substitutions on 1 line0123456789[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^0-9]//g [?25l[?1c72 substitutions on 1 line0123456789[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\o//g [?25l[?1c8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\o//g [?25l[?1c8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\o//g [?25l[?1c8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[0-7]//g [?25l[?1c8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[0-7]//g [?25l[?1c8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[0-7]//g [?25l[?1c8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\O//g [?25l[?1c74 substitutions on 1 line01234567[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\O//g [?25l[?1c74 substitutions on 1 line01234567[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\O//g [?25l[?1c74 substitutions on 1 line01234567[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^0-7]//g [?25l[?1c74 substitutions on 1 line01234567[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^0-7]//g [?25l[?1c74 substitutions on 1 line01234567[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^0-7]//g [?25l[?1c74 substitutions on 1 line01234567[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\x//g [?25l[?1c22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\x//g [?25l[?1c22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\x//g [?25l[?1c22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[0-9A-Fa-f]//g [?25l[?1c22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[0-9A-Fa-f]//g [?25l[?1c22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[0-9A-Fa-f]//g [?25l[?1c22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\X//g [?25l[?1c60 substitutions on 1 line0123456789ABCDEFabcdef[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\X//g [?25l[?1c60 substitutions on 1 line0123456789ABCDEFabcdef[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\X//g [?25l[?1c60 substitutions on 1 line0123456789ABCDEFabcdef[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^0-9A-Fa-f]//g [?25l[?1c60 substitutions on 1 line0123456789ABCDEFabcdef[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^0-9A-Fa-f]//g [?25l[?1c60 substitutions on 1 line0123456789ABCDEFabcdef[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^0-9A-Fa-f]//g [?25l[?1c60 substitutions on 1 line0123456789ABCDEFabcdef[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\w//g [?25l[?1c36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\w//g [?25l[?1c36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\w//g [?25l[?1c36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[0-9A-Za-z_]//g [?25l[?1c36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[0-9A-Za-z_]//g [?25l[?1c36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[0-9A-Za-z_]//g [?25l[?1c36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\W//g [?25l[?1c46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\W//g [?25l[?1c46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\W//g [?25l[?1c46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^0-9A-Za-z_]//g [?25l[?1c46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^0-9A-Za-z_]//g [?25l[?1c46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^0-9A-Za-z_]//g [?25l[?1c46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\h//g [?25l[?1c26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\h//g [?25l[?1c26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\h//g [?25l[?1c26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[A-Za-z_]//g [?25l[?1c26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[A-Za-z_]//g [?25l[?1c26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[A-Za-z_]//g [?25l[?1c26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\H//g [?25l[?1c56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\H//g [?25l[?1c56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\H//g [?25l[?1c56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^A-Za-z_]//g [?25l[?1c56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^A-Za-z_]//g [?25l[?1c56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^A-Za-z_]//g [?25l[?1c56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\a//g [?25l[?1c25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\a//g [?25l[?1c25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\a//g [?25l[?1c25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[A-Za-z]//g [?25l[?1c25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[A-Za-z]//g [?25l[?1c25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[A-Za-z]//g [?25l[?1c25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\A//g [?25l[?1c57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\A//g [?25l[?1c57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\A//g [?25l[?1c57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^A-Za-z]//g [?25l[?1c57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^A-Za-z]//g [?25l[?1c57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^A-Za-z]//g [?25l[?1c57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\l//g [?25l[?1c13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\l//g [?25l[?1c13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\l//g [?25l[?1c13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[a-z]//g [?25l[?1c13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[a-z]//g [?25l[?1c13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[a-z]//g [?25l[?1c13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\L//g [?25l[?1c69 substitutions on 1 lineabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\L//g [?25l[?1c69 substitutions on 1 lineabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\L//g [?25l[?1c69 substitutions on 1 lineabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^a-z]//g [?25l[?1c69 substitutions on 1 lineabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^a-z]//g [?25l[?1c69 substitutions on 1 lineabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^a-z]//g [?25l[?1c69 substitutions on 1 lineabcdefghiwxyz[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\u//g [?25l[?1c12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\u//g [?25l[?1c12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\u//g [?25l[?1c12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[A-Z]//g [?25l[?1c12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[A-Z]//g [?25l[?1c12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[A-Z]//g [?25l[?1c12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\U//g [?25l[?1c70 substitutions on 1 lineABCDEFGHIXYZ[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\U//g [?25l[?1c70 substitutions on 1 lineABCDEFGHIXYZ[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\U//g [?25l[?1c70 substitutions on 1 lineABCDEFGHIXYZ[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0[^A-Z]//g [?25l[?1c70 substitutions on 1 lineABCDEFGHIXYZ[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1[^A-Z]//g [?25l[?1c70 substitutions on 1 lineABCDEFGHIXYZ[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2[^A-Z]//g [?25l[?1c70 substitutions on 1 lineABCDEFGHIXYZ[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=0\%204l^\t...//g [?25l[?1c!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=1\%205l^\t...//g [?25l[?1c!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c ^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c :[?25h[?0cs/\%#=2\%206l^\t...//g [?25l[?1c!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé[?25h[?0c[?25l[?1c:[?25h[?0c/^start-here/+1,$wq! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 99 lines, 4269 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :set scrollopt+=hor gg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG: :set scrollopt-=hor :" ****** tests using two different buffers ***** ^Wt^Wj: :close ^Wt: :set noscrollbind :/^start of window 2$/,/^end of window 2$/y :new ^Wt^Wj4"zpGp: ^Wt/^start of window 1$/ zt: :set scrollbind ^Wj: /^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 :set scrollopt+=hor gg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG: :set scrollopt-=hor :" TEST syncbind ^Wt:set noscb ggL^Wj:set noscb ggL:set scb ^Wt:set scb G^WjG:syncbind Hk^WtH^WjHyy^Wbp^Wtyy^Wbp:[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 72 lines, 1498 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST^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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset noscrollbind [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollopt=ver,jump [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrolloff=2 [?25l[?1c/^start of window 1$/ zt::set scrollb^Wj: :resize 7/^start of window 2$/ zt::set scrollb:" -- start of tests -- :" TEST scrolling down L5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3:up^WtH4kjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3ktH^WjHyy^Wbpr6^WtHyy^Wbpr7:horizontal scrolling :set scrollopt+=horgg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG: :set scrollopt-=hor:" ****** tests using two different buffers ***** ^Wt^Wj:close:set noscrollbind :/^start of window 2$/,/^end of window 2$/y :new^Wt^Wj4"zpGp:^Wt/^start of window 1$/ zt::set scrollbind^Wj: /^start of window 2$/ zt::set scrollb:" -- start of tests -- :" TEST scrolling down L5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3:up^WtH4kjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3ktH^WjHyy^Wbpr6^WtHyy^Wbpr7:horizontal scrolling :set scrollopt+=horgg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG: :set scrollopt-=hor:" TEST syncbind^Wt:set noscbggL^Wj:set noscb ggL:set scb^Wt:set scbG^WjG:syncbind Hk^WtH^WjHyy^Wbp^Wtyy^Wbp: ^Wt:set noscbggL^Wj:set noscbggL:set scb^Wt:set scb^WtG^WjG^Wt:syncbind Hk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp:H3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out " Write contents of this file :qa!ENDTESTstart of window 1[?25h[?0c[?25l[?1c:[?25h[?0cset nowrap [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset noequalalways [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset splitbelow [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST using two windows open to one buffer, one extra empty window [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0csplit [?25l[?1czt::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 :set scrollopt+=horgg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG:set scrollopt-=hor:" TEST syncbind^Wt:set noscbggL^Wj:set noscbL:set scbt:set scbG^WjG:syncbindHk^WtH^WjHyy^Wbp^Wtyy^Wbp::set noscb ggL^Wj:set noscb ggL:set scb ^Wt:set scb^WtG^WjG^Wt:syncbindHk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp:H3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out" Write contents of this file :qa!ENDTESTtest37.in " -- 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: :" TEST horizontal scrollingset scrollopt+=horgg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG::set scrollopt-=hor" TEST syncbind^Wt:set nosggL^Wj:set noscb ggL:set scb^Wt G^WjG:syncbind Hk^WtH^WjHyy^Wbp^Wtyy^Wbp: ^Wt:set noscbggL^Wj:set noscb ggL:set scb^WtG^WjG^Wt:syncbind Hk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: ^WtH3kjH^WtHyybp^Wt^Wjyy^Wbp: :" ***** done with tests *****w! test.out " Write contents of this file :qa!ENDTESTstart of window 1 test37.in [?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c^Wt:set scbG^WjG:syncbindHk^WtHjHyybp^Wtyy^Wbp:^Wt:set noscbggL^Wj:set noscbggL:set scb^Wt:set scb^WtG^WjG^Wt:syncbindHk^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!ENDTESTtest37.in ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name][?25h[?0c[?25l[?1cstart of window 1 test37.in [No Name] [?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cresize 8 [?25l[?1c^WtH3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out " Write contents of this file :qa!ENDTESTstart of window 1test37.in zt:set scrollbindj/^start of window 2$/ zt::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: :" TEST horizontal scrolling :set scrollopt+=horgg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG:k10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG: :set scrollopt-=hor" TEST syncbind^Wt:set noscb ggL^Wj:set noscb ggL:set scb ^Wt:set scb G^WjG:syncbindHk^WtH^WjHyy^Wbp^Wtyy^Wbp:noscb ggL^Wj:set noscb ggL:set scbscb^WtG^WjG^Wt:syncbind Hk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp:H3k^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[?25h[?0c[?25l[?1c/[?25h[?0c^start of window 1$/ [?25l[?1c. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?25h[?0c[?25l[?1c. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03 . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollbind [?25l[?1c[?25h[?0ctest37.in test37.in [?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cresize 7 [?25l[?1c:" ***** done with tests ***** :w! test.out " Write contents of this file :qa! ENDTESTstart of window 1test37.in ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c/[?25h[?0c^start of window 2$/ [?25l[?1cend of window 1start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 . line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03[?25h[?0c[?25l[?1c . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollbind [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" -- start of tests -- [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST scrolling down [?25l[?1c[?25h[?0c [?25l[?1c. 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[?25h[?0ctest37.in [No Name] [?25l[?1c . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[+][?25h[?0c[?25l[?1c0[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[?25h[?0c[?25l[?1c1[?25h[?0ctest37.in [No Name] [+]  [?25l[?1c. 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[?25h[?0ctest37.in [No Name] [+] [?25l[?1c . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?25h[?0c[?25l[?1c2[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?25h[?0c[?25l[?1c3[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST scrolling up [?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08440505060607070808090900[?25h[?0ctest37.in test37.in test37.in test37.in test37.in [No Name] [+] [?25l[?1c . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06[?25h[?0c[?25l[?1c4[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06[?25h[?0c[?25l[?1c5[?25h[?0ctest37.in [No Name] [+] [?25l[?1cstart 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 [?25h[?0ctest37.in test37.in test37.in test37.in test37.in [No Name] [+] [?25l[?1c . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[?25h[?0c[?25l[?1c6[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?25h[?0c[?25l[?1c7[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST horizontal scrolling [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollopt+=hor [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c 156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0256789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0356789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0556789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0656789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 2UTSRQPONMLKJIHGREDCBA9876543210 01UTSRQPONMLKJIHGREDCBA9876543210 02UTSRQPONMLKJIHGREDCBA9876543210 03UTSRQPONMLKJIHGREDCBA9876543210 04UTSRQPONMLKJIHGREDCBA9876543210 05UTSRQPONMLKJIHGREDCBA9876543210 06[?25h[?0ctest37.in [No Name] [+] [?25l[?1c56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1cUTSRQPONMLKJIHGREDCBA9876543210 02[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09101112131415UTSRQPONMLKJIHGREDCBA9876543210 09101112131415[?25h[?0c[?25l[?1c. 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[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+]  test37.in [No Name] [+] [?25l[?1c. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollopt-=hor [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" ****** tests using two different buffers ***** [?25l[?1c[?25h[?0ctest37.in [No Name] [+] test37.in test37.in [?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1cstart of window 20000000000[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset noscrollbind [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^start of window 2$/,/^end of window 2$/y [?25l[?1c18 lines yanked[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1ctest37.in ~ ~ ~ ~ ~ ~ ~ [No Name][?25h[?0ctest37.in [No Name] test37.in [No Name] [?25l[?1c4 more lines[+][?25h[?0c [?25l[?1c18 more linesstart of window 2. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c/[?25h[?0c^start of window 1$/ [?25l[?1csearch hit BOTTOM, continuing at TOPENDTESTstart of window 1010102020303[?25h[?0c[?25l[?1c . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollbind [?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^start of window 2$/ [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04 . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollbind [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" -- start of tests -- [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST scrolling down [?25l[?1c[?25h[?0c [?25l[?1c. 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[?25h[?0c[No Name] [+] [No Name] [+] [?25l[?1c . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[?25h[?0c[?25l[?1c0[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[?25h[?0c[?25l[?1c1[?25h[?0ctest37.in [No Name] [+]  [?25l[?1c. 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[?25h[?0ctest37.in [No Name] [+] [?25l[?1c . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?25h[?0c[?25l[?1c2[?25h[?0c[No Name] [+] [No Name] [+] [No Name] [+] [No Name] [+] [?25l[?1c . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?25h[?0c[?25l[?1c3[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST scrolling up [?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c440505060607070808090900. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04 . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07 . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06[?25h[?0c[?25l[?1c4[?25h[?0c[No Name] [+] [No Name] [+] [No Name] [+] [No Name] [+] [?25l[?1c . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06[?25h[?0c[?25l[?1c5[?25h[?0c[No Name] [+] [No Name] [+] [?25l[?1cstart 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 [?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+] [?25l[?1c . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[?25h[?0c[?25l[?1c6[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?25h[?0c[?25l[?1c7[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST horizontal scrolling [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollopt+=hor [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c 156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0256789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0356789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0556789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 2UTSRQPONMLKJIHGREDCBA9876543210 01UTSRQPONMLKJIHGREDCBA9876543210 02UTSRQPONMLKJIHGREDCBA9876543210 03UTSRQPONMLKJIHGREDCBA9876543210 04UTSRQPONMLKJIHGREDCBA9876543210 05UTSRQPONMLKJIHGREDCBA9876543210 06UTSRQPONMLKJIHGREDCBA9876543210 07[?25h[?0ctest37.in [No Name] [+] [?25l[?1c56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?25h[?0c[?25l[?1c[?25h[?0c[No Name] [+] [No Name] [+] [No Name] [+] [No Name] [+] [?25l[?1cUTSRQPONMLKJIHGREDCBA9876543210 02[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[No Name] [+] [No Name] [+] [?25l[?1c56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09101112131415 UTSRQPONMLKJIHGREDCBA9876543210 0910111213141516[?25h[?0c[?25l[?1c. 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[?25h[?0c[?25l[?1c[?25h[?0c[No Name] [+] [No Name] [+] [?25l[?1c. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+]  test37.in [No Name] [+] [?25l[?1c. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset scrollopt-=hor [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TEST syncbind [?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c:[?25h[?0cset noscb [?25l[?1c[?25h[?0c[?25l[?1cTest for 'scrollbind'. Do not add a line below! STARTTEST:so small.vim:set noscrollbind:set scrollopt=ver,jump:set scrolloff=2:set nowrap[?25h[?0c test37.in [No Name] [+] [?25l[?1c:[?25h[?0cset noscb [?25l[?1c[?25h[?0c[?25l[?1cstart of window 201010202[?25h[?0c[?25l[?1c:[?25h[?0cset scb [?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c:[?25h[?0cset scb [?25l[?1c[?25h[?0c[?25l[?1c. 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 ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1czt::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] [+] [?25h[?0c[?25l[?1c:[?25h[?0csyncbind [?25l[?1c[?25h[?0c[?25l[?1c/^start of window 2$/. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+] [?25l[?1c . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c :set scrollbind[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c:[?25h[?0cset noscb [?25l[?1c[?25h[?0c[?25l[?1cTest for 'scrollbind'. Do not add a line below! STARTTEST :so small.vimset noscrollbindset scrollopt=ver,jump :set scrolloff=2set nowrap[?25h[?0c test37.in [No Name] [+] [?25l[?1c:[?25h[?0cset noscb [?25l[?1c[?25h[?0c[?25l[?1cstart of window 2. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[?25h[?0c[?25l[?1c:[?25h[?0cset scb [?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1c:[?25h[?0cset scb [?25l[?1c[?25h[?0c[?25l[?1c. 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 ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1czt::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] [+] [?25h[?0ctest37.in [No Name] [+] [?25l[?1c:[?25h[?0csyncbind [?25l[?1c[?25h[?0c[?25l[?1c/^start of window 2$/. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c :set scrollbind[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+] [?25l[?1c . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0ctest37.in [No Name] [+] [?25l[?1czt: :set scrollbind ^Wj: :resize 7. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10 . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] test37.in [No Name] [+] [?25l[?1c ^Wj:[?25h[?0ctest37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+] [?25l[?1c . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" ***** done with tests ***** [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! test.out " Write contents of this file [?25l[?1c"test.out" [New File] 33 lines, 1329 characters writtentest.out [?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 29 lines, 407 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" make sure that backspace works, no matter what termcap is used [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset t_kD=^^? t_kb=^^H [?25l[?1cTest 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 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?25h[?0c[?25l[?1c abcdefghijk lmn opq rstuvwxyz[?25h[?0c[?25l[?1c:[?25h[?0cset ai [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset bs=2 [?25l[?1c[?25h[?0c[?25l[?1c 1 A BCDEFGHIJ KL MNOPQR[?25h[?0c[?25l[?1c:[?25h[?0cka [?25l[?1c[?25h[?0c[?25l[?1cabcdefghijk lmn opq rstuvwxyz[?25h[?0c [?25l[?1c 1[?25h[?0c[?25l[?1c:[?25h[?0c$ [?25l[?1c[?25h[?0c[?25l[?1cab cdefghi jkl[?25h[?0c [?25l[?1cAB......CDEFGHI.J[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1cabcdefghijklmnopqrst[?25h[?0c [?25l[?1cAB IJKLMNO QR[?25h[?0c[?25l[?1c:[?25h[?0cwq! test.out [?25l[?1c"test.out" [New File] 13 lines, 107 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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\\ \" :/^aa/,/^$/w >> test.out /xaaa$/ :exe ":norm! \jjjI<>\p\" :/xaaa$/,/^$/w >> test.out :" Test for Visual block was created with the last $ /^A23$/ :exe ":norm! l\j$Aab\" :.,/^$/w >> test.out :" Test for Visual block was created with the middle $ (1) /^B23$/ :exe ":norm! l\j$hAab\" :.,/^$/w >> test.out :" Test for Visual block was created with the middle $ (2) /^C23$/ :exe ":norm! l\j$hhAab\" :.,/^$/w >> test.out :" Test for Visual block insert when virtualedit=all and utf-8 encoding :set ve=all enc=utf-8 :/\t\tline :exe ":norm! 07l\jjIx\" :.,/^$/w >> test.out :" Test for Visual block append when virtualedit=all :exe ":norm! 012l\jjAx\" :set ve= enc=latin1 :.,/^$/w >> test.out :" gUe must uppercase a whole word, also when ß changes to SS Gothe youtußeuu end^[Ypk0wgUe :" gUfx must uppercase until x, inclusive. O- youßtußexu -^[0fogUfx :" VU must uppercase a whole line YpkVU :" same, when it's the last line in the buffer YPGi111^[VUddP :" Uppercase two lines Oblah di doh dut^[VkUj[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 75 lines, 2061 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST:" Uppercase part of two lines ddppi333^[k0i222^[fyllvjfuUk :" visual replace using Enter or NL G3o123456789^[2k05l^V2jr^MG3o98765^[2k02l^V2jr^V^M G3o123456789^[2k05l^V2jr G3o98765^[2k02l^V2jr^V :" :" 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! ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cso mbyte.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" This only works when 'encoding' is "latin1", don't depend on the environment [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset enc=latin1 [?25l[?1c:" Test block-change G$khhh^Vhhkkcmno^[ :$-4,$w! test.out :" Test block-insert using cursor keys for movement /^aaaa/ :exe ":norm! l\jjjlllI\\ \" :/^aa/,/^$/w >> test.out /xaaa$/ :exe ":norm! \jjjI<>\p\" :/xaaa$/,/^$/w >> test.out :" Test for Visual block was created with the last $ /^A23$/ :exe ":norm! l\j$Aab\" :.,/^$/w >> test.out :" Test for Visual block was created with the middle $ (1) /^B23$/ :exe ":norm! l\j$hAab\" :.,/^$/w >> test.out :" Test for Visual block was created with the middle $ (2) /^C23$/ :exe ":norm! l\j$hhAab\" :.,/^$/w >> test.out :" Test for Visual block insert when virtualedit=all and utf-8 encoding :set ve=all enc=utf-8 :/\t\tline :exe ":norm! 07l\jjIx\" :.,/^$/w >> test.out :" Test for Visual block append when virtualedit=all :exe ":norm! 012l\jjAx\" :set ve= enc=latin1 :.,/^$/w >> test.out :" gUe must uppercase a whole word, also when ß changes to SS Gothe youtußeuu end^[Ypk0wgUe :" gUfx must uppercase until x, inclusive. O- youßtußexu -^[0fogUfx :" VU must uppercase a whole line YpkVU :" same, when it's the last line in the buffer YPGi111^[VUddP :" Uppercase two lines Oblah di doh dut^[VkUj :" Uppercase part of two lines ddppi333^[k0i222^[fyllvjfuUk :" visual replace using Enter or NL G3o123456789^[2k05l^V2jr^MG3o98765^[2k02l^V2jr^V^M G3o123456789^[2k05l^V2jr G3o98765^[2k02l^V2jr^V :" :" 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! ENDTEST [?25h[?0c[?25l[?1c /[?25h[?0c^abcde [?25l[?1cline1line2line3 aaaaaa bbbbbb cccccc dddddd xaaa bbbb cccc dddd yaaa ¿¿¿ bbb A23 4567 B23 4567 C23 4567 abcdefghijklm[?25h[?0c[?25l[?1c :[?25h[?0c" Test shift-right of a block [?25l[?1c[?25h[?0c[?25l[?1c abcdefghijklm[?25h[?0cabcd[?25l[?1c[?25h[?0c[?25l[?1c e abcdefghijklm abcd[?25h[?0c[?25l[?1c e abcdefghijklm abcd[?25h[?0c[?25l[?1c 3 lines >ed 1 time efghijklm abcd efghijklm abcd efghijklm[?25h[?0c ef[?25l[?1c[?25h[?0c[?25l[?1cg[?25h[?0c[?25l[?1chg[?25h[?0c[?25l[?1cih[?25h[?0c[?25l[?1cji[?25h[?0c[?25l[?1c ghijklm ghijklm[?25h[?0c[?25l[?1c:[?25h[?0c" Test shift-left of a block [?25l[?1c[?25h[?0c[?25l[?1c abcdefghijklm[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1ci[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c 3 lines jjjlllI\\ \" [?25l[?1c aaa bbb bbb ccc ccc ddd ddd[?25h[?0c[?25l[?1c:[?25h[?0c/^aa/,/^$/w >> test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" 5 lines, 37 characters appended[?25h[?0c[?25l[?1c/[?25h[?0cxaaa$/ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexe ":norm! \jjjI<>\p\" [?25l[?1c

xaaa

bbbb

cccc

dddd[?25h[?0c[?25l[?1c:[?25h[?0c/xaaa$/,/^$/w >> test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" 5 lines, 33 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test for Visual block was created with the last $ [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^A23$/ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexe ":norm! l\j$Aab\" [?25l[?1cab 4567ab[?25h[?0c[?25l[?1c:[?25h[?0c.,/^$/w >> test.out [?25l[?1c"test.out" 3 lines, 14 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test for Visual block was created with the middle $ (1) [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^B23$/ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexe ":norm! l\j$hAab\" [?25l[?1cab 4567ab[?25h[?0c[?25l[?1c:[?25h[?0c.,/^$/w >> test.out [?25l[?1c"test.out" 3 lines, 15 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test for Visual block was created with the middle $ (2) [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^C23$/ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexe ":norm! l\j$hhAab\" [?25l[?1cab 456ab7[?25h[?0c[?25l[?1c:[?25h[?0c.,/^$/w >> test.out [?25l[?1c"test.out" 3 lines, 14 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test for Visual block insert when virtualedit=all and utf-8 encoding [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ve=all enc=utf-8 [?25l[?1cGothe youtueuu end^[Ypk0wgUe :" gUfx must uppercase until x, inclusive. O- youtuexu -^[0fogUfx :" VU must uppercase a whole line YpkVU :" same, when it's the last line in the buffer YPGi111^[VUddP :" Uppercase two lines Oblah di doh dut^[VkUj :" Uppercase part of two lines ddppi333^[k0i222^[fyllvjfuUk :" visual replace using Enter or NL G3o123456789^[2k05l^V2jr^MG3o98765^[2k02l^V2jr^V^M G3o123456789^[2k05l^V2jr G3o98765^[2k02l^V2jr^V :" :" 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 aaa 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[?25h[?0c[?25l[?1c:[?25h[?0c/\t\tline [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c:[?25h[?0cexe ":norm! 07l\jjIx\" [?25l[?1cxxx[?25h[?0c[?25l[?1c:[?25h[?0c.,/^$/w >> test.out [?25l[?1c"test.out" 4 lines, 49 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test for Visual block append when virtualedit=all [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexe ":norm! 012l\jjAx\" [?25l[?1cx line1x line2x line3[?25h[?0c[?25l[?1c:[?25h[?0cset ve= enc=latin1 [?25l[?1cGothe youtußeuu end^[Ypk0wgUe :" gUfx must uppercase until x, inclusive. O- youßtußexu -^[0fogUfx :" VU must uppercase a whole line YpkVU :" same, when it's the last line in the buffer YPGi111^[VUddP :" Uppercase two lines Oblah di doh dut^[VkUj :" Uppercase part of two lines ddppi333^[k0i222^[fyllvjfuUk :" visual replace using Enter or NL G3o123456789^[2k05l^V2jr^MG3o98765^[2k02l^V2jr^V^M G3o123456789^[2k05l^V2jr G3o98765^[2k02l^V2jr^V :" :" 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! ENDTESTx 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 axyzqqqq mnoghijklm axyzqqqqef mnoghijklm axyzqqqqefgmnoklm abcdqqqqijklm[?25h[?0c[?25l[?1c:[?25h[?0c.,/^$/w >> test.out [?25l[?1c"test.out" 4 lines, 70 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c" gUe must uppercase a whole word, also when ß changes to SS [?25l[?1c[?25h[?0c[?25l[?1c the youtußeuu end[?25h[?0c[?25l[?1c the youtußeuu end [?25h[?0cthe [?25l[?1cYOUTUSSEUU end the [?25h[?0c the [?25l[?1c :[?25h[?0c" gUfx must uppercase until x, inclusive. [?25l[?1c[?25h[?0c[?25l[?1c - youßtußexu -[?25h[?0c - y[?25l[?1cOUSSTUSSEXu - - y[?25h[?0c[?25l[?1c the youtußeuu end[?25h[?0c[?25l[?1c :[?25h[?0c" VU must uppercase a whole line [?25l[?1c[?25h[?0c[?25l[?1c the youtußeuu end[?25h[?0c[?25l[?1cthe youtußeuu end [?25h[?0c[?25l[?1cTHE YOUTUSSEUU END [?25h[?0c [?25l[?1c :[?25h[?0c" same, when it's the last line in the buffer [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c the youtußeuu end[?25h[?0c[?25l[?1c111the youtußeuu end 11[?25h[?0c[?25l[?1c 111the youtußeuu end 11[?25h[?0c[?25l[?1c 111THE YOUTUSSEUU END [?25h[?0c[?25l[?1c~ [?25h[?0c[?25l[?1c111THE YOUTUSSEUU END the youtußeuu end[?25h[?0c [?25l[?1c :[?25h[?0c" Uppercase two lines [?25l[?1c[?25h[?0c[?25l[?1c blah didoh dut[?25h[?0c[?25l[?1c doh dut [?25h[?0c[?25l[?1cblah di t[?25h[?0c[?25l[?1c BLAH DIDOH DUT[?25h[?0c[?25l[?1c the youtußeuu end[?25h[?0c[?25l[?1c :[?25h[?0c" Uppercase part of two lines [?25l[?1c[?25h[?0c[?25l[?1c ~ [?25h[?0c[?25l[?1c the youtußeuu end[?25h[?0c[?25l[?1c the youtußeuu end[?25h[?0c[?25l[?1c333the youtußeuu end 33[?25h[?0c [?25l[?1c222the youtußeuu end 22[?25h[?0c2the yo[?25l[?1c[?25h[?0c[?25l[?1cutußeuu end 333the yo[?25h[?0c[?25l[?1cut[?25h[?0c[?25l[?1cUTUSSEUU END 333THE YOUTU[?25h[?0c[?25l[?1c :[?25h[?0c" visual replace using Enter or NL [?25l[?1c[?25h[?0c [?25l[?1c123456789 123456789 123456789[?25h[?0c 12345[?25l[?1c[?25h[?0c[?25l[?1c66[?25h[?0c[?25l[?1c789[?25h[?0c[?25l[?1c789 12345 789 [?25h[?0c[?25l[?1c98765 98765 98765[?25h[?0c 98[?25l[?1c[?25h[?0c[?25l[?1c7 987 98[?25h[?0c[?25l[?1c^M65 98^M65 98^M65[?25h[?0c 98 [?25l[?1c123456789 123456789 123456789[?25h[?0c 12345[?25l[?1c[?25h[?0c[?25l[?1c66[?25h[?0c[?25l[?1c789[?25h[?0c[?25l[?1c789 12345 789 [?25h[?0c[?25l[?1c98765 98765 98765[?25h[?0c 98[?25l[?1c[?25h[?0c[?25l[?1c7 987 98[?25h[?0c[?25l[?1c^@65 98^@65 98^@65[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test cursor position. When ve=block and Visual block mode and $gj [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ve=block [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexe ":norm! 2k\$gj\" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet cpos=getpos("'>") [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put ='col:'.cpos[2].' off:'.cpos[3] [?25l[?1c col:4 off:0[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" block_insert when replacing spaces in front of the block with tabs [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ts=8 sts=4 sw=4 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c4,7y [?25l[?1c4 lines yanked[?25h[?0c[?25l[?1c 4 more lines 4 more lines[?25h[?0c[?25l[?1c #define BO_ALL 0x0001[?25h[?0c[?25l[?1c :[?25h[?0cexe ":norm! f0\2jI\\" [?25l[?1c 0x0001 #define BO_BS0x0002 #define BO_CRSR0x0004[?25h[?0c[?25l[?1c :[?25h[?0c/^the/,$w >> test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" 31 lines, 322 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :" 1 start of Xxx :" 2test40 :" 3 start of Xxx :" 4test401 :" 5 end of Xxx :" 6 end of Xxx :" 7 write :" 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 ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1455 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^start/,$w! Xxx^I^I" write lines below to Xxx [?25l[?1c"Xxx" [New File] 3 lines, 32 characters written[?25h[?0c[?25l[?1c:[?25h[?0cau BufReadCmd XtestA 0r Xxx|$del [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce XtestA^I^I^I" will read text of Xxd instead [?25l[?1c"Xxx" 3 lines, 32 charactersstart of Xxxtest40 end of Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cau BufWriteCmd XtestA call append(line("$"), "write") [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw^I^I^I^I" will append a line to the file [?25l[?1cwrite[?25h[?0c[?25l[?1c:[?25h[?0cr XtestA^I^I^I" should not read anything [?25l[?1cE484: Can't open file XtestA[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" now we have: [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 1^Istart of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 2^I^Itest40 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 3^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 4^Iwrite [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau FileReadCmd XtestB '[r Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c2r XtestB^I^I^I" will read Xxx below line 2 instead [?25l[?1c"Xxx" 3 lines, 32 charactersstart of Xxxtest40 end of Xxx[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 1^Istart of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 2^I^Itest40 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 3^Istart of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 4^I^Itest40 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 5^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 6^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 7^Iwrite [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau FileWriteCmd XtestC '[,']copy $ [?25l[?1c[?25h[?0c[?25l[?1ctest401[?25h[?0c[?25l[?1c:[?25h[?0c4,5w XtestC^I^I^I" will copy lines 4 and 5 to the end [?25l[?1c test401end of Xxx[?25h[?0c[?25l[?1c:[?25h[?0cr XtestC^I^I^I" should not read anything [?25l[?1cE484: Can't open file XtestC[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 1^Istart of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 2^I^Itest40 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 3^Istart of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 4^I^Itest401 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 5^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 6^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 7^Iwrite [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 8^I^Itest401 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 9^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau FILEAppendCmd XtestD '[,']w! test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>XtestD^I^I^I" will write all lines to test.out [?25l[?1c"test.out" [New File] 9 lines, 91 characters written[?25h[?0c[?25l[?1c:[?25h[?0c$r XtestD^I^I^I" should not read anything [?25l[?1cE484: Can't open file XtestD[?25h[?0c[?25l[?1c:[?25h[?0c$w >>test.out^I^I^I" append "end of Xxx" to test.out [?25l[?1c"test.out" 1 line, 11 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cau BufReadCmd XtestE 0r test.out|$del [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0csp XtestE^I^I^I" split window with test.out [?25l[?1c"test.out" 10 lines, 102 charactersend of XxxXtestE end of Xxxend of Xxxwrite test401end of XxxXtestA [?25h[?0c[?25l[?1casdf[+][?25h[?0cXtestE [+] XtestA [?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufWriteCmd XtestE w! test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cwall^I^I^I^I" will write other window to test.out [?25l[?1c"test.out" 11 lines, 107 characters written [?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 1^Istart of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 2^I^Itest40 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 3^Istart of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 4^I^Itest401 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 5^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 6^Iasdf [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 7^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 8^Iwrite [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 9^I^Itest401 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 10^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c^I^I^I^I" 11^Iend of Xxx [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 13 lines, 196 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0c%d [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?25h[?0c[?25l[?1cThis is the start This is the leaderThis is the middleThis is the trailerThis is the end[?25h[?0c[?25l[?1c3000 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 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 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[?25h[?0c[?25l[?1cleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleader[?25h[?0c [?25l[?1c:[?25h[?0cw! Xtest [?25l[?1c"Xtest" [New File] 6005 lines, 117092 characters written[?25h[?0c[?25l[?1c:[?25h[?0c%d [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --No lines in buffer--[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest [?25l[?1c"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 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 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[?25h[?0c[?25l[?1c:[?25h[?0c.w! test.out [?25l[?1c"test.out" [New File] 1 line, 18 characters written[?25h[?0c[?25l[?1cThis 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 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 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 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[?25h[?0c[?25l[?1c:[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 19 characters appended[?25h[?0c[?25l[?1cThis 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 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 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 [?25h[?0c[?25l[?1c :[?25h[?0c.w >>test.out [?25l[?1c"test.out" 1 line, 16 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :set nobin :e # :" :" --- Check that editing a latin-1 file doesn't see a BOM :e! Xtest0 :redir! >test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set bomb fenc=latin-1 :w! Xtest0x :" :" --- Check utf-8 :e! Xtest1 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=utf-8 :w! Xtest1x :" :" --- Check utf-8 with an error (will fall back to latin-1) :e! Xtest2 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=utf-8 :w! Xtest2x :" :" --- Check ucs-2 :e! Xtest3 :redir >>test.out[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 111 lines, 2116 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST:set fenc=latin-1 :w >>test.out :set fenc=ucs-2 :w! Xtest3x :" :" --- Check ucs-2le :e! Xtest4 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-2le :w! Xtest4x :" :" --- Check ucs-4 :e! Xtest5 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4 :w! Xtest5x :" :" --- Check ucs-4le :e! Xtest6 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4le :w! Xtest6x :" :" --- 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 ÿþ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso mbyte.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset encoding=utf-8 [?25l[?1c:set fenc=latin-1 :w >>test.out :set fenc=ucs-2 :w! Xtest3x :" :" --- Check ucs-2le :e! Xtest4 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-2le :w! Xtest4x :" :" --- Check ucs-4 :e! Xtest5 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4 :w! Xtest5x :" :" --- Check ucs-4le :e! Xtest6 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4le :w! Xtest6x :" :" --- 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 ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@[?25h[?0c[?25l[?1c:[?25h[?0cset fileencodings=ucs-bom,latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ff=unix ffs=unix " This changes the file for DOS and MAC [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Write the test files [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^latin-1$/+1w! Xtest0 [?25l[?1c"Xtest0" [New File] 1 line, 10 characters written[?25h[?0c[?25l[?1c:[?25h[?0c/^utf-8$/+1w! Xtest1 [?25l[?1c"Xtest1" [New File] 1 line, 9 characters written[?25h[?0c[?25l[?1c:[?25h[?0c/^utf-8-err$/+1w! Xtest2 [?25l[?1c"Xtest2" [New File] 1 line, 13 characters written[?25h[?0c[?25l[?1c:[?25h[?0c/^ucs-2$/+1w! Xtest3 [?25l[?1c"Xtest3" [New File] 1 line, 14 characters written[?25h[?0c[?25l[?1c:[?25h[?0c/^ucs-2le$/+1w! Xtest4 [?25l[?1c"Xtest4" [New File] 1 line, 17 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" Need to add a NUL byte after the NL byte [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset bin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest4 " Ignore change from setting 'ff' [?25l[?1c"Xtest4" 1 line, 17 charactersu^@c^@s^@-^@2^@l^@e^@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c [?25l[?1c^@[?25h[?0c[?25l[?1c:[?25h[?0cset noeol [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"Xtest4" [Incomplete last line] 2 lines, 18 characters written[?25h[?0c[?25l[?1c:[?25h[?0cset ffs& nobinary " Allow default test42.in format [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce # [?25l[?1c"test42.in" [converted] 130 lines, 2385 characters:set fenc=latin-1:w >>test.out :set fenc=ucs-2:w! Xtest3x:":" --- Check ucs-2le:e! Xtest4:redir >>test.out:set fileencoding bomb?:redir END:set fenc=latin-1:w >>test.out:set fenc=ucs-2le:w! Xtest4x:":" --- Check ucs-4:e! Xtest5:redir >>test.out:set fileencoding bomb?:redir END:set fenc=latin-1:w >>test.out:set fenc=ucs-4:w! Xtest5x:":" --- Check ucs-4le:e! Xtest6:redir >>test.out:set fileencoding bomb?:redir END:set fenc=latin-1:w >>test.out:set fenc=ucs-4le:w! Xtest6x:":" --- 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!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^@^@^@[?25h[?0c[?25l[?1c:[?25h[?0cset ff=unix " Format for files to write [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^ucs-4$/+1w! Xtest5 [?25l[?1c"Xtest5" [converted][New File] 1 line, 30 characters written[?25h[?0c[?25l[?1c:[?25h[?0c/^ucs-4le$/+1w! Xtest6 [?25l[?1c"Xtest6" [converted][New File] 1 line, 35 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" Need to add three NUL bytes after the NL byte [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset bin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest6 " ! for when setting 'ff' is a change [?25l[?1c"Xtest6" 1 line, 33 characters^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c ~ [?25l[?1c ^@^@^@[?25h[?0c[?25l[?1c:[?25h[?0cset noeol [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"Xtest6" [Incomplete last line] 2 lines, 36 characters written[?25h[?0c[?25l[?1c:[?25h[?0cset nobin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce # [?25l[?1c"test42.in" [converted] 130 lines, 2385 characters:set fenc=latin-1:w >>test.out :set fenc=ucs-2:w! Xtest3x:":" --- Check ucs-2le:e! Xtest4:redir >>test.out:set fileencoding bomb?:redir END:set fenc=latin-1:w >>test.out:set fenc=ucs-2le:w! Xtest4x:":" --- Check ucs-4:e! Xtest5:redir >>test.out:set fileencoding bomb?:redir END:set fenc=latin-1:w >>test.out:set fenc=ucs-4:w! Xtest5x:":" --- Check ucs-4le:e! Xtest6:redir >>test.out:set fileencoding bomb?:redir END:set fenc=latin-1:w >>test.out:set fenc=ucs-4le:w! Xtest6x:":" --- 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!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^@^@^@[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check that editing a latin-1 file doesn't see a BOM [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest0 [?25l[?1c"Xtest0" [converted] 1 line, 12 charactersþþlatin-1~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0credir! >test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fileencoding bomb? [?25l[?1c fileencoding=latin1 nobomb Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cþþlatin-1 ~ [?25h[?0c[?25l[?1c:[?25h[?0cset fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" [converted] 1 line, 12 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset bomb fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! Xtest0x [?25l[?1c"Xtest0x" [converted][New File] 1 line, 12 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check utf-8 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest1 [?25l[?1c"Xtest1" 1 line, 9 charactersutf-8[?25h[?0c[?25l[?1c:[?25h[?0credir >>test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fileencoding bomb? [?25l[?1c fileencoding=utf-8 bomb Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cutf-8 ~ [?25h[?0c[?25l[?1c:[?25h[?0cset fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" [converted] 1 line, 6 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset fenc=utf-8 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! Xtest1x [?25l[?1c"Xtest1x" [New File] 1 line, 9 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check utf-8 with an error (will fall back to latin-1) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest2 [?25l[?1c"Xtest2" [converted] 1 line, 17 charactersutf-8<80>err [?25h[?0c[?25l[?1c:[?25h[?0credir >>test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fileencoding bomb? [?25l[?1c fileencoding=latin1 nobomb Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cutf-8<80>err ~ [?25h[?0c[?25l[?1c:[?25h[?0cset fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" [converted] 1 line, 17 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset fenc=utf-8 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! Xtest2x [?25l[?1c"Xtest2x" [New File] 1 line, 17 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check ucs-2 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest3 [?25l[?1c"Xtest3" [converted] 1 line, 8 charactersucs-2[?25h[?0c[?25l[?1c:[?25h[?0credir >>test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fileencoding bomb? [?25l[?1c fileencoding=utf-16 bomb Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cucs-2 ~ [?25h[?0c[?25l[?1c:[?25h[?0cset fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" [converted] 1 line, 6 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset fenc=ucs-2 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! Xtest3x [?25l[?1c"Xtest3x" [converted][New File] 1 line, 8 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check ucs-2le [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest4 [?25l[?1c"Xtest4" [converted] 1 line, 10 charactersle [?25h[?0c[?25l[?1c:[?25h[?0credir >>test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fileencoding bomb? [?25l[?1c fileencoding=utf-16le bomb Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cucs-2le ~ [?25h[?0c[?25l[?1c:[?25h[?0cset fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" [converted] 1 line, 8 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset fenc=ucs-2le [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! Xtest4x [?25l[?1c"Xtest4x" [converted][New File] 1 line, 10 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check ucs-4 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest5 [?25l[?1c"Xtest5" [converted] 1 line, 10 characters4[?25h[?0c[?25l[?1c:[?25h[?0credir >>test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fileencoding bomb? [?25l[?1c fileencoding=ucs-4 bomb Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cucs-4 ~ [?25h[?0c[?25l[?1c:[?25h[?0cset fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" [converted] 1 line, 6 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset fenc=ucs-4 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! Xtest5x [?25l[?1c"Xtest5x" [converted][New File] 1 line, 10 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check ucs-4le [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! Xtest6 [?25l[?1c"Xtest6" [converted] 1 line, 12 charactersle [?25h[?0c[?25l[?1c:[?25h[?0credir >>test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fileencoding bomb? [?25l[?1c fileencoding=ucs-4le bomb Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cucs-4le ~ [?25h[?0c[?25l[?1c:[?25h[?0cset fenc=latin-1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw >>test.out [?25l[?1c"test.out" [converted] 1 line, 8 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cset fenc=ucs-4le [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! Xtest6x [?25l[?1c"Xtest6x" [converted][New File] 1 line, 12 characters written[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" --- Check the files written with BOM [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset bin [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! test.out [?25l[?1c"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 bombucs-4 fileencoding=ucs-4le bombucs-4le[?25h[?0c[?25l[?1c:[?25h[?0c$r Xtest0x [?25l[?1c"Xtest0x" 1 line, 10 characterslatin-1[?25h[?0c[?25l[?1c:[?25h[?0c$r Xtest1x [?25l[?1c"Xtest1x" 1 line, 9 charactersutf-8[?25h[?0c[?25l[?1c:[?25h[?0c$r Xtest2x [?25l[?1c"Xtest2x" 1 line, 17 charactersutf-8<80>err[?25h[?0c[?25l[?1c:[?25h[?0c$r Xtest3x [?25l[?1c"Xtest3x" 1 line, 14 characters^@u^@c^@s^@-^@2^@[?25h[?0c[?25l[?1c:[?25h[?0c$r Xtest4x [?25l[?1c"Xtest4x" [Incomplete last line] 2 lines, 18 charactersu^@c^@s^@-^@2^@l^@e^@^@[?25h[?0c[?25l[?1c:[?25h[?0c$r Xtest5x [?25l[?1c"Xtest5x" 1 line, 28 characters^@^@^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@[?25h[?0c[?25l[?1c:[?25h[?0c$r Xtest6x [?25l[?1c"Xtest6x" [Incomplete last line] 2 lines, 36 characters^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@^@^@^@[?25h[?0c[?25l[?1c:[?25h[?0cset nobin ff& " Write the file in default format [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw! test.out [?25l[?1c"test.out" 44 lines, 409 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 5 m mm mnn mnnooo 6 x ^aa$ x 7 (a)(b) abbaa 8 axx [ab]xx 9 foobar ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 19 lines, 268 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nocompatible viminfo+=nviminfo [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0ca*b\{2}c\+/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\Md\*e\{2}f\+/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nomagic [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cg\*h\{2}i\+/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\mj*k\{2}l\+/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\vm*n{2}o+/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\V^aa$ [?25l[?1c[?25h[?0c[?25l[?1caa$ x[?25h[?0c[?25l[?1c:[?25h[?0cset magic [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\v(a)(b)\2\1\1/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\V[ab]\(\[xy]\)\1 [?25l[?1c[?25h[?0c[?25l[?1cab]x[?25h[?0c[?25l[?1c:[?25h[?0c$ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset undolevels=100 [?25l[?1c[?25h[?0c[?25l[?1c?[?25h[?0cbar? [?25l[?1c~ [?25h[?0c[?25l[?1c1 more line; before #2 0 seconds agobar[?25h[?0c[?25l[?1c9 foo[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c?^1?,$w! test.out [?25l[?1c"test.out" [New] 11L, 137C written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 x:" d /[\u4f7f\u5929]\+ x:" e /\%U12345678 x:" f /[\U1234abcd\u1234\uabcd] x:" g /\%d21879b x:" j Test backwards search from a multi-byte char /x x?. x:" k :let @w=':%s#comb[i]nations#Å~SÌ~Dá¹£Ì~AmÌ¥Ì~DαÌ~DÌ~FÌ~A#g' :@w :" :" l Test what 7.3.192 fixed /^l :s/ \?/ /g :?^1?,$w! test.out :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[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1023 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso mbyte.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo [?25l[?1cTests 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 /¿ x:" find word by change of word class /¿?\<¿?¿?\>¿? x:" Test \%u, [\u] and friends :" c /\%u20ac x:" d /[\u4f7f\u5929]\+ x:" e /\%U12345678 x:" f /[\U1234abcd\u1234\uabcd] x:" g /\%d21879b x:" j Test backwards search from a multi-byte char /x x?. x:" k :let @w=':%s#comb[i]nations#¿¿m¿#g' :@w :" :" l Test what 7.3.192 fixed /^l :s/ \?/ /g :?^1?,$w! test.out :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[?25h[?0c[?25l[?1c :[?25h[?0cset re=1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^1 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0ca*b\{2}c\+/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\Md\*e\{2}f\+/e [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nomagic [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cg\*h\{2}i\+/e [?25l[?1c 3 g gg ghh ghhiii[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c /[?25h[?0c\mj*k\{2}l\+/e [?25l[?1c 4 j jj jkk jkklll[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c /[?25h[?0c\vm*n{2}o+/e [?25l[?1c 5 m mm mnn mnnooo[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c /[?25h[?0c\V^aa$ [?25l[?1c 6 x ^aa$ x[?25h[?0c[?25l[?1caa$ x[?25h[?0c[?25l[?1c :[?25h[?0cset magic [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\v(a)(b)\2\1\1/e [?25l[?1c 7 (a)(b) abbaa[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c /[?25h[?0c\V[ab]\(\[xy]\)\1 [?25l[?1c 8 axx [ab]xx[?25h[?0c[?25l[?1cab]x[?25h[?0c[?25l[?1c :[?25h[?0c" Now search for multi-byte without composing char [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c¿ [?25l[?1c 9 ¿¿x ¿¿x[?25h[?0c[?25l[?1cx[?25h[?0c[?25l[?1c :[?25h[?0c" Now search for multi-byte with composing char [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c¿¿ [?25l[?1c a ¿¿x ¿¿x[?25h[?0c[?25l[?1cx[?25h[?0c[?25l[?1c :[?25h[?0c" find word by change of word class [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c¿?\<¿?¿?\>¿? [?25l[?1c b ¿?¿?¿?¿?[?25h[?0c[?25l[?1c¿?¿?¿?[?25h[?0c[?25l[?1c :[?25h[?0c" Test \%u, [\u] and friends [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" c [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\%u20ac [?25l[?1c c x ¬¿x[?25h[?0c[?25l[?1cx[?25h[?0c[?25l[?1c :[?25h[?0c" d [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c[\u4f7f\u5929]\+ [?25l[?1c d ¿?¿?x[?25h[?0c[?25l[?1c¿?x [?25h[?0c[?25l[?1c :[?25h[?0c" e [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\%U12345678 [?25l[?1c e ¿y[?25h[?0c[?25l[?1cy[?25h[?0c[?25l[?1c :[?25h[?0c" f [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c[\U1234abcd\u1234\uabcd] [?25l[?1c f ¿z[?25h[?0c[?25l[?1cz[?25h[?0c[?25l[?1c :[?25h[?0c" g [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\%d21879b [?25l[?1c g a¿?bb[?25h[?0c[?25l[?1cbb[?25h[?0c[?25l[?1c :[?25h[?0c" j Test backwards search from a multi-byte char [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cx [?25l[?1c j 0123¿x[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c ?[?25h[?0c. [?25l[?1c[?25h[?0c[?25l[?1c¿[?25h[?0c[?25l[?1c:[?25h[?0c" k [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet @w=':%s#comb[i]nations#¿¿¿¿mmm¿¿¿#g' [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c@w [?25l[?1c k ¿¿m¿[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" l Test what 7.3.192 fixed [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^l [?25l[?1c l äö ü¿[?25h[?0c[?25l[?1c :[?25h[?0cs/ \?/ /g [?25l[?1c5 substitutions on 1 line l ä ö ü¿[?25h[?0c[?25l[?1c:[?25h[?0c?^1?,$w! test.out [?25l[?1c"test.out" [New] 19L, 250C written[?25h[?0c[?25l[?1c:[?25h[?0ce! test.out [?25l[?1c"test.out" 19L, 250C1 a aa abb abbcc2 d dd dee deeff3 g gg ghh ghhii4 j jj jkk jkkll 5 m mm mnn mnnoo6 x aa$ x 7 (a)(b) abba8 axx ab]xx9 ¿¿x ¿xa ¿¿x ¿x b ¿?¿?¿? c x ¬x d ¿?xe yf zg abb j 012¿k ¿¿m¿ l ä ö ü ¿~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cput =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿ [?25l[?1c¿[?25h[?0c[?25l[?1c:[?25h[?0cput =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿ [?25l[?1c¿¿[?25h[?0c[?25l[?1c:[?25h[?0cput =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿ [?25l[?1c¿[?25h[?0c[?25l[?1c:[?25h[?0cput =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿ [?25l[?1c¿[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] c x ¬xd ¿?xe yf zg abbj 012¿k ¿¿m¿ l ä ö ü ¿¿¿¿¿¿test.out [+] [?25h[?0c[?25l[?1c:[?25h[?0c$put =['dog(a', 'cat('] [?25l[?1cdog(acat([+][?25h[?0c[?25l[?1c/[?25h[?0c(/e+ [?25l[?1c/(/e+1 [?25h[?0c[?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c:[?25h[?0cbd! [?25l[?1c1 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 zg abbj 012¿k ¿¿m¿ l ä ö ü ¿¿¿¿¿¿~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0c$put ='' [?25l[?1c[?25h[?0c[?25l[?1ca cat([?25h[?0c [?25l[?1c:[?25h[?0cw! [?25l[?1c"test.out" 25L, 271C written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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(".")) k:call append("$", foldlevel(".")) :set sw& :" test syntax folding :set fdm=syntax fdl=0 :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3 :syn region Fd1 start="ee" end="ff" fold contained :syn region Fd2 start="gg" end="hh" fold contained :syn region Fd3 start="commentstart" end="commentend" fold contained Gzk:call append("$", "folding " . getline(".")) k:call append("$", getline(".")) jAcommentstart ^[Acommentend^[:set fdl=1 3j:call append("$", getline(".")) :set fdl=0 zO^Lj:call append("$", getline(".")) :" test expression folding :fun Flvl() let l = getline(v:lnum) if l =~ "bb$" return 2 elseif l =~ "gg$" return "s1" elseif l =~ "ii$" return ">2" elseif l =~ "kk$" return "0" endif return "=" endfun :set fdm=expr fde=Flvl() /bb$ :call append("$", "expr " . foldlevel(".")) /hh$ :call append("$", foldlevel(".")) /ii$ :call append("$", foldlevel(".")) /kk$[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 75 lines, 1846 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset belloff=all [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" We also need the +syntax feature here. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cif !has("syntax") [?25l[?1c : [?25h[?0c e! test.ok [?25l[?1c: [?25h[?0c w! test.out [?25l[?1c: [?25h[?0c qa! [?25l[?1c: [?25h[?0c:endif [?25l[?1czc:call append("$", getline(foldclosed("."))) :" test folding with markers. :set fdm=marker fdl=1 fdc=3 /^5[?25h[?0c[?25l[?1c :[?25h[?0c" basic test if a fold can be created, opened, moving to the end and closed [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^1 [?25l[?1c 1 aa[?25h[?0c[?25l[?1c+-- 3 lines: 1 aa------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------[?25h[?0c[?25l[?1c :[?25h[?0ccall append("$", "manual " . getline(foldclosed("."))) [?25l[?1c[?25h[?0c[?25l[?1c1 aa[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", foldclosed(".")) [?25l[?1c[?25h[?0c[?25l[?1c2 bb 3 cc[?25h[?0c[?25l[?1c :[?25h[?0ccall append("$", getline(".")) [?25l[?1c[?25h[?0c[?25l[?1c+-- 3 lines: 1 aa------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------4 dd {{{ 5 ee {{{ }}}[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", getline(foldclosed("."))) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" test folding with markers. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fdm=marker fdl=1 fdc=3 [?25l[?1c /^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("."))  k:call append("$", foldlevel("."))  :set sw&  :" test syntax folding  :set fdm=syntax fdl=0  :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3  :syn region Fd1 start="ee" end="ff" fold contained  :syn region Fd2 start="gg" end="hh" fold contained  :syn region Fd3 start="commentstart" end="commentend" fold contained  Gzk:call append("$", "folding " . getline("."))  k:call append("$", getline("."))  jAcommentstart ^[Acommentend^[:set fdl=1  3j:call append("$", getline("."))  :set fdl=0  zO^Lj:call append("$", getline("."))  :" test expression folding  :fun Flvl()   let l = getline(v:lnum)   if l =~ "bb$"   return 2   elseif l =~ "gg$"   return "s1"   elseif l =~ "ii$"   return ">2"   elseif l =~ "kk$"   return "0"   endif   return "="  endfun  :set fdm=expr fde=Flvl()  /bb$  :call append("$", "expr " . foldlevel("."))  /hh$  :call append("$", foldlevel("."))  /ii$  :call append("$", foldlevel("."))  /kk$  :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[?25h[?0c[?25l[?1c/[?25h[?0c^5 [?25l[?1c[z:call append("$", foldlevel("."))jo{{ ^[r{jj:call append("$", foldlevel(".")kYpj:call append("$", foldlevel(".")):" test folding with indent:set fdm=indent sw=2/^2 bi ^[jI ^[:call append("$", "indent " . foldlevel("."))k:call append("$", foldlevel(".")):set sw&:" test syntax foldingfdm=syntax fdl=0syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3yn region Fd1 start="ee" end="ff" fold containedFd2gghhed3commentstart" end="commentend" fold containedGzk:call append("$", "folding " . getline("."))k:call append("$", getline("."))jAcommentstart ^[Acommentend^[:set fdl=13j:call append("$", getline(".")):set fdl=0zO^Lj:call append("$", getline("."))" test expression folding:fun Flvl() let l = getline(v:lnum) if l =~ "bb$" return 2elseif l =~ "gg$""s1"ii>2kk0"ndifreturn "=endfun:set fdm=expr fde=Flvl()/bb$call append("$", "expr " . foldlevel("."))hhfoldlevel("."))iikk:/^last/+1,$w! test.outdelfun FlvlnewiTest fdm=indent and :move bug ENDline2 Test fdm=indent START line3line4^[:set fdm=indent:1m12jzc:m0%w >> test.out:qa!ENDTEST1 aa2 bb3 cc -4 dd {{{ |-5 ee {{{ }}}[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", "marker " . foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c | {{[?25h[?0c[?25l[?1c-{[?25h[?0c[?25l[?1c || 6 ff }}}[?25h[?0c[?25l[?1c | 7 gg[?25h[?0c[?25l[?1c :[?25h[?0ccall append("$", foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c6 ff }}}[?25h[?0c[?25l[?1c  7 gg[?25h[?0c[?25l[?1c :[?25h[?0ccall append("$", foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" test folding with indent [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fdm=indent sw=2 [?25l[?1c- | |- | |- | |- | |- | |-++--- 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 ii[?25h[?0c[?25l[?1c/[?25h[?0c^2 b [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c - 2 bb[?25h[?0c[?25l[?1c |- 3 cc[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", "indent " . foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset sw& [?25l[?1c   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 gg[?25h[?0c[?25l[?1c:[?25h[?0c" test syntax folding [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fdm=syntax fdl=0 [?25l[?1c [?25h[?0c[?25l[?1c:[?25h[?0csyn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3 [?25l[?1c++-- 8 lines: 4 dd --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------a jjb kklastmanual 1 aa-1[?25h[?0c[?25l[?1c:[?25h[?0csyn region Fd1 start="ee" end="ff" fold contained [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0csyn region Fd2 start="gg" end="hh" fold contained [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0csyn region Fd3 start="commentstart" end="commentend" fold contained [?25l[?1c[?25h[?0c[?25l[?1c 3 cc  1 aa  marker 2  1  1  0  indent 2  1[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", "folding " . getline(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", getline(".")) [?25l[?1c[?25h[?0c[?25l[?1c --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[?25h[?0c[?25l[?1c commentend- |- | [?25h[?0c[?25l[?1c:[?25h[?0cset fdl=1 [?25l[?1c++--- 3 lines: 5 ee ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 ff }}}++--- 2 lines: 7 gg--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------9 ii a jj  b kk  lastmanual 1 aa-13 cc1 aamarker 21[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", getline(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset fdl=0 [?25l[?1c++-- 8 lines: 4 dd commentstart commentend-------------------------------------------------------------------------------------------------------------------------------------------------------------------- a jj b kk last manual 1 aa-13 cc1 aarker 2110indent[?25h[?0c[?25l[?1c -4 dd {{{commentstart commentend|-5 ee {{{ }}} ||{{{||6 ff }}} |6 ff }}}|-7 gg ||8 hh |9 iia jjb kklastmanual 1 aa-13 cc[?25h[?0c[?25l[?1c :syn region Fd1 start="ee" end="ff" fold contained  :syn region Fd2 start="gg" end="hh" fold contained  :syn region Fd3 start="commentstart" end="commentend" fold contained  Gzk:call append("$", "folding " . getline("."))  k:call append("$", getline("."))  jAcommentstart ^[Acommentend^[:set fdl=1  3j:call append("$", getline("."))  :set fdl=0  zO^Lj:call append("$", getline("."))  :" test expression folding  :fun Flvl()   let l = getline(v:lnum)   if l =~ "bb$"   return 2   elseif l =~ "gg$"   return "s1"   elseif l =~ "ii$"   return ">2"   elseif l =~ "kk$"   return "0"   endif   return "="  endfun  :set fdm=expr fde=Flvl()  /bb$  :call append("$", "expr " . foldlevel("."))  /hh$  :call append("$", foldlevel("."))  /ii$  :call append("$", foldlevel("."))  /kk$  :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 {{{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[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", getline(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" test expression folding [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfun Flvl() [?25l[?1c : [?25h[?0c let l = getline(v:lnum) [?25l[?1c: [?25h[?0c if l =~ "bb$" [?25l[?1c: [?25h[?0c return 2 [?25l[?1c: [?25h[?0c elseif l =~ "gg$" [?25l[?1c: [?25h[?0c return "s1" [?25l[?1c: [?25h[?0c elseif l =~ "ii$" [?25l[?1c: [?25h[?0c return ">2" [?25l[?1c: [?25h[?0c elseif l =~ "kk$" [?25l[?1c: [?25h[?0c return "0" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c return "=" [?25l[?1c: [?25h[?0cendfun [?25l[?1c :syn region Fd1 start="ee" end="ff" fold contained  :syn region Fd2 start="gg" end="hh" fold contained  :syn region Fd3 start="commentstart" end="commentend" fold contained  Gzk:call append("$", "folding " . getline("."))  k:call append("$", getline("."))  jAcommentstart ^[Acommentend^[:set fdl=1  3j:call append("$", getline("."))  :set fdl=0  zO^Lj:call append("$", getline("."))  :" test expression folding  :fun Flvl()   let l = getline(v:lnum)[?25h[?0c[?25l[?1c:[?25h[?0cset fdm=expr fde=Flvl() [?25l[?1c++-- 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-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------~ ~ [?25h[?0c[?25l[?1c/[?25h[?0cbb$ [?25l[?1csearch 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[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", "expr " . foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0chh$ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cii$ [?25l[?1c-9 ii||a jjb kklastmanual 1 aa-13 cc[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0ckk$ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall append("$", foldlevel(".")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^last/+1,$w! test.out [?25l[?1c"test.out" [New File] 18 lines, 96 characters written[?25h[?0c[?25l[?1c:[?25h[?0cdelfun Flvl [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] /kk$call append("$", foldlevel("."))/^last/+1,$w! test.out:delfun Flvl:newiTest fdm=indent and :move bug ENDline2Test fdm=indent START line3 line4^[:set fdm=indent1m12jzc:m0:%w >> test.out:qa!ENDTEST   1 aa-- 2 bb 3 cc4 dd {{{commentstart commentend5 ee {{{ }}}{{{6 ff }}}|6 ff }}}|7 gg 8 hh |-9 ii ||a jjb kklast test45.in [+] [?25h[?0c[?25l[?1cTest fdm=indent and :move bug ENDline2 Test fdm=indent START line3 line4[+][?25h[?0c[?25l[?1c:[?25h[?0cset fdm=indent [?25l[?1c++-- 3 lines: Test fdm=indent START----------------------------------------------------------------------------------------------------------------------------------------------------------------------------~ ~ [?25h[?0c[?25l[?1c:[?25h[?0c1m1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cm0 [?25l[?1c3 lines moved++-- 3 lines: Test fdm=indent START----------------------------------------------------------------------------------------------------------------------------------------------------------------------------Test fdm=indent and :move bug END  line2[?25h[?0c[?25l[?1c:[?25h[?0c%w >> test.out [?25l[?1c"test.out" 5 lines, 77 characters appendedtest.out [+] [?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 ' '^[ :" :" Make sure 'a' works $4la<-- should be 4 ' '^[ :" :" Make sure 'A' works $4lA<-- should be 0 ' '^[ :" :" Make sure 'D' works $4lDi<-- 'D' should be intact^[ :" :" Test for yank bug reported by Mark Waggoner. :set ve=block ^2w^V3jyGp :" :" Test "r" beyond the end of the line :set ve=all /^"r" $5lrxa<-- should be 'x'^[ :" :" Test "r" on a tab :" Note that for this test, 'ts' must be 8 (the default). ^5lrxA<-- should be ' x '^[ :" :" Test to make sure 'x' can delete control characters :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[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 61 lines, 1442 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST ENDTEST[?25h[?0c[?25l[?1c foo, bar [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset noswf [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ve=all [?25l[?1c[?25h[?0c[?25l[?1c 65 fewer linesfoo, barkeyword keywall 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" aVb^Msdabcv6efi.him0kl~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c [?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword". [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Repeating CTRL-N fixes it. (Mary Ellen Foster) [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0cw [?25l[?1c[?25h[?0c[?25l[?1c$Scanning tags. The only matchword[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Using "C" then then moves the last remaining character to the next [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" line. (Mary Ellen Foster) [?25l[?1c[?25h[?0c [?25l[?1c/[?25h[?0care [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c$are belong to vim 1 2 3 4 5 6 'i 'C 'a 'A 'D'this is a test "r" a^Vb^Msdabcv6efi.him0kl[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" When past the end of a line that ends in a single character "b" skips [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" that word. [?25l[?1c[?25h[?0c [?25l[?1c$7[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Make sure 'i' works [?25l[?1c[?25h[?0c 'i' [?25l[?1c<-- should be 3 ' '[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Make sure 'C' works [?25l[?1c[?25h[?0c 'C' [?25l[?1c$<-- should be 3 ' '[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Make sure 'a' works [?25l[?1c[?25h[?0c 'a' [?25l[?1c <-- should be 4 ' '[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Make sure 'A' works [?25l[?1c[?25h[?0c 'A' [?25l[?1c<-- should be 0 ' '[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Make sure 'D' works [?25l[?1c[?25h[?0c 'D' [?25l[?1c<-- 'D' should be intact[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test for yank bug reported by Mark Waggoner. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ve=block [?25l[?1c[?25h[?0c [?25l[?1c[?25h[?0c[?25l[?1caaa[?25h[?0c[?25l[?1caaablock of 4 lines yanked[?25h[?0c[?25l[?1c3 more linesa aa [?25h[?0c [?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test "r" beyond the end of the line [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ve=all [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^"r" [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c"r" [?25l[?1cx[?25h[?0c[?25l[?1cx<-- should be 'x'[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test "r" on a tab [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Note that for this test, 'ts' must be 8 (the default). [?25l[?1c[?25h[?0c "r" [?25l[?1cx[?25h[?0c[?25l[?1cx <-- should be ' x '[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test to make sure 'x' can delete control characters [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset display=uhex [?25l[?1c<16>b<0d>sd[?25h[?0c [?25l[?1c<16>b<0d>sd[?25h[?0c[?25l[?1cb<0d>sd[?25h[?0c[?25l[?1c<0d>sd[?25h[?0c[?25l[?1csd[?25h[?0c[?25l[?1cd[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c[This line should contain only the text between the brackets.][?25h[?0c[?25l[?1c:[?25h[?0cset display= [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test for ^Y/^E due to bad w_virtcol value, reported by [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Roy . [?25l[?1c[?25h[?0c [?25l[?1c[?25h[?0c [?25l[?1cv[?25h[?0cv [?25l[?1ci[?25h[?0ci [?25l[?1cm <-- should show the name of a noted text editor[?25h[?0c [?25l[?1c[?25h[?0c [?25l[?1c6[?25h[?0c6 [?25l[?1c.[?25h[?0c. [?25l[?1c0 <-- and its version number[?25h[?0c[?25l[?1c ~ [?25h[?0c  [?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test for yanking and pasting using the small delete register [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^foo [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c, bar[?25h[?0c, [?25l[?1c[?25h[?0c[?25l[?1cba[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1cfoo[?25h[?0c keyw[?25l[?1c:[?25h[?0cwq! test.out [?25l[?1c"test.out" [New File] 23 lines, 479 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 guibg=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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 31 lines, 747 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" basic test if ":highlight" doesn't crash [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0chighlight [?25l[?1c SpecialKey xxx term=bold cterm=bold ctermfg=4 guifg=Cyan EndOfBuffer xxx links to NonText NonTextxxx term=bold cterm=bold ctermfg=4 gui=bold guifg=Blue Directory xxx term=bold cterm=bold ctermfg=6 guifg=Cyan ErrorMsgxxx term=standout cterm=bold ctermfg=7 ctermbg=1 guifg=White guibg=Red IncSearch xxx term=reverse cterm=reverse gui=reverse Searchxxx term=reverse ctermfg=0 ctermbg=3 guifg=Black guibg=Yellow MoreMsgxxx term=bold cterm=bold ctermfg=2 gui=bold guifg=SeaGreen ModeMsgxxx term=bold cterm=bold gui=bold LineNrxxx term=underline cterm=bold ctermfg=3 guifg=Yellow CursorLineNr xxx term=bold cterm=bold ctermfg=3 gui=bold guifg=Yellow Questionxxx term=standout cterm=bold ctermfg=2 gui=bold guifg=Green 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 cterm=bold ctermfg=5 gui=bold guifg=Magenta Visualxxx term=reverse cterm=reverse guibg=DarkGrey VisualNOS xxx cleared WarningMsg xxx term=standout cterm=bold ctermfg=1 guifg=Red WildMenuxxx term=standout ctermfg=0 ctermbg=3 guifg=Black guibg=Yellow Foldedxxx term=standout cterm=bold ctermfg=6 ctermbg=0 guifg=Cyan guibg=DarkGrey FoldColumn xxx term=standout cterm=bold ctermfg=6 ctermbg=0 guifg=Cyan guibg=Grey DiffAddxxx term=bold ctermbg=4 guibg=DarkBlue DiffChange xxx term=bold ctermbg=5 guibg=DarkMagenta DiffDelete xxx term=bold cterm=bold ctermfg=4 ctermbg=6 gui=bold guifg=Blue guibg=DarkCyan DiffTextxxx term=reverse cterm=bold ctermbg=1 gui=bold guibg=Red SignColumn xxx term=standout cterm=bold ctermfg=6 ctermbg=0 guifg=Cyan guibg=Grey Concealxxx ctermfg=7 ctermbg=0 guifg=LightGrey guibg=DarkGrey SpellBadxxx term=reverse ctermbg=1 gui=undercurl guisp=Red SpellCapxxx term=reverse ctermbg=4 gui=undercurl guisp=Blue SpellRare xxx term=reverse ctermbg=5 gui=undercurl guisp=Magenta SpellLocal xxx term=underline ctermbg=6 gui=undercurl guisp=Cyan Pmenuxxx ctermfg=0 ctermbg=5 guibg=Magenta PmenuSelxxx cterm=bold ctermfg=0 ctermbg=0 guibg=DarkGrey PmenuSbar xxx ctermbg=7 guibg=Grey PmenuThumb xxx ctermbg=7 guibg=White TabLinexxx term=underline cterm=bold,underline ctermfg=7 ctermbg=0 gui=underline guibg=DarkGrey TabLineSel xxx term=bold cterm=bold gui=bold TabLineFill xxx term=reverse cterm=reverse gui=reverse CursorColumn xxx term=reverse ctermbg=0 guibg=Grey40 CursorLine xxx term=underline cterm=underline guibg=Grey40 ColorColumn xxx term=reverse ctermbg=1 guibg=DarkRed MatchParen xxx term=reverse ctermbg=6 guibg=DarkCyan Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi Search [?25l[?1c Searchxxx term=reverse ctermfg=0 ctermbg=3 guifg=Black guibg=Yellow Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0c" test setting colors. [?25l[?1cTests 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 guibg=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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0c" test clearing one color and all doesn't generate error or warning [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0chi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibg=Cyan [?25l[?1cE418: Illegal value: guifg=#00ff00[?25h[?0c[?25l[?1c:[?25h[?0chi Group2 term= cterm= [?25l[?1cE418: Illegal value: cterm=[?25h[?0c[?25l[?1c:[?25h[?0chi Group3 term=underline cterm=bold [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0credir! >test.out [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0chi NewGroup [?25l[?1c NewGroupxxx term=bold cterm=italic ctermfg=4 ctermbg=7 Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi Group2 [?25l[?1c Group2xxx cleared Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi Group3 [?25l[?1c Group3xxx term=underline cterm=bold Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi clear NewGroup [?25l[?1cTests for ":highlight". vim: set ft=vim : STARTTEST :so small.vim :" basic test if ":highlight" doesn't crash :highlight[?25h[?0c[?25l[?1c:[?25h[?0chi NewGroup [?25l[?1c NewGroupxxx cleared Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi Group2 [?25l[?1c Group2xxx cleared Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi Group2 NONE [?25l[?1cTests for ":highlight". vim: set ft=vim : STARTTEST :so small.vim[?25h[?0c[?25l[?1c:[?25h[?0chi Group2 [?25l[?1c Group2xxx cleared Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi clear [?25l[?1cTests 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 guibg=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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0chi Group3 [?25l[?1c Group3xxx cleared Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0chi Crash term='asdf [?25l[?1cE475: Invalid argument: term='asdf Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1cTests for ":highlight". vim: set ft=vim : STARTTEST[?25h[?0c[?25l[?1c:[?25h[?0c" filter ctermfg and ctermbg, the numbers depend on the terminal [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! test.out [?25l[?1c"test.out" 20 lines, 289 charactersNewGroup xxx term=bold cterm=italic ctermfg=4 ctermbg=7Group2 xxx clearedGroup3 xxx term=underline cterm=boldNewGroup xxx clearedGroup2 xxx clearedGroup2 xxx clearedGroup3 xxx clearedE475: Invalid argument: term='asdf ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0c%s/ctermfg=\d*/ctermfg=2/ [?25l[?1c2 [?25h[?0c[?25l[?1c:[?25h[?0c%s/ctermbg=\d*/ctermbg=3/ [?25l[?1c3 [?25h[?0c[?25l[?1c:[?25h[?0c" filter out possibly translated error message [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c%s/E475: [^:]*:/E475:/ [?25l[?1cterm='asdf[?25h[?0c[?25l[?1c:[?25h[?0c" fix the fileformat [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ff& [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cwq! [?25l[?1c"test.out" 20 lines, 271 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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) :put =matchstr(\"abcd\", \".\", 0, -1) " a :put =match(\"abcd\", \".\", 0, 5) " -1 :put =match(\"abcd\", \".\", 0, -1) " 0 :put =match('abc', '.', 0, 1) " 0 :put =match('abc', '.', 0, 2) " 1 :put =match('abc', '.', 0, 3) " 2 :put =match('abc', '.', 0, 4) " -1 :put =match('abc', '.', 1, 1) " 1 :put =match('abc', '.', 2, 1) " 2 :put =match('abc', '.', 3, 1) " -1 :put =match('abc', '$', 0, 1) " 3 :put =match('abc', '$', 0, 2) " -1 :put =match('abc', '$', 1, 1) " 3 :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[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 47 lines, 1237 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^start:/ [?25l[?1c[?25h[?0c[?25l[?1cfo[?25h[?0c [?25l[?1c[?25h[?0c[?25l[?1c'foo'[?25h[?0c[?25l[?1c 'bar'[?25h[?0c[?25l[?1c xxxxxxxxxxxx [?25h[?0c [?25l[?1cblah[?25h[?0c [?25l[?1c"[?25h[?0c [?25l[?1c[?25h[?0c[?25l[?1c' rep[?25h[?0c[?25l[?1cyyyyy[?25h[?0c[?25l[?1c:[?25h[?0cset quoteescape=+*- [?25l[?1c[?25h[?0c[?25l[?1c` b`la[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c" sdf"[?25h[?0c[?25l[?1c" [?25h[?0c[?25l[?1c"[?25h[?0c[?25l[?1c asdf" sdf [?25h[?0c[?25l[?1cah" sdf " voo "[?25h[?0c[?25l[?1czzzzzzzzzzzzzzzzzzzzzzzzzzzz voo "[?25h[?0c [?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^[?25h[?0c[?25l[?1c -asdfXasdfasdf- [?25h[?0c[?25l[?1casdf-[?25h[?0c[?25l[?1c -asdXasdfasdf-[?25h[?0c [?25l[?1c-[?25h[?0c[?25l[?1c -asdfXasdfasdf- -[?25h[?0c[?25l[?1casdf-[?25h[?0c[?25l[?1c -asdXasdfasdf-[?25h[?0c [?25l[?1c --[?25h[?0c[?25l[?1c - -[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cput =matchstr(\"abcd\", \".\", 0, 2) " b [?25l[?1c b[?25h[?0c[?25l[?1c :[?25h[?0cput =matchstr(\"abcd\", \"..\", 0, 2) " bc [?25l[?1c bc[?25h[?0c[?25l[?1c :[?25h[?0cput =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match) [?25l[?1c c[?25h[?0c[?25l[?1c :[?25h[?0cput =matchstr(\"abcd\", \".\", 0, -1) " a [?25l[?1c a[?25h[?0c[?25l[?1c :[?25h[?0cput =match(\"abcd\", \".\", 0, 5) " -1 [?25l[?1c -1[?25h[?0c[?25l[?1c :[?25h[?0cput =match(\"abcd\", \".\", 0, -1) " 0 [?25l[?1c 0[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '.', 0, 1) " 0 [?25l[?1c 0[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '.', 0, 2) " 1 [?25l[?1c 1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '.', 0, 3) " 2 [?25l[?1c 2[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '.', 0, 4) " -1 [?25l[?1c -1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '.', 1, 1) " 1 [?25l[?1c 1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '.', 2, 1) " 2 [?25l[?1c 2[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '.', 3, 1) " -1 [?25l[?1c -1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '$', 0, 1) " 3 [?25l[?1c 3[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '$', 0, 2) " -1 [?25l[?1c -1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '$', 1, 1) " 3 [?25l[?1c 3[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '$', 2, 1) " 3 [?25l[?1c 3[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '$', 3, 1) " 3 [?25l[?1c 3[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '$', 4, 1) " -1 [?25l[?1c -1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 0, 1) " 0 [?25l[?1c 0[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 0, 2) " 1 [?25l[?1c 1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 0, 3) " 2 [?25l[?1c 2[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 0, 4) " 3 [?25l[?1c 3[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 0, 5) " -1 [?25l[?1c -1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 1, 1) " 1 [?25l[?1c 1[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 2, 1) " 2 [?25l[?1c 2[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 3, 1) " 3 [?25l[?1c 3[?25h[?0c[?25l[?1c :[?25h[?0cput =match('abc', '\zs', 4, 1) " -1 [?25l[?1c -1[?25h[?0c[?25l[?1c :[?25h[?0c/^start:/,/^end:/wq! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 45 lines, 284 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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) :catch : $put =v:exception :endtry :" :" Creating Dictionary directly with different types :let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},} :$put =string(d) . d.1 :$put =string(sort(keys(d))) :$put =string (values(d)) :for [key, val] in items(d) : $put =key . ':' . string(val) : unlet key val :endfor :call extend (d, {3:33, 1:99}) :call extend(d, {'b':'bbb', 'c':'ccc'}, "keep") :try : call extend(d, {3:333,4:444}, "error") :catch : $put =v:exception[:15] . v:exception[-1:-1] :endtry :$put =string(d) :call filter(d, 'v:key =~ ''[ac391]''') :$put =string(d) :" :" Dictionary identity :let dd = d :let dx = copy(d) :try : $put =(d == dd) . (d isnot dd) . (d is dd) . (d == dx) . (d is dx) . (d isnot dx) :catch : $put =v:exception :endtry :" :" :" removing items with :unlet :unlet l[2][?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 580 lines, 12170 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST:" :" compare recursively linked list and dict :let l = [1, 2, 3, 4] :let d = {'1': 1, '2': l, '3': 3} :let l[1] = d :$put =(l == l) :$put =(d == d) :$put =(l != deepcopy(l)) :$put =(d != deepcopy(d)) :" :" compare complex recursively linked list and dict :let l = [] :call add(l, l) :let dict4 = {"l": l} :call add(dict4.l, dict4) :let lcopy = deepcopy(l) :let dict4copy = deepcopy(dict4) :$put =(l == lcopy) :$put =(dict4 == dict4copy) :" :" Pass the same List to extend() :let l = [1, 2, 3, 4, 5] :call extend(l, l) :$put =string(l) :" :" Pass the same Dict to extend() :let d = { 'a': {'b': 'B'}} :call extend(d, d) :$put =string(d) :" :" Pass the same Dict to extend() with "error" :try : call extend(d, d, "error") :catch : $put =v:exception[:15] . v:exception[-1:-1] :endtry :$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:[?25h[?0c [?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfun Test(...) [?25l[?1c : [?25h[?0c:lang C [?25l[?1c: [?25h[?0c:" Creating List directly with different types [?25l[?1c: [?25h[?0c:let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0c:$put =string(l[-1]) [?25l[?1c: [?25h[?0c:$put =string(l[-4]) [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c: $put =string(l[-5]) [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put =v:exception[:14] [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:" List slices [?25l[?1c: [?25h[?0c:$put =string(l[:]) [?25l[?1c: [?25h[?0c:$put =string(l[1:]) [?25l[?1c: [?25h[?0c:$put =string(l[:-2]) [?25l[?1c: [?25h[?0c:$put =string(l[0:8]) [?25l[?1c: [?25h[?0c:$put =string(l[8:-1]) [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" List identity [?25l[?1c: [?25h[?0c:let ll = l [?25l[?1c: [?25h[?0c:let lx = copy(l) [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c: $put =(l == ll) . (l isnot ll) . (l is ll) . (l == lx) . (l is lx) . (l isnot lx) [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put =v:exception [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" Creating Dictionary directly with different types [?25l[?1c: [?25h[?0c:let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},} [?25l[?1c: [?25h[?0c:$put =string(d) . d.1 [?25l[?1c: [?25h[?0c:$put =string(sort(keys(d))) [?25l[?1c: [?25h[?0c:$put =string (values(d)) [?25l[?1c: [?25h[?0c:for [key, val] in items(d) [?25l[?1c: [?25h[?0c: $put =key . ':' . string(val) [?25l[?1c: [?25h[?0c: unlet key val [?25l[?1c: [?25h[?0c:endfor [?25l[?1c: [?25h[?0c:call extend (d, {3:33, 1:99}) [?25l[?1c: [?25h[?0c:call extend(d, {'b':'bbb', 'c':'ccc'}, "keep") [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c: call extend(d, {3:333,4:444}, "error") [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put =v:exception[:15] . v:exception[-1:-1] [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:$put =string(d) [?25l[?1c: [?25h[?0c:call filter(d, 'v:key =~ ''[ac391]''') [?25l[?1c: [?25h[?0c:$put =string(d) [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" Dictionary identity [?25l[?1c: [?25h[?0c:let dd = d [?25l[?1c: [?25h[?0c:let dx = copy(d) [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c: $put =(d == dd) . (d isnot dd) . (d is dd) . (d == dx) . (d is dx) . (d isnot dx) [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put =v:exception [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" removing items with :unlet [?25l[?1c: [?25h[?0c:unlet l[2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0c:let l = range(8) [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c:unlet l[:3] [?25l[?1c: [?25h[?0c:unlet l[1:] [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c:$put =v:exception [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:unlet d.c [?25l[?1c: [?25h[?0c:unlet d[-1] [?25l[?1c: [?25h[?0c:$put =string(d) [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" removing items out of range: silently skip items that don't exist [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[2:1] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[2:2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[2:3] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[2:4] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[2:5] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[-1:2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[-2:2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[-3:2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[-4:2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[-5:2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0clet l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:unlet l[-6:2] [?25l[?1c: [?25h[?0c:$put =string(l) [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" assignment to a list [?25l[?1c: [?25h[?0c:let l = [0, 1, 2, 3] [?25l[?1c: [?25h[?0c:let [va, vb] = l[2:3] [?25l[?1c: [?25h[?0c:$put =va [?25l[?1c: [?25h[?0c:$put =vb [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c: let [va, vb] = l [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put =v:exception[:14] [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c: let [va, vb] = l[1:1] [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put =v:exception[:14] [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" manipulating a big Dictionary (hashtable.c has a border of 1000 entries) [?25l[?1c: [?25h[?0c:let d = {} [?25l[?1c: [?25h[?0c:for i in range(1500) [?25l[?1c: [?25h[?0c: let d[i] = 3000 - i [?25l[?1c: [?25h[?0c:endfor [?25l[?1c: [?25h[?0c:$put =d[0] . ' ' . d[100] . ' ' . d[999] . ' ' . d[1400] . ' ' . d[1499] [?25l[?1c: [?25h[?0c:try [?25l[?1c: [?25h[?0c: let n = d[1500] [?25l[?1c: [?25h[?0c:catch [?25l[?1c: [?25h[?0c: $put =substitute(v:exception, '\v(.{14}).*( \d{4}).*', '\1\2', '') [?25l[?1c: [?25h[?0c:endtry [?25l[?1c: [?25h[?0c:" lookup each items [?25l[?1c: [?25h[?0c:for i in range(1500) [?25l[?1c: [?25h[?0c: if d[i] != 3000 - i [?25l[?1c: [?25h[?0c: $put =d[i] [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c:endfor [?25l[?1c: [?25h[?0c: let i += 1 [?25l[?1c: [?25h[?0c:" delete even items [?25l[?1c: [?25h[?0c:while i >= 2 [?25l[?1c: [?25h[?0c: let i -= 2 [?25l[?1c: [?25h[?0c: unlet d[i] [?25l[?1c: [?25h[?0c:endwhile [?25l[?1c: [?25h[?0c:$put =get(d, 1500 - 100, 'NONE') . ' ' . d[1] [?25l[?1c: [?25h[?0c:" delete odd items, checking value, one intentionally wrong [?25l[?1c: [?25h[?0c:let d[33] = 999 [?25l[?1c: [?25h[?0c:let i = 1 [?25l[?1c: [?25h[?0c:while i < 1500 [?25l[?1c: [?25h[?0c: if d[i] != 3000 - i [?25l[?1c: [?25h[?0c: $put =i . '=' . d[i] [?25l[?1c: [?25h[?0c: else [?25l[?1c: [?25h[?0c: unlet d[i] [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: let i += 2 [?25l[?1c: [?25h[?0c:endwhile [?25l[?1c: [?25h[?0c:$put =string(d) " must be almost empty now [?25l[?1c: [?25h[?0c:unlet d [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" Dictionary function [?25l[?1c: [?25h[?0c:let dict = {} [?25l[?1c: [?25h[?0c:func dict.func(a) dict [?25l[?1c: [?25h[?0c: $put =a:a . len(self.data) [?25l[?1c: [?25h[?0c:endfunc [?25l[?1c: [?25h[?0c:let dict.data = [1,2,3] [?25l[?1c: [?25h[?0c:call dict.func("len: ") [?25l[?1c: [?25h[?0c:let x = dict.func("again: ") [?25l[?1c: [?25h[?0c:let Fn = dict.func [?25l[?1c: [?25h[?0c:call Fn('xxx') [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" Function in script-local List or Dict [?25l[?1c: [?25h[?0c:let g:dict = {} [?25l[?1c: [?25h[?0c:function g:dict.func() dict [?25l[?1c: [?25h[?0c: $put ='g:dict.func'.self.foo[1].self.foo[0]('asdf') [?25l[?1c: [?25h[?0c:endfunc [?25l[?1c: [?25h[?0c:let g:dict.foo = ['-', 2, 3] [?25l[?1c: [?25h[?0c:call insert(g:dict.foo, function('strlen')) [?25l[?1c: [?25h[?0c:call g:dict.func() [?25l[?1c: [?25h[?0c:" [?25l[?1c: [?25h[?0c:" Nasty: remove func from Dict that's being called (works) [?25l[?1c: [?25h[?0c:let d = {1:1} [?25l[?1c: [?25h[?0c:func d.func(a) [?25l[?1c:[?25h[?0c: return "a:". a:a [?25l[?1c:[?25h[?0c:endfunc [?25l[?1c:[?25h[?0c:$put =d.func(string(remove(d, 'func'))) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" Nasty: deepcopy() dict that refers to itself (fails when noref used) [?25l[?1c:[?25h[?0c:let d = {1:1, 2:2} [?25l[?1c:[?25h[?0c:let l = [4, d, 6] [?25l[?1c:[?25h[?0c:let d[3] = l [?25l[?1c:[?25h[?0c:let dc = deepcopy(d) [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: let dc = deepcopy(d, 1) [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:14] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:let l2 = [0, l, l, 3] [?25l[?1c:[?25h[?0c:let l[1] = l2 [?25l[?1c:[?25h[?0c:let l3 = deepcopy(l2) [?25l[?1c:[?25h[?0c:$put ='same list: ' . (l3[1] is l3[2]) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" Locked variables [?25l[?1c:[?25h[?0c:for depth in range(5) [?25l[?1c:[?25h[?0c: $put ='depth is ' . depth [?25l[?1c:[?25h[?0c: for u in range(3) [?25l[?1c:[?25h[?0c: unlet l [?25l[?1c:[?25h[?0c: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}] [?25l[?1c:[?25h[?0c: exe "lockvar " . depth . " l" [?25l[?1c:[?25h[?0c: if u == 1 [?25l[?1c:[?25h[?0c: exe "unlockvar l" [?25l[?1c:[?25h[?0c: elseif u == 2 [?25l[?1c:[?25h[?0c: exe "unlockvar " . depth . " l" [?25l[?1c:[?25h[?0c: endif [?25l[?1c:[?25h[?0c: 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[?1c:[?25h[?0c: $put =ps [?25l[?1c:[?25h[?0c: let ps = '' [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: let l[1][1][0] = 99 [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: let l[1][1] = [99] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: let l[1] = [99] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: let l[2]['6'][7] = 99 [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: let l[2][6] = {99: 99} [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: let l[2] = {99: 99} [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: let l = [99] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: $put =ps [?25l[?1c:[?25h[?0c: endfor [?25l[?1c:[?25h[?0c:endfor [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" Unletting locked variables [?25l[?1c:[?25h[?0c:$put ='Unletting:' [?25l[?1c:[?25h[?0c:for depth in range(5) [?25l[?1c:[?25h[?0c: $put ='depth is ' . depth [?25l[?1c:[?25h[?0c: for u in range(3) [?25l[?1c:[?25h[?0c: unlet l [?25l[?1c:[?25h[?0c: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}] [?25l[?1c:[?25h[?0c: exe "lockvar " . depth . " l" [?25l[?1c:[?25h[?0c: if u == 1 [?25l[?1c:[?25h[?0c: exe "unlockvar l" [?25l[?1c:[?25h[?0c: elseif u == 2 [?25l[?1c:[?25h[?0c: exe "unlockvar " . depth . " l" [?25l[?1c:[?25h[?0c: endif [?25l[?1c:[?25h[?0c: 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[?1c:[?25h[?0c: $put =ps [?25l[?1c:[?25h[?0c: let ps = '' [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: unlet l[2]['6'][7] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: unlet l[2][6] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: unlet l[2] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: unlet l[1][1][0] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: unlet l[1][1] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: unlet l[1] [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: unlet l [?25l[?1c:[?25h[?0c: let ps .= 'p' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: let ps .= 'F' [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c: $put =ps [?25l[?1c:[?25h[?0c: endfor [?25l[?1c:[?25h[?0c:endfor [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" Locked variables and :unlet or list / dict functions [?25l[?1c:[?25h[?0c:$put ='Locks and commands or functions:' [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='No :unlet after lock on dict:' [?25l[?1c:[?25h[?0c:unlet! d [?25l[?1c:[?25h[?0c:let d = {'a': 99, 'b': 100} [?25l[?1c:[?25h[?0c:lockvar 1 d [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: unlet d.a [?25l[?1c:[?25h[?0c: $put ='did :unlet' [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:16] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:$put =string(d) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put =':unlet after lock on dict item:' [?25l[?1c:[?25h[?0c:unlet! d [?25l[?1c:[?25h[?0c:let d = {'a': 99, 'b': 100} [?25l[?1c:[?25h[?0c:lockvar d.a [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: unlet d.a [?25l[?1c:[?25h[?0c: $put ='did :unlet' [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:16] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:$put =string(d) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='filter() after lock on dict item:' [?25l[?1c:[?25h[?0c:unlet! d [?25l[?1c:[?25h[?0c:let d = {'a': 99, 'b': 100} [?25l[?1c:[?25h[?0c:lockvar d.a [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: call filter(d, 'v:key != "a"') [?25l[?1c:[?25h[?0c: $put ='did filter()' [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:16] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:$put =string(d) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='map() after lock on dict:' [?25l[?1c:[?25h[?0c:unlet! d [?25l[?1c:[?25h[?0c:let d = {'a': 99, 'b': 100} [?25l[?1c:[?25h[?0c:lockvar 1 d [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: call map(d, 'v:val + 200') [?25l[?1c:[?25h[?0c: $put ='did map()' [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:16] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:$put =string(d) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='No extend() after lock on dict item:' [?25l[?1c:[?25h[?0c:unlet! d [?25l[?1c:[?25h[?0c:let d = {'a': 99, 'b': 100} [?25l[?1c:[?25h[?0c:lockvar d.a [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: $put =string(extend(d, {'a': 123})) [?25l[?1c:[?25h[?0c: $put ='did extend()' [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:14] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:$put =string(d) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='No remove() of write-protected scope-level variable:' [?25l[?1c:[?25h[?0c:fun! Tfunc(this_is_a_loooooooooong_parameter_name) [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: $put =string(remove(a:, 'this_is_a_loooooooooong_parameter_name')) [?25l[?1c:[?25h[?0c: $put ='did remove()' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: $put =v:exception[:14] [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c:endfun [?25l[?1c:[?25h[?0c:call Tfunc('testval') [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='No extend() of write-protected scope-level variable:' [?25l[?1c:[?25h[?0c:fun! Tfunc(this_is_a_loooooooooong_parameter_name) [?25l[?1c:[?25h[?0c: try [?25l[?1c:[?25h[?0c: $put =string(extend(a:, {'this_is_a_loooooooooong_parameter_name': 1234})) [?25l[?1c:[?25h[?0c: $put ='did extend()' [?25l[?1c:[?25h[?0c: catch [?25l[?1c:[?25h[?0c: $put =v:exception[:14] [?25l[?1c:[?25h[?0c: endtry [?25l[?1c:[?25h[?0c:endfun [?25l[?1c:[?25h[?0c:call Tfunc('testval') [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='No :unlet of variable in locked scope:' [?25l[?1c:[?25h[?0c:let b:testvar = 123 [?25l[?1c:[?25h[?0c:lockvar 1 b: [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: unlet b:testvar [?25l[?1c:[?25h[?0c: $put ='b:testvar was :unlet: '. (!exists('b:testvar')) [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:16] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:unlockvar 1 b: [?25l[?1c:[?25h[?0c:unlet! b:testvar [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:$put ='No :let += of locked list variable:' [?25l[?1c:[?25h[?0c:let l = ['a', 'b', 3] [?25l[?1c:[?25h[?0c:lockvar 1 l [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: let l += ['x'] [?25l[?1c:[?25h[?0c: $put ='did :let +=' [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:14] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:unlet l [?25l[?1c:[?25h[?0c:let l = [1, 2, 3, 4] [?25l[?1c:[?25h[?0c:lockvar! l [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:unlockvar l[1] [?25l[?1c:[?25h[?0c:unlet l[0:1] [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:unlet l[1:2] [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:unlockvar l[1] [?25l[?1c:[?25h[?0c:let l[0:1] = [0, 1] [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:let l[1:2] = [0, 1] [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:unlet l [?25l[?1c:[?25h[?0c:" :lockvar/islocked() triggering script autoloading [?25l[?1c:[?25h[?0c:set rtp+=./sautest [?25l[?1c:[?25h[?0c:lockvar g:footest#x [?25l[?1c:[?25h[?0c:unlockvar g:footest#x [?25l[?1c:[?25h[?0c:$put ='locked g:footest#x:'.islocked('g:footest#x') [?25l[?1c:[?25h[?0c:$put ='exists g:footest#x:'.exists('g:footest#x') [?25l[?1c:[?25h[?0c:$put ='g:footest#x: '.g:footest#x [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" a:000 function argument [?25l[?1c:[?25h[?0c:" first the tests that should fail [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: let a:000 = [1, 2] [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put ='caught a:000' [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: let a:000[0] = 9 [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put ='caught a:000[0]' [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: let a:000[2] = [9, 10] [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put ='caught a:000[2]' [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: let a:000[3] = {9: 10} [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put ='caught a:000[3]' [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:" now the tests that should pass [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: let a:000[2][1] = 9 [?25l[?1c:[?25h[?0c: call extend(a:000[2], [5, 6]) [?25l[?1c:[?25h[?0c: let a:000[3][5] = 8 [?25l[?1c:[?25h[?0c: let a:000[3]['a'] = 12 [?25l[?1c:[?25h[?0c: $put =string(a:000) [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put ='caught ' . v:exception [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" reverse(), sort(), uniq() [?25l[?1c:[?25h[?0c:let l = ['-0', 'A11', 2, 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5] [?25l[?1c:[?25h[?0c:$put =string(uniq(copy(l))) [?25l[?1c:[?25h[?0c:$put =string(reverse(l)) [?25l[?1c:[?25h[?0c:$put =string(reverse(reverse(l))) [?25l[?1c:[?25h[?0c:$put =string(sort(l)) [?25l[?1c:[?25h[?0c:$put =string(reverse(sort(l))) [?25l[?1c:[?25h[?0c:$put =string(sort(reverse(sort(l)))) [?25l[?1c:[?25h[?0c:$put =string(uniq(sort(l))) [?25l[?1c:[?25h[?0c:let l=[7, 9, 'one', 18, 12, 22, 'two', 10.0e-16, -1, 'three', 0xff, 0.22, 'four'] [?25l[?1c:[?25h[?0c:$put =string(sort(copy(l), 'n')) [?25l[?1c:[?25h[?0c:let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'bar', 'BAR', 'Bar', 'Foo', 'FOO', 'foo', 'FOOBAR', {}, []] [?25l[?1c:[?25h[?0c:$put =string(sort(copy(l), 1)) [?25l[?1c:[?25h[?0c:$put =string(sort(copy(l), 'i')) [?25l[?1c:[?25h[?0c:$put =string(sort(copy(l))) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" splitting a string to a List [?25l[?1c:[?25h[?0c:$put =string(split(' aa bb ')) [?25l[?1c:[?25h[?0c:$put =string(split(' aa bb ', '\W\+', 0)) [?25l[?1c:[?25h[?0c:$put =string(split(' aa bb ', '\W\+', 1)) [?25l[?1c:[?25h[?0c:$put =string(split(' aa bb ', '\W', 1)) [?25l[?1c:[?25h[?0c:$put =string(split(':aa::bb:', ':', 0)) [?25l[?1c:[?25h[?0c:$put =string(split(':aa::bb:', ':', 1)) [?25l[?1c:[?25h[?0c:$put =string(split('aa,,bb, cc,', ',\s*', 1)) [?25l[?1c:[?25h[?0c:$put =string(split('abc', '\zs')) [?25l[?1c:[?25h[?0c:$put =string(split('abc', '\zs', 1)) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" compare recursively linked list and dict [?25l[?1c:[?25h[?0c:let l = [1, 2, 3, 4] [?25l[?1c:[?25h[?0c:let d = {'1': 1, '2': l, '3': 3} [?25l[?1c:[?25h[?0c:let l[1] = d [?25l[?1c:[?25h[?0c:$put =(l == l) [?25l[?1c:[?25h[?0c:$put =(d == d) [?25l[?1c:[?25h[?0c:$put =(l != deepcopy(l)) [?25l[?1c:[?25h[?0c:$put =(d != deepcopy(d)) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" compare complex recursively linked list and dict [?25l[?1c:[?25h[?0c:let l = [] [?25l[?1c:[?25h[?0c:call add(l, l) [?25l[?1c:[?25h[?0c:let dict4 = {"l": l} [?25l[?1c:[?25h[?0c:call add(dict4.l, dict4) [?25l[?1c:[?25h[?0c:let lcopy = deepcopy(l) [?25l[?1c:[?25h[?0c:let dict4copy = deepcopy(dict4) [?25l[?1c:[?25h[?0c:$put =(l == lcopy) [?25l[?1c:[?25h[?0c:$put =(dict4 == dict4copy) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" Pass the same List to extend() [?25l[?1c:[?25h[?0c:let l = [1, 2, 3, 4, 5] [?25l[?1c:[?25h[?0c:call extend(l, l) [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" Pass the same Dict to extend() [?25l[?1c:[?25h[?0c:let d = { 'a': {'b': 'B'}} [?25l[?1c:[?25h[?0c:call extend(d, d) [?25l[?1c:[?25h[?0c:$put =string(d) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" Pass the same Dict to extend() with "error" [?25l[?1c:[?25h[?0c:try [?25l[?1c:[?25h[?0c: call extend(d, d, "error") [?25l[?1c:[?25h[?0c:catch [?25l[?1c:[?25h[?0c: $put =v:exception[:15] . v:exception[-1:-1] [?25l[?1c:[?25h[?0c:endtry [?25l[?1c:[?25h[?0c:$put =string(d) [?25l[?1c:[?25h[?0c:" [?25l[?1c:[?25h[?0c:" test for range assign [?25l[?1c:[?25h[?0c:let l = [0] [?25l[?1c:[?25h[?0c:let l[:] = [1, 2] [?25l[?1c:[?25h[?0c:$put =string(l) [?25l[?1c:[?25h[?0c:endfun [?25l[?1c:" :" compare recursively linked list and dict :let l = [1, 2, 3, 4] :let d = {'1': 1, '2': l, '3': 3} :let l[1] = d :$put =(l == l) :$put =(d == d) :$put =(l != deepcopy(l)) :$put =(d != deepcopy(d)) :" :" compare complex recursively linked list and dict :let l = [] :call add(l, l) :let dict4 = {"l": l} :call add(dict4.l, dict4) :let lcopy = deepcopy(l) :let dict4copy = deepcopy(dict4) :$put =(l == lcopy) :$put =(dict4 == dict4copy) :" :" Pass the same List to extend() :let l = [1, 2, 3, 4, 5] :call extend(l, l) :$put =string(l) :" :" Pass the same Dict to extend() :let d = { 'a': {'b': 'B'}} :call extend(d, d) :$put =string(d) :" :" Pass the same Dict to extend() with "error" :try : call extend(d, d, "error") :catch : $put =v:exception[:15] . v:exception[-1:-1] :endtry :$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:[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall Test(1, 2, [3, 4], {5: 6}) " This may take a while [?25l[?1cError 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[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1cdid :unlet {'b': 100} filter() after lock on dict item: did filter() {'b': 100} map() after lock on dict: did map() {'a': 299, 'b': 300} No extend() after lock on dict item: Vim(put):E741: {'a': 99, 'b': 100} No remove() of write-protected scope-level variable: Vim(put):E795: No extend() of write-protected scope-level variable: Vim(put):E742: No :unlet of variable in locked scope: Vim(unlet):E741: No :let += of locked list variable: Vim(let):E741: ['a', 'b', 3] [1, 2, 3, 4] [1, 2, 3, 4] [1, 2, 3, 4] [1, 2, 3, 4] [1, 2, 3, 4] locked g:footest#x:-1 exists g:footest#x:0 g:footest#x: 1 caught a:000caught a:000[0] caught a:000[2]caught a:000[3] [1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}] ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', 'foo', [0, 1, 2], 'x8', [0, 1, 2], 1.5] [1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0'] [1.5, [0, 1, 2], 'x8', [0, 1, 2], 'foo', 'foo6', 'foo', 4, 'xaaa', 2, 2, 'A11', '-0'] ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] [[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0'] ['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]] ['-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', '']110011[1, 2, 3, 4, 5, 1, 2, 3, 4, 5] {'a': {'b': 'B'}}Vim(call):E737: a {'a': {'b': 'B'}} [1, 2][?25h[?0c[?25l[?1c :[?25h[?0cdelfunc Test [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cunlet dict [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall garbagecollect(1) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" test for patch 7.3.637 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet a = 'No error caught' [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ctry|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry [?25l[?1c[?25h[?0c[?25l[?1c=[?25h[?0ca [?25l[?1c Vim(foldopen):E490:[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clang C [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0credir => a [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ctry|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry [?25l[?1cError detected while processing : E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0credir END [?25l[?1c{'b': 100} filter() after lock on dict item:[?25h[?0c[?25l[?1c =[?25h[?0ca [?25l[?1cError detected while processing : E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^start:/,$wq! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 197 lines, 3821 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 DoNothingdelfunc DoLast end: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 7 lines, 120 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nocp viminfo+=nviminfo [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^start:/+1,/^end:/-1w! Xtest.vim [?25l[?1c"Xtest.vim" [New] 7L, 251C written[?25h[?0c[?25l[?1c:[?25h[?0csource Xtest.vim [?25l[?1c[?25h[?0c[?25l[?1c:call 4_DoNothing()|call 4_DoLast()|delfunc 4_DoNothing|delfunc 4_DoLast nothing linelast line[?25h[?0c [?25l[?1c:[?25h[?0c$-1,$wq! test.out [?25l[?1c"test.out" [New] 2L, 23C written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :/^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 t01: alphebetical abc ab a a321 a123 a122 b321 b123 c123d 123b c321d b322b b321 b321b t02: numeric abc ab a321 a123 a122 a x-22 b321[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 33 lines, 920 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/^t01:/+1,/^t02/-1sort [?25l[?1c 123b2 a123 a ababcbb1b b322 c123d c321d[?25h[?0c[?25l[?1c:[?25h[?0c/^t02:/+1,/^t03/-1sort n [?25l[?1c-24x-22[?25h[?0c[?25l[?1c:[?25h[?0c/^t03:/+1,/^t04/-1sort x [?25l[?1c0 a122 a123 b123 c123d 123b a321 b321 c321d b321 b321b b322b t03: hexadecimal[?25h[?0c[?25l[?1c :[?25h[?0c/^t04:/+1,/^t05/-1sort u [?25l[?1ca ab abc 123b a122 a123 a321 b123 b321 b321 b321b b322b c123d c321d t04: alpha, unique[?25h[?0c[?25l[?1c :[?25h[?0c/^t05:/+1,/^t06/-1sort! [?25l[?1c123b a a122 a123 a321 ab abc b123 b321 b321b b322b c123d c321d t05: alpha, reverse c321d[?25h[?0c[?25l[?1c :[?25h[?0c/^t06:/+1,/^t07/-1sort! n [?25l[?1cc123d b322b b321b b321 b321 b123 abc ab a321 a123 a122 a 123b t06: numeric, reverse b322b[?25h[?0c[?25l[?1c :[?25h[?0c/^t07:/+1,/^t08/-1sort! u [?25l[?1cb321b b321 c321d b321 a321 123b c123d b123 a123 a122 a ab abc t07: unique, reverse c321d[?25h[?0c[?25l[?1c :[?25h[?0c/^t08:/+1,/^t09/-1sort o [?25l[?1cc123d b322b b321b b321 b123 abc ab a321 a123 a122 a 123b t08: octal abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t09:/+1,/^t10/-1sort! x [?25l[?1cab a a122 a123 b123 c123d 123b a321 b321 c321d b321 b321b b322b t09: reverse, hexadecimal c321d[?25h[?0c[?25l[?1c :[?25h[?0c/^t10:/+1,/^t11/-1sort/./ [?25l[?1cc123d b322b b321b b321 b321 b123 a321 a123 a122 123b abc ab a t10: alpha, skip first character a[?25h[?0c[?25l[?1c :[?25h[?0c/^t11:/+1,/^t12/-1sort/../ [?25l[?1ca122 a123 b123 123b c123d a321 b321 b321 b321b c321d b322b ab abc t11: alpha, skip first 2 characters ab[?25h[?0c[?25l[?1c :[?25h[?0c/^t12:/+1,/^t13/-1sort/../u [?25l[?1ca a321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d abc t12: alpha, unique, skip first 2 characters ab[?25h[?0c[?25l[?1c :[?25h[?0c/^t13:/+1,/^t14/-1sort/./n [?25l[?1ca a321 b321 b321b c321d a122 b322b a123 b123 123b c123d abc t13: numeric, skip first character abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t14:/+1,/^t15/-1sort/./r [?25l[?1cab a a122 a123 b123 c123d 123b a321 b321 c321d b321 b321b b322b t14: alpha, sort on first character[?25h[?0c[?25l[?1c :[?25h[?0c/^t15:/+1,/^t16/-1sort/../r [?25l[?1c123b abc ab a a321 a123 a122 b321 b123 b322b b321 b321b c123d c321d t15: alpha, sort on first 2 characters a[?25h[?0c[?25l[?1c :[?25h[?0c/^t16:/+1,/^t17/-1sort/./rn [?25l[?1c123b a123 a122 a321 abc ab b123 b321 b322b b321 b321b c123d c321d t16: numeric, sort on first character abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t17:/+1,/^t18/-1sort/\d/ [?25l[?1cab a a321 a123 a122 b321 b123 c123d 123b c321d b322b b321 b321b t17: alpha, skip past first digit abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t18:/+1,/^t19/-1sort/\d/r [?25l[?1cab a a321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d t18: alpha, sort on first digit abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t19:/+1,/^t20/-1sort/\d/n [?25l[?1cab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t19: numeric, skip past first digit abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t20:/+1,/^t21/-1sort/\d/rn [?25l[?1cab a a321 b321 c321d b321 b321b a122 b322b a123 b123 c123d 123b t20: numeric, sort on first digit abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t21:/+1,/^t22/-1sort/\d\d/ [?25l[?1cab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t21: alpha, skip past first 2 digits abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t22:/+1,/^t23/-1sort/\d\d/n [?25l[?1cab a a321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d t22: numeric, skip past first 2 digits abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t23:/+1,/^t24/-1sort/\d\d/x [?25l[?1cab a a321 b321 c321d b321 b321b a122 b322b a123 b123 c123d 123b t23: hexadecimal, skip past first 2 digits abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t24:/+1,/^t25/-1sort/\d\d/r [?25l[?1cab a a321 b321 b321 a122 a123 b123 b321b c321d b322b 123b c123d t24: alpha, sort on first 2 digits abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t25:/+1,/^t26/-1sort/\d\d/rn [?25l[?1cab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t25: numeric, sort on first 2 digits abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t26:/+1,/^t27/-1sort/\d\d/rx [?25l[?1cab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t26: hexadecimal, sort on first 2 digits abc[?25h[?0c[?25l[?1c :[?25h[?0c/^t27:/+1,/^t28/-1sort no [?25l[?1cE474: Invalid argument[?25h[?0c[?25l[?1c:[?25h[?0c/^t28:/+1,/^t29/-1sort b [?25l[?1ca123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t27: wrong arguments abc ab a a321 a123 a122 b321 b123 c123d 123b c321d b322b b321 b321b t28: binary 0b000000 0b001000 0b010000 0b100000 0b100010 0b100010 0b100100 0b101000 0b101000 0b101001 0b101001 0b101010 0b101100 0b111000 t29: binary with leading characters 0b100010 0b010000 0b101001 b0b101100 0b100010 0b100100 a0b001000 0b101000 0b101000 a0b101001 ab0b100000 0b101010 0b000000 b0b111000[?25h[?0c[?25l[?1c:[?25h[?0c/^t29:/+1,/^t30/-1sort b [?25l[?1c0b0000a0b0010 0b01000 ab0b100000 0b10001001 0b100100 0b10100b10 0b101001 a0b101001 0b10101b0b101100 b0b111000[?25h[?0c[?25l[?1c:[?25h[?0c/^t30:/+1,/^t31/-1sort f [?25l[?1ct30: float[?25h[?0c[?25l[?1c :[?25h[?0c/^t01:/,$wq! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 501 lines, 3105 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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]] " Valid autocmd event let test_cases += [['#BufEnter', 1]] " Valid autocmd event and pattern let test_cases += [['#BufEnter#*.my', 1]] " Non-existing autocmd group or event let test_cases += [['#xyzagroup', 0]] " Non-existing autocmd group and valid autocmd event let test_cases += [['#xyzagroup#BufEnter', 0]] " Valid autocmd group and event with no matching pattern let test_cases += [['#myagroup#CmdwinEnter', 0]] " Valid autocmd group and non-existing autocmd event let test_cases += [['#myagroup#xyzacmd', 0]] " Valid autocmd group and event and non-matching pattern let test_cases += [['#myagroup#BufEnter#xyzpat', 0]] " Valid autocmd event and non-matching pattern let test_cases += [['#BufEnter#xyzpat', 0]] " Empty autocmd group, event and pattern let test_cases += [['###', 0]] " Empty autocmd group and event or empty event and pattern let test_cases += [['##', 0]] " Valid autocmd event let test_cases += [['##FileReadCmd', 1]] " Non-existing autocmd event let test_cases += [['##MySpecialCmd', 0]]" Existing and working option (long form) let test_cases += [['&textwidth', 1]] " Existing and working option (short form) let test_cases += [['&tw', 1]] " Existing and working option with garbage let test_cases += [['&tw-', 0]] " Global option let test_cases += [['&g:errorformat', 1]] " Local option let test_cases += [['&l:errorformat', 1]] " Negative form of existing and working option (long form)[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 596 lines, 13023 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTESTecho "OK" elseecho "FAILED" endif" Non-existing Vim internal variable echo 'v:non_exists_var: 0' if !exists('v:non_exists_var')echo "OK" elseecho "FAILED" endif" Function arguments function TestFuncArg(func_arg, ...)echo 'a:func_arg: 1'if exists('a:func_arg')echo "OK"elseecho "FAILED"endifecho 'a:non_exists_arg: 0'if !exists('a:non_exists_arg')echo "OK"elseecho "FAILED"endifecho 'a:1: 1'if exists('a:1')echo "OK"elseecho "FAILED"endifecho '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 [?25h[?0c [?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfunction! RunTest(str, result) [?25l[?1c : [?25h[?0c if exists(a:str) == a:result [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED: Checking for " . a:str [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0cendfunction [?25l[?1cecho "OK" elseecho "FAILED" endif" Non-existing Vim internal variable[?25h[?0c[?25l[?1c :[?25h[?0cfunction! TestExists() [?25l[?1c : [?25h[?0c augroup myagroup [?25l[?1c: [?25h[?0c^Iautocmd! BufEnter *.my echo "myfile edited" [?25l[?1c: [?25h[?0c^Iautocmd! FuncUndefined UndefFun exec "fu UndefFun()\nendfu" [?25l[?1c: [?25h[?0c augroup END [?25l[?1c: [?25h[?0c set rtp+=./sautest [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c let test_cases = [] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " valid autocmd group [?25l[?1c: [?25h[?0c let test_cases += [['#myagroup', 1]] [?25l[?1c: [?25h[?0c " valid autocmd group with garbage [?25l[?1c: [?25h[?0c let test_cases += [['#myagroup+b', 0]] [?25l[?1c: [?25h[?0c " Valid autocmd group and event [?25l[?1c: [?25h[?0c let test_cases += [['#myagroup#BufEnter', 1]] [?25l[?1c: [?25h[?0c " Valid autocmd group, event and pattern [?25l[?1c: [?25h[?0c let test_cases += [['#myagroup#BufEnter#*.my', 1]] [?25l[?1c: [?25h[?0c " Valid autocmd event [?25l[?1c: [?25h[?0c let test_cases += [['#BufEnter', 1]] [?25l[?1c: [?25h[?0c " Valid autocmd event and pattern [?25l[?1c: [?25h[?0c let test_cases += [['#BufEnter#*.my', 1]] [?25l[?1c: [?25h[?0c " Non-existing autocmd group or event [?25l[?1c: [?25h[?0c let test_cases += [['#xyzagroup', 0]] [?25l[?1c: [?25h[?0c " Non-existing autocmd group and valid autocmd event [?25l[?1c: [?25h[?0c let test_cases += [['#xyzagroup#BufEnter', 0]] [?25l[?1c: [?25h[?0c " Valid autocmd group and event with no matching pattern [?25l[?1c: [?25h[?0c let test_cases += [['#myagroup#CmdwinEnter', 0]] [?25l[?1c: [?25h[?0c " Valid autocmd group and non-existing autocmd event [?25l[?1c: [?25h[?0c let test_cases += [['#myagroup#xyzacmd', 0]] [?25l[?1c: [?25h[?0c " Valid autocmd group and event and non-matching pattern [?25l[?1c: [?25h[?0c let test_cases += [['#myagroup#BufEnter#xyzpat', 0]] [?25l[?1c: [?25h[?0c " Valid autocmd event and non-matching pattern [?25l[?1c: [?25h[?0c let test_cases += [['#BufEnter#xyzpat', 0]] [?25l[?1c: [?25h[?0c " Empty autocmd group, event and pattern [?25l[?1c: [?25h[?0c let test_cases += [['###', 0]] [?25l[?1c: [?25h[?0c " Empty autocmd group and event or empty event and pattern [?25l[?1c: [?25h[?0c let test_cases += [['##', 0]] [?25l[?1c: [?25h[?0c " Valid autocmd event [?25l[?1c: [?25h[?0c let test_cases += [['##FileReadCmd', 1]] [?25l[?1c: [?25h[?0c " Non-existing autocmd event [?25l[?1c: [?25h[?0c let test_cases += [['##MySpecialCmd', 0]] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing and working option (long form) [?25l[?1c: [?25h[?0c let test_cases += [['&textwidth', 1]] [?25l[?1c: [?25h[?0c " Existing and working option (short form) [?25l[?1c: [?25h[?0c let test_cases += [['&tw', 1]] [?25l[?1c: [?25h[?0c " Existing and working option with garbage [?25l[?1c: [?25h[?0c let test_cases += [['&tw-', 0]] [?25l[?1c: [?25h[?0c " Global option [?25l[?1c: [?25h[?0c let test_cases += [['&g:errorformat', 1]] [?25l[?1c: [?25h[?0c " Local option [?25l[?1c: [?25h[?0c let test_cases += [['&l:errorformat', 1]] [?25l[?1c: [?25h[?0c " Negative form of existing and working option (long form) [?25l[?1c: [?25h[?0c let test_cases += [['&nojoinspaces', 0]] [?25l[?1c: [?25h[?0c " Negative form of existing and working option (short form) [?25l[?1c: [?25h[?0c let test_cases += [['&nojs', 0]] [?25l[?1c: [?25h[?0c " Non-existing option [?25l[?1c: [?25h[?0c let test_cases += [['&myxyzoption', 0]] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing and working option (long form) [?25l[?1c: [?25h[?0c let test_cases += [['+incsearch', 1]] [?25l[?1c: [?25h[?0c " Existing and working option with garbage [?25l[?1c: [?25h[?0c let test_cases += [['+incsearch!1', 0]] [?25l[?1c: [?25h[?0c " Existing and working option (short form) [?25l[?1c: [?25h[?0c let test_cases += [['+is', 1]] [?25l[?1c: [?25h[?0c " Existing option that is hidden. [?25l[?1c: [?25h[?0c let test_cases += [['+autoprint', 0]] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing environment variable [?25l[?1c: [?25h[?0c let $EDITOR_NAME = 'Vim Editor' [?25l[?1c: [?25h[?0c let test_cases += [['$EDITOR_NAME', 1]] [?25l[?1c: [?25h[?0c " Non-existing environment variable [?25l[?1c: [?25h[?0c let test_cases += [['$NON_ENV_VAR', 0]] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid internal function [?25l[?1c: [?25h[?0c let test_cases += [['*bufnr', 1]] [?25l[?1c: [?25h[?0c " Valid internal function with () [?25l[?1c: [?25h[?0c let test_cases += [['*bufnr()', 1]] [?25l[?1c: [?25h[?0c " Non-existing internal function [?25l[?1c: [?25h[?0c let test_cases += [['*myxyzfunc', 0]] [?25l[?1c: [?25h[?0c " Valid internal function with garbage [?25l[?1c: [?25h[?0c let test_cases += [['*bufnr&6', 0]] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid user defined function [?25l[?1c: [?25h[?0c let test_cases += [['*TestExists', 1]] [?25l[?1c: [?25h[?0c " Non-existing user defined function [?25l[?1c: [?25h[?0c let test_cases += [['*MyxyzFunc', 0]] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Function that may be created by FuncUndefined event [?25l[?1c: [?25h[?0c let test_cases += [['*UndefFun', 0]] [?25l[?1c: [?25h[?0c " Function that may be created by script autoloading [?25l[?1c: [?25h[?0c let test_cases += [['*footest#F', 0]] [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c redir! > test.out [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c for [test_case, result] in test_cases [?25l[?1c: [?25h[?0c echo test_case . ": " . result [?25l[?1c: [?25h[?0c call RunTest(test_case, result) [?25l[?1c: [?25h[?0c endfor [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid internal command (full match) [?25l[?1c: [?25h[?0c echo ':edit: 2' [?25l[?1c: [?25h[?0c if exists(':edit') == 2 [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid internal command (full match) with garbage [?25l[?1c: [?25h[?0c echo ':edit/a: 0' [?25l[?1c: [?25h[?0c if exists(':edit/a') == 0 [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid internal command (partial match) [?25l[?1c: [?25h[?0c echo ':q: 1' [?25l[?1c: [?25h[?0c if exists(':q') == 1 [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing internal command [?25l[?1c: [?25h[?0c echo ':invalidcmd: 0' [?25l[?1c: [?25h[?0c if !exists(':invalidcmd') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " User defined command (full match) [?25l[?1c: [?25h[?0c command! MyCmd :echo 'My command' [?25l[?1c: [?25h[?0c echo ':MyCmd: 2' [?25l[?1c: [?25h[?0c if exists(':MyCmd') == 2 [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " User defined command (partial match) [?25l[?1c: [?25h[?0c command! MyOtherCmd :echo 'Another command' [?25l[?1c: [?25h[?0c echo ':My: 3' [?25l[?1c: [?25h[?0c if exists(':My') == 3 [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Command modifier [?25l[?1c: [?25h[?0c echo ':rightbelow: 2' [?25l[?1c: [?25h[?0c if exists(':rightbelow') == 2 [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing user defined command (full match) [?25l[?1c: [?25h[?0c delcommand MyCmd [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c echo ':MyCmd: 0' [?25l[?1c: [?25h[?0c if !exists(':MyCmd') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing user defined command (partial match) [?25l[?1c: [?25h[?0c delcommand MyOtherCmd [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c echo ':My: 0' [?25l[?1c: [?25h[?0c if !exists(':My') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid local variable [?25l[?1c: [?25h[?0c let local_var = 1 [?25l[?1c: [?25h[?0c echo 'local_var: 1' [?25l[?1c: [?25h[?0c if exists('local_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid local variable with garbage [?25l[?1c: [?25h[?0c let local_var = 1 [?25l[?1c: [?25h[?0c echo 'local_var%n: 0' [?25l[?1c: [?25h[?0c if !exists('local_var%n') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing local variable [?25l[?1c: [?25h[?0c unlet local_var [?25l[?1c: [?25h[?0c echo 'local_var: 0' [?25l[?1c: [?25h[?0c if !exists('local_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing autoload variable that may be autoloaded [?25l[?1c: [?25h[?0c echo 'footest#x: 0' [?25l[?1c: [?25h[?0c if !exists('footest#x') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid local list [?25l[?1c: [?25h[?0c let local_list = ["blue", "orange"] [?25l[?1c: [?25h[?0c echo 'local_list: 1' [?25l[?1c: [?25h[?0c if exists('local_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid local list item [?25l[?1c: [?25h[?0c echo 'local_list[1]: 1' [?25l[?1c: [?25h[?0c if exists('local_list[1]') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid local list item with garbage [?25l[?1c: [?25h[?0c echo 'local_list[1]+5: 0' [?25l[?1c: [?25h[?0c if !exists('local_list[1]+5') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Invalid local list item [?25l[?1c: [?25h[?0c echo 'local_list[2]: 0' [?25l[?1c: [?25h[?0c if !exists('local_list[2]') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing local list [?25l[?1c: [?25h[?0c unlet local_list [?25l[?1c: [?25h[?0c echo 'local_list: 0' [?25l[?1c: [?25h[?0c if !exists('local_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Valid local dictionary [?25l[?1c: [?25h[?0c let local_dict = {"xcord":100, "ycord":2} [?25l[?1c: [?25h[?0c echo 'local_dict: 1' [?25l[?1c: [?25h[?0c if exists('local_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing local dictionary [?25l[?1c: [?25h[?0c unlet local_dict [?25l[?1c: [?25h[?0c echo 'local_dict: 0' [?25l[?1c: [?25h[?0c if !exists('local_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing local curly-brace variable [?25l[?1c: [?25h[?0c let str = "local" [?25l[?1c: [?25h[?0c let curly_{str}_var = 1 [?25l[?1c: [?25h[?0c echo 'curly_' . str . '_var: 1' [?25l[?1c: [?25h[?0c if exists('curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing local curly-brace variable [?25l[?1c: [?25h[?0c unlet curly_{str}_var [?25l[?1c: [?25h[?0c echo 'curly_' . str . '_var: 0' [?25l[?1c: [?25h[?0c if !exists('curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing global variable [?25l[?1c: [?25h[?0c let g:global_var = 1 [?25l[?1c: [?25h[?0c echo 'g:global_var: 1' [?25l[?1c: [?25h[?0c if exists('g:global_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing global variable with garbage [?25l[?1c: [?25h[?0c echo 'g:global_var-n: 1' [?25l[?1c: [?25h[?0c if !exists('g:global_var-n') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing global variable [?25l[?1c: [?25h[?0c unlet g:global_var [?25l[?1c: [?25h[?0c echo 'g:global_var: 0' [?25l[?1c: [?25h[?0c if !exists('g:global_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing global list [?25l[?1c: [?25h[?0c let g:global_list = ["blue", "orange"] [?25l[?1c: [?25h[?0c echo 'g:global_list: 1' [?25l[?1c: [?25h[?0c if exists('g:global_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing global list [?25l[?1c: [?25h[?0c unlet g:global_list [?25l[?1c: [?25h[?0c echo 'g:global_list: 0' [?25l[?1c: [?25h[?0c if !exists('g:global_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing global dictionary [?25l[?1c: [?25h[?0c let g:global_dict = {"xcord":100, "ycord":2} [?25l[?1c: [?25h[?0c echo 'g:global_dict: 1' [?25l[?1c: [?25h[?0c if exists('g:global_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing global dictionary [?25l[?1c: [?25h[?0c unlet g:global_dict [?25l[?1c: [?25h[?0c echo 'g:global_dict: 0' [?25l[?1c: [?25h[?0c if !exists('g:global_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing global curly-brace variable [?25l[?1c: [?25h[?0c let str = "global" [?25l[?1c: [?25h[?0c let g:curly_{str}_var = 1 [?25l[?1c: [?25h[?0c echo 'g:curly_' . str . '_var: 1' [?25l[?1c: [?25h[?0c if exists('g:curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing global curly-brace variable [?25l[?1c: [?25h[?0c unlet g:curly_{str}_var [?25l[?1c: [?25h[?0c echo 'g:curly_' . str . '_var: 0' [?25l[?1c: [?25h[?0c if !exists('g:curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing window variable [?25l[?1c: [?25h[?0c echo 'w:window_var: 1' [?25l[?1c: [?25h[?0c let w:window_var = 1 [?25l[?1c: [?25h[?0c if exists('w:window_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing window variable [?25l[?1c: [?25h[?0c unlet w:window_var [?25l[?1c: [?25h[?0c echo 'w:window_var: 0' [?25l[?1c: [?25h[?0c if !exists('w:window_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing window list [?25l[?1c: [?25h[?0c let w:window_list = ["blue", "orange"] [?25l[?1c: [?25h[?0c echo 'w:window_list: 1' [?25l[?1c: [?25h[?0c if exists('w:window_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing window list [?25l[?1c: [?25h[?0c unlet w:window_list [?25l[?1c: [?25h[?0c echo 'w:window_list: 0' [?25l[?1c: [?25h[?0c if !exists('w:window_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing window dictionary [?25l[?1c: [?25h[?0c let w:window_dict = {"xcord":100, "ycord":2} [?25l[?1c: [?25h[?0c echo 'w:window_dict: 1' [?25l[?1c: [?25h[?0c if exists('w:window_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing window dictionary [?25l[?1c: [?25h[?0c unlet w:window_dict [?25l[?1c: [?25h[?0c echo 'w:window_dict: 0' [?25l[?1c: [?25h[?0c if !exists('w:window_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing window curly-brace variable [?25l[?1c: [?25h[?0c let str = "window" [?25l[?1c: [?25h[?0c let w:curly_{str}_var = 1 [?25l[?1c: [?25h[?0c echo 'w:curly_' . str . '_var: 1' [?25l[?1c: [?25h[?0c if exists('w:curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing window curly-brace variable [?25l[?1c: [?25h[?0c unlet w:curly_{str}_var [?25l[?1c: [?25h[?0c echo 'w:curly_' . str . '_var: 0' [?25l[?1c: [?25h[?0c if !exists('w:curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing buffer variable [?25l[?1c: [?25h[?0c echo 'b:buffer_var: 1' [?25l[?1c: [?25h[?0c let b:buffer_var = 1 [?25l[?1c: [?25h[?0c if exists('b:buffer_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing buffer variable [?25l[?1c: [?25h[?0c unlet b:buffer_var [?25l[?1c: [?25h[?0c echo 'b:buffer_var: 0' [?25l[?1c: [?25h[?0c if !exists('b:buffer_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing buffer list [?25l[?1c: [?25h[?0c let b:buffer_list = ["blue", "orange"] [?25l[?1c: [?25h[?0c echo 'b:buffer_list: 1' [?25l[?1c: [?25h[?0c if exists('b:buffer_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing buffer list [?25l[?1c: [?25h[?0c unlet b:buffer_list [?25l[?1c: [?25h[?0c echo 'b:buffer_list: 0' [?25l[?1c: [?25h[?0c if !exists('b:buffer_list') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing buffer dictionary [?25l[?1c: [?25h[?0c let b:buffer_dict = {"xcord":100, "ycord":2} [?25l[?1c: [?25h[?0c echo 'b:buffer_dict: 1' [?25l[?1c: [?25h[?0c if exists('b:buffer_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing buffer dictionary [?25l[?1c: [?25h[?0c unlet b:buffer_dict [?25l[?1c: [?25h[?0c echo 'b:buffer_dict: 0' [?25l[?1c: [?25h[?0c if !exists('b:buffer_dict') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing buffer curly-brace variable [?25l[?1c: [?25h[?0c let str = "buffer" [?25l[?1c: [?25h[?0c let b:curly_{str}_var = 1 [?25l[?1c: [?25h[?0c echo 'b:curly_' . str . '_var: 1' [?25l[?1c: [?25h[?0c if exists('b:curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing buffer curly-brace variable [?25l[?1c: [?25h[?0c unlet b:curly_{str}_var [?25l[?1c: [?25h[?0c echo 'b:curly_' . str . '_var: 0' [?25l[?1c: [?25h[?0c if !exists('b:curly_{str}_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Script-local tests [?25l[?1c: [?25h[?0c source test60.vim [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Existing Vim internal variable [?25l[?1c: [?25h[?0c echo 'v:version: 1' [?25l[?1c: [?25h[?0c if exists('v:version') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Non-existing Vim internal variable [?25l[?1c: [?25h[?0c echo 'v:non_exists_var: 0' [?25l[?1c: [?25h[?0c if !exists('v:non_exists_var') [?25l[?1c: [?25h[?0c^Iecho "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c^Iecho "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c " Function arguments [?25l[?1c: [?25h[?0c function TestFuncArg(func_arg, ...) [?25l[?1c: [?25h[?0c echo 'a:func_arg: 1' [?25l[?1c: [?25h[?0c if exists('a:func_arg') [?25l[?1c: [?25h[?0c echo "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c echo "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c echo 'a:non_exists_arg: 0' [?25l[?1c: [?25h[?0c if !exists('a:non_exists_arg') [?25l[?1c: [?25h[?0c echo "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c echo "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c echo 'a:1: 1' [?25l[?1c: [?25h[?0c if exists('a:1') [?25l[?1c: [?25h[?0c echo "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c echo "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c echo 'a:2: 0' [?25l[?1c: [?25h[?0c if !exists('a:2') [?25l[?1c: [?25h[?0c echo "OK" [?25l[?1c: [?25h[?0c else [?25l[?1c: [?25h[?0c echo "FAILED" [?25l[?1c: [?25h[?0c endif [?25l[?1c: [?25h[?0c endfunction [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c call TestFuncArg("arg1", "arg2") [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c echo ' g:footest#x =' g:footest#x [?25l[?1c: [?25h[?0c echo ' footest#F()' footest#F() [?25l[?1c: [?25h[?0c echo 'UndefFun()' UndefFun() [?25l[?1c: [?25h[?0c [?25l[?1c: [?25h[?0c redir END [?25l[?1c: [?25h[?0cendfunction [?25l[?1cecho "OK" elseecho "FAILED" endif" Non-existing Vim internal variable echo 'v:non_exists_var: 0' if !exists('v:non_exists_var')echo "OK" elseecho "FAILED" endif" Function arguments function TestFuncArg(func_arg, ...)echo 'a:func_arg: 1'if exists('a:func_arg')echo "OK"elseecho "FAILED"endifecho 'a:non_exists_arg: 0'if !exists('a:non_exists_arg')echo "OK"elseecho "FAILED"endifecho 'a:1: 1'if exists('a:1')echo "OK"elseecho "FAILED"endifecho '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 [?25h[?0c[?25l[?1c :[?25h[?0ccall TestExists() [?25l[?1c#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[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1cecho "OK" elseecho "FAILED" endif" Non-existing Vim internal variable echo 'v:non_exists_var: 0' if !exists('v:non_exists_var')echo "OK" elseecho "FAILED" endif" Function arguments function TestFuncArg(func_arg, ...)echo 'a:func_arg: 1'if exists('a:func_arg')echo "OK"elseecho "FAILED"endifecho 'a:non_exists_arg: 0'if !exists('a:non_exists_arg')echo "OK"elseecho "FAILED"endifecho 'a:1: 1'if exists('a:1')echo "OK"elseecho "FAILED"endifecho '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 [?25h[?0c[?25l[?1c :[?25h[?0cdelfunc TestExists [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc RunTest [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cdelfunc TestFuncArg [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cedit! test.out [?25l[?1c"test.out" [Incomplete last line] 206 lines, 1940 characters#myagroup: 1 OK#myagroup+b: 0 OK #myagroup#BufEnter: 1OK#myagroup#BufEnter#*.my: 1OK#BufEnter: 1 OK#BufEnter#*.my: 1 OK #xyzagroup: 0OK#xyzagroup#BufEnter: 0OK#myagroup#CmdwinEnter: 0 OK#myagroup#xyzacmd: 0OK#myagroup#BufEnter#xyzpat: 0 OK#BufEnter#xyzpat: 0OK###: 0OK##: 0OK ##FileReadCmd: 1OK##MySpecialCmd: 0OK&textwidth: 1OK&tw: 1 OK&tw-: 0OK&g:errorformat: 1 OK&l:errorformat: 1 OK&nojoinspaces: 0 OK&nojs: 0 OK&myxyzoption: 0OK+incsearch: 1 OK+incsearch!1: 0 OK+is: 1 OK+autoprint: 0OK$EDITOR_NAME: 1 OK$NON_ENV_VAR: 0 OK*bufnr: 1OK*bufnr(): 1[?25h[?0c[?25l[?1c:[?25h[?0cset ff=unix [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"test.out" 206 lines, 1941 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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']) :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 :" :"operator \| :call add(tl, [2, 'a\|ab', 'cabd', 'a']) "alternation is ordered :" :call add(tl, [2, 'c\?', 'ccb', 'c']) :call add(tl, [2, 'bc\?', 'abd', 'b']) :call add(tl, [2, 'bc\?', 'abccd', 'bc']) :" :call add(tl, [2, '\va{1}', 'ab', 'a']) :" :call add(tl, [2, '\va{2}', 'aa', 'aa']) :call add(tl, [2, '\va{2}', 'caad', 'aa']) :call add(tl, [2, '\va{2}', 'aba']) :call add(tl, [2, '\va{2}', 'ab']) :call add(tl, [2, '\va{2}', 'abaa', 'aa']) :call add(tl, [2, '\va{2}', 'aaa', 'aa']) :" :call add(tl, [2, '\vb{1}', 'abca', 'b']) :call add(tl, [2, '\vba{2}', 'abaa', 'baa']) :call add(tl, [2, '\vba{3}', 'aabaac']) :" :call add(tl, [2, '\v(ab){1}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'dabc', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'acb']) :" :call add(tl, [2, '\v(ab){0,2}', 'acb', "", ""]) :call add(tl, [2, '\v(ab){0,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ababc', 'abab', 'ab']) :call add(tl, [2, '\v(ab){2,4}', 'ababcab', 'abab', 'ab'])[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 621 lines, 27090 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST%s/\%>7l\%12c./?/g %s/\%>7l\%<9l\%>5v\%<8v./#/g $s/\%(|\u.*\)\@<=[^|\t]\+$//ge 1,$yank quit! endfunc Go-0-^[:set re=0 :call Postest() :put o-1-^[:set re=1 :call Postest() :put o-2-^[:set re=2 :call Postest() :put :" :" start and end of buffer /\%^ yeGo^[p:" 50%/\%^.. yeGo^[pA END^[:" 50%/\%$ "ayb20gg/..\%$ "bybGo^["apo^["bp:" :" :" 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[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\s\+\ze\[/\|\s\zs\s\+', 'is [a t', ' ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" Tests for \@= and \& features [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'abc\@=', 'abc', 'ab']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'abc\@=cd', 'abcd', 'abcd']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'abc\@=', 'ababc', 'ab']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" will never match, no matter the input text [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'abcd\@=e', 'abcd']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" will never match [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'abcd\@=e', 'any text in here ... ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\v(abc)@=..', 'xabcd', 'ab', 'abc']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(.*John\)\@=.*Bob', 'here is John, and here is B']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(John.*\)\@=.*Bob', 'John is Bobs friend', 'John is Bob', 'John is Bobs friend']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\<\S\+\())\)\@=', '$((i=i+1))', 'i=i+1', '))']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '.*John\&.*Bob', 'here is John, and here is B']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '.*John\&.*Bob', 'John is Bobs friend', 'John is Bob']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\v(test1)@=.*yep', 'this is a test1, yep it is', 'test1, yep', 'test1']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\(bar\)\@!', 'foobar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\(bar\)\@!', 'foo bar', 'foo']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'if \(\(then\)\@!.\)*$', ' if then else']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'if \(\(then\)\@!.\)*$', ' if else ', 'if else ', ' ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(foo\)\@!bar', 'foobar', 'bar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(foo\)\@!...bar', 'foobar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' bar foo ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo bar ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo xxx ', 'foo']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '[ ]\@!\p\%([ ]\@!\p\)*:', 'implicit mappings:', 'mappings:']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '[ ]\@!\p\([ ]\@!\p\)*:', 'implicit mappings:', 'mappings:', 's']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'm\k\+_\@=\%(_\@!\k\)\@<=\k\+e', 'mx__xe', 'mx__xe']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%(\U\@<=S\k*\|S\l\)R', 'SuR', 'SuR']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" Combining different tests and features [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '[[:alpha:]]\{-2,6}', '787abcdiuhsasiuhb4', 'ab']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '', 'abcd', '']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\v(())', 'any possible text', '']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\v%(ab(xyz)c)', ' abxyzc ', 'abxyzc', 'xyz']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\v(test|)empty', 'tesempty', 'empty', '']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\v(a|aa)(a|aa)', 'aaa', 'aa', 'a', 'a']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" \%u and friends [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%d32', 'yes no', ' ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%o40', 'yes no', ' ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%x20', 'yes no', ' ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%u0020', 'yes no', ' ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%U00000020', 'yes no', ' ']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%d0', "yes\x0ano", "\x0a"]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c""""" \%[abc] [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]', 'fobar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]', 'foobar', 'foobar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]', 'fooxx', 'foo']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]', 'foobxx', 'foob']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]', 'foobaxx', 'fooba']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]', 'foobarxx', 'foobar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]x', 'foobxx', 'foobx']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'foo\%[bar]x', 'foobarxx', 'foobarx']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%[bar]x', 'barxx', 'barx']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%[bar]x', 'bxx', 'bx']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%[bar]x', 'xxx', 'x']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'b\%[[ao]r]', 'bar bor', 'bar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'b\%[[]]r]', 'b]r bor', 'b]r']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '@\%[\w\-]*', '[@pandoc]', '@pandoc']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" Alternatives, must use first longest match [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'goo\|go', 'google', 'goo']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\', 'foobar']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" complicated look-behind match [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(r\@<=\|\w\@ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(a*\)\@>a', 'aaaa']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '^\(.\{-}b\)\@>.', ' abcbd', ' abc', ' ab']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(.\{-}\)\(\)\@>$', 'abc', 'abc', 'abc', '']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" TODO: BT engine does not restore submatch after failure [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" "\_" prepended negated collection matches EOL [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\_[^8-9]\+', "asfi\n9888", "asfi\n"]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\_[^a]\+', "asfi\n9888", "sfi\n9888"]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" Requiring lots of states. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall 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[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" Skip adding state twice [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=', "#if FOO", "#if", ' FOO']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c""" Test \%V atom [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\%>70vGesamt', 'Jean-Michel Charlier & Victor Hubinon\Gesamtausgabe [Salleck] Buck Danny {Jean-Michel Charlier & Victor Hubinon}\Gesamtausgabe', 'Gesamt']) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" Run the tests [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfor t in tl [?25l[?1c : [?25h[?0c: let re = t[0] [?25l[?1c: [?25h[?0c: let pat = t[1] [?25l[?1c: [?25h[?0c: let text = t[2] [?25l[?1c: [?25h[?0c: let matchidx = 3 [?25l[?1c: [?25h[?0c: for engine in [0, 1, 2] [?25l[?1c: [?25h[?0c: if engine == 2 && re == 0 || engine == 1 && re == 1 [?25l[?1c: [?25h[?0c: continue [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: let ®expengine = engine [?25l[?1c: [?25h[?0c: try [?25l[?1c: [?25h[?0c: let l = matchlist(text, pat) [?25l[?1c: [?25h[?0c: catch [?25l[?1c: [?25h[?0c: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exception . '\"' [?25l[?1c: [?25h[?0c: endtry [?25l[?1c: [?25h[?0c:" check the match itself [?25l[?1c: [?25h[?0c: if len(l) == 0 && len(t) > matchidx [?25l[?1c: [?25h[?0c: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' . t[matchidx] . '\"' [?25l[?1c: [?25h[?0c: elseif len(l) > 0 && len(t) == matchidx [?25l[?1c: [?25h[?0c: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected no match' [?25l[?1c: [?25h[?0c: elseif len(t) > matchidx && l[0] != t[matchidx] [?25l[?1c: [?25h[?0c: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expected: \"' . t[matchidx] . '\"' [?25l[?1c: [?25h[?0c: else [?25l[?1c: [?25h[?0c: $put ='OK ' . engine . ' - ' . pat [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: if len(l) > 0 [?25l[?1c: [?25h[?0c:" check all the nine submatches [?25l[?1c: [?25h[?0c: for i in range(1, 9) [?25l[?1c:[?25h[?0c: if len(t) <= matchidx + i [?25l[?1c:[?25h[?0c: let e = '' [?25l[?1c:[?25h[?0c: else [?25l[?1c:[?25h[?0c: let e = t[matchidx + i] [?25l[?1c:[?25h[?0c: endif [?25l[?1c:[?25h[?0c: if l[i] != e [?25l[?1c:[?25h[?0c: $put ='ERROR ' . engine . ': pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . l[i] . '\", expected: \"' . e . '\"' [?25l[?1c:[?25h[?0c: endif [?25l[?1c:[?25h[?0c: endfor [?25l[?1c: [?25h[?0c: unlet i [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: endfor [?25l[?1c: [?25h[?0c:endfor [?25l[?1cOK 1 - <\@2<=span. OK 2 - <\@2<=span. OK 0 - \(<<\)\@<=span. OK 1 - \(<<\)\@<=span. OK 2 - \(<<\)\@<=span. OK 0 - \(<<\)\@1<=span. OK 1 - \(<<\)\@1<=span. OK 2 - \(<<\)\@1<=span. OK 0 - \(<<\)\@2<=span. OK 1 - \(<<\)\@2<=span. OK 2 - \(<<\)\@2<=span. OK 0 - \(foo\)\@ OK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=\> OK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=.* OK 1 - \(foo\)\@<=.* OK 2 - \(foo\)\@<=.* OK 0 - \(r\@<=\|\w\@a OK 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[?25h[?0c[?25l[?1c :[?25h[?0cunlet t tl e l [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""""" multi-line tests """""""""""""""""""" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet tl = [] [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" back references [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '^.\(.\).\_..\1.', ['aaa', 'aaa', 'b'], ['XX', 'b']]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\v.*\/(.*)\n.*\/\1$', ['./Dir1/Dir2/zyxwvuts.txt', './Dir1/Dir2/abcdefgh.bat', '', './Dir1/Dir2/file1.txt', './OtherDir1/OtherDir2/file1.txt'], ['./Dir1/Dir2/zyxwvuts.txt', './Dir1/Dir2/abcd efgh.bat', '', 'XX']]) [?25l[?1cOK 1 - <\@2<=span.[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" line breaks [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\S.*\nx', ['abc', 'def', 'ghi', 'xjk', 'lmn'], ['abc', 'def', 'XXjk', 'lmn']]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check that \_[0-9] matching EOL does not break a following \> [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall 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', '']]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check a pattern with a line break and ^ and $ [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(tl, [2, '\(^.\+\n\)\1', [' dog', ' dog', 'asdf'], ['XXasdf']]) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c"""" Run the multi-line tests [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put ='multi-line tests' [?25l[?1c multi-line tests[?25h[?0c[?25l[?1c :[?25h[?0cfor t in tl [?25l[?1c : [?25h[?0c: let re = t[0] [?25l[?1c: [?25h[?0c: let pat = t[1] [?25l[?1c: [?25h[?0c: let before = t[2] [?25l[?1c: [?25h[?0c: let after = t[3] [?25l[?1c: [?25h[?0c: for engine in [0, 1, 2] [?25l[?1c: [?25h[?0c: if engine == 2 && re == 0 || engine == 1 && re ==1 [?25l[?1c: [?25h[?0c: continue [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: let ®expengine = engine [?25l[?1c: [?25h[?0c: new [?25l[?1c: [?25h[?0c: call setline(1, before) [?25l[?1c: [?25h[?0c: exe '%s/' . pat . '/XX/' [?25l[?1c: [?25h[?0c: let result = getline(1, '$') [?25l[?1c: [?25h[?0c: q! [?25l[?1c: [?25h[?0c: if result != after [?25l[?1c: [?25h[?0c: $put ='ERROR: pat: \"' . pat . '\", text: \"' . string(before) . '\", expected: \"' . string(after) . '\", got: \"' . string(result) . '\"' [?25l[?1c: [?25h[?0c: else [?25l[?1c: [?25h[?0c: $put ='OK ' . engine . ' - ' . pat [?25l[?1c: [?25h[?0c: endif [?25l[?1c: [?25h[?0c: endfor [?25l[?1c: [?25h[?0c:endfor [?25l[?1cOK 2 - \v\C%( OK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=\> OK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=.* OK 1 - \(foo\)\@<=.* OK 2 - \(foo\)\@<=.* OK 0 - \(r\@<=\|\w\@a OK 1 - \(a*\)\@>a OK 2 - \(a*\)\@>a OK 0 - \(a*\)\@>b OK 1 - \(a*\)\@>ba*\)\@>b^\(.\{-}b\)\@>.^\(.\{-}b\)\@>.^\(.\{-}b\)\@>..\{-}\)\(\)\@>$.\{-}\)\(\)\@>$.\{-}\)\(\)\@>$a*\)\@>a\|a\+2 - \(a*\)\@>a\|a\+0 - \_[^8-9]\+1 - \_[^8-9]\+2 - \_[^8-9]\+0 - \_[^a1 - \_[^a]\+2 - \_[^a]\+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 - \%>70vGesamt1 - \%>70vGesamt2 - \%>70vGesamtmulti-line tests^.\(.\).\_..\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.*\nx1 - \S.*\nx2 - \S.*\nx0 - \<\(\(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]\?\)\> OK 1 - \<\(\(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]\?\)\> OK 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]\?\)\> 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[?25h[?0c[?25l[?1c :[?25h[?0cunlet t tl [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check that using a pattern on two lines doesn't get messed up by using [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" matchstr() with \ze in between. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset re=0 [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^Substitute here [?25l[?1csearch hit BOTTOM, continuing at TOPo-1-^[:set re=1 :call Postest() :put o-2-^[:set re=2 :call Postest() :put :" :" start and end of buffer /\%^ yeGo^[p:" 50%/\%^.. yeGo^[pA END^[:" 50%/\%$ "ayb20gg/..\%$ "bybGo^["apo^["bp:" :" :" 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: asdfasdTa 5 Ac 7 [?25h[?0c[?25l[?1c/[?25h[?0c^Substitute here [?25l[?1csearch hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1c:[?25h[?0c.+1,.+2yank [?25l[?1c[?25h[?0c[?25l[?1cOK 2 - \v\C%( OK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=\> OK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=.* OK 1 - \(foo\)\@<=.* OK 2 - \(foo\)\@<=.* OK 0 - \(r\@<=\|\w\@a OK 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 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]\|2\_[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]\|2\_[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]\|2\_[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 [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c Ta 5 [?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check a pattern with a look beind crossing a line boundary [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^Behind: [?25l[?1csearch hit BOTTOM, continuing at TOP:call Postest() :put :" :" start and end of buffer /\%^ yeGo^[p:" 50%/\%^.. yeGo^[pA END^[:" 50%/\%$ "ayb20gg/..\%$ "bybGo^["apo^["bp:" :" :" 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 OK 0 - \(foo\)\@<=\> OK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=.* OK 1 - \(foo\)\@<=.* OK 2 - \(foo\)\@<=.* OK 0 - \(r\@<=\|\w\@a OK 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 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]\|2\_[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]\|2\_[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]\|2\_[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 [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c xxstart3 [?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check matching Visual area [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^Visual: [?25l[?1csearch hit BOTTOM, continuing at TOP50%/\%$ "ayb20gg/..\%$ "bybGo^["apo^["bp:" :" :" 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[?25h[?0cs/\%Ve/E/g [?25l[?1c3 substitutions on 1 linexE thE thE [?25h[?0c [?25l[?1candaxand andaxand [?25h[?0c[?25l[?1c:'<,'>[?25h[?0cs/\%Va/A/g [?25l[?1c6 substitutions on 1 lineAndAxAnd AndAxAnd[?25h[?0c ooo[?25l[?1c[?25h[?0c[?25l[?1cxofor foro[?25h[?0c[?25l[?1cx oooxofor foro[?25h[?0c[?25l[?1c:'<,'>[?25h[?0cs/\%Vo/O/g [?25l[?1c8 substitutions on 2 linesxOfOr fOrOx oooxOfOr fOrO [?25h[?0c[?25l[?1c:[?25h[?0c/^Visual/+1,/^Visual/+4yank [?25l[?1csearch hit BOTTOM, continuing at TOP 4 lines yanked[?25h[?0c[?25l[?1cOK 1 - \(foo\)\@<=\> OK 2 - \(foo\)\@<=\> OK 0 - \(foo\)\@<=.* OK 1 - \(foo\)\@<=.* OK 2 - \(foo\)\@<=.* OK 0 - \(r\@<=\|\w\@a OK 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 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]\|2\_[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]\|2\_[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]\|2\_[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 [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c 4 more lines thexE thE thExethe4 more lines[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check matching marks [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^Marks: [?25l[?1csearch 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: asdfasd's.*\%<'e../here/ [?25l[?1chereasdf[?25h[?0c asdf dfsa dfsadf[?25l[?1c:[?25h[?0c.-4,.+6s/.\%>'s\_.*\%<'e../again/ [?25l[?1c asdfagainasdfOK 0 - bc\+[?25h[?0c[?25l[?1c:[?25h[?0c/^Marks:/+1,/^Marks:/+3yank [?25l[?1csearch hit BOTTOM, continuing at TOP 3 lines yanked[?25h[?0c[?25l[?1cOK 0 - \(r\@<=\|\w\@a OK 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 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]\|2\_[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]\|2\_[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]\|2\_[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 [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c 3 more lines asdfhereasdf3 more lines[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check patterns matching cursor position. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfunc! Postest() [?25l[?1c : [?25h[?0c new [?25l[?1c: [?25h[?0c call setline(1, ['ffooooo', 'boboooo', 'zoooooo', 'koooooo', 'moooooo', "\t\t\tfoo", 'abababababababfoo', 'bababababababafoo', '********_', ' xxxxxxxxxxxx xxxx xxxxxx xxxxxxx x xxxxxxxxx xx xxxxx x 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 xxx xxxxxxxx xx xxxxx xxx xxxxxxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxx x xxxxxxxxx xx xxxxxx xxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx 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 xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx']) [?25l[?1c: [?25h[?0c call setpos('.', [0, 1, 0, 0]) [?25l[?1c: [?25h[?0c s/\%>3c.//g [?25l[?1c: [?25h[?0c call setpos('.', [0, 2, 4, 0]) [?25l[?1c: [?25h[?0c s/\%#.*$//g [?25l[?1c: [?25h[?0c call setpos('.', [0, 3, 0, 0]) [?25l[?1c: [?25h[?0c s/\%<3c./_/g [?25l[?1c: [?25h[?0c %s/\%4l\%>5c./_/g [?25l[?1c: [?25h[?0c %s/\%6l\%>25v./_/g [?25l[?1c: [?25h[?0c %s/\%>6l\%3c./!/g [?25l[?1c: [?25h[?0c %s/\%>7l\%12c./?/g [?25l[?1c: [?25h[?0c %s/\%>7l\%<9l\%>5v\%<8v./#/g [?25l[?1c: [?25h[?0c $s/\%(|\u.*\)\@<=[^|\t]\+$//ge [?25l[?1c: [?25h[?0c 1,$yank [?25l[?1c: [?25h[?0c quit! [?25l[?1c: [?25h[?0cendfunc [?25l[?1cOK 2 - \(r\@<=\|\w\@a OK 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]\+[?25h[?0c[?25l[?1casdfagainasdf [?25h[?0c[?25l[?1c -0-[?25h[?0c[?25l[?1c :[?25h[?0cset re=0 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall Postest() [?25l[?1c4 substitutions on 4 lines 10 lines yanked Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cput [?25l[?1c10 more lines Press ENTER or type command to continue[?25h[?0c[?25l[?1cOK 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]\+1 - \_[^a]\+2 - \_[^a]\+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.*$\)\@=^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=%>70vGesamt%>70vGesamt%>70vGesamt multi-line tests OK 0 - ^.\(.\).\_..\1. OK 1 - ^.\(.\).\_..\1. OK 2 - ^.\(.\).\_..\1.0 - \v.*\/(.*)\n.*\/\1$1 - \v.*\/(.*)\n.*\/\1$2 - \v.*\/(.*)\n.*\/\1$0 - \S.*\nx1 - \S.*\nx2 - \S.*\nx0 - \<\(\(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]\?\)\> OK 1 - \<\(\(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]\?\)\> OK 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]\?\)\>a\n^b$\n^ca\n^b$\n^ca\n^b$\n^c(^.\+\n\)\1(^.\+\n\)\1(^.\+\n\)\1Ta 5 Ac 7xxstart3thexE thE thExethe AndAxAnd AndAxAnd oooxOfOr fOrOxooo oooxOfOr fOrOxoooasdfhereasdfasdfagainasdf-0-ffo bob__ooooo koooo__moooooo f__ ab!babababababf 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?25h[?0c[?25l[?1c -1-[?25h[?0c[?25l[?1c :[?25h[?0cset re=1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall Postest() [?25l[?1c4 substitutions on 4 lines 10 lines yanked Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cput [?25l[?1c10 more lines Press ENTER or type command to continue[?25h[?0c[?25l[?1cOK 1 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 2 - ^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@= OK 0 - \%>70vGesamt%>70vGesamt%>70vGesamt multi-line tests OK 0 - ^.\(.\).\_..\1. OK 1 - ^.\(.\).\_..\1. OK 2 - ^.\(.\).\_..\1.0 - \v.*\/(.*)\n.*\/\1$1 - \v.*\/(.*)\n.*\/\1$2 - \v.*\/(.*)\n.*\/\1$0 - \S.*\nx1 - \S.*\nx2 - \S.*\nx0 - \<\(\(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]\?\)\> OK 1 - \<\(\(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]\?\)\> OK 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]\?\)\>a\n^b$\n^ca\n^b$\n^ca\n^b$\n^c(^.\+\n\)\1(^.\+\n\)\1(^.\+\n\)\1Ta 5 Ac 7xxstart3thexE thE thExethe AndAxAnd AndAxAnd oooxOfOr fOrOxooo oooxOfOr fOrOxoooasdfhereasdfasdfagainasdf-0-ffo bob__ooooo koooo__moooooo f__ ab!babababababf 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx 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  x xxxxxxxxx xx xxxxxx xxx xxxxxxx xx xx xxxx xx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxx xxxxxxxxx xxx xxxxxxxx xxxx xxxx xxx x xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx  xxxxx xxx xx xxx xx x xxxxxxxxx xx xxxxxx  xxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?25h[?0c[?25l[?1c -2-[?25h[?0c[?25l[?1c :[?25h[?0cset re=2 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall Postest() [?25l[?1c4 substitutions on 4 lines 10 lines yanked Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0cput [?25l[?1c10 more lines Press ENTER or type command to continue[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1cOK 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]\|2\_[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]\|2\_[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]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>a\n^b$\n^ca\n^b$\n^ca\n^b$\n^c(^.\+\n\)\1(^.\+\n\)\1(^.\+\n\)\1Ta 5 Ac 7xxstart3thexE thE thExethe AndAxAnd AndAxAnd oooxOfOr fOrOxooo oooxOfOr fOrOxoooasdfhereasdfasdfagainasdf-0-ffo bob__ooooo koooo__moooooo f__ ab!babababababf 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx 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  x xxxxxxxxx xx xxxxxx xxx xxxxxxx xx xx xxxx xx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxx xxxxxxxxx xxx xxxxxxxx xxxx xxxx xxx x xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx  xxxxx xxx xx xxx xx x xxxxxxxxx xx xxxxxx  xxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx 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__ moooooo f__ ab!bababababab ba!ab##abab?bafoo **!*****_ ! xxx?xxxxxxxx xxxx xxxxxx  x xxxxxxxxx xx xxxxxx xxx xxxxxxx xx xx xxxx xx xxx xxxxxxx xxxxxxxxx xx xxxxxx xx xxxxxxx xxx xxxxxxxxx xxx xxxxxxxx xxxx xxxx xxx x xxx xxxxx xxxxxxxxxxxx xxxx xxxxxxxxx  xxxxx xxx xx xxx xx x xxxxxxxxx xx xxxxxx  xxxxxxxxxx xxxxxxx xxxxxxx xxx xxx xxxxxxxx xxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?25h[?0c[?25l[?1c :[?25h[?0c" start and end of buffer [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c\%^ [?25l[?1csearch 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']) :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 :" :"operator \| :call add(tl, [2, 'a\|ab', 'cabd', 'a']) "alternation is ordered :" :call add(tl, [2, 'c\?', 'ccb', 'c']) :call add(tl, [2, 'bc\?', 'abd', 'b']) :call add(tl, [2, 'bc\?', 'abccd', 'bc']) :" :call add(tl, [2, '\va{1}', 'ab', 'a']) :" :call add(tl, [2, '\va{2}', 'aa', 'aa']) :call add(tl, [2, '\va{2}', 'caad', 'aa']) :call add(tl, [2, '\va{2}', 'aba']) :call add(tl, [2, '\va{2}', 'ab']) :call add(tl, [2, '\va{2}', 'abaa', 'aa']) :call add(tl, [2, '\va{2}', 'aaa', 'aa']) :" :call add(tl, [2, '\vb{1}', 'abca', 'b']) :call add(tl, [2, '\vba{2}', 'abaa', 'baa']) :call add(tl, [2, '\vba{3}', 'aabaac']) :" :call add(tl, [2, '\v(ab){1}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'dabc', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'acb']) :" :call add(tl, [2, '\v(ab){0,2}', 'acb', "", ""]) :call add(tl, [2, '\v(ab){0,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ababc', 'abab', 'ab']) :call add(tl, [2, '\v(ab){2,4}', 'ababcab', 'abab', 'ab']) search hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1cOK 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]\|2\_[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]\|2\_[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]\|2\_[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 asdfagainasdf -0- 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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__ 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1cTest[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1cOK 0 - \v(a{3})+ OK 1 - \v(a{3})+ OK 2 - \v(a{3})+ OK 0 - \v(a|b|c)+ OK 1 - \v(a|b|c)+ OK 2 - \v(a|b|c)+ OK 0 - \v(a|b|c){2} OK 1 - \v(a|b|c){2} OK 2 - \v(a|b|c){2} OK 0 - \v(abc){2} OK 1 - \v(abc){2} OK 2 - \v(abc){2} OK 0 - \v(abc){2} OK 1 - \v(abc){2} OK 2 - \v(abc){2} OK 0 - a* OK 1 - a* OK 2 - 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 - \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} OK 2 - \va{2,3} OK 0 - \v((ab)+|c*)+ OK 1 - \v((ab)+|c*)+ OK 2 - \v((ab)+|c*)+ OK 0 - \v(a{2})|(b{3}) OK 1 - \v(a{2})|(b{3}) OK 2 - \v(a{2})|(b{3}) OK 0 - \va{2}|b{2} OK 1 - \va{2}|b{2} OK 2 - \va{2}|b{2} OK 0 - \v(a)+|(c)+ OK 1 - \v(a)+|(c)+ OK 2 - \v(a)+|(c)+ OK 0 - \vab{2,3}c OK 1 - \vab{2,3}c OK 2 - \vab{2,3}c OK 0 - \vab{2,3}c[?25h[?0c[?25l[?1c/[?25h[?0c\%^.. [?25l[?1csearch 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']) :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 :" :"operator \| :call add(tl, [2, 'a\|ab', 'cabd', 'a']) "alternation is ordered :" :call add(tl, [2, 'c\?', 'ccb', 'c']) :call add(tl, [2, 'bc\?', 'abd', 'b']) :call add(tl, [2, 'bc\?', 'abccd', 'bc']) :" :call add(tl, [2, '\va{1}', 'ab', 'a']) :" :call add(tl, [2, '\va{2}', 'aa', 'aa']) :call add(tl, [2, '\va{2}', 'caad', 'aa']) :call add(tl, [2, '\va{2}', 'aba']) :call add(tl, [2, '\va{2}', 'ab']) :call add(tl, [2, '\va{2}', 'abaa', 'aa']) :call add(tl, [2, '\va{2}', 'aaa', 'aa']) :" :call add(tl, [2, '\vb{1}', 'abca', 'b']) :call add(tl, [2, '\vba{2}', 'abaa', 'baa']) :call add(tl, [2, '\vba{3}', 'aabaac']) :" :call add(tl, [2, '\v(ab){1}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'dabc', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'acb']) :" :call add(tl, [2, '\v(ab){0,2}', 'acb', "", ""]) :call add(tl, [2, '\v(ab){0,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ababc', 'abab', 'ab']) :call add(tl, [2, '\v(ab){2,4}', 'ababcab', 'abab', 'ab']) search hit BOTTOM, continuing at TOP[?25h[?0c[?25l[?1cOK 2 - \S.*\nx OK 0 - \<\(\(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]\?\)\> OK 1 - \<\(\(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]\?\)\> OK 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]\?\)\> 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 asdfagainasdf -0- 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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__ 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx xxxxxxx xxx xxxxxxxxxxxx xxxx xxxxxxxxx xxxxxx xxxxxx xxxxx xxx xxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxxx xx xxxxxxxx xxx xxxxxxxxxxx xxxxx Test [?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1cTest[?25h[?0c[?25l[?1ct END[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1cOK 1 - \v(a{3})+ OK 2 - \v(a{3})+ OK 0 - \v(a|b|c)+ OK 1 - \v(a|b|c)+ OK 2 - \v(a|b|c)+ OK 0 - \v(a|b|c){2} OK 1 - \v(a|b|c){2} OK 2 - \v(a|b|c){2} OK 0 - \v(abc){2} OK 1 - \v(abc){2} OK 2 - \v(abc){2} OK 0 - \v(abc){2} OK 1 - \v(abc){2} OK 2 - \v(abc){2} OK 0 - a* OK 1 - a* OK 2 - 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 - \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} OK 2 - \va{2,3} OK 0 - \v((ab)+|c*)+ OK 1 - \v((ab)+|c*)+ OK 2 - \v((ab)+|c*)+ OK 0 - \v(a{2})|(b{3}) OK 1 - \v(a{2})|(b{3}) OK 2 - \v(a{2})|(b{3}) OK 0 - \va{2}|b{2} OK 1 - \va{2}|b{2} OK 2 - \va{2}|b{2} OK 0 - \v(a)+|(c)+ OK 1 - \v(a)+|(c)+ OK 2 - \v(a)+|(c)+ OK 0 - \vab{2,3}c OK 1 - \vab{2,3}c OK 2 - \vab{2,3}c OK 0 - \vab{2,3}c OK 1 - \vab{2,3}c[?25h[?0c[?25l[?1c/[?25h[?0c\%$ [?25l[?1cOK 0 - \<\(\(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]\?\)\> OK 1 - \<\(\(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]\?\)\> OK 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]\?\)\> 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 asdfagainasdf -0- 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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__ 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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[?25h[?0c[?25l[?1cTest 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']) :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 :" :"operator \| :call add(tl, [2, 'a\|ab', 'cabd', 'a']) "alternation is ordered :" :call add(tl, [2, 'c\?', 'ccb', 'c']) :call add(tl, [2, 'bc\?', 'abd', 'b']) :call add(tl, [2, 'bc\?', 'abccd', 'bc']) :" :call add(tl, [2, '\va{1}', 'ab', 'a']) :" :call add(tl, [2, '\va{2}', 'aa', 'aa']) :call add(tl, [2, '\va{2}', 'caad', 'aa']) :call add(tl, [2, '\va{2}', 'aba']) :call add(tl, [2, '\va{2}', 'ab']) :call add(tl, [2, '\va{2}', 'abaa', 'aa']) :call add(tl, [2, '\va{2}', 'aaa', 'aa']) :" :call add(tl, [2, '\vb{1}', 'abca', 'b']) :call add(tl, [2, '\vba{2}', 'abaa', 'baa']) :call add(tl, [2, '\vba{3}', 'aabaac']) :" :call add(tl, [2, '\v(ab){1}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'dabc', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1}', 'acb']) :" :call add(tl, [2, '\v(ab){0,2}', 'acb', "", ""]) :call add(tl, [2, '\v(ab){0,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ab', 'ab', 'ab']) :call add(tl, [2, '\v(ab){1,2}', 'ababc', 'abab', 'ab']) :call add(tl, [2, '\v(ab){2,4}', 'ababcab', 'abab', 'ab'])[?25h[?0c[?25l[?1c/[?25h[?0c..\%$ [?25l[?1cOK 0 - \<\(\(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]\?\)\> OK 1 - \<\(\(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]\?\)\> OK 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]\?\)\> 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 asdfagainasdf -0- 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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__ 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx 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[?25h[?0c [?25l[?1c [?25h[?0c[?25l[?1cEN[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1cE[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Check for detecting error [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset regexpengine=2 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfor pat in [' \ze*', ' \zs*'] [?25l[?1c : [?25h[?0c: try [?25l[?1c: [?25h[?0c: let l = matchlist('x x', pat) [?25l[?1c: [?25h[?0c: $put ='E888 NOT detected for ' . pat [?25l[?1c: [?25h[?0c: catch [?25l[?1c: [?25h[?0c: $put ='E888 detected for ' . pat [?25l[?1c: [?25h[?0c: endtry [?25l[?1c: [?25h[?0c:endfor [?25l[?1cOK 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 7xxstart3thexE thE thExethe AndAxAnd AndAxAnd oooxOfOr fOrOxooooooxOfOr fOrOxoooasdfhereasdfasdfagainasdf-0-ffo bob __ooooo koooo__ mo 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx x xxxxxx xx xx xxxxx xxx  xxxxxxxxx xxxxxxxxx xxxxxxxxxx   xxx xx xxxx-1-ffobob __ooooo koooo__ mo 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx x xxxxxx xx xx xxxxx xxx  xxxxxxxxx xxxxxxxxx xxxxxxxxxx   xxx xx xxxx-2-ffobob __ooooo koooo__ mo 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 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 xxxxxxx xxxxxxx xxx xxx xxxxxxxxxxxxxxx xxxx xxx xxxxxx xxxxx xxxxx xx xxxxxx x xxxxxx xx xx xxxxx xxx  xxxxxxxxx xxxxxxxxx xxxxxxxxxx   xxx xx xxxxTestTest ENDENE888 detected for \ze* E888 detected for \zs*[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c""""" Write the results """"""""""""" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c/\%#=1^Results/,$wq! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 1107 lines, 22167 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :$put ='add-subtract' :$put =printf('%g', 4 + 1.234) :$put =printf('%g', 1.234 - 8) :$put ='mult-div' :$put =printf('%g', 4 * 1.234) :$put =printf('%g', 4.0 / 1234) :$put ='dict' :$put =string({'x': 1.234, 'y': -2.0e20}) :$put ='list' :$put =string([-123.4, 2.0e-20]) :$put ='abs' :$put =printf('%d', abs(1456)) :$put =printf('%d', abs(-4)) :$put =printf('%d', abs([1, 2, 3])) :$put =printf('%g', abs(14.56)) :$put =printf('%g', abs(-54.32)) :$put ='ceil' :$put =printf('%g', ceil(1.456)) :$put =printf('%g', ceil(-5.456)) :$put =printf('%g', ceil(-4.000)) :$put ='floor' :$put =printf('%g', floor(1.856)) :$put =printf('%g', floor(-5.456)) :$put =printf('%g', floor(4.0)) :$put ='log10' :$put =printf('%g', log10(1000)) :$put =printf('%g', log10(0.01000)) :$put ='pow' :$put =printf('%g', pow(3, 3.0)) :$put =printf('%g', pow(2, 16)) :$put ='round' :$put =printf('%g', round(0.456)) :$put =printf('%g', round(4.5)) :$put =printf('%g', round(-4.50)) :$put ='sqrt' :$put =printf('%g', sqrt(100))[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 89 lines, 2067 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST:echo sqrt(-4.01) :$put ='str2float' :$put =printf('%g', str2float('1e40')) :$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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cif !has("float") [?25l[?1c : [?25h[?0c: e! test.ok [?25l[?1c: [?25h[?0c: wq! test.out [?25l[?1c: [?25h[?0c:endif [?25l[?1c:$put =printf('%g', 1.234 - 8) :$put ='mult-div' :$put =printf('%g', 4 * 1.234)[?25h[?0c[?25l[?1c :[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put =printf('%f', 123.456) [?25l[?1cResults of test65: 123.456000[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%e', 123.456) [?25l[?1c 1.234560e+02[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', 123.456) [?25l[?1c 123.456[?25h[?0c[?25l[?1c :[?25h[?0c" check we don't crash on division by zero [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cecho 1.0 / 0.0 [?25l[?1cinf[?25h[?0c[?25l[?1c:[?25h[?0c$put ='+=' [?25l[?1c +=[?25h[?0c[?25l[?1c :[?25h[?0clet v = 1.234 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet v += 6.543 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put =printf('%g', v) [?25l[?1c 7.777[?25h[?0c[?25l[?1c :[?25h[?0clet v = 1.234 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet v += 5 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put =printf('%g', v) [?25l[?1c 6.234[?25h[?0c[?25l[?1c :[?25h[?0clet a = 5 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet a += 3.333 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put =string(a) [?25l[?1c 8.333[?25h[?0c[?25l[?1c :[?25h[?0c$put ='==' [?25l[?1c ==[?25h[?0c[?25l[?1c :[?25h[?0clet v = 1.234 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c$put =v == 1.234 [?25l[?1c 1[?25h[?0c[?25l[?1c :[?25h[?0c$put =v == 1.2341 [?25l[?1c 0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='add-subtract' [?25l[?1c add-subtract[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', 4 + 1.234) [?25l[?1c 5.234[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', 1.234 - 8) [?25l[?1c -6.766[?25h[?0c[?25l[?1c :[?25h[?0c$put ='mult-div' [?25l[?1c mult-div[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', 4 * 1.234) [?25l[?1c 4.936[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', 4.0 / 1234) [?25l[?1c 0.003241[?25h[?0c[?25l[?1c :[?25h[?0c$put ='dict' [?25l[?1c dict[?25h[?0c[?25l[?1c :[?25h[?0c$put =string({'x': 1.234, 'y': -2.0e20}) [?25l[?1c {'x': 1.234, 'y': -2.0e20}[?25h[?0c[?25l[?1c :[?25h[?0c$put ='list' [?25l[?1c list[?25h[?0c[?25l[?1c :[?25h[?0c$put =string([-123.4, 2.0e-20]) [?25l[?1c [-123.4, 2.0e-20][?25h[?0c[?25l[?1c :[?25h[?0c$put ='abs' [?25l[?1c abs[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%d', abs(1456)) [?25l[?1c 1456[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%d', abs(-4)) [?25l[?1c 4[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%d', abs([1, 2, 3])) [?25l[?1cE745: Using a List as a Number -1[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', abs(14.56)) [?25l[?1c 14.56[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', abs(-54.32)) [?25l[?1c 54.32[?25h[?0c[?25l[?1c :[?25h[?0c$put ='ceil' [?25l[?1c ceil[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', ceil(1.456)) [?25l[?1c 2.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', ceil(-5.456)) [?25l[?1c -5.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', ceil(-4.000)) [?25l[?1c -4.0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='floor' [?25l[?1c floor[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', floor(1.856)) [?25l[?1c 1.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', floor(-5.456)) [?25l[?1c -6.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', floor(4.0)) [?25l[?1c 4.0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='log10' [?25l[?1c log10[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', log10(1000)) [?25l[?1c 3.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', log10(0.01000)) [?25l[?1c -2.0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='pow' [?25l[?1c pow[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', pow(3, 3.0)) [?25l[?1c 27.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', pow(2, 16)) [?25l[?1c 65536.0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='round' [?25l[?1c round[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', round(0.456)) [?25l[?1c 0.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', round(4.5)) [?25l[?1c 5.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', round(-4.50)) [?25l[?1c -5.0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='sqrt' [?25l[?1c sqrt[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', sqrt(100)) [?25l[?1c 10.0[?25h[?0c[?25l[?1c :[?25h[?0cecho sqrt(-4.01) [?25l[?1cnan[?25h[?0c[?25l[?1c:[?25h[?0c$put ='str2float' [?25l[?1c str2float[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', str2float('1e40')) [?25l[?1c 1.0e40[?25h[?0c[?25l[?1c :[?25h[?0c$put ='trunc' [?25l[?1c trunc[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', trunc(1.456)) [?25l[?1c 1.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', trunc(-5.456)) [?25l[?1c -5.0[?25h[?0c[?25l[?1c :[?25h[?0c$put =printf('%g', trunc(4.000)) [?25l[?1c 4.0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='float2nr' [?25l[?1c float2nr[?25h[?0c[?25l[?1c :[?25h[?0c$put =float2nr(123.456) [?25l[?1c 123[?25h[?0c[?25l[?1c :[?25h[?0c$put =float2nr(-123.456) [?25l[?1c -123[?25h[?0c[?25l[?1c :[?25h[?0c$put ='AND' [?25l[?1c AND[?25h[?0c[?25l[?1c :[?25h[?0c$put =and(127, 127) [?25l[?1c 127[?25h[?0c[?25l[?1c :[?25h[?0c$put =and(127, 16) [?25l[?1c 16[?25h[?0c[?25l[?1c :[?25h[?0c$put =and(127, 128) [?25l[?1c 0[?25h[?0c[?25l[?1c :[?25h[?0c$put ='OR' [?25l[?1c OR[?25h[?0c[?25l[?1c :[?25h[?0c$put =or(16, 7) [?25l[?1c 23[?25h[?0c[?25l[?1c :[?25h[?0c$put =or(8, 7) [?25l[?1c 15[?25h[?0c[?25l[?1c :[?25h[?0c$put =or(0, 123) [?25l[?1c 123[?25h[?0c[?25l[?1c :[?25h[?0c$put ='XOR' [?25l[?1c XOR[?25h[?0c[?25l[?1c :[?25h[?0c$put =xor(127, 127) [?25l[?1c 0[?25h[?0c[?25l[?1c :[?25h[?0c$put =xor(127, 16) [?25l[?1c 111[?25h[?0c[?25l[?1c :[?25h[?0c$put =xor(127, 128) [?25l[?1c 255[?25h[?0c[?25l[?1c :[?25h[?0c$put ='invert' [?25l[?1c invert[?25h[?0c[?25l[?1c :[?25h[?0c$put =and(invert(127), 65535) [?25l[?1c 65408[?25h[?0c[?25l[?1c :[?25h[?0c$put =and(invert(16), 65535) [?25l[?1c 65519[?25h[?0c[?25l[?1c :[?25h[?0c$put =and(invert(128), 65535) [?25l[?1c 65407[?25h[?0c[?25l[?1c :[?25h[?0c$put =invert(1.0) [?25l[?1cE805: Using a Float as a Number 0[?25h[?0c[?25l[?1c :[?25h[?0c/^Results/,$wq! test.out [?25l[?1csearch hit BOTTOM, continuing at TOP "test.out" [New File] 73 lines, 430 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 16 lines, 234 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^one [?25l[?1c[?25h[?0con[?25l[?1c[?25h[?0c[?25l[?1ce one one one on[?25h[?0c[?25l[?1c4 fewer lines~ ~ ~ ~ 4 fewer lines[?25h[?0c[?25l[?1cmore lines; before #1 0 seconds agoone two three one two three one two three one two three one two three[?25h[?0c[?25l[?1ce one one one on[?25h[?0c[?25l[?1c1 on1 on1 on1 on1[?25h[?0c[?25l[?1c:[?25h[?0c'<,'>w! test.out [?25l[?1c"test.out" [New File] 5 lines, 70 characters written[?25h[?0c[?25l[?1c/[?25h[?0c^abcdefgh [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1ca a a a [?25h[?0c[?25l[?1ca a a a abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz[?25h[?0c [?25l[?1cabcdefghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1cc defghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1cc defghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1cc defghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1ci  [?25h[?0c[?25l[?1c5 lines > test.out [?25l[?1c"test.out"6 lines, 151 characters appended[?25h[?0c[?25l[?1c:[?25h[?0c$-4,$s/\s\+//g [?25l[?1c7 substitutions on 4 linesabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1ca a a a[?25h[?0c[?25l[?1c a a a a abcdefghijklmnopqrstuvwxyz abcdefghij abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz[?25h[?0c [?25l[?1cabcdefghij[?25h[?0c ab[?25l[?1cc defghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1cc defghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1cc defghijklmnopqrstuvwxyz[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1ci  [?25h[?0c[?25l[?1c5 lines > test.out [?25l[?1c"test.out"5 lines, 147 characters appended[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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) :$d :w :qa! ENDTEST ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 27 lines, 999 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet results=[] [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0caugroup auexists [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0caugroup END [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "##BufEnter: " . exists("##BufEnter")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#BufEnter: " . exists("#BufEnter")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufEnter * let g:entered=1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#BufEnter: " . exists("#BufEnter")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0caugroup auexists [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufEnter * let g:entered=1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0caugroup END [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufEnter *.test let g:entered=1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cedit testfile.test [?25l[?1c"testfile.test" [New File]~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#BufEnter#: " . exists("#BufEnter#")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cau BufEnter let g:entered=1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#BufEnter#: " . exists("#BufEnter#")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cedit testfile2.test [?25l[?1c"testfile2.test" [New File][?25h[?0c[?25l[?1c:[?25h[?0ccall add(results, "#BufEnter#: " . exists("#BufEnter#")) [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce! test.out [?25l[?1c"test.out" [New File][?25h[?0c[?25l[?1c:[?25h[?0ccall append(0, results) [?25l[?1c##BufEnter: 1 #BufEnter: 0 #BufEnter: 1 #auexists#BufEnter: 0 #auexists#BufEnter: 1 #BufEnter#*.test: 0 #BufEnter#*.test: 1 #BufEnter#: 0 #BufEnter#: 1 #BufEnter#: 0[?25h[?0c[?25l[?1c:[?25h[?0c$d [?25l[?1c~ [?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"test.out" [New File] 10 lines, 190 characters written[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 } STARTTEST /^{/+1 :set tw=3 fo=t gqgqo a ^V^A^[ ENDTEST { a ^A } STARTTEST /^{/+1 :set tw=2 fo=tcq1 comments=:# gqgqjgqgqo a b #a b^[ ENDTEST { a b #a b } STARTTEST /^{/+1 :set tw=5 fo=tcn comments=:# A b^[jA b^[ ENDTEST { 1 a # 1 a } STARTTEST[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 4 lines, 48 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset noai tw=2 fo=t [?25l[?1c[?25h[?0c[?25l[?1ca b[?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 38 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset ai tw=2 fo=tw [?25l[?1c[?25h[?0c[?25l[?1cb[?25h[?0c a [?25l[?1cb[?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 4 lines, 34 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset tw=3 fo=t [?25l[?1c[?25h[?0c[?25l[?1c^A[?25h[?0c [?25l[?1ca ^A [?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 58 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset tw=2 fo=tcq1 comments=:# [?25l[?1c[?25h[?0c [?25l[?1ca b #a b[?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 46 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTESTA b^[jA b^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ 1 a[?25h[?0c[?25l[?1c :[?25h[?0cset tw=5 fo=tcn comments=:# [?25l[?1c[?25h[?0c[?25l[?1c b[?25h[?0c[?25l[?1c # 1 a[?25h[?0c[?25l[?1c # b[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^{/+3 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 35 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set tw=5 fo=t2a si i ^[A_^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+3 [?25l[?1c{ x a b[?25h[?0c[?25l[?1c :[?25h[?0cset tw=5 fo=t2a si [?25l[?1c[?25h[?0c[?25l[?1c b[?25h[?0c[?25l[?1c b_[?25h[?0c[?25l[?1c c[?25h[?0c[?25l[?1c /^STARTTEST } STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 40 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set tw=5 fo=qn comments=:# gwap ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ # 1 a b[?25h[?0c[?25l[?1c :[?25h[?0cset tw=5 fo=qn comments=:# [?25l[?1c[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c # b[?25h[?0c[?25l[?1c /^STARTTEST } STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 40 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set tw=5 fo=q2 comments=:# gwap ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ # x[?25h[?0c[?25l[?1c :[?25h[?0cset tw=5 fo=q2 comments=:# [?25l[?1c[?25h[?0c[?25l[?1c# x a [?25h[?0c[?25l[?1c # b[?25h[?0c[?25l[?1c /^STARTTEST } STARTTEST[?25h[?0c[?25l[?1c /^{/+2 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 26 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set tw& fo=a I^^^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+2 [?25l[?1c{ 1aa 2bb[?25h[?0c[?25l[?1c :[?25h[?0cset tw& fo=a [?25l[?1c[?25h[?0c[?25l[?1c1aa ^^2bb }STARTTEST[?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c[?25l[?1c /mno pqr/[?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 69 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:setl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/ A vwx yz^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0cmno pqr/ [?25l[?1c/* abc def ghi jkl * mno pqr stu[?25h[?0c[?25l[?1c :[?25h[?0csetl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/ [?25l[?1c[?25h[?0c[?25l[?1c * vwx yz[?25h[?0c[?25l[?1c */[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^#/ [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 47 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:setl tw=12 fo=tqnc comments=:# A foobar^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^#/ [?25l[?1c # 1 xxxxx[?25h[?0c[?25l[?1c :[?25h[?0csetl tw=12 fo=tqnc comments=:# [?25l[?1c[?25h[?0c[?25l[?1c # foobar[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c /^STARTTEST  STARTTEST[?25h[?0c[?25l[?1c :g/^STARTTEST/.,/^ENDTEST/d [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 56 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST[?25h[?0c[?25l[?1c :1;/^Results/,$wq! test.out[?25h[?0c [?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cg/^STARTTEST/.,/^ENDTEST/d [?25l[?1c63 fewer lines# foobar~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [?25h[?0c[?25l[?1c:[?25h[?0c1;/^Results/,$wq! test.out [?25l[?1c"test.out" [New File] 77 lines, 281 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 gqgqjgqgqjgqgqjgqgqjgqgqo X Xa X a XY X ï¼¹^[ ENDTEST { X Xa X a XY X ï¼¹ } STARTTEST /^{/+1 :set tw=2 fo=tm gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo X Xa X a XY X ï¼¹ aX abX abcX abX c abXY^[ ENDTEST { X Xa X a[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 2 lines, 34 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso mbyte.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset encoding=utf-8 [?25l[?1cTest 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 gqgqjgqgqjgqgqjgqgqjgqgqo X Xa X a XY X ï¼¹^[ ENDTEST { X Xa X a XY X ï¼¹ } STARTTEST /^{/+1 :set tw=2 fo=tm gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo X Xa X a XY X ï¼¹ aX abX abcX abX c abXY^[ ENDTEST { X Xa X a[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 58 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset tw=2 fo=t [?25l[?1c[?25h[?0c [?25l[?1cXYZ[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1cï¼¹[?25h[?0c[?25l[?1cZ abc [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1cï¼¹[?25h[?0c[?25l[?1cZ[?25h[?0c [?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 8 lines, 80 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset tw=1 fo=tm [?25l[?1c[?25h[?0c [?25l[?1ca[?25h[?0c [?25l[?1ca[?25h[?0c [?25l[?1cï¼¹ [?25h[?0c [?25l[?1cï¼¹ [?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1cX [?25h[?0c[?25l[?1cX a [?25h[?0c[?25l[?1cX a [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1cï¼¹ [?25h[?0c[?25l[?1cX [?25h[?0c[?25l[?1cï¼¹ [?25h[?0c [?25l[?1c /^STARTTEST [?25h[?0c[?25l[?1c /^{/+1[?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 13 lines, 140 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set tw=2 fo=tm gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo X Xa X a XY X ï¼¹ aX abX abcX abX c abXY^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ X[?25h[?0c[?25l[?1c :[?25h[?0cset tw=2 fo=tm [?25l[?1c[?25h[?0c[?25l[?1c Xa[?25h[?0c[?25l[?1c a[?25h[?0c[?25l[?1c X a [?25h[?0c[?25l[?1c a[?25h[?0c[?25l[?1c XY [?25h[?0c[?25l[?1c ï¼¹ [?25h[?0c[?25l[?1c X ï¼¹ [?25h[?0c[?25l[?1c ï¼¹ [?25h[?0c[?25l[?1c aX [?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1c abX [?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1c abcX [?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1c abX c [?25h[?0c[?25l[?1cX c[?25h[?0c[?25l[?1c abXY [?25h[?0c[?25l[?1cX ï¼¹ [?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1cX a [?25h[?0c[?25l[?1cX a [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1cï¼¹ [?25h[?0c[?25l[?1cX [?25h[?0c[?25l[?1cï¼¹ a[?25h[?0c[?25l[?1cX ab[?25h[?0c[?25l[?1cX abc[?25h[?0c[?25l[?1cX ab[?25h[?0c[?25l[?1cX c ab[?25h[?0c[?25l[?1c X[?25h[?0c[?25l[?1c ï¼¹ [?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 47 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set ai tw=2 fo=tm gqgqjgqgqo X Xa^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ X[?25h[?0c[?25l[?1c :[?25h[?0cset ai tw=2 fo=tm [?25l[?1c[?25h[?0c [?25l[?1c Xa[?25h[?0c[?25l[?1c a[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1c X a[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 5 lines, 53 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set noai tw=2 fo=tm gqgqjgqgqo X Xa^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ X[?25h[?0c[?25l[?1c :[?25h[?0cset noai tw=2 fo=tm [?25l[?1c[?25h[?0c [?25l[?1c Xa[?25h[?0c[?25l[?1c a[?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1c X a[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 13 lines, 169 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set tw=2 fo=cqm comments=n:X gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo X Xa Xaï¼¹ XY XYZ X ï¼¹ X YZ XX XXa XXY^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ X[?25h[?0c[?25l[?1c :[?25h[?0cset tw=2 fo=cqm comments=n:X [?25l[?1c[?25h[?0c[?25l[?1c Xa[?25h[?0c[?25l[?1c Xaï¼¹ [?25h[?0c[?25l[?1c XY [?25h[?0c[?25l[?1c XY [?25h[?0c[?25l[?1c XYZ [?25h[?0c[?25l[?1c XZ [?25h[?0c[?25l[?1c X ï¼¹ [?25h[?0c[?25l[?1c X YZ [?25h[?0c[?25l[?1c X Z [?25h[?0c[?25l[?1c XX [?25h[?0c[?25l[?1c XXa [?25h[?0c[?25l[?1c XXY [?25h[?0c[?25l[?1c[?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1c Xa [?25h[?0c[?25l[?1cXa[?25h[?0c[?25l[?1cXY [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1c ï¼¹ [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1cï¼¹[?25h[?0c[?25l[?1cXZ [?25h[?0c[?25l[?1cX [?25h[?0c[?25l[?1c ï¼¹ [?25h[?0c[?25l[?1cX [?25h[?0c[?25l[?1cï¼¹[?25h[?0c[?25l[?1cX Z [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1c X [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1c Xa [?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1cX[?25h[?0c[?25l[?1cï¼¹[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 30 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set tw=2 fo=tm RXa^[ ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{[?25h[?0c[?25l[?1c :[?25h[?0cset tw=2 fo=tm [?25l[?1c[?25h[?0c[?25l[?1c X a[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^{/+1 [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 3 lines, 34 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:set mps+=^Vu2018:^Vu2019 d% ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^{/+1 [?25l[?1c{ ‘two three ’four[?25h[?0c[?25l[?1c :[?25h[?0cset mps+=^‘:^’ [?25l[?1c[?25h[?0c[?25l[?1c four[?25h[?0c[?25l[?1c }[?25h[?0c[?25l[?1c /^STARTTEST  STARTTEST[?25h[?0c[?25l[?1c /^ra test [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 16 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTESTjVjra ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^ra test [?25l[?1c ra test[?25h[?0c[?25l[?1c ï½bbï½ [?25h[?0c[?25l[?1cbbï½ [?25h[?0c[?25l[?1c ï½ ï½ï½b [?25h[?0c[?25l[?1caaaaaaa [?25h[?0c [?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c :set whichwrap+=h [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 4 lines, 43 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST/^x dh :set whichwrap-=h ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cset whichwrap+=h [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^x [?25l[?1cáx[?25h[?0c[?25l[?1cx[?25h[?0c [?25l[?1c :[?25h[?0cset whichwrap-=h [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST  STARTTEST[?25h[?0c[?25l[?1c :let a = '.é.' " one char of two bytes [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 9 lines, 548 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /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[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0clet a = '.é.' " one char of two bytes [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet b = '.eeÌ.' " normal e with composing char [?25l[?1c[?25h[?0c[?25l[?1c/[?25h[?0c^byteidx [?25l[?1c byteidx[?25h[?0c[?25l[?1c :[?25h[?0cput =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)]) [?25l[?1c [0, 1, 3, 4, -1][?25h[?0c[?25l[?1c :[?25h[?0cput =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)]) [?25l[?1c [0, 1, 4, 5, -1][?25h[?0c[?25l[?1c /[?25h[?0c^byteidxcomp [?25l[?1c byteidxcomp[?25h[?0c[?25l[?1c :[?25h[?0cput =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)]) [?25l[?1c [0, 1, 3, 4, -1][?25h[?0c[?25l[?1c :[?25h[?0clet b = '.eeÌ.' [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cput =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)]) [?25l[?1c [0, 1, 2, 4, 5, -1][?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c /^substitute [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 75 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST:let y = substitute('123', '\zs', 'a', 'g') | put =y ENDTEST[?25h[?0c[?25l[?1c [?25h[?0c[?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c/[?25h[?0c^substitute [?25l[?1c substitute[?25h[?0c[?25l[?1c :[?25h[?0clet y = substitute('123', '\zs', 'a', 'g') | put =y [?25l[?1c a1aï¼’a3a[?25h[?0c[?25l[?1c /^STARTTEST STARTTEST[?25h[?0c[?25l[?1c :g/^STARTTEST/.,/^ENDTEST/d [?25h[?0c[?25l[?1c :set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" 2 lines, 56 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c /ENDTEST[?25h[?0c[?25l[?1c :1;/^Results/,$wq! test.out[?25h[?0c [?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cg/^STARTTEST/.,/^ENDTEST/d [?25l[?1c104 fewer linesa}{ X Xa XaXYXYXY XZX ï¼¹ X ï¼¹ X Z XX XXaXXYXXa XaXY XY XY XZX ï¼¹X ï¼¹ X Z XXXXaXXY }{Xa}{ 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[?25h[?0c[?25l[?1c:[?25h[?0c1;/^Results/,$wq! test.out [?25l[?1c"test.out" [New File] 166 lines, 730 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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') :if tmp_string . tmp_1000 == "string1000" :let scalar_res = "OK" :else :let scalar_res = "FAILED" :endif :call append(search("^1"), "scalar test " . scalar_res) :" dictionary containing a list :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 ~ [?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1398 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST[?25h[?0c [?25l[?1c:so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso mzscheme.vim [?25l[?1c"test.ok" 6 lines, 94 characters "test.out" [New File] 6 lines, 94 characters written [?25h[?0c # 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 [?25h[?8c[?25h[?0c[?25l[?1c"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 :close :new :set path=.,, :find :exec "w >>" . test_out :close :new :set path=./** :find :exec "w >>" . test_out :close :new :" We shouldn't find any file at this point, test.out must be empty. :call mkdir('in') :cd in :call mkdir('path') :exec "cd " . cwd :e Xfind/file.txt SHoly Grail^[:w :e Xfind/in/file.txt SJimmy Hoffa^[:w :e Xfind/in/stuff.txt SAnother Holy Grail^[:w :e Xfind/in/path/file.txt SE.T.^[:w :set path=Xfind/** :find file :exec "w >>" . test_out :find file :exec "w >>" . test_out :find file :exec "w >>" . test_out :" Rerun the previous three find completions, using fullpath in 'path' :exec "set path=" . cwd . "/Xfind/**" :find file :exec "w >>" . test_out[?25h[?0c[?25l[?1c:[?25h[?0cset cp [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cmap dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest [?25l[?1c[?25h[?0c[?25l[?1c/^STARTTEST [?25h[?0c [?25l[?1c:set ff=unix cpo-=A [?25h[?0c[?25l[?1c:.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 165 lines, 3617 characters written[?25h[?0c[?25l[?1c:set ff& cpo+=A [?25h[?0c[?25l[?1c/ENDTEST:cd y :call mkdir('bar') :cd .. :cd .. :" We should now be in the Xfind directory :e foo/x/bar/voyager.txt SVoyager 1^[:w :e foo/y/bar/voyager.txt SVoyager 2^[:w :exec "set path=" . cwd . "/Xfind/**" :find voyager :exec "w >>" . test_out :find voyager :exec "w >>" . test_out :" :" When current directory is .../foo/y/bar they should be shortened to (in :" order of appearance): :" :" ./voyager.txt :" x/bar/voyager.txt :cd foo :cd y :cd bar :find voyager :exec "w >> " . test_out :find voyager :exec "w >> " . test_out :" Check the opposite too: :cd .. :cd .. :cd x :cd bar :find voyager :exec "w >> " . test_out :find voyager :exec "w >> " . test_out :" 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 [?25h[?0c [?25l[?1c :so! Xdotest [?25h[?0c[?25l[?1c:[?25h[?0cso small.vim [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset belloff=all [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Do all test in a separate window to avoid E211 when we recursively [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" delete the Xfind directory during cleanup [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" This will cause a few errors, do it silently. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset visualbell [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset nocp viminfo+=nviminfo [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" On windows a stale "Xfind" directory may exist, remove it so that [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" we start from a clean state. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall delete("Xfind", "rf") [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] exec "w >> " . test_out :find voyager :exec "w >> " . test_out :" 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.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 [?25h[?0c[?25l[?1c:[?25h[?0clet cwd=getcwd() [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0clet test_out = cwd . '/test.out' [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('Xfind') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd Xfind [?25l[?1c/sources/vim80/src/testdir/Xfind/sources/vim80/src/testdir/test73.in[?25h[?0c[?25l[?1c:[?25h[?0cset path= [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind ...[?25l[?1c[?25h[?0c [?25l[?1cE345: Can't find file "" in path[?25h[?0c[?25l[?1c:[?25h[?0cexec "w! " . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" [New] 0L, 0C written/sources/vim80/src/testdir/test.out[?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1c:cd y :call mkdir('bar'):cd ..:cd ..:" We should now be in the Xfind directory:e foo/x/bar/voyager.txtSVoyager 1^[:w:e foo/y/bar/voyager.txtSVoyager 2^[:w:exec "set path=" . cwd . "/Xfind/**":find voyager :exec "w >>" . test_out:find voyager :exec "w >>" . test_out:":" When current directory is .../foo/y/bar they should be shortened to (in:" order of appearance)::":" ./voyager.txt:" x/bar/voyager.txt:cd foo:cd y:cd bar:find voyager :exec "w >> " . test_out:find voyager :exec "w >> " . test_out:" Check the opposite too::cd ..:cd ..:cd x:cd barfind voyager exec "w >> " . test_out :find voyager :exec "w >> " . test_out" 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_outTest 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[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] exec "w >> " . test_out :find voyager :exec "w >> " . test_out :" 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.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 [?25h[?0c[?25l[?1c:[?25h[?0cset path=. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind ...[?25l[?1c[?25h[?0c [?25l[?1cE32: No file name[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 0L, 0C appended[?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1c:cd y :call mkdir('bar'):cd ..:cd ..:" We should now be in the Xfind directory:e foo/x/bar/voyager.txtSVoyager 1^[:w:e foo/y/bar/voyager.txtSVoyager 2^[:w:exec "set path=" . cwd . "/Xfind/**":find voyager :exec "w >>" . test_out:find voyager :exec "w >>" . test_out:":" When current directory is .../foo/y/bar they should be shortened to (in:" order of appearance)::":" ./voyager.txt:" x/bar/voyager.txt:cd foo:cd y:cd bar:find voyager :exec "w >> " . test_out:find voyager :exec "w >> " . test_out:" Check the opposite too::cd ..:cd ..:cd x:cd barfind voyager exec "w >> " . test_out :find voyager :exec "w >> " . test_out" 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_outTest 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[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] exec "w >> " . test_out :find voyager :exec "w >> " . test_out :" 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.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 [?25h[?0c[?25l[?1c:[?25h[?0cset path=.,, [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind ...[?25l[?1c[?25h[?0c [?25l[?1cE32: No file name[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 0L, 0C appended[?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1c:cd y :call mkdir('bar'):cd ..:cd ..:" We should now be in the Xfind directory:e foo/x/bar/voyager.txtSVoyager 1^[:w:e foo/y/bar/voyager.txtSVoyager 2^[:w:exec "set path=" . cwd . "/Xfind/**":find voyager :exec "w >>" . test_out:find voyager :exec "w >>" . test_out:":" When current directory is .../foo/y/bar they should be shortened to (in:" order of appearance)::":" ./voyager.txt:" x/bar/voyager.txt:cd foo:cd y:cd bar:find voyager :exec "w >> " . test_out:find voyager :exec "w >> " . test_out:" Check the opposite too::cd ..:cd ..:cd x:cd barfind voyager exec "w >> " . test_out :find voyager :exec "w >> " . test_out" 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_outTest 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[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] exec "w >> " . test_out :find voyager :exec "w >> " . test_out :" 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.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 [?25h[?0c[?25l[?1c:[?25h[?0cset path=./** [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind ...[?25l[?1c[?25h[?0c [?25l[?1cE32: No file name[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 0L, 0C appended[?25h[?0c[?25l[?1c:[?25h[?0cclose [?25l[?1c:cd y :call mkdir('bar'):cd ..:cd ..:" We should now be in the Xfind directory:e foo/x/bar/voyager.txtSVoyager 1^[:w:e foo/y/bar/voyager.txtSVoyager 2^[:w:exec "set path=" . cwd . "/Xfind/**":find voyager :exec "w >>" . test_out:find voyager :exec "w >>" . test_out:":" When current directory is .../foo/y/bar they should be shortened to (in:" order of appearance)::":" ./voyager.txt:" x/bar/voyager.txt:cd foo:cd y:cd bar:find voyager :exec "w >> " . test_out:find voyager :exec "w >> " . test_out:" Check the opposite too::cd ..:cd ..:cd x:cd barfind voyager exec "w >> " . test_out :find voyager :exec "w >> " . test_out" 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_outTest 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[?25h[?0c[?25l[?1c:[?25h[?0cnew [?25l[?1c~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ [No Name] exec "w >> " . test_out :find voyager :exec "w >> " . test_out :" 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.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 [?25h[?0c[?25l[?1c:[?25h[?0c" We shouldn't find any file at this point, test.out must be empty. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('in') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd in [?25l[?1c/sources/vim80/src/testdir/Xfind/in[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('path') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexec "cd " . cwd [?25l[?1c/sources/vim80/src/testdirtest73.in [?25h[?0c[?25l[?1c:[?25h[?0ce Xfind/file.txt [?25l[?1c"Xfind/file.txt" [New File]Xfind/file.txt[?25h[?0c[?25l[?1c-- INSERT --Holy Grail[+][?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"Xfind/file.txt" [New] 1L, 11C written [?25h[?0c[?25l[?1c:[?25h[?0ce Xfind/in/file.txt [?25l[?1c"Xfind/in/file.txt" [New File]in/file.txt[?25h[?0c[?25l[?1c-- INSERT --Jimmy Hoffa[+][?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"Xfind/in/file.txt" [New] 1L, 12C written [?25h[?0c[?25l[?1c:[?25h[?0ce Xfind/in/stuff.txt [?25l[?1c"Xfind/in/stuff.txt" [New File]stuff.txt[?25h[?0c[?25l[?1c-- INSERT --Another Holy Grail[+][?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"Xfind/in/stuff.txt" [New] 1L, 19C written [?25h[?0c[?25l[?1c:[?25h[?0ce Xfind/in/path/file.txt [?25l[?1c"Xfind/in/path/file.txt" [New File]path/file.txt[?25h[?0c[?25l[?1c-- INSERT --E.T.[+][?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"Xfind/in/path/file.txt" [New] 1L, 5C written [?25h[?0c[?25l[?1c:[?25h[?0cset path=Xfind/** [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c [?25l[?1c"Xfind/file.txt" 1L, 11CHoly Grailfile.txt [?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c...[?25l[?1cin/file.txt[?25h[?0c [?25l[?1c"Xfind/in/file.txt" 1L, 12CJimmy Hoffain/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c...[?25l[?1cin/file.txt[?25h[?0c...[?25l[?1cpath/file.txt[?25h[?0c [?25l[?1c"Xfind/in/path/file.txt" 1L, 5CE.T.path/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Rerun the previous three find completions, using fullpath in 'path' [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexec "set path=" . cwd . "/Xfind/**" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c [?25l[?1c"Xfind/file.txt" 1L, 11CHoly Grailfile.txt [?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c...[?25l[?1cin/file.txt[?25h[?0c [?25l[?1c"Xfind/in/file.txt" 1L, 12CJimmy Hoffain/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c...[?25l[?1cin/file.txt[?25h[?0c...[?25l[?1cpath/file.txt[?25h[?0c [?25l[?1c"Xfind/in/path/file.txt" 1L, 5CE.T.path/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Same steps again, using relative and fullpath items that point to the same [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" recursive location. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" This is to test that there are no duplicates in the completion list. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexec "set path+=Xfind/**" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c [?25l[?1c"Xfind/file.txt" 1L, 11CHoly Grailfile.txt [?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c...[?25l[?1cin/file.txt[?25h[?0c [?25l[?1c"Xfind/in/file.txt" 1L, 12CJimmy Hoffain/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c...[?25l[?1cin/file.txt[?25h[?0c...[?25l[?1cpath/file.txt[?25h[?0c [?25l[?1c"Xfind/in/path/file.txt" 1L, 5CE.T.path/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./Xfind/file.txt[?25h[?0c...[?25l[?1cin/file.txt[?25h[?0c [?25l[?1c"Xfind/in/file.txt" 1L, 12CJimmy Hoffafile.txt [?25h[?0c[?25l[?1c:[?25h[?0c" Test find completion for directory of current buffer, which at this point [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" is Xfind/in/file.txt. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset path=. [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind st...[?25l[?1cuff.txt[?25h[?0c [?25l[?1c"Xfind/in/stuff.txt" 1L, 19CAnother Holy Grailstuff.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 19C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test find completion for empty path item ",," which is the current directory [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd Xfind [?25l[?1c/sources/vim80/src/testdir/Xfindin/stuff.txt /sources/vim80/src/testdir/test73.in[?25h[?0c[?25l[?1c:[?25h[?0cset path=,, [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind f...[?25l[?1cile.txt[?25h[?0c...[?25l[?1c[?25h[?0c [?25l[?1c"file.txt" 1L, 11CHoly Grailfile.txt [?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 11C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test shortening of [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" foo/x/bar/voyager.txt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" foo/y/bar/voyager.txt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" When current directory is above foo/ they should be shortened to (in order [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" of appearance): [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" x/bar/voyager.txt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" y/bar/voyager.txt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('foo') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd foo [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/sources/vim80/src/testdir/Xfind/file.txt[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('x') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('y') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd x [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/x[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('bar') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd .. [?25l[?1c/sources/vim80/src/testdir/Xfind/foo[?25h[?0c[?25l[?1c:[?25h[?0ccd y [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/y[?25h[?0c[?25l[?1c:[?25h[?0ccall mkdir('bar') [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd .. [?25l[?1c/sources/vim80/src/testdir/Xfind/foo[?25h[?0c[?25l[?1c:[?25h[?0ccd .. [?25l[?1c/sources/vim80/src/testdir/Xfindfile.txt [?25h[?0c[?25l[?1c:[?25h[?0c" We should now be in the Xfind directory [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce foo/x/bar/voyager.txt [?25l[?1c"foo/x/bar/voyager.txt" [New File]oo/x/bar/voyager.txt[?25h[?0c[?25l[?1c-- INSERT --Voyager 1[+][?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"foo/x/bar/voyager.txt" [New] 1L, 10C written [?25h[?0c[?25l[?1c:[?25h[?0ce foo/y/bar/voyager.txt [?25l[?1c"foo/y/bar/voyager.txt" [New File]y[?25h[?0c[?25l[?1c-- INSERT --Voyager 2[+][?25h[?0c[?25l[?1c:[?25h[?0cw [?25l[?1c"foo/y/bar/voyager.txt" [New] 1L, 10C written [?25h[?0c[?25l[?1c:[?25h[?0cexec "set path=" . cwd . "/Xfind/**" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind voyager...[?25l[?1cx/bar/voyager.txt[?25h[?0c [?25l[?1c"foo/x/bar/voyager.txt" 1L, 10C1x[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind voyager...[?25l[?1cx/bar/voyager.txt[?25h[?0c...[?25l[?1cy[?25h[?0c [?25l[?1c"foo/y/bar/voyager.txt" 1L, 10C2y[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" When current directory is .../foo/y/bar they should be shortened to (in [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" order of appearance): [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" ./voyager.txt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" x/bar/voyager.txt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd foo [?25l[?1c/sources/vim80/src/testdir/Xfind/fooy/bar/voyager.txt [?25h[?0c[?25l[?1c:[?25h[?0ccd y [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/ybar/voyager.txt [?25h[?0c[?25l[?1c:[?25h[?0ccd bar [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/y/barvoyager.txt [?25h[?0c[?25l[?1c:[?25h[?0cfind voyager...[?25l[?1c./voyager.txt[?25h[?0c [?25l[?1c"voyager.txt" 1L, 10C[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >> " . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind voyager...[?25l[?1c./voyager.txt[?25h[?0c...[?25l[?1cx/bar/voyager.txt[?25h[?0c [?25l[?1c"/sources/vim80/src/testdir/Xfind/foo/x/bar/voyager.txt" 1L, 10C1/sources/vim80/src/testdir/Xfind/foo/x/bar/voyager.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >> " . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Check the opposite too: [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ccd .. [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/y[?25h[?0c[?25l[?1c:[?25h[?0ccd .. [?25l[?1c/sources/vim80/src/testdir/Xfind/foox/bar/voyager.txt [?25h[?0c[?25l[?1c:[?25h[?0ccd x [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/xbar/voyager.txt [?25h[?0c[?25l[?1c:[?25h[?0ccd bar [?25l[?1c/sources/vim80/src/testdir/Xfind/foo/x/barvoyager.txt [?25h[?0c[?25l[?1c:[?25h[?0cfind voyager...[?25l[?1c./voyager.txt[?25h[?0c [?25l[?1c"voyager.txt" 1L, 10C[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >> " . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?25h[?0c[?25l[?1c:[?25h[?0cfind voyager...[?25l[?1c./voyager.txt[?25h[?0c...[?25l[?1cy/bar/voyager.txt[?25h[?0c [?25l[?1c"/sources/vim80/src/testdir/Xfind/foo/y/bar/voyager.txt" 1L, 10C2/sources/vim80/src/testdir/Xfind/foo/y/bar/voyager.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >> " . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 10C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Check for correct handling of shorten_fname()'s behavior on windows [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexec "cd " . cwd . "/Xfind/in" [?25l[?1c/sources/vim80/src/testdir/Xfind/in[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1c./file.txt[?25h[?0c [?25l[?1c"file.txt" 1L, 12CJimmy Hoffafile.txt [?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Test for relative to current buffer 'path' item [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cexec "cd " . cwd . "/Xfind/" [?25l[?1c/sources/vim80/src/testdir/Xfindin/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cset path=./path [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Open the file where Jimmy Hoffa is found [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce in/file.txt [?25l[?1c"in/file.txt" 1L, 12C[?25h[?0c[?25l[?1c:[?25h[?0c" Find the file containing 'E.T.' in the Xfind/in/path directory [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind file...[?25l[?1ctxt[?25h[?0c [?25l[?1c"in/path/file.txt" 1L, 5CE.T.path/file.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 5C appended[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Test that completion works when path=.,, [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cset path=.,, [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0c" Open Jimmy Hoffa file [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0ce in/file.txt [?25l[?1c"in/file.txt" 1L, 12CJimmy Hoffafile.txt [?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 12C appended[?25h[?0c[?25l[?1c:[?25h[?0c" Search for the file containing Holy Grail in same directory as in/path.txt [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cfind stu...[?25l[?1cff.txt[?25h[?0c [?25l[?1c"in/stuff.txt" 1L, 19CAnother Holy Grailstuff.txt[?25h[?0c[?25l[?1c:[?25h[?0cexec "w >>" . test_out [?25l[?1c"/sources/vim80/src/testdir/test.out" 1L, 19C appended[?25h[?0c[?25l[?1c:[?25h[?0cq [?25l[?1c:cd y:call mkdir('bar'):cd ..:cd ..:" We should now be in the Xfind directory:e foo/x/bar/voyager.txtSVoyager 1^[:w:e foo/y/bar/voyager.txtSVoyager 2^[:w:exec "set path=" . cwd . "/Xfind/**":find voyager :exec "w >>" . test_out:find voyager :exec "w >>" . test_out:":" When current directory is .../foo/y/bar they should be shortened to (in:" order of appearance)::":" ./voyager.txt:" x/bar/voyager.txt:cd foo:cd y:cd bar:find voyager :exec "w >> " . test_out:find voyager :exec "w >> " . test_out:" Check the opposite too::cd ..:cd ..:cd x:cd barfind voyager exec "w >> " . test_out :find voyager :exec "w >> " . test_out" 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_outTest 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[?25h[?0c[?25l[?1c:[?25h[?0cexec "cd " . cwd [?25l[?1c/sources/vim80/src/testdir[?25h[?0c[?25l[?1c:[?25h[?0ccall delete("Xfind", "rf") [?25l[?1c[?25h[?0c[?25l[?1c:[?25h[?0cqa! [?25l[?1c[?25h[?0c# 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 [?25h[?8c[?25h[?0c[?25l[?1c"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