Mon Sep  7 18:04:24 CDT 2015
make[1]: Entering directory '/sources/vim74'
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/vim74/src'
make -f Makefile vim
make[3]: Entering directory '/sources/vim74/src'
make[3]: 'vim' is up to date.
make[3]: Leaving directory '/sources/vim74/src'
if test -n "yes" -a -f po/Makefile; then \
	cd po; make -f Makefile check VIM=../vim; \
fi
make[3]: Entering directory '/sources/vim74/src/po'
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq af.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"af.po" "af.po" 5393 lines, 133397 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch af.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ca.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ca.po" "ca.po" 6201 lines, 161831 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ca.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq cs.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"cs.po" "cs.po" 4664 lines, 111014 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch cs.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq de.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"de.po" "de.po" 6117 lines, 156573 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch de.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq en_GB.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"en_GB.po" "en_GB.po" 290 lines, 8951 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch en_GB.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq eo.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"eo.po" "eo.po" 6825 lines, 173499 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch eo.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq es.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"es.po" "es.po" 8279 lines, 203810 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch es.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq fi.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"fi.po" "fi.po" 6526 lines, 161907 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch fi.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq fr.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"fr.po" "fr.po" 7091 lines, 192058 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch fr.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ga.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ga.po" "ga.po" 6503 lines, 164355 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ga.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq it.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"it.po" "it.po" 6803 lines, 174859 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch it.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ja.po" "ja.po" 6808 lines, 195582 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ja.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ko.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ko.po" "ko.po" 6447 lines, 155537 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ko.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ko.UTF-8.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ko.UTF-8.po" "ko.UTF-8.po" 6447 lines, 171434 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ko.UTF-8.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq nb.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"nb.po" "nb.po" 6166 lines, 150559 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch nb.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq nl.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"nl.po" "nl.po" 5852 lines, 135179 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch nl.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq no.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"no.po" "no.po" 6166 lines, 150559 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch no.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"pl.po" "pl.po" 6904 lines, 175255 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch pl.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pt_BR.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"pt_BR.po" "pt_BR.po" 6236 lines, 160823 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch pt_BR.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ru.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ru.po" "ru.po" 6883 lines, 225596 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ru.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sk.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"sk.po" "sk.po" 5821 lines, 147389 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch sk.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sv.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"sv.po" "sv.po" 6148 lines, 149143 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch sv.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq uk.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"uk.po" "uk.po" 6845 lines, 208009 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch uk.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq vi.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"vi.po" "vi.po" 5196 lines, 143932 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch vi.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.UTF-8.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"zh_CN.UTF-8.po" "zh_CN.UTF-8.po" 6139 lines, 147455 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch zh_CN.UTF-8.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"zh_CN.po" "zh_CN.po" 6140 lines, 136477 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch zh_CN.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_TW.UTF-8.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"zh_TW.UTF-8.po" "zh_TW.UTF-8.po" 5282 lines, 127286 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch zh_TW.UTF-8.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_TW.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"zh_TW.po" "zh_TW.po" 5275 lines, 117353 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch zh_TW.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq cs.cp1250.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"cs.cp1250.po" "cs.cp1250.po" 4664 lines, 111022 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch cs.cp1250.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.sjis.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ja.sjis.po" "ja.sjis.po" 6808 lines, 172635 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ja.sjis.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ja.euc-jp.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ja.euc-jp.po" "ja.euc-jp.po" 6808 lines, 172526 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ja.euc-jp.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.cp1250.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"pl.cp1250.po" "pl.cp1250.po" 6904 lines, 175251 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch pl.cp1250.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.UTF-8.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"pl.UTF-8.po" "pl.UTF-8.po" 6904 lines, 178041 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch pl.UTF-8.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq ru.cp1251.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"ru.cp1251.po" "ru.cp1251.po" 6883 lines, 177871 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch ru.cp1251.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq sk.cp1250.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"sk.cp1250.po" "sk.cp1250.po" 5821 lines, 147385 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch sk.cp1250.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq uk.cp1251.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"uk.cp1251.po" "uk.cp1251.po" 6845 lines, 168332 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch uk.cp1251.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq zh_CN.cp936.po
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[?25l[60;1H"zh_CN.cp936.po" "zh_CN.cp936.po" 6140 lines, 136489 characters
search hit BOTTOM, continuing at TOPOK[60;3H[K[60;1H
[?1l>[?12l[?25h[?1049ltouch zh_CN.cp936.ck
make[3]: Leaving directory '/sources/vim74/src/po'
if test vim != vim -a ! -r vim; then \
	ln -s vim vim; \
fi
cd testdir; make -f Makefile  VIMPROG=../vim 
make[3]: Entering directory '/sources/vim74/src/testdir'
rm -f test.log
rm -rf test1.failed test.out X* viminfo tiny.vim small.vim mbyte.vim mzscheme.vim lua.vim test.ok
../vim -u unix.vim -U NONE --noplugin -s dotest.in test1.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test1.in" 53 lines, 1864 characters[2;1HFirst 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
:" Write a single line to test.out to check if testing works at all.
:%d
athis is a test[34m^[[m: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!
[34m^[[m: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

[1m[34m~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[20;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[21;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 31 lines, 928 characters written[21;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[21;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[52;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Write a single line to test.out to check if testing works at all.[?25l[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%d[?25l[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25lthis is a test[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 15 characters written[1;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test.[?25l[1;14H[?12l[?25h[?25l[1;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! small.vim[?25l"small.vim" [60;13H[K[60;13H[New File] 1 line, 1 character written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! tiny.vim[?25l"tiny.vim" [60;12H[K[60;12H[New File] 1 line, 1 character written[1;1H[?12l[?25h[?25le! test.ok
w! test.out[2;12H[K[3;1Hqa![3;4H[K[4;1H[K[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! mbyte.vim[?25l"mbyte.vim" [60;13H[K[60;13H[New File] 4 lines, 28 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! mzscheme.vim[?25l"mzscheme.vim" [60;16H[K[60;16H[New File] 4 lines, 28 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! lua.vim[?25l"lua.vim" [60;11H[K[60;11H[New File] 4 lines, 28 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" If +multi_byte feature supported, make mbyte.vim empty.[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("multi_byte") | sp another | w! mbyte.vim | q | endif[?25l"another" [New File][60;21H[K[60;1H
"mbyte.vim" 0 lines, 0 characters written[1;1H[L[1;1He! test.ok[60;1H[K[4;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" If +mzscheme feature supported, make mzscheme.vim empty.[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("mzscheme") | sp another | w! mzscheme.vim | q | endif[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" If +lua feature supported, make lua.vim empty.[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("lua") | sp another | w! lua.vim | q | endif[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Otherwise write small.vim to skip the test.[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif 1 | q! | endif[?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049lrm -rf X* viminfo
rm -rf test2.failed test.ok test.out X* viminfo
cp test2.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test2.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test2.in" 29 lines, 717 characters[2;1HThis is a test if a URL is recognized by "gf", with the cursor before and
after the "://".  Also test ":\\".

STARTTEST
:so small.vim
/^first
/tmp
:call append(0, expand("<cfile>"))
/^second
/URL
:call append(1, expand("<cfile>"))
:if has("ebcdic")
: set isf=@,240-249,/,.,-,_,+,,,$,:,~,\
:else
: set isf=@,48-57,/,.,-,_,+,,,$,:,~,\
:endif
/^third
/name
:call append(2, expand("<cfile>"))
/^fourth
/URL
:call append(3, expand("<cfile>"))
5GdG:wq! test.out
ENDTEST
first test for URL://machine.name/tmp/vimtest2a and other text
second test for URL://machine.name/tmp/vimtest2b. And other text
third test for URL:\\machine.name\vimtest2c and other text
fourth test for URL:\\machine.name\tmp\vimtest2d, and other text
[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 19 lines, 336 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[25;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[26;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[26;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^first[?25l[31msearch hit BOTTOM, continuing at TOP[26;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25htmp[?25l[26;35H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(0, expand("<cfile>"))[?25l[1;59r[1;1H[L[1;60r[1;1HURL://machine.name/tmp/vimtest2a[60;1H[K[27;35H[?12l[?25h[?25l[60;1H/[?12l[?25h^second[?25l[28;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hURL[?25l[28;17H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(1, expand("<cfile>"))[?25l[2;59r[2;1H[L[1;60r[2;1HURL://machine.name/tmp/vimtest2b[60;1H[K[29;17H[?12l[?25h[?25l[60;1H:[?12l[?25hif has("ebcdic")[?25l
:  [?12l[?25h: set isf=@,240-249,/,.,-,_,+,,,$,:,~,\
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: set isf=@,48-57,/,.,-,_,+,,,$,:,~,\
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HURL://machine.name/tmp/vimtest2a
URL://machine.name/tmp/vimtest2b

This is a test if a URL is recognized by "gf", with the cursor before and[60;1H[K[29;17H[?12l[?25h[?25l[60;1H/[?12l[?25h^third[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hname[?25l[30;30H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(2, expand("<cfile>"))[?25l[3;59r[3;1H[L[1;60r[3;1HURL:\\machine.name\vimtest2c[60;1H[K[31;30H[?12l[?25h[?25l[60;1H/[?12l[?25h^fourth[?25l[32;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hURL[?25l[32;17H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(3, expand("<cfile>"))[?25l[4;59r[4;1H[L[1;60r[4;1HURL:\\machine.name\tmp\vimtest2d[60;1H[K[33;17H[?12l[?25h[5;1H[?25l[60;1H29 fewer lines[5;1H[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [4;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 4 lines, 128 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test3.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test3.in" 2056 lines, 21564 characters[1;1H/* vim: set cin ts=4 sw=4 : */

Test for 'cindent'

STARTTEST
:so small.vim
:set nocompatible viminfo+=nviminfo modeline
:edit[16C" read modeline
/start of AUTO
=/end of AUTO
ENDTEST

/* start of AUTO matically checked vim: set ts=4 : */
{[15;9Hif (test)[16;17Hcmd1;[17;9Hcmd2;
}

{[21;9Hif (test)[22;17Hcmd1;[23;9Helse[24;17Hcmd2;
}

{[28;9Hif (test)[29;9H{[30;17Hcmd1;[31;17Hcmd2;[32;9H}
}

{[36;9Hif (test)[37;9H{[38;17Hcmd1;[39;17Helse[40;9H}
}

{[44;9Hwhile (this)[45;17Hif (test)[46;25Hcmd1;[47;9Hcmd2;
}

{[51;9Hwhile (this)[52;17Hif (test)[53;25Hcmd1;[54;17Helse[55;25Hcmd2;
}

{[59;9Hif (test)[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1H/* vim: set cin ts=4 sw=4 : */[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 5 lines, 125 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[11;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo modeline[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hedit                " read modeline[?25l"test3.in"[60;22H[K[60;12H2056L, 21564C[15;5Hif (test)[15;14H[K[16;9Hcmd1;[16;17H[K[17;5Hcmd2;[17;10H[K[21;5Hif (test)[21;14H[K[22;9Hcmd1;[22;17H[K[23;5Helse[23;9H[K[24;9Hcmd2;[24;17H[K[28;5Hif (test)[28;14H[K[29;5H{[29;9H[K[30;9Hcmd1;[30;17H[K[31;9Hcmd2;[31;17H[K[32;5H}[32;9H[K[36;5Hif (test)[36;14H[K[37;5H{[37;9H[K[38;9Hcmd1;[38;17H[K[39;9Helse[39;17H[K[40;5H}[40;9H[K[44;5Hwhile (this)[44;17H[K[45;9Hif (test)[45;18H[K[46;13Hcmd1;[46;25H[K[47;5Hcmd2;[47;10H[K[51;5Hwhile (this)[51;17H[K[52;9Hif (test)[52;18H[K[53;13Hcmd1;[53;25H[K[54;9Helse[54;17H[K[55;13Hcmd2;[55;25H[K[59;5Hif (test)[59;14H[K[12;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hstart of AUTO[?25l[13;4H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hend of AUTO[?25l873 lines to indent...850075065055045035025015050 lines to indent... 874 lines indented [60;20H[K[13;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[27m[23m[m[H[2J[1;9H22222222222222222;
    }
}

/* invalid namespaces use block indent */
namespace test test2 {
    111111111111111111111;
}
namespace11111111111 {
    111111111111;
}
namespace() {
    1111111111111;
}
namespace()
{
    111111111111111111;
}
namespace test test2
{
    1111111111111111111;
}
namespace111111111
{
    111111111111111111;
}

/* end of AUTO */

STARTTEST
:set tw=0 wm=60 columns=80 noai fo=croq
/serious/e
a about life, the universe, and the rest[34m^[[m
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[34m^[[m/happens
jothere[34m^[[m/below
oline[34m^[[m/this
Ohello[34m^[[m
ENDTEST

{
    /*[56;6H* Testing for comments, without 'cin' set[57;6H*/

/*[30;1H[?12l[?25h
[?25l[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 93C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[33;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset tw=0 wm=60 columns=80 noai fo=croq[?25l[8;60;80t[27m[23m[m[H[2J[?12l[?25h[27m[23m[m[H[2J[?25l[1;9H22222222222222222;
    }
}

/* invalid namespaces use block indent */
namespace test test2 {
    111111111111111111111;
}
namespace11111111111 {
    111111111111;
}
namespace() {
    1111111111111;
}
namespace()
{
    111111111111111111;
}
namespace test test2
{
    1111111111111111111;
}
namespace111111111
{
    111111111111111111;
}

/* end of AUTO */

STARTTEST
:set tw=0 wm=60 columns=80 noai fo=croq
/serious/e
a about life, the universe, and the rest[34m^[[m
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[34m^[[m/happens
jothere[34m^[[m/below
oline[34m^[[m/this
Ohello[34m^[[m
ENDTEST

{
    /*[56;6H* Testing for comments, without 'cin' set[57;6H*/

/*[34;1H[?12l[?25h[?25l[60;1H/[?12l[?25hserious/e[?25l[39;17H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[40;59r[40;1H[3L[1;60r[39;19H[K[40;2H* about life, the
 * universe, and the
 * rest important big[42;7H[?12l[?25h[43;7H[?25l[60;1H/^STARTTEST[48;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[49;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H6L, 78C written[49;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[49;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[54;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocin[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hcomments[?25l[59;20H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;6H*/[60;1H[K[59;7H[?12l[?25h[?25l
[1m-- INSERT --[m[60;1H[K[1;59r[59;1H
[1;60r[59;1Habout life[?12l[?25h[?25l
/[?12l[?25hhappens[?25l[1;59r[1;1H[3M[1;60r[58;1H/*
* what happens here?[60;1H[K[59;8H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H*/[?12l[?25h[?25l
[1m-- INSERT --[m[60;1H[K[1;59r[59;1H
[1;60r[59;1Hthere[?12l[?25h[?25l
/[?12l[?25hbelow[?25l[1;59r[1;1H[3M[1;60r[58;5H/*[59;8Hthe end of the comment, try inserting a line below */[60;1H[K[59;53H[?12l[?25h[?25l
[1m-- INSERT --[m[60;1H[K[1;59r[59;1H
[1;60r[59;1Hline[?12l[?25h[?25l
/[?12l[?25hthis[?25l[1;59r[1;1H[3M[1;60r[58;9H/* how about[59;25Hthis one */[60;1H[K[59;25H[?12l[?25h[?25l
[1m-- INSERT --[m[60;1H[K[59;1Hhello[59;25H[K[59;5H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;25Hthis one */[59;8H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[3M[1;60r[57;1H}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 18C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H/vec2
==[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cin[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hvec2[?25l[1;59r[1;1H[5M[1;60r[56;1H{
    var = this + that + vec[0] * vec[0][58;23H+ vec[1] * vec[1][59;23H+ vec2[2] * vec[2];[60;1H[K[59;25H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H5L, 51C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[4M[1;60r[56;1H:set cino=}4
/testing1
k2==/testing2
k2==[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cin[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=}4[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25htesting1[?25l[1;59r[1;1H[8M[1;60r[53;1H{[54;9Hasdf asdflkajds f;
    if (tes & ting) {[56;9Hasdf asdf asdf ;[57;9Hasdfa sdf asdf;[58;9H}
    testing1;[60;1H[K[59;5H[?12l[?25h[58;8H [?25l

/[?12l[?25htesting2[?25l[1;59r[1;1H[6M[1;60r[54;5Hif (tes & ting)
    {[56;9Hasdf asdf asdf ;[57;9Hasdfa sdf asdf;[58;9H}
    testing2;[60;1H[K[59;5H[?12l[?25h[58;8H [59;9H[?25l
/^STARTTEST[1;59r[1;1H[3M[1;60r[57;1H}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H4L, 36C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set cino=(0,)20
/main
=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cin[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0,)20[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hmain[?25l[1;59r[1;1H[2M[1;60r[59;1Hmain ( int first_par, /*[60;1H[K[59;1H[?12l[?25h[?25l
19 lines to indent...20[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;24H* Comment for[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[21M[1;60r[39;24H* first par[40;24H*/[41;8Hint second_par /*[42;24H* Comment for[43;24H* second par[44;24H*/[45;6H)
{
    func( first_par, /*[48;23H* Comment for[49;23H* first par[50;23H*/[51;11Hsecond_par /*[52;23H* Comment for[53;23H* second par[54;23H*/[55;9H);

}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H4L, 36C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set cino=es,n0s
/main
=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cin[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=es,n0s[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hmain[?25l[1;59r[1;1H[2M[1;60r[59;1Hmain(void)[60;1H[K[59;1H[?12l[?25h[?25l
8 lines to indent...9[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[10M[1;60r[50;5H/* Make sure that cino=X0s is not parsed like cino=Xs. */
    if (cond)[52;9Hfoo();
    else
    {[55;9Hbar();
    }
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 26C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H:set cino=
]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cin[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=[?25l[59;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
11 lines to indent...12[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hdo[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[13M[1;60r[47;5H{[48;9Hif ()[49;9H{[50;13Hif ()[51;17Hasdf;[52;13Helse[53;17Hasdf;[54;9H}
    } while ();
    cmd;[8C/* this should go under the } */
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H]]=][[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H1L, 6C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[60;1H[K[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
8 lines to indent...9[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hif ( k() ) {[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[10M[1;60r[50;9Hl();[52;5H} else { /* Start (two words) end */[53;9Hm();
    }[56;5Hn();
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino={s,e-s[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino={s,e-s[?25l[59;1H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
7 lines to indent...8[7Cindented [60;18H[K[59;1H    {[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hif ( k() )[60;1H[K[59;5H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[9M[1;60r[51;9H{[52;9Hl();[53;9H} else { /* Start (two words) end */[54;9Hm();[55;9H}
    n();    /* should be under the if () */
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino={s,fs[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 25C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H]]=/ foo[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino={s,fs[?25l[59;1H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[58;1Hvoid bar(void)
{[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h foo[?25l30 lines to indent...31[7Cindented [60;19H[K[59;1H    {[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[27m[23m[m[H[2J[1;13H{ 1, 2 },[2;13H{ 3, 4 },[3;9H}[5;5Hwhile (a)[6;9H{[7;9Hfoo(&a);[8;9H}[10;9H{[11;9Hint a;[12;13H{[13;13Ha = a + 1;[14;13H}[15;9H}
    b = a;
    }

void func(void)
    {
    a = 1;[22;9H{[23;9Hb = 2;[24;9H}
    c = 3;
    d = 4;
    }
/* foo */

STARTTEST
:set cino=
/while
ohere[34m^[[m
ENDTEST

a()
{
  do {
    a = a +[40;7Ha;
  } while ( a );[8C/* add text under this line */
    if ( a )[43;7Ha;
}

STARTTEST
:set cino= com=
/comment
olabel2: b();[34m^M[mlabel3 /* post */:[34m^M[m/* pre */ label4:[34m^M[mf(/*com*/);[34m^M[mif (/*com*/)[34m^^[50;1HM[mcmd();[34m^[[m
ENDTEST

a()
{
label1:[56;13H/* hmm */[57;13H// comment
}[30;1H[?12l[?25h
[?25l[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 25C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[33;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=[?25l[34;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hwhile[?25l[41;5H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[42;59r[42;1H[L[1;60r[42;3Hhere[?12l[?25h[43;6H[?25l[60;1H/^STARTTEST[47;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 109C written[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[48;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[50;1H[?12l[?25h

[?25l[60;1H[K[60;1H:so! Xdotest[52;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino= com=[?25l[52;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hcomment[?25l[58;16H[?12l[?25h[?25l

[1m-- INSERT --[m[60;1H[K[1;59r[1;1H[5M[1;60r[54;1Hlabel2: b();
label3 /* post */:
/* pre */ label4:[57;9Hf(/*com*/);[58;9Hif (/*com*/)[59;13Hcmd();[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set comments& comments^=s:/*,m:**,ex:*/[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 53C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H/simple
=5j[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset comments& comments^=s:/*,m:**,ex:*/[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hsimple[?25l[1;59r[1;1H[3M[1;60r[58;1H/*
  * A simple comment[60;1H[K[59;7H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [60;18H[K[59;2H* A simple comment[59;20H[K[59;2H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2H*/[60;1H[K[59;2H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[6M[1;60r[55;1H/*
** A different comment
*/

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=c0[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 70C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H:set comments& comments-=s1:/* comments^=s0:/*
2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=c0[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset comments& comments-=s1:/* comments^=s0:/*[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[6M[1;60r[54;5H/*********[55;7HA comment.
    *********/
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=c0,C1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 73C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H:set comments& comments-=s1:/* comments^=s0:/*
2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=c0,C1[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset comments& comments-=s1:/* comments^=s0:/*[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[6M[1;60r[54;5H/*********
    A comment.
    *********/
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 17C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H]]=][
ENDTEST[60;1H[K[58;1H[?12l[?25h
[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=[?25l[59;1H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hc = c1 &&[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[7M[1;60r[53;9H([54;10Hc2 ||[55;10Hc3[56;9H) && c4;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(s[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(s[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hc = c1 &&[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[7M[1;60r[53;9H([54;10Hc2 ||[55;10Hc3[56;9H) && c4;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(s,U1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 28C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(s,U1  [?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hc = c1 &&[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[7M[1;60r[53;9H([54;13Hc2 ||[55;13Hc3[56;9H) && c4;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(0[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hif (   c1[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[6M[1;60r[54;12H&& (   c2[55;19H|| c3))[56;9Hfoo;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(0,w1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 28C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0,w1  [?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hif (   c1[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[6M[1;60r[54;9H&& (   c2[55;13H|| c3))[56;9Hfoo;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(s[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(s[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
8 lines to indent...9[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hc = c1 && ([60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[10M[1;60r[50;9Hc2 ||[51;9Hc3[52;9H) && c4;
    if ([54;9Hc1 && c2[55;8H)[56;9Hfoo;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(s,m1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 28C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(s,m1  [?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
8 lines to indent...9[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hc = c1 && ([60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[10M[1;60r[50;9Hc2 ||[51;9Hc3
    ) && c4;
    if ([54;9Hc1 && c2
    )[56;9Hfoo;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=b1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=b1[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
9 lines to indent...10 lines indented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hswitch (x)[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[11M[1;60r[49;5H{[50;9Hcase 1:[51;13Ha = b;[52;9Hbreak;[53;9Hdefault:[54;13Ha = 0;[55;9Hbreak;
    }
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(0,W5[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 26C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0,W5[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
10 lines to indent...11[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hinvokeme([60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[12M[1;60r[48;10Hargu,[49;10Hment);
    invokeme([51;10Hargu,[52;10Hment[53;10H);
    invokeme(argu,[55;14Hment[56;13H);
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=/6[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=/6[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
3 lines to indent...4[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hstatement;[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[5M[1;60r[55;11H// comment 1[56;11H// comment 2
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 34C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H2kdd]]/comment 1/+1
==[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=[?25l[59;1H[?12l[?25h[57;1H[?25l==[57;3H[K[58;1HENDTEST[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hvoid f()
{[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25hcomment 1/+1[?25l[1;59r[1;1H[3M[1;60r[57;5Hstatement;[58;8H// comment 1
    // comment 2[60;1H[K[59;4H[?12l[?25h[?25l    // comment 2[59;8H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=g0[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=g0[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hclass CAbc
{[60;1H[K[59;1H[?12l[?25h[?25l
6 lines to indent...7[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hint Test() { return FALSE; }[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[8M[1;60r[53;1Hpublic: // comment
    void testfall();
protected:
    void testfall();
};

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(0,gs,hs[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 29C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0,gs,hs[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hclass Foo : public Bar
{[60;1H[K[59;1H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hpublic:[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[7M[1;60r[53;9Hvirtual void method1(void) = 0;[54;9Hvirtual void method2(int arg1,[55;30Hint arg2,[56;30Hint arg3) = 0;
};

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=+20[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 24C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=+20[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[57;5Hvoid
foo()
{[60;1H[K[59;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hif (a)[60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[6M[1;60r[54;5H{
    } else[56;9Hasdf;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=(0,W2s[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 27C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd]]=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0,W2s[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd]]=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
34 lines to indent...35[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Haverylongfunctionnamelongfunctionnameaverylongfunctionname()->asd([60;1H[K[59;4H[?12l[?25h[?25l
/^STARTTEST[27m[23m[m[H[2J[1;5H/* those are ugly, but consequent */[3;5Hfunc()->asd(asdasdf,[4;17Haverylongfunctionname([5;25Habc,[6;25Hdec)->averylongfunctionname([7;33Hasdfadsf,[8;33Hasdfasdf,[9;33Hasdfasdf,[10;33H),[11;17Hfunc(asdfadf,[12;22Hasdfasdf[13;21H),[14;17Hasdasdf[15;16H);[17;5Haverylongfunctionnameaverylongfunctionnameavery()->asd(fasdf([18;21Habc,[19;21Hdec)->asdfasdfasdf([20;29Hasdfadsf,[21;29Hasdfasdf,[22;29Hasdfasdf,[23;29H),[24;13Hfunc(asdfadf,[25;18Hasdfasdf),[26;13Hasdasdf[27;13H);
}

STARTTEST
:set cino=M1
2kdd]]=][
ENDTEST

int main ()
{
    if (cond1 &&[38;13Hcond2[39;13H)[40;9Hfoo;
}

STARTTEST
:set cino=(0,ts
2kdd=][
ENDTEST

void func(int a
#if defined(FOO)[50;11H, int b[51;11H, int c
#endif[53;10H)
{
}

STARTTEST
:set cino=(0
2kdd=][[30;1H[?12l[?25h
[?25l[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 23C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=M1[?25l[33;1H[?12l[?25h[31;1H[?25l[31;59r[59;1H
[1;60r[59;1HENDTEST[60;1H[K[31;1H[?12l[?25h[35;1H[?25l[60;1H4 lines to indent...5[7Cindented [60;18H[K[35;1H[?12l[?25h
   [?25l[60;1H[K[60;1H/^STARTTEST[42;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 24C written[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[43;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[44;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0,ts[?25l[45;1H[?12l[?25h[43;1H[?25l[43;59r[59;1H
[1;60r[60;1H[K[43;1H[?12l[?25h[?25l[60;1H9 lines to indent...10 lines indented [60;19H[K[43;1H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[55;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 21C written[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[56;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[57;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=(0[?25l[58;1H[?12l[?25h[56;1H[?25l[56;59r[59;1H
[1;60r[59;1Hvoid[60;1H[K[56;1H[?12l[?25h[?25l[60;1H10 lines to indent...11[7Cindented [60;19H[K[59;1H    void[56;1H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[10M[1;60r[50;1Hfunc(int a
#if defined(FOO)[52;6H, int b[53;6H, int c
#endif
    )
{
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino&[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 20C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd=7][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino&[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd=7][[57;9H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l


71 lines to indent...5072[7Cindented [60;19H[K[57;1H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[27m[23m[m[H[2J[1;9H1, 2,[2;9H3, 4,[3;9H5, 6};[5;5Hprintf("Don't you dare indent this line incorrectly!\n");
}[8;5Hvoid
func4(a, b,[10;9Hc)
    int a;
    int b;
    int c;
{
}[17;5Hvoid
func5([19;9Hint a,[20;9Hint b)
{
}[24;5Hvoid
func6([26;9Hint a)
{
}

STARTTEST
:set cino&
:set cino+=l1
2kdd=][
ENDTEST

void func(void)
{
    int tab[] =
    {[40;9H1, 2, 3,[41;9H4, 5, 6};[43;5Hprintf("Indent this line correctly!\n");[45;5Hswitch (foo)
    {[47;9Hcase bar:[48;13Hprintf("bar");[49;13Hbreak;[50;9Hcase baz: {[51;13Hprintf("baz");[52;13Hbreak;[53;9H}[54;9Hcase quux:
printf("But don't break the indentation of this instruction\n");
break;
    }
}[30;1H[?12l[?25h
[?25l[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 33C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[33;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino&[?25l[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino+=l1[?25l[34;1H[?12l[?25h[32;1H[?25l[32;59r[59;1H
[1;60r[59;1HSTARTTEST[60;1H[K[32;1H[?12l[?25h[?25l[60;1H24 lines to indent...25[7Cindented [60;19H[K[54;1H            printf("But don't break the indentation of this instruction\n");
            break;[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino&[60;1H[K[59;1H[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 19C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino&[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd=][[57;8H[K[58;1HENDTEST[59;1H[K[57;1H[?12l[?25h[?25l


8 lines to indent...9[7Cindented [60;18H[K[57;1H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[9M[1;60r[51;1Hvoid func(void)
{
    cout << "a"[54;9H<< "b"[55;9H<< ") :"[56;9H<< "c";
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set com=s1:/*,m:*,ex:*/[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 38C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H]]3jofoo();[34m^[[m[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset com=s1:/*,m:*,ex:*/[?25l[59;1H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[58;1Hvoid func(void)
{[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[57;5H/*[58;6H* This is a comment.[59;6H*/[?12l[?25h[?25l
[1m-- INSERT --[m[60;1H[K[1;59r[59;1H
[1;60r[59;5Hfoo();[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino&[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 19C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino&[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd=][[57;8H[K[58;1HENDTEST[59;1H[K[57;1H[?12l[?25h[?25l


10 lines to indent...11[7Cindented [60;19H[K[57;1H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[11M[1;60r[49;1Hvoid func(void)
{
    for (int i = 0; i < 10; ++i)[52;9Hif (i & 1) {[53;13Hfoo(1);[54;9H} else[55;13Hfoo(0);
    baz();
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=k2s,(0[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 27C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd3j=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=k2s,(0[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd3j=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hvoid func(void)[60;1H[K[59;1H[?12l[?25h[?25l
23 lines to indent...24[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[25M[1;60r[35;5Hif (condition1[36;13H&& condition2)[37;9Haction();
    function(argument1[39;14H&& argument2);[41;5Hif (c1 && (c2 ||[42;17Hc3))[43;9Hfoo;
    if (c1 &&[45;13H(c2 || c3))
    {
    }[49;5Hif (   c1[50;13H&& (      c2[51;23H|| c3))[52;9Hfoo;
    func( c1[54;11H&& (     c2[55;20H|| c3))[56;9Hfoo;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=k2s,(s[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 27C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd3j=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=k2s,(s[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd3j=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hvoid func(void)[60;1H[K[59;1H[?12l[?25h[?25l
23 lines to indent...24[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[25M[1;60r[35;5Hif (condition1[36;13H&& condition2)[37;9Haction();
    function(argument1[39;9H&& argument2);[41;5Hif (c1 && (c2 ||[42;17Hc3))[43;9Hfoo;
    if (c1 &&[45;13H(c2 || c3))
    {
    }[49;5Hif (   c1[50;13H&& (      c2[51;17H|| c3))[52;9Hfoo;
    func(   c1[54;9H&& (      c2[55;13H|| c3))[56;9Hfoo;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=k2s,(s,U1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 30C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd3j=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=k2s,(s,U1[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd3j=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hvoid func(void)[60;1H[K[59;1H[?12l[?25h[?25l
24 lines to indent...25[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[26M[1;60r[34;5Hif (condition1[35;13H&& condition2)[36;9Haction();
    function(argument1[38;9H&& argument2);[40;5Hif (c1 && (c2 ||[41;17Hc3))[42;9Hfoo;
    if (c1 &&[44;13H(c2 || c3))
    {
    }
    if (c123456789[48;13H&& (c22345[49;17H|| c3))[50;9Hprintf("foo\n");[52;5Hc = c1 &&[53;9H([54;13Hc2 ||[55;13Hc3[56;9H) && c4;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=k2s,(0,W4[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 30C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd3j=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=k2s,(0,W4[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd3j=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hvoid func(void)[60;1H[K[59;1H[?12l[?25h[?25l
29 lines to indent...30[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[27m[23m[m[H[2J[1;13H&& condition2)[2;9Haction();
    function(argument1[4;14H&& argument2);[6;5Hif (c1 && (c2 ||[7;17Hc3))[8;9Hfoo;
    if (c1 &&[10;13H(c2 || c3))
    {
    }
    if (c123456789[14;13H&& (c22345[15;17H|| c3))[16;9Hprintf("foo\n");[18;5Hif (   c1[19;13H&& (   c2[20;20H|| c3))[21;9Hfoo;[23;5Ha_long_line([24;9Hargument,[25;9Hargument);
    a_short_line(argument,[27;18Hargument);
}

STARTTEST
:set cino=k2s,u2
2kdd3j=][
ENDTEST

void func(void)
{
    if (condition1
    && condition2)
    action();
    function(argument1
    && argument2);[43;5Hif (c1 && (c2 ||
    c3))
    foo;
    if (c1 &&
    (c2 || c3))
    {
    }
    if (c123456789
    && (c22345
    || c3))
    printf("foo\n");
}

STARTTEST
:set cino=k2s,(0,w1
2kdd3j=][
ENDTEST[30;1H[?12l[?25h
[?25l[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 27C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=k2s,u2[?25l[33;1H[?12l[?25h[31;1H[?25l[31;59r[59;1H
[1;60r[60;1H[K[31;1H[?12l[?25h


[?25l[60;1H18 lines to indent...19[7Cindented [60;19H[K[37;5H        && condition2)
        action();[40;5H        && argument2);[43;5H          c3))
        foo;[46;5H        (c2 || c3))[50;5H        && (c22345
              || c3))
        printf("foo\n");[34;1H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[55;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 30C written[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[56;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[57;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=k2s,(0,w1[?25l[58;1H[?12l[?25h[56;1H[?25l[56;59r[59;1H
[1;60r[59;1Hvoid func(void)[60;1H[K[56;1H[?12l[?25h


[?25l
27 lines to indent...28[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[29M[1;60r[31;5Hif (condition1[32;13H&& condition2)[33;9Haction();
    function(argument1[35;14H&& argument2);[37;5Hif (c1 && (c2 ||[38;17Hc3))[39;9Hfoo;
    if (c1 &&[41;13H(c2 || c3))
    {
    }
    if (c123456789[45;13H&& (c22345[46;17H|| c3))[47;9Hprintf("foo\n");[49;5Hif (   c1[50;13H&& (      c2[51;17H|| c3))[52;9Hfoo;
    func(   c1[54;10H&& (      c2[55;14H|| c3))[56;9Hfoo;
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=k2,(s[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 26C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[59;1H
[1;60r[59;1H2kdd3j=][[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=k2,(s[?25l[59;1H[?12l[?25h[57;1H[?25l2kdd3j=][[57;10H[K[58;1HENDTEST[58;8H[K[59;1H[K[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hvoid func(void)[60;1H[K[59;1H[?12l[?25h[?25l
14 lines to indent...15[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H{[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[16M[1;60r[44;5Hif (condition1[45;7H&& condition2)[46;9Haction();
    function(argument1[48;9H&& argument2);[50;5Hif (c1 && (c2 ||[51;11Hc3))[52;9Hfoo;
    if (c1 &&[54;7H(c2 || c3))
    {
    }
}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=N-s[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 47C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H/^NAMESPACESTART
=/^NAMESPACEEND[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=N-s[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^NAMESPACESTART[?25l[1;59r[1;1H[2M[1;60r[59;1HNAMESPACESTART[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^NAMESPACEEND[?25l61 lines to indent...5062[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[27m[23m[m[H[2J[1;1H22222222222222222;
}
}

/* 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,  // indent 8 more[30;1H[?12l[?25h
[?25l[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 35C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[33;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=j1,J1[?25l[34;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSSTART[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSEND[?25l12 lines to indent...13[7Cindented [60;19H[K[38;1H    foo: {
        that: this,
        some: ok,
    },
    "bar":{
        a : 2,
        b: "123abc",
        x: 4,
        "y": 5
    }[36;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[51;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[52;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 35C written[52;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[52;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[54;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=j1,J1[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSSTART[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSEND[?25l5 lines to indent...6[7Cindented [60;18H[K[57;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[6M[1;60r[54;5H2,
    3
    ];  // indent 8 less
JSEND

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=j1,J1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 35C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H/^JSSTART
=/^JSEND[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=j1,J1[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSSTART[?25l[1;59r[1;1H[2M[1;60r[59;1HJSSTART[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^JSEND[?25l7 lines to indent...8[7Cindented [60;18H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[10M[1;60r[50;1Hfunction bar() {
    var foo = [[52;9H1,[53;9H2,[54;9H3[55;13H];  // indent 16 less
}
JSEND

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set cino=j1,J1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 35C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H/^JSSTART
=/^JSEND[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=j1,J1[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSSTART[?25l[1;59r[1;1H[2M[1;60r[59;1HJSSTART[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^JSEND[?25l52 lines to indent...503[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[27m[23m[m[H[2J[1;9H}, options||{}));
    }[4;5H$.fn[class_name]=function() {[6;9Hvar _arguments=arguments;[7;9Hreturn this.each(function(){[9;13Hvar options=$(this).data(class_name+'_public');[10;13Hif (!options) {[11;17Hinit.apply(this,_arguments);[13;13H} else {[14;17Hvar method=public_method[_arguments[0]];[16;17Hif (typeof(method)!='function') {[17;21Hconsole.log(class_name+' has no method "'+_arguments[0]+'"'))[18;1H;[19;21Hreturn false;[20;17H}[21;17H_arguments[0]=options;[22;17Hmethod.apply(this,_arguments);[23;13H}[24;9H});
    }

})(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,  // indent 8 more
2,  // indent 8 more
3   // indent 8 more
],
callback: function(){
return true;
}
}, options||{}));
}
JSEND

STARTTEST
:set cino=j1,J1
/^JSSTART
=/^JSEND
ENDTEST

JSSTART[30;1H[?12l[?25h
[?25l[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 35C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[33;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=j1,J1[?25l[34;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSSTART[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSEND[?25l14 lines to indent...15[7Cindented [60;19H[K[38;1H    $(this).data(class_name+'_public',$.extend({},{
        foo: 'bar',
        bar: 2,
        foobar: [
        1,  // indent 8 more
        2,  // indent 8 more
        3   // indent 8 more
        ],
        callback: function(){
            return true;
 [7C}
    }, options||{}));[36;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[53;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[54;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3L, 35C written[54;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[54;1H[?12l[?25h[?25l[60;1H/ENDTEST/+-1[60;13H[K[60;1H[56;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cino=j1,J1[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSSTART[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^JSEND[?25l16 lines to indent...17[7Cindented [60;19H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[19M[1;60r[41;1H(function($){
    function init(options) {[43;9H$(this).data(class_name+'_public',$.extend({},{[44;13Hfoo: 'bar',[45;9Hbar: 2,  // indent 8 more[46;9Hfoobar: [  // indent 8 more[47;13H1,  // indent 8 more[48;9H2,  // indent 16 more[49;9H3  // indent 16 more[50;13H],[51;9Hcallback: function(){  // indent 8 more[52;13Hreturn true;  // indent 8 more[53;9H}  // indent 8 more[54;9H}, options||{}));
    }
})(jQuery);
JSEND

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:g/^STARTTEST/.,/^ENDTEST/d[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2L, 61C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST/+-1[60;13H[K[60;1H[58;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l216 fewer lines[60;16H[K[1;13Hvar options=$(this).data(class_name+'_public');[2;13Hif (!options) {[2;28H[K[3;13H    init.apply(this,_arguments);[4;9H[K[5;5H [7C} else {[6;17Hvar method=public_method[_arguments[0]];[7;1H[K[8;1H     [11Cif (typeof(method)!='function') {[9;21Hconsole.log(class_name+' has no method "'+_arguments[0]+'"'))[10;1H;[10;2H[K[11;1H                    return false;
         [7C}
        [8C_arguments[0]=options;
       [9Cmethod.apply(this,_arguments);[15;13H}
        });
    }[17;6H[K[18;5H[K[19;1H})(jQuery);[19;12H[K[20;1HJSEND[20;9H[K[21;9H[K[22;9H[K[23;1HJSSTART[23;9H[K[24;1Hfunction init(options) {[24;25H[K[25;5H$(this).data(class_name+'_public',$.extend({},{[26;9Hfoo: 'bar',[26;20H[K[27;9Hbar: 2,[27;16H[K[28;9Hfoobar: [
        1,  // indent 8 more
 [7C2,  // indent 8 more
        3   // indent 8 more[32;9H],
        callback: function(){
            return true;
        }
    }, options||{}));
}[37;2H[K[38;1HJSEND[39;1H[K[40;1H[K[41;1HJSSTART[41;8H[K[42;1H(function($){[42;14H[K[43;5Hfunction init(options) {[44;9H$(this).data(class_name+'_public',$.extend({},{[45;9H    foo: 'bar',[45;24H[K[46;9Hbar: 2,  // indent 8 more[47;9Hfoobar: [  // indent 8 more[48;9H    1,  // indent 8 more[49;9H2,  // indent 16 more[50;9H3  // indent 16 more[50;29H[K[51;13H],[51;15H[K[52;9Hcallback: function(){  // indent 8 more[53;9H    return true;  // indent 8 more
        }  // indent 8 more
        }, options||{}));
    }
})(jQuery);
JSEND[58;6H[K[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h1;/start of AUTO/,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New] 1820L, 18429C written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test4.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test4.in" 31 lines, 839 characters[1;1HTest 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[13C" split to Xxx, autocmd will do :brew
G?this is a
othis should be auto-indented[34m^[[m
:[19C" Append text with autoindent to this file
:au! BufEnter Xxx
:buf Xxx[12C" go to Xxx, no autocmd anymore
G?this is a
othis should be in column 1[34m^[[m:wq " append text without autoindent to Xxx
G:r Xxx[13C" include Xxx in the current file
:?startstart?,$w! test.out
:qa!
ENDTEST

startstart
start of test file Xxx
vim: set noai :[27;9Hthis is a test[28;9Hthis is a test[29;9Hthis is a test[30;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that changes current buffer on BufEnter event.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 17 lines, 557 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[22;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufEnter Xxx brew[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hstart of[?25l[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx   " write test file Xxx[?25l"Xxx" [60;7H[K[60;7H[New] 7L, 124C written[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ai modeline modelines=3[?25l[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xxx             " split to Xxx, autocmd will do :brew[?25l"Xxx" [60;7H[K[60;7H7L, 124C[30;1H[1m[7mtest4.in                                                                                          [m[31;1H:                   " Append text with autoindent to this file
:au! BufEnter Xxx[32;18H[K[33;1H:buf Xxx            " go to Xxx, no autocmd anymore[33;52H[K[34;1HG?this is a[34;12H[K[35;1Hothis should be in column 1[34m^[[m:wq " append text without autoindent to Xxx[35;73H[K[36;1HG:r Xxx             " include Xxx in the current file[36;54H[K[37;1H:?startstart?,$w! test.out[37;27H[K[38;1H:qa![38;5H[K[39;1HENDTEST[39;8H[K[40;1H[K[41;1Hstartstart[41;11H[K[42;1Hstart of test file Xxx[42;23H[K[43;1Hvim: set noai :[43;16H[K[44;1H        this is a test[44;23H[K[45;1H        this is a test[45;23H[K[46;1H        this is a test[46;23H[K[47;1H        this is a test[47;23H[K[48;1Hend of test file Xxx[48;21H[K[59;1H[7mtest4.in                                                                                          [m[60;2Htest4.in" line 1 of 31 --3%-- col 1[1;1H[?12l[?25h[?25l[1;29r[1;1H[2M[1;60r[28;9Hthis is a test
end of test file Xxx[60;1H[K[29;1H[?12l[?25h[?25l[60;1H?[?12l[?25hthis is a[?25l[28;9H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[29;1H        this should be auto-indented[30;10H[1m[7m[+][48;58r[m[48;1H[L[1;60r[48;9Hthis should be auto-indented[59;10H[7m[+][29;36H[?12l[?25h[?25l[1;29r[m[29;1H
[1;60r[29;1Hend of test file Xxx[?12l[?25h[?25l[60;1H:[?12l[?25h                   " Append text with autoindent to this file[?25l[29;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau! BufEnter Xxx[?25l[29;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbuf Xxx            " go to Xxx, no autocmd anymore[?25l"Xxx" [60;7H[K[60;7H7L, 124C[1;1Hstart of test file Xxx
vim: set noai :
        this is a test[3;23H[K[4;1H        this is a test
        this is a test
        this is a test[6;23H[K[7;1Hend of test file Xxx[7;21H[K[8;1H[1m[34m~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7mXxxt          [1;1H[?12l[?25h[7;1H[?25l[m[60;1H[K[60;1H?[?12l[?25hthis is a[?25l[6;9H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[7;29r[7;1H[L[1;60r[7;1Hthis should be in column 1[30;5H[1m[7m[+][7;26H[?12l[?25h[?25l[60;1H[m:[?12l[?25hwq " append text without autoindent to Xxx[?25l"Xxx[60;7H[K[60;7H8L, 151C written[1;1HTest for autocommand that changes current buffer on BufEnter event.
Check if modelines are interpreted for the correct buffer.[3;9H[K[4;1HSTARTTEST[4;10H[K[5;1H:so small.vim[5;14H[K[6;1H:set nocompatible viminfo+=nviminfo
:au BufEnter Xxx brew[7;22H[K[8;1H/start of[8;10H[K[9;1H:.,/end of/w! Xxx   " write test file Xxx[9;42H[K[10;1H:set ai modeline modelines=3[10;29H[K[11;1H:sp Xxx             " split to Xxx, autocmd will do :brew[11;58H[K[12;1HG?this is a[12;12H[K[13;1Hothis should be auto-indented[34m^[[m[13;32H[K[14;1H:                   " Append text with autoindent to this file[14;63H[K[15;1H:au! BufEnter Xxx[15;18H[K[16;1H:buf Xxx            " go to Xxx, no autocmd anymore[16;52H[K[17;1HG?this is a[17;12H[K[18;1Hothis should be in column 1[34m^[[m:wq " append text without autoindent to Xxx[18;73H[K[19;1HG:r Xxx             " include Xxx in the current file[19;54H[K[20;1H:?startstart?,$w! test.out[20;27H[K[21;1H:qa![21;5H[K[22;1HENDTEST[22;8H[K[23;1H[K[24;1Hstartstart[24;11H[K[25;1Hstart of test file Xxx[25;23H[K[26;1Hvim: set noai :[26;16H[K[27;1H        this is a test[27;23H[K[28;1H        this is a test[28;23H[K[29;1H        this is a test[29;23H[K[30;1H        this is a test[30;23H[K[31;1H [7Cthis should be auto-indented[31;37H[K[32;1Hend of test file Xxx
[1m[34m~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [59;1H~                                                                                                 [25;1H[?12l[?25h[32;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hr Xxx             " include Xxx in the current file[?25l"Xxx" [60;20H[K[60;7H8L, 151C[33;1Hstart of test file Xxx[33;23H[K[34;1Hvim: set noai :[34;16H[K[35;1H        this is a test[35;23H[K[36;1H        this is a test[36;23H[K[37;1H        this is a test[37;23H[K[38;1H        this is a test[38;23H[K[39;1Hthis should be in column 1[39;27H[K[40;1Hend of test file Xxx[40;21H[K[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h?startstart?,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New] 17L, 316C written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test5.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test5.in" 29 lines, 949 characters[1;1HTest 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[15C" write test file Xxx
:sp Xxx[25C" split to Xxx
:bwipe[26C" delete buffer Xxx, now we're back here
G?this is a
othis is some more text[34m^[[m
:[31C" Append some text to this file
:?start?,$w! test.out[11C" Write current file contents
:bwipe test.out[17C" delete alternate buffer
:au bufleave test5.in bwipe
:bwipe![25C" delete current buffer, get an empty one
ithis is another test line[34m^[[m:w >>test.out
:[31C" append an extra line to the output file
:qa!
ENDTEST

start of test file Xxx
vim: set noai :[25;9Hthis is a test[26;9Hthis is a test[27;9Hthis is a test[28;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that deletes the current buffer on BufLeave event.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 16 lines, 664 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[21;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[22;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[22;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufLeave Xxx bwipe[?25l[22;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hstart of[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx               " write test file Xxx[?25l"Xxx" [60;7H[K[60;7H[New File] 7 lines, 124 characters written[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xxx                         " split to Xxx[?25l"Xxx" [60;7H[K[60;7H7 lines, 124 characters[1;1Hstart of test file Xxx[1;23H[K[2;1Hvim: set noai :[2;16H[K[3;9Hthis is a test
        this is a test
        this is a test
        this is a test
end of test file Xxx
[1m[34m~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7mXxx                                                                                               [m[31;1H:                               " Append some text to this file[31;64H[K[32;1H:?start?,$w! test.out           " Write current file contents[32;62H[K[33;1H:bwipe test.out                 " delete alternate buffer[33;58H[K[34;1H:au bufleave test5.in bwipe[34;28H[K[35;1H:bwipe!                         " delete current buffer, get an empty one[35;74H[K[36;1Hithis is another test line[34m^[[m:w >>test.out[36;42H[K[37;1H:                               " append an extra line to the output file[37;74H[K[38;1H:qa![38;5H[K[39;1HENDTEST[39;8H[K[40;1H[K[41;1Hstart of test file Xxx[41;23H[K[42;1Hvim: set noai :[42;16H[K[43;1H        this is a test[43;23H[K[44;1H        this is a test[44;23H[K[45;1H        this is a test[45;23H[K[46;1H        this is a test[46;23H[K[47;1Hend of test file Xxx[47;21H[K[59;1H[7mtest5.in                                                                                          [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hbwipe                          " delete buffer Xxx, now we're back here[?25l[1;1HTest for autocommand that deletes the current buffer on BufLeave event.
Also test deleting the last buffer, should give a new, empty buffer.[3;9H[K[4;1HSTARTTEST[4;10H[K[5;1H:so small.vim[5;14H[K[6;1H:au BufLeave Xxx bwipe
/start of[7;10H[K[8;1H:.,/end of/w! Xxx               " write test file Xxx[8;54H[K[9;1H:sp Xxx                         " split to Xxx[9;47H[K[10;1H:bwipe                          " delete buffer Xxx, now we're back here[10;73H[K[11;1HG?this is a[11;12H[K[12;1Hothis is some more text[34m^[[m[12;26H[K[13;1H:                               " Append some text to this file[13;64H[K[14;1H:?start?,$w! test.out           " Write current file contents[14;62H[K[15;1H:bwipe test.out                 " delete alternate buffer[15;58H[K[16;1H:au bufleave test5.in bwipe[16;28H[K[17;1H:bwipe!                         " delete current buffer, get an empty one[17;74H[K[18;1Hithis is another test line[34m^[[m:w >>test.out[18;42H[K[19;1H:                               " append an extra line to the output file[19;74H[K[20;1H:qa![20;5H[K[21;1HENDTEST[21;8H[K[22;1H[K[23;1Hstart of test file Xxx[23;23H[K[24;1Hvim: set noai :[24;16H[K[25;1H        this is a test[25;23H[K[26;1H        this is a test[26;23H[K[27;1H        this is a test[27;23H[K[28;1H        this is a test[28;23H[K[29;1Hend of test file Xxx[29;21H[K[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H"test5.in" line 23 of 29 --79%-- col 1[60;39H[K[23;1H[?12l[?25h[29;1H[?25l[60;1H[K[60;1H?[?12l[?25hthis is a[?25l[28;9H[?12l[?25h[?25l[29;59r[29;1H[L[1;60r[29;1Hthis is some more text[60;1H[K[29;22H[?12l[?25h[30;20H[?25l[60;1H:[?12l[?25h                               " Append some text to this file[?25l[30;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h?start?,$w! test.out           " Write current file contents[?25l"test.out" [60;12H[K[60;12H[New File] 8 lines, 147 characters written[30;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe test.out                 " delete alternate buffer[?25l[30;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau bufleave test5.in bwipe[?25l[30;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe!                         " delete current buffer, get an empty one[?25l[1m[37m[41mError detected while processing BufLeave Auto commands for "test5.in":[m[60;71H[K[60;1H
[1m[37m[41mE89: No write since last change for buffer 1 (add ! to override)[m
[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[2L[?25l[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25lthis is another test line[?12l[?25h[?25l[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 26 characters appended[1;25H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h                               " append an extra line to the output file[?25l[1;25H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test6.failed test.ok test.out X* viminfo
cp test6.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test6.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test6.in" 24 lines, 739 characters[1;1HTest for autocommand that redefines the argument list, when doing ":all".

STARTTEST
:so small.vim
:au BufReadPost Xxx2 next Xxx2 Xxx1
/^start of
A1[34m^[[m:.,/end of/w! Xxx1    " write test file Xxx1
$r2:.,/end of/w! Xxx2     " write test file Xxx2
$r3:.,/end of/w! Xxx3     " write test file Xxx3
:next! Xxx1 Xxx2 Xxx3     " redefine arglist; go to Xxx1
:all[22C" open window for all args
:w! test.out[14C" Write contents of Xxx1
[34m^W^W^W^W[m:w >>test.out     " Append contents of last window (Xxx1)
:rew[22C" should now be in Xxx2
:w >>test.out[13C" Append contents of Xxx2
:qa!
ENDTEST

start of test file Xxx[20;9Hthis is a test[21;9Hthis is a test[22;9Hthis is a test[23;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that redefines the argument list, when doing ":all".[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 13 lines, 537 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[17;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[18;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[18;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufReadPost Xxx2 next Xxx2 Xxx1[?25l[18;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start of[?25l[19;1H[?12l[?25h[?25l[22C1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx1    " write test file Xxx1[?25l"Xxx1" [60;9H[K[60;8H[New File] 6 lines, 109 characters written[19;23H[?12l[?25h[?25l2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx2     " write test file Xxx2[?25l"Xxx2" [60;9H[K[60;8H[New File] 6 lines, 109 characters written[19;23H[?12l[?25h[?25l3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx3     " write test file Xxx3[?25l"Xxx3" [60;9H[K[60;8H[New File] 6 lines, 109 characters written[19;23H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnext! Xxx1 Xxx2 Xxx3     " redefine arglist; go to Xxx1[?25l"Xxx1"[60;8H[K[60;8H6 lines, 109 characters[1;1Hstart of test file Xxx1[1;24H[K[2;9Hthis is a test
        this is a test
        this is a test
        this is a test[5;23H[K[6;1Hend of test file Xxx
[1m[34m~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hall                      " open window for all args[?25l"Xxx2"[60;27H[K[60;8H6 lines, 109 characters
"Xxx2" 6 lines, 109 characters
"Xxx1" line 1 of 6 --16%-- col 1 (file (3) of 2)
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! test.out              " Write contents of Xxx1[?25l"test.out" [60;12H[K[60;12H[New File] 6 lines, 109 characters written
[32mPress ENTER or type command to continue[?12l[?25h[27m[23m[m[H[2J[?25l[1;1Hstart of test file Xxx1[2;9Hthis is a test[3;9Hthis is a test[4;9Hthis is a test[5;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [m[20;1H[1m[7mXxx1                                                                                              [m[21;1Hstart of test file Xxx2[22;9Hthis is a test[23;9Hthis is a test[24;9Hthis is a test[25;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [m[39;1H[7mXxx2                                                                                              [m[40;1Hstart of test file Xxx1[41;9Hthis is a test[42;9Hthis is a test[43;9Hthis is a test[44;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7mXxx1                                                                                              [1;1H[?12l[?25h[20;1HXxx1[m[1m[7m [m[7m                                                                                              [m[39;1H[1m[7mXxx2                                                                                              [21;1H[m[39;1H[7mXxx2[m[1m[7m [m[7m                                                                                              [m[59;1H[1m[7mXxx1                                                                                              [40;1H[?25l[60;1H[m:[?12l[?25hw >>test.out     " Append contents of last window (Xxx1)[?25l"test.out" [60;12H[K[60;12H6 lines, 109 characters appended[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hrew                      " should now be in Xxx2[?25l"Xxx2" line 1 of 6 --16%-- col 1 (file 1 of 2)[60;47H[K[40;23H2[59;4H[1m[7m2 [40;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out             " Append contents of Xxx2[?25l"test.out" [60;12H[K[60;12H6 lines, 109 characters appended[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test7.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test7.in" 26 lines, 675 characters[1;1HTest for autocommand that changes the buffer list, when doing ":ball".

STARTTEST
:so small.vim
/^start of
A1[34m^[[m:.,/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[17C" open window for all args, close Xxx2
:.,$w! test.out[10C" Write contents of this file
[34m^W^W[m:w >>test.out[8C" Append contents of second window (Xxx1)
[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)
:qa!
ENDTEST

start of test file Xxx[24;9Hthis is a test[25;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that changes the buffer list, when doing ":ball".[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 17 lines, 508 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[21;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[22;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[22;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start of[?25l[23;1H[?12l[?25h[?25l[22C1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx1   " write test file Xxx1[?25l"Xxx1" [60;9H[K[60;8H[New File] 4 lines, 77 characters written[23;23H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xxx1[?25l"Xxx1" [60;8H[K[60;8H4 lines, 77 characters[1;1Hstart of test file Xxx1[1;24H[K[2;9Hthis is a test
        this is a test
end of test file Xxx
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [m[30;1H[1m[7mXxx1                                                                                              [m[31;1H:sp Xxx3[31;9H[K[32;1H:close[32;7H[K[33;1H:au BufReadPost Xxx2 bwipe[33;27H[K[34;1H$r4:ball                 " open window for all args, close Xxx2[34;64H[K[35;1H:.,$w! test.out          " Write contents of this file[35;55H[K[36;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[36;67H[K[37;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[37;78H[K[38;1H:qa![38;5H[K[39;1HENDTEST[39;8H[K[40;1H[K[41;1Hstart of test file Xxx1[41;24H[K[42;1H        this is a test[42;23H[K[43;1H        this is a test[43;23H[K[44;1Hend of test file Xxx[44;21H[K[59;1H[7mtest7.in [+]                                                                                      [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1HTest for autocommand that changes the buffer list, when doing ":ball".[2;9H[K[3;1HSTARTTEST[3;10H[K[4;1H:so small.vim[4;14H[K[5;1H/^start of[5;11H[K[6;1HA1[34m^[[m:.,/end of/w! Xxx1   " write test file Xxx1[6;48H[K[7;1H:sp Xxx1[7;9H[K[8;1H:close[8;7H[K[9;1H$r2:.,/end of/w! Xxx2    " write test file Xxx2[9;48H[K[10;1H:sp Xxx2[10;9H[K[11;1H:close[11;7H[K[12;1H$r3:.,/end of/w! Xxx3    " write test file Xxx3[12;48H[K[13;1H:sp Xxx3[13;9H[K[14;1H:close[14;7H[K[15;1H:au BufReadPost Xxx2 bwipe[15;27H[K[16;1H$r4:ball                 " open window for all args, close Xxx2[16;64H[K[17;1H:.,$w! test.out          " Write contents of this file[17;55H[K[18;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[18;67H[K[19;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[19;78H[K[20;1H:qa![20;5H[K[21;1HENDTEST[21;8H[K[22;1H[K[23;1Hstart of test file Xxx1[23;24H[K[24;1H        this is a test[24;23H[K[25;1H        this is a test[25;23H[K[26;1Hend of test file Xxx[26;21H[K[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [59;1H~                                                                                                 [23;23H[?12l[?25h[?25l[m2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx2    " write test file Xxx2[?25l"Xxx2" [60;9H[K[60;8H[New File] 4 lines, 77 characters written[23;23H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xxx2[?25l"Xxx2" [60;8H[K[60;8H4 lines, 77 characters[1;1Hstart of test file Xxx2[1;24H[K[2;9Hthis is a test
        this is a test
end of test file Xxx
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [m[30;1H[1m[7mXxx2                                                                                              [m[31;1H:sp Xxx3[31;9H[K[32;1H:close[32;7H[K[33;1H:au BufReadPost Xxx2 bwipe[33;27H[K[34;1H$r4:ball                 " open window for all args, close Xxx2[34;64H[K[35;1H:.,$w! test.out          " Write contents of this file[35;55H[K[36;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[36;67H[K[37;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[37;78H[K[38;1H:qa![38;5H[K[39;1HENDTEST[39;8H[K[40;1H[K[41;1Hstart of test file Xxx2[41;24H[K[42;1H        this is a test[42;23H[K[43;1H        this is a test[43;23H[K[44;1Hend of test file Xxx[44;21H[K[59;1H[7mtest7.in [+]                                                                                      [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1HTest for autocommand that changes the buffer list, when doing ":ball".[2;9H[K[3;1HSTARTTEST[3;10H[K[4;1H:so small.vim[4;14H[K[5;1H/^start of[5;11H[K[6;1HA1[34m^[[m:.,/end of/w! Xxx1   " write test file Xxx1[6;48H[K[7;1H:sp Xxx1[7;9H[K[8;1H:close[8;7H[K[9;1H$r2:.,/end of/w! Xxx2    " write test file Xxx2[9;48H[K[10;1H:sp Xxx2[10;9H[K[11;1H:close[11;7H[K[12;1H$r3:.,/end of/w! Xxx3    " write test file Xxx3[12;48H[K[13;1H:sp Xxx3[13;9H[K[14;1H:close[14;7H[K[15;1H:au BufReadPost Xxx2 bwipe[15;27H[K[16;1H$r4:ball                 " open window for all args, close Xxx2[16;64H[K[17;1H:.,$w! test.out          " Write contents of this file[17;55H[K[18;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[18;67H[K[19;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[19;78H[K[20;1H:qa![20;5H[K[21;1HENDTEST[21;8H[K[22;1H[K[23;1Hstart of test file Xxx2[23;24H[K[24;1H        this is a test[24;23H[K[25;1H        this is a test[25;23H[K[26;1Hend of test file Xxx[26;21H[K[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [59;1H~                                                                                                 [23;23H[?12l[?25h[?25l[m3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx3    " write test file Xxx3[?25l"Xxx3" [60;9H[K[60;8H[New File] 4 lines, 77 characters written[23;23H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xxx3[?25l"Xxx3" [60;8H[K[60;8H4 lines, 77 characters[1;1Hstart of test file Xxx3[1;24H[K[2;9Hthis is a test
        this is a test
end of test file Xxx
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [m[30;1H[1m[7mXxx3                                                                                              [m[31;1H:sp Xxx3[31;9H[K[32;1H:close[32;7H[K[33;1H:au BufReadPost Xxx2 bwipe[33;27H[K[34;1H$r4:ball                 " open window for all args, close Xxx2[34;64H[K[35;1H:.,$w! test.out          " Write contents of this file[35;55H[K[36;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[36;67H[K[37;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[37;78H[K[38;1H:qa![38;5H[K[39;1HENDTEST[39;8H[K[40;1H[K[41;1Hstart of test file Xxx3[41;24H[K[42;1H        this is a test[42;23H[K[43;1H        this is a test[43;23H[K[44;1Hend of test file Xxx[44;21H[K[59;1H[7mtest7.in [+]                                                                                      [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1HTest for autocommand that changes the buffer list, when doing ":ball".[2;9H[K[3;1HSTARTTEST[3;10H[K[4;1H:so small.vim[4;14H[K[5;1H/^start of[5;11H[K[6;1HA1[34m^[[m:.,/end of/w! Xxx1   " write test file Xxx1[6;48H[K[7;1H:sp Xxx1[7;9H[K[8;1H:close[8;7H[K[9;1H$r2:.,/end of/w! Xxx2    " write test file Xxx2[9;48H[K[10;1H:sp Xxx2[10;9H[K[11;1H:close[11;7H[K[12;1H$r3:.,/end of/w! Xxx3    " write test file Xxx3[12;48H[K[13;1H:sp Xxx3[13;9H[K[14;1H:close[14;7H[K[15;1H:au BufReadPost Xxx2 bwipe[15;27H[K[16;1H$r4:ball                 " open window for all args, close Xxx2[16;64H[K[17;1H:.,$w! test.out          " Write contents of this file[17;55H[K[18;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[18;67H[K[19;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[19;78H[K[20;1H:qa![20;5H[K[21;1HENDTEST[21;8H[K[22;1H[K[23;1Hstart of test file Xxx3[23;24H[K[24;1H        this is a test[24;23H[K[25;1H        this is a test[25;23H[K[26;1Hend of test file Xxx[26;21H[K[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [59;1H~                                                                                                 [23;23H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau BufReadPost Xxx2 bwipe[?25l[23;23H[?12l[?25h[?25l4[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hball                 " open window for all args, close Xxx2[?25l"Xxx1"[60;23H[K[60;8H4 lines, 77 characters
"Xxx2" 4 lines, 77 characters
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h.,$w! test.out          " Write contents of this file[?25l"test.out" [60;12H[K[60;12H[New File] 4 lines, 77 characters written
[32mPress ENTER or type command to continue[?12l[?25h[27m[23m[m[H[2J[?25l[1;1H:sp Xxx3
:close
:au BufReadPost Xxx2 bwipe
$r4:ball[17C" open window for all args, close Xxx2
:.,$w! test.out[10C" Write contents of this file
[34m^W^W[m:w >>test.out[8C" Append contents of second window (Xxx1)
[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)
:qa!
ENDTEST

start of test file Xxx4[12;9Hthis is a test[13;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [m[29;1H[1m[7mtest7.in [+]                                                                                      [m[30;1Hstart of test file Xxx1[31;9Hthis is a test[32;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7mXxx1                                                                                              [11;23H[?12l[?25h[29;1Htest7.in [+][m[1m[7m [m[7m                                                                                      [m[59;1H[1m[7mXxx1                                                                                              [30;1H[?25l[60;1H[m:[?12l[?25hw >>test.out        " Append contents of second window (Xxx1)[?25l"test.out" [60;12H[K[60;12H4 lines, 77 characters appended[30;1H[?12l[?25h[29;1H[1m[7mtest7.in [+]                                                                                      [m[59;1H[7mXxx1[m[1m[7m [m[7m                                                                                              [11;23H[?25l[m[60;1H[K[60;1H:[?12l[?25h/^start of/,$w >>test.out   " Append contents of last window (this file)[?25l[31msearch hit BOTTOM, continuing at TOP[m[60;37H[K[60;1H"test.out" [60;12H[K[60;12H4 lines, 77 characters appended[11;23H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test8.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test8.in" 46 lines, 1236 characters[1;1HTest 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[34m^[[m:.,/end of/w! Xxx1  " write test file Xxx1
$r2:.,/end of/w! Xxx2   " write test file Xxx2
:e! Xxx2[16C" edit Xxx2
:bdel test8.in[10C" delete this file from the buffer list
:e Xxx1[17C" edit Xxx1
:w[22C" write it, will unload it and give an error msg
:w! test.out[12C" Write contents of this file
:e! Xxx2[16C" start editing Xxx2
:bwipe test.out[9C" remove test.out from the buffer list
:w[22C" write it, will delete the buffer and give an error msg
:w >>test.out[11C" Append contents of this file
:au! BufWritePre
:func CloseAll()
  let i = 0
  while i <= bufnr('$')
    if i != bufnr('%') && bufloaded(i)[25;7Hexe  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 Xxx[45;9Htest
end of Xxx
[1m[34m~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for BufWritePre autocommand that deletes or unloads the buffer.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 37 lines, 1054 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[42;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufWritePre Xxx1 bunload[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufWritePre Xxx2 bwipe[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start of[?25l[44;1H[?12l[?25h[?25l[12C1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx1  " write test file Xxx1[?25l"Xxx1" [60;9H[K[60;8H[New File] 3 lines, 31 characters written[44;13H[?12l[?25h[?25l2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,/end of/w! Xxx2   " write test file Xxx2[?25l"Xxx2" [60;9H[K[60;8H[New File] 3 lines, 31 characters written[44;13H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xxx2                " edit Xxx2[?25l"Xxx2" [60;8H[K[60;8H3 lines, 31 characters[1;1Hstart of Xxx2[1;14H[K[2;1H        test[2;13H[K[3;1Hend of Xxx
[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hbdel test8.in[34m^I^I[m" delete this file from the buffer list[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xxx1                 " edit Xxx1[?25l"Xxx1" [60;25H[K[60;8H3 lines, 31 characters[1;13H1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw                      " write it, will unload it and give an error msg[?25l"Xxx2"[60;25H[K[60;8H3 lines, 31 characters
[1m[37m[41mE203: Autocommands deleted or unloaded buffer to be written[m
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! test.out            " Write contents of this file[?25l"test.out" [60;12H[K[60;12H[New File] 3 lines, 31 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he! Xxx2                " start editing Xxx2[?25l"Xxx2" [60;8H[K[60;8H3 lines, 31 characters[1;1H[3L[1;1Hstart of Xxx2[2;9Htest
end of Xxx[60;1H[K[60;1H"Xxx2" 3 lines, 31 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe test.out         " remove test.out from the buffer list[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw                      " write it, will delete the buffer and give an error msg[?25l"Xxx1"[60;25H[K[60;8H3 lines, 31 characters
[1m[37m[41mE203: Autocommands deleted or unloaded buffer to be written[m
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out           " Append contents of this file[?25l"test.out" [60;12H[K[60;12H3 lines, 31 characters appended
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau! BufWritePre[?25l[1;1H[3L[1;1Hstart of Xxx1[2;9Htest
end of Xxx[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hfunc CloseAll()[?25l
:  [?12l[?25h  let i = 0
[?25l:  [?12l[?25h  while i <= bufnr('$')
[?25l:    [?12l[?25h    if i != bufnr('%') && bufloaded(i)
[?25l:      [?12l[?25h      exe  i . "bunload"
[?25l:      [?12l[?25h    endif
[?25l:    [?12l[?25h    let i += 1
[?25l:    [?12l[?25h  endwhile
[?25l:  [?12l[?25hendfunc[1;1H[8L[?25l[1;1Hstart of Xxx1[2;9Htest
end of Xxx
[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hfunc WriteToOut()[?25l
:  [?12l[?25h  edit! test.out
[?25l:  [?12l[?25h  $put ='VimLeave done'
[?25l:  [?12l[?25h  write
[?25l:  [?12l[?25hendfunc[1;1H[4L[?25l[1;1Hstart of Xxx1[2;9Htest
end of Xxx
[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset viminfo='100,nviminfo[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufUnload * call CloseAll()[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau VimLeave * call WriteToOut()[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he small.vim[?25l[1m[37m[41mError detected while processing function CloseAll:[m
[33mline    4:[m
[1m[37m[41mE515: No buffers were unloaded: 0bunload[m
"small.vim" 1 line, 1 character
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hsp mbyte.vim[?25l"mbyte.vim" [60;13H[K[60;13H0 lines, 0 characters[1;1H[4L[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [m[30;1H[1m[7mmbyte.vim                                                                                         [m[31;1H[K[59;1H[7msmall.vim                                                                                         [m[60;1H[K[60;1H"mbyte.vim" 0 lines, 0 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq[?25l[1m[37m[41mError detected while processing function CloseAll:[m
[33mline    4:[m
[1m[37m[41mE515: No buffers were unloaded: 0bunload[m
"test.out" 6 lines, 62 characters
"test.out" 7 lines, 76 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test9.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test9.in" 12 lines, 255 characters[1;1HTest 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
[1m[34m~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for Bufleave autocommand that deletes the buffer we are about to edit.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 5 lines, 117 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[9;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufLeave test9.in bwipe yy[?25l[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he yy[?25l[1m[37m[41mE143: Autocommands unexpectedly deleted new buffer yy[10;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h/^start of/,$w! test.out      " Write contents of this file[?25l"test.out" [60;12H[K[60;12H[New File] 2 lines, 42 characters written[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test10.failed test.ok test.out X* viminfo
cp test10.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test10.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test10.in" 114 lines, 3080 characters[1;1HTest for 'errorformat'.  This will fail if the quickfix feature was disabled.

STARTTEST
:so small.vim
:" Also test a BOM is ignored.
:so mbyte.vim
:set encoding=utf-8
:7/start of errorfile/,/end of errorfile/w! Xerrorfile1
:7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
:/start of testfile/,/end of testfile/w! Xtestfile
:set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m
:set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m
:cf Xerrorfile2
:clast
:copen
:let a=w:quickfix_title
:wincmd p
lgR[34m^R[m=a[34m^M^[[m
:cf Xerrorfile1
grA
:cn
gRLINE 6, COL 19[34m^[[m
:cn
gRNO COLUMN SPECIFIED[34m^[[m
:cn
gRAGAIN NO COLUMN[34m^[[m
:cn
gRCOL 1[34m^[[m
:cn
gRCOL 2[34m^[[m
:cn
gRCOL 10[34m^[[m
:cn
gRVCOL 10[34m^[[m
:cn
grI
:cn
gR. SPACE POINTER[34m^[[m
:cn
gR. DOT POINTER[34m^[[m
:cn
gR. DASH POINTER[34m^[[m
:cn
gR. TAB-SPACE POINTER[34m^[[m
:clast
:cprev
:cprev
:wincmd w
:let a=w:quickfix_title
:wincmd p
lgR[34m^R[m=a[34m^M^[[m
:w! test.out[13C" Write contents of this file
:qa!
ENDTEST

start of errorfile
"Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.
ï»¿"Xtestfile", line 6 col 19; this is an error
gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include  version.c[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for 'errorformat'.  This will fail if the quickfix feature was disabled.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 50 lines, 801 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[54;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Also test a BOM is ignored.[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset encoding=utf-8[?25l[27m[23m[m[H[2J[1;1HTest for 'errorformat'.  This will fail if the quickfix feature was disabled.

STARTTEST
:so small.vim
:" Also test a BOM is ignored.
:so mbyte.vim
:set encoding=utf-8
:7/start of errorfile/,/end of errorfile/w! Xerrorfile1
:7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
:/start of testfile/,/end of testfile/w! Xtestfile
:set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m
:set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m
:cf Xerrorfile2
:clast
:copen
:let a=w:quickfix_title
:wincmd p
lgR[34m^R[m=a[34m^M^[[m
:cf Xerrorfile1
grA
:cn
gRLINE 6, COL 19[34m^[[m
:cn
gRNO COLUMN SPECIFIED[34m^[[m
:cn
gRAGAIN NO COLUMN[34m^[[m
:cn
gRCOL 1[34m^[[m
:cn
gRCOL 2[34m^[[m
:cn
gRCOL 10[34m^[[m
:cn
gRVCOL 10[34m^[[m
:cn
grI
:cn
gR. SPACE POINTER[34m^[[m
:cn
gR. DOT POINTER[34m^[[m
:cn
gR. DASH POINTER[34m^[[m
:cn
gR. TAB-SPACE POINTER[34m^[[m
:clast
:cprev
:cprev
:wincmd w
:let a=w:quickfix_title
:wincmd p
lgR[34m^R[m=a[34m^M^[[m
:w! test.out[13C" Write contents of this file
:qa!
ENDTEST

start of errorfile
"Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.
[34m<feff>[m"Xtestfile", line 6 col 19; this is an error
gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include  version.c[55;1H[?12l[?25h[?25l[60;1H:[?12l[?25h7/start of errorfile/,/end of errorfile/w! Xerrorfile1[?25l"Xerrorfile1" [60;15H[K[60;15H[New File] 83 lines, 1974 characters written[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2[?25l"Xerrorfile2" [60;15H[K[60;15H[New File] 82 lines, 1957 characters written[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/start of testfile/,/end of testfile/w! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H[New File] 23 lines, 937 characters written[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcf Xerrorfile2[?25l"Xtestfile" [60;13H[K[60;13H23 lines, 937 characters
(50 of 70): 1506-045 (S) Undeclared identifier fd_set.
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hclast[?25l(70 of 70): What is the title of the quickfix window?
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcopen[?25l[1;1H[3L[1;1Hstart of testfile[2;9Hxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  2[3;9Hxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  3
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  4
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  5
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  6
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  7
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  8[8;50H[K[9;1H        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  9[9;50H[K[10;1H        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 10[10;50H[K[11;1H        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 11
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 12[12;50H[K[13;1H        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 13
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 14
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 15
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 16
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 21
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 22
end of testfile
[1m[34m~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [m[48;1H[7mXtestfile                                                                                         [m[49;1HXtestfile|15 col 10| this is another error, but in vcol 10 this time
Xtestfile|16| yet another problem
Xtestfile|17 col 13|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17
Xtestfile|18 col 14|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18
Xtestfile|19 col 15|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19
Xtestfile|20 col 16|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20
||
|| Does anyone know what is the problem and how to correction it?
Xtestfile|21 col 9| What is the title of the quickfix window?[57;62H[K[58;1H[30m[43mXtestfile|22 col 9| What is the title of the quickfix window?                                     [m[59;1H[1m[7m[Quickfix List]                                                                                   [m[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25hlet a=w:quickfix_title[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[48;1H[1m[7mXtestfile                                                                                         [m[59;1H[7m[Quickfix List][m[1m[7m [m[7m                                                                                   [22;16H[?12l[?25h[mx[?25l[60;1H[K[60;1H=[?12l[?25ha[?25l[22;17H:cf Xerrorfile2[48;11H[1m[7m[+][22;31H[?12l[?25h[23;15H[?25l[m[60;1H[K[60;1H:[?12l[?25hcf Xerrorfile1[?25l[49;1H|| :qa![49;8H[K[50;1H|| ENDTEST[50;11H[K[51;1H|| [51;4H[K[52;1H|| start of errorfile[52;23H[K[53;1H[30m[43mXtestfile|4 col 12| 1506-045 (S) Undeclared identifier fd_set.                                    [m[54;11H6 col 19| this is an error[54;37H[K[55;4Hgcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include  version.c
Xtestfile|9| parse error before `asd'[56;38H[K[57;1H|| make: *** [vim] Error 1[57;27H[K[58;1HXtestfile|10| there is an error[58;32H[K[4;19H[?12l[?25h[?25lA[?12l[?25h[5;19H[?25l[60;1H[K[60;1H:[?12l[?25hcn[?25l[53;1HXtestfile|4 col 12| 1506-045 (S) Undeclared identifier fd_set.[53;63H[K[54;1H[30m[43mXtestfile|6 col 19| this is an error                                                              [6;26H[?12l[?25h[?25l[mLINE 6, COL 19[?12l[?25h[7;39H[?25l[60;1H[K[60;1H:[?12l[?25hcn[?25l[54;1HXtestfile|6 col 19| this is an error[54;37H[K[56;1H[30m[43mXtestfile|9| parse error before `asd'                                                             [9;9H[?12l[?25h[?25l[mNO COLUMN SPECIFIED[?12l[?25h[10;27H[?25l[60;1H[K[60;1H:[?12l[?25hcn[?25l[56;1HXtestfile|9| parse error before `asd'[56;38H[K[58;1H[30m[43mXtestfile|10| there is an error                                                                   [10;9H[?12l[?25h[?25l[mAGAIN NO COLUMN[?12l[?25h[11;23H[?25l[60;1H[K[60;1H:[?12l[?25hcn[?25l[49;58r[49;1H[3M[1;60r[55;1HXtestfile|10| there is an error[55;32H[K[56;1H||
|| 2 returned
[30m[43mXtestfile|11 col 1| this is an error                                                              [m[60;1H[K[11;8H[?12l[?25h[?25lCOL 1[?12l[?25h[12;8H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|11 col 1| this is an error[57;37H[K[58;1H[30m[43mXtestfile|12 col 2| this is another error                                                         [m[60;1H[K[12;9H[?12l[?25h[?25lCOL 2[?12l[?25h[13;13H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|12 col 2| this is another error[57;42H[K[58;1H[30m[43mXtestfile|14 col 10| this is an error in column 10                                                [m[60;1H[K[14;17H[?12l[?25h[?25lCOL 10[?12l[?25h[15;22H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|14 col 10| this is an error in column 10[57;51H[K[58;1H[30m[43mXtestfile|15 col 10| this is another error, but in vcol 10 this time                              [m[60;1H[K[15;10H[?12l[?25h[?25lVCOL 10[?12l[?25h[16;16H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|15 col 10| this is another error, but in vcol 10 this time[57;69H[K[58;1H[30m[43mXtestfile|16| yet another problem                                                                 [m[60;1H[K[16;9H[?12l[?25h[?25lI[?12l[?25h[17;9H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|16| yet another problem[57;34H[K[58;1H[30m[43mXtestfile|17 col 13|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17                 [m[60;1H[K[17;13H[?12l[?25h[?25l. SPACE POINTER[?12l[?25h[18;27H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|17 col 13|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17[57;82H[K[58;1H[30m[43mXtestfile|18 col 14|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18                 [m[60;1H[K[18;14H[?12l[?25h[?25l. DOT POINTER[?12l[?25h[19;26H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|18 col 14|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18[57;82H[K[58;1H[30m[43mXtestfile|19 col 15|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19                 [m[60;1H[K[19;15H[?12l[?25h[?25l. DASH POINTER[?12l[?25h[20;28H[?25l[60;1H:[?12l[?25hcn[?25l[49;58r[58;1H
[1;60r[57;1HXtestfile|19 col 15|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19[57;82H[K[58;1H[30m[43mXtestfile|20 col 16|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20                 [m[60;1H[K[20;16H[?12l[?25h[?25l. TAB-SPACE POINTER[?12l[?25h[21;34H[?25l[60;1H:[?12l[?25hclast[?25l[49;58r[49;1H[5M[1;60r[53;1HXtestfile|20 col 16|  x should be a dot xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20[53;82H[K[54;1H||
|| Does anyone know what is the problem and how to correction it?
Xtestfile|21 col 9| What is the title of the quickfix window?
Xtestfile|22 col 9| What is the title of the quickfix window?
[30m[43m|| end of errorfile                                                                               [m[60;1H[K[21;9H[?12l[?25h[?25l[60;1H:[?12l[?25hcprev[?25l[57;1H[30m[43mXtestfile|22 col 9| What is the title of the quickfix window?                                     [m[58;1H|| end of errorfile[58;20H[K[22;16H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcprev[?25l[56;1H[30m[43mXtestfile|21 col 9| What is the title of the quickfix window?                                     [m[57;1HXtestfile|22 col 9| What is the title of the quickfix window?[57;62H[K[21;16H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd w[?25l[48;1H[7mXtestfile [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[Quickfix List]                                                                                   [56;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet a=w:quickfix_title[?25l[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[48;1H[1m[7mXtestfile [+]                                                                                     [m[59;1H[7m[Quickfix List][m[1m[7m [m[7m                                                                                   [21;16H[?12l[?25h[mx[?25l[60;1H[K[60;1H=[?12l[?25ha[?25l[21;17H:cf Xerrorfile1[?12l[?25h[22;31H[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out             " Write contents of this file[?25l"test.out" [60;12H[K[60;12H[New File] 23 lines, 942 characters written[48;11H[1m[7m    [22;31H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test11.failed test.ok test.out X* viminfo
cp test11.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test11.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test11.in" 84 lines, 3345 characters[1;1HTests for autocommands:
- FileWritePre[10Cwriting a compressed file
- FileReadPost[10Creading a compressed file
- BufNewFile[12Creading a file template
- BufReadPre[12Cdecompressing the file to be read
- FilterReadPre[9Csubstituting characters in the temp file
- FilterReadPost[8Csubstituting characters after filtering
- FileReadPre[11Cset options for decompression
- FileReadPost[10Cdecompress the file

Note: This test is skipped if "gzip" is not available.
$GZIP is made empty, "-v" would cause trouble.
Use a FileChangedShell autocommand to avoid a prompt for "Xtestfile.gz" being
modified outside of Vim (noticed on Solaris).

STARTTEST
:so small.vim
:" drop out when there is no gzip program
:if !executable("gzip")
: e! test.ok
: w! test.out
: qa!
:endif
:let $GZIP = ""
:au FileChangedShell * echo "caught FileChangedShell"
:set bin
:au FileWritePre    *.gz   '[,']!gzip
:au FileWritePost   *.gz   undo
:/^start of testfile/,/^end of testfile/w! Xtestfile.gz
:au FileReadPost    *.gz   '[,']!gzip -d
:$r Xtestfile.gz[16C" Read and decompress the testfile
:?startstart?,$w! test.out      " Write contents of this file
:au BufNewFile      *.c    read Xtest.c
:/^start of test.c/+1,/^end of test.c/-1w! Xtest.c
:e! foo.c[23C" Will load Xtest.c
:au FileAppendPre   *.out  '[,']s/new/NEW/
:au FileAppendPost  *.out  !cat Xtest.c >>test.out
:w>>test.out[20C" Append it to the output file
:au! FileAppendPre
:" setup autocommands to decompress before reading and re-compress afterwards
:au BufReadPre      *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))
:au BufReadPre      *.gz   call rename(expand("<afile>:r"), expand("<afile>"))
:au BufReadPost     *.gz   call rename(expand("<afile>"), expand("<afile>:r"))
:au BufReadPost     *.gz   exe '!gzip ' . shellescape(expand("<afile>:r"))
:e! Xtestfile.gz[16C" Edit compressed file
:w>>test.out[20C" Append it to the output file
:set shelltemp[18C" need temp files here
:au FilterReadPre   *.out  call rename(expand("<afile>"), expand("<afile>") . ".t")
:au FilterReadPre   *.out  exe '!sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shellescc[50;1Hape(expand("<afile>"))
:au FilterReadPre   *.out  exe '!rm ' . shellescape(expand("<afile>")) . '.t'
:au FilterReadPost  *.out  '[,']s/x/X/g
:e! test.out[20C" Edit the output file
:23,$!cat
:23,$s/\r$//[17C" remove CR for when sed adds them
:au! FileReadPre    *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))
:au  FileReadPre    *.gz   call rename(expand("<afile>:r"), expand("<afile>"))
:au! FileReadPost   *.gz   '[,']s/l/L/
:$r Xtestfile.gz[13C" Read compressed file[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for autocommands:[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[16;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[17;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 48 lines, 2277 characters written[17;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[17;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[7M[1;60r[53;1H:w[27C" write it, after filtering
:au![13C" remove all autocommands
:e[15C" Edit test.out again
:set nobin ff&   " use the default fileformat for writing
:w
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" drop out when there is no gzip program[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !executable("gzip")[?25l
:  [?12l[?25h: e! test.ok
[?25l:  [?12l[?25h: w! test.out
[?25l:  [?12l[?25h: qa!
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H- FileReadPost[10Cdecompress the file

Note: This test is skipped if "gzip" is not available.
$GZIP is made empty, "-v" would cause trouble.[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet $GZIP = ""[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FileChangedShell * echo "caught FileChangedShell"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bin[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FileWritePre    *.gz   '[,']!gzip[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FileWritePost   *.gz   undo[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestfile.gz[?25l[?12l[?25h[?25l11 lines filtered[60;18H[K[60;1H
"Xtestfile.gz" [New File][Incomplete last line] 1 line, 111 characters written
10 more lines; before #1  0 seconds ago
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau FileReadPost    *.gz   '[,']!gzip -d[?25l[1;1H[3L[1;1H: w! test.out
: qa!
:endif
:let $GZIP = ""[4;16H[K[5;1H:au FileChangedShell * echo "caught FileChangedShell"[5;54H[K[6;1H:set bin[6;10H[K[7;1H:au FileWritePre    *.gz   '[,']!gzip
:au FileWritePost   *.gz   undo
:/^start of testfile/,/^end of testfile/w! Xtestfile.gz
:au FileReadPost    *.gz   '[,']!gzip -d[10;41H[K[11;2H$r Xtestfile.gz       [9C" Read and decompress the testfile
:?startstart?,$w! test.out      " Write contents of this file
:au BufNewFile      *.c    read Xtest.c
:/^start of test.c/+1,/^end of test.c/-1w! Xtest.c
:e! foo.c[23C" Will load Xtest.c
:au FileAppendPre   *.out  '[,']s/new/NEW/[17;9HAppendPost  *.out  !cat Xtest.c >>test.out[17;51H[K[18;2Hw>>test.out[20C" Append it to the output file
:au! FileAppendPre[19;21H[K[20;2H" setup autocommands to decompress before reading and re-compress afterwards
:au BufReadPre      *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))
:au BufReadPre  [11Ccall rename(expand("<afile>:r"), expand("<afile>"))
:au BufReadPost     *.gz   call rename(expand("<afile>"), expand("<afile>:r"))
:au BufReadPost     *.gz   exe '!gzip ' . shellescape(expand("<afile>:r"))
:e! Xtestfile.gz                " Edit compressed file
:w>>test.out                    " Append it to the output file
:set shelltemp[20Cneed temp files here[28;8HterRea[14Ccall rename(expand("<afile>"), expand("<afile>") . ".t")[29;8HterReadPre [9Cexe '!sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shellescc[30;1Hape(expand("<afile>"))[30;33H[K[31;4H FilterReadPre   *.out  exe '!rm ' . shellescape(expand("<afile>")) . '.t'
:au FilterReadPost  *.out  '[,']s/x/X/g[32;40H[K[33;2He! test.out                    " Edit the output file[33;55H[K[34;2H23,$!cat[34;10H[K[35;2H23,$s/\r$//                 " remove CR for when sed adds them[35;64H[K[36;4H! FileReadPre[22C-d ' . shellescape(expand("<afile>"))
:au  FileReadPre    *.gz   call rename(expand("<afile>:r"), expand("<afile>"))
:au! FileReadPost   *.gz   '[,']s/l/L/[38;39H[K[39;2H$r Xtestfile.gz[13C" Read compressed file[39;52H[K[40;2Hw                           " write it, after filtering[40;57H[K[41;4H!             " remove all autocommands[41;43H[K[42;1H:e               " Edit test.out again
:set nobin ff&   " use the default fileformat for writing[43;58H[K[44;2Hw[44;3H[K[45;2Hqa![45;5H[K[46;1HENDTEST[46;8H[K[47;1H[K[48;1Hstartstart[48;11H[K[49;1Hstart of testfile[49;21H[K[50;1Hline 2  Abcdefghijklmnopqrstuvwxyz[50;35H[K[51;1Hline 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[51;39H[K[52;1Hline 4  Abcdefghijklmnopqrstuvwxyz[52;35H[K[53;1Hline 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[53;39H[K[54;1Hline 6  Abcdefghijklmnopqrstuvwxyz[54;35H[K[55;1Hline 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[55;39H[K[56;1Hline 8  Abcdefghijklmnopqrstuvwxyz
line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 10 Abcdefghijklmnopqrstuvwxyz
end of testfile[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$r Xtestfile.gz                " Read and decompress the testfile[?25l"Xtestfile.gz" [60;16H[K[60;16H[Incomplete last line] 1 line, 111 characters[?12l[?25h[60C[?25l[1;59r[1;1H[7M[1;60r[54;1Hstart of test.c
/*
 * Here is a new .c file
 */
end of test.c
start of testfile[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h?startstart?,$w! test.out      " Write contents of this file[?25l"test.out" [60;12H[K[60;12H[New File] 29 lines, 788 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufNewFile      *.c    read Xtest.c[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of test.c/+1,/^end of test.c/-1w! Xtest.c[?25l[31msearch hit BOTTOM, continuing at TOP[m[60;37H[K[60;1H"Xtest.c" [60;11H[K[60;11H[New File] 3 lines, 32 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! foo.c                       " Will load Xtest.c[?25l"foo.c" [New File][60;33H[K[60;1H
"Xtest.c" 3 lines, 32 characters
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau FileAppendPre   *.out  '[,']s/new/NEW/[?25l[1;1H[2L[2;1H/*
 * Here is a new .c file[3;28H[K[4;1H */[4;5H[K[5;1H[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hau FileAppendPost  *.out  !cat Xtest.c >>test.out[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw>>test.out                    " Append it to the output file[?25l"test.out" [60;12H[K[60;12H4 lines, 33 characters appended
:!cat Xtest.c >>test.out
[?12l[?25h[m
[32mPress ENTER or type command to continue[?25l[m[60;1H[K[60;1H:[?12l[?25hau! FileAppendPre[?25l[27m[23m[m[H[2J[2;1H/*
 * Here is a NEW .c file
 */
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [3;2H[?12l[?25h[?25l[60;1H[m:[?12l[?25h" setup autocommands to decompress before reading and re-compress afterwards[?25l[3;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufReadPre      *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))[?25l[3;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufReadPre      *.gz   call rename(expand("<afile>:r"), expand("<afile>"))[?25l[3;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufReadPost     *.gz   call rename(expand("<afile>"), expand("<afile>:r"))[?25l[3;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufReadPost     *.gz   exe '!gzip ' . shellescape(expand("<afile>:r"))[?25l[3;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtestfile.gz                " Edit compressed file[?25l:!gzip -d 'Xtestfile.gz'[60;33H[K[60;25H
[?12l[?25h[?25l[m"Xtestfile.gz"[59;1H"Xtestfile.gz" 11 lines, 357 characters[60;1H[K[60;1H:!gzip 'Xtestfile'
[?12l[?25h[m
[32mPress ENTER or type command to continue[?25l[m[60;1H[K[60;1H:[?12l[?25hw>>test.out                    " Append it to the output file[?25l"test.out" [60;12H[K[60;12H11 lines, 357 characters appended
:!cat Xtest.c >>test.out
[?12l[?25h[m
[32mPress ENTER or type command to continue[?25l[m[60;1H[K[60;1H:[?12l[?25hset shelltemp                  " need temp files here[?25l[27m[23m[m[H[2J[1;1Hstart of testfile
line 2  Abcdefghijklmnopqrstuvwxyz
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  Abcdefghijklmnopqrstuvwxyz
line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 6  Abcdefghijklmnopqrstuvwxyz
line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 8  Abcdefghijklmnopqrstuvwxyz
line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 10 Abcdefghijklmnopqrstuvwxyz
end of testfile
[1m[34m~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hau FilterReadPre   *.out  call rename(expand("<afile>"), expand("<afile>") . ".t")[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FilterReadPre   *.out  exe '!sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shelles
[59;98Hc[60;1Hape(expand("<afile>"))[?25l[1;1H[L[1;1Hstart of testfile[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hau FilterReadPre   *.out  exe '!rm ' . shellescape(expand("<afile>")) . '.t'[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FilterReadPost  *.out  '[,']s/x/X/g[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! test.out                    " Edit the output file[?25l"test.out" [60;12H[K[60;12H50 lines, 1242 characters[1;6Hstar[1;11H[K[2;1Hstart of testfile[2;18H[K[3;6H2  Abcdefghijklmnopqrstuvwxyz[3;35H[K[4;6H3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[5;6H4  Abcdefghijklmnopqrstuvwxyz[5;35H[K[6;6H5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[7;6H6  Abcdefghijklmnopqrstuvwxyz[7;35H[K[8;6H7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[9;6H8  Abcdefghijklmnopqrstuvwxyz[9;35H[K[10;6H9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 10 Abcdefghijklmnopqrstuvwxyz
end of testfile[12;16H[K[13;1H[K[14;1Hstart of test.c[14;16H[K[15;1H/*[15;3H[K[16;1H * Here is a new .c file[16;25H[K[17;1H */[17;4H[K[18;1Hend of test.c[18;14H[K[19;1Hstart of testfile[19;18H[K[20;1Hline 2  Abcdefghijklmnopqrstuvwxyz[20;35H[K[21;1Hline 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[21;39H[K[22;1Hline 4  Abcdefghijklmnopqrstuvwxyz[22;35H[K[23;1Hline 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[23;39H[K[24;1Hline 6  Abcdefghijklmnopqrstuvwxyz[24;35H[K[25;1Hline 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[25;39H[K[26;1Hline 8  Abcdefghijklmnopqrstuvwxyz[26;35H[K[27;1Hline 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[27;39H[K[28;1Hline 10 Abcdefghijklmnopqrstuvwxyz[28;35H[K[29;1Hend of testfile[29;16H[K[30;1H[K[31;1H/*[31;3H[K[32;1H * Here is a NEW .c file[32;25H[K[33;1H */[33;4H[K[34;1H/*[34;3H[K[35;1H * Here is a new .c file[35;25H[K[36;1H */[36;4H[K[37;1Hstart of testfile[37;18H[K[38;1Hline 2  Abcdefghijklmnopqrstuvwxyz[38;35H[K[39;1Hline 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[39;39H[K[40;1Hline 4  Abcdefghijklmnopqrstuvwxyz[40;35H[K[41;1Hline 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[41;39H[K[42;1Hline 6  Abcdefghijklmnopqrstuvwxyz[42;35H[K[43;1Hline 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[43;39H[K[44;1Hline 8  Abcdefghijklmnopqrstuvwxyz[44;35H[K[45;1Hline 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[45;39H[K[46;1Hline 10 Abcdefghijklmnopqrstuvwxyz[46;35H[K[47;1Hend of testfile[47;16H[K[48;1H/*[48;3H[K[49;1H * Here is a new .c file[49;25H[K[50;1H */[50;4H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h23,$!cat[?25l[?12l[?25h[?25l:!sed s/e/E/ '/tmp/vFAhkpM/1'.t >'/tmp/vFAhkpM/1'
[?12l[?25h[?25l[m:!rm '/tmp/vFAhkpM/1'.t
[?12l[?25h[?25l[m218 substitutions on 15 lines
28 lines filtered
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h23,$s/\r$//                 " remove CR for when sed adds them[?25l[1m[37m[41mE486: Pattern not found: \r$[m[60;30H[K[60;1H
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau! FileReadPre    *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))[?25l[27m[23m[m[H[2J[1;1Hstartstart
start of testfile
line 2  Abcdefghijklmnopqrstuvwxyz
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  Abcdefghijklmnopqrstuvwxyz
line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 6  Abcdefghijklmnopqrstuvwxyz
line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 8  Abcdefghijklmnopqrstuvwxyz
line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 10 Abcdefghijklmnopqrstuvwxyz
end of testfile

start of test.c
/*
 * Here is a new .c file
 */
end of test.c
start of testfile
line 2  Abcdefghijklmnopqrstuvwxyz
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  Abcdefghijklmnopqrstuvwxyz
linE 5  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 6  AbcdefghijklmnopqrstuvwXyz
linE 7  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 8  AbcdefghijklmnopqrstuvwXyz
linE 9  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 10 AbcdefghijklmnopqrstuvwXyz
End of testfile

/*
 * HEre is a NEW .c file
 */
/*
 * HEre is a new .c file
 */
start of tEstfile
linE 2  AbcdefghijklmnopqrstuvwXyz
linE 3  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 4  AbcdefghijklmnopqrstuvwXyz
linE 5  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 6  AbcdefghijklmnopqrstuvwXyz
linE 7  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 8  AbcdefghijklmnopqrstuvwXyz
linE 9  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 10 AbcdefghijklmnopqrstuvwXyz
End of testfile
/*
 * HEre is a new .c file
 */
[1m[34m~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [23;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hau  FileReadPre    *.gz   call rename(expand("<afile>:r"), expand("<afile>"))[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau! FileReadPost   *.gz   '[,']s/l/L/[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtestfile.gz             " Read compressed file[?25l:!gzip -d 'Xtestfile.gz'[60;30H[K[60;25H
[?12l[?25h[?25l[m"Xtestfile.gz"[59;1H"Xtestfile.gz" 11 lines, 357 characters[60;1H[K[60;1H11 substitutions on 11 lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw                           " write it, after filtering[?25l"test.out"[60;30H[K[60;12H61 lines, 1599 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau!             " remove all autocommands[?25l[1m[37m[41mE216: No such group or event: " remove all autocommands[m
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he               " Edit test.out again[?25l"test.out"[60;18H[K[60;12H61 lines, 1599 characters[27m[23m[m[H[2J[1;1Hstartstart
start of testfile
line 2  Abcdefghijklmnopqrstuvwxyz
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  Abcdefghijklmnopqrstuvwxyz
line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 6  Abcdefghijklmnopqrstuvwxyz
line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 8  Abcdefghijklmnopqrstuvwxyz
line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 10 Abcdefghijklmnopqrstuvwxyz
end of testfile

start of test.c
/*
 * Here is a new .c file
 */
end of test.c
start of testfile
line 2  Abcdefghijklmnopqrstuvwxyz
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  Abcdefghijklmnopqrstuvwxyz
linE 5  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 6  AbcdefghijklmnopqrstuvwXyz
linE 7  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 8  AbcdefghijklmnopqrstuvwXyz
linE 9  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 10 AbcdefghijklmnopqrstuvwXyz
End of testfile

/*
 * HEre is a NEW .c file
 */
/*
 * HEre is a new .c file
 */
start of tEstfile
linE 2  AbcdefghijklmnopqrstuvwXyz
linE 3  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 4  AbcdefghijklmnopqrstuvwXyz
linE 5  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 6  AbcdefghijklmnopqrstuvwXyz
linE 7  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 8  AbcdefghijklmnopqrstuvwXyz
linE 9  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
linE 10 AbcdefghijklmnopqrstuvwXyz
End of testfile
/*
 * HEre is a new .c file
 */
start of testfiLe
Line 2  Abcdefghijklmnopqrstuvwxyz
Line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 4  Abcdefghijklmnopqrstuvwxyz
Line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 6  Abcdefghijklmnopqrstuvwxyz
Line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Line 8  Abcdefghijklmnopqrstuvwxyz
Line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"test.out" 61 lines, 1599 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nobin ff&   " use the default fileformat for writing[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 61 lines, 1599 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test12.failed test.ok test.out X* viminfo
cp test12.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test12.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test12.in" 52 lines, 1199 characters[1;1HTests for 'directory' option.
- ".", in same dir as file
- "./dir", in directory relative to file
- "dir", in directory relative to current dir

STARTTEST
:so small.vim
:set nocompatible viminfo+=nviminfo
:set dir=.,~
:/start of testfile/,/end of testfile/w! Xtest1
:" do an ls of the current dir to find the swap file (should not be there)
:if has("unix")
:  !ls .X*.swp >test.out
:else
:  r !ls X*.swp >test.out
:endif
:!echo first line >>test.out
:e Xtest1
:if has("unix")
:" Do an ls of the current dir to find the swap file, remove the leading dot
:" to make the result the same for all systems.
:  r!ls .X*.swp
:  s/\.*X/X/
:  .w >>test.out
:  undo
:else
:  !ls X*.swp >>test.out
:endif
:!echo under Xtest1.swp >>test.out
:!mkdir Xtest2
:set dir=./Xtest2,.,~
:e Xtest1
:!ls X*.swp >>test.out
:!echo under under >>test.out
:!ls Xtest2 >>test.out
:!echo under Xtest1.swp >>test.out
:!mkdir Xtest.je
:/start of testfile/,/end of testfile/w! Xtest2/Xtest3
:set dir=Xtest.je,~
:e Xtest2/Xtest3
:swap
:!ls Xtest2 >>test.out
:!echo under Xtest3 >>test.out
:!ls Xtest.je >>test.out
:!echo under Xtest3.swp >>test.out
:qa!
ENDTEST

start of testfile
line 2 Abcdefghij
line 3 Abcdefghij
end of testfile
[1m[34m~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for 'directory' option.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 40 lines, 965 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[47;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset dir=.,~[?25l[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/start of testfile/,/end of testfile/w! Xtest1[?25l"Xtest1" [60;10H[K[60;10H[New] 4L, 70C written[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" do an ls of the current dir to find the swap file (should not be there)[?25l[48;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("unix")[?25l
:  [?12l[?25h:  !ls .X*.swp >test.out
[?25l:!ls .X*.swp >test.out[?1l>[?12l[?25h[?1049l
ls: cannot access .X*.swp: No such file or directory

shell returned 2

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:  :[?12l[?25helse
[?25l:  [?12l[?25h:  r !ls X*.swp >test.out
[?25l:  [?12l[?25h:endif[?25l[60;1H[K[60;1H:[?12l[?25h!echo first line >>test.out[?25l[28C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25he Xtest1[?25l"Xtest1" 4L, 70C[27m[23m[m[H[2J[1;1Hstart of testfile
line 2 Abcdefghij
line 3 Abcdefghij
end of testfile
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H"Xtest1" 4L, 70C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("unix")[?25l
:  [?12l[?25h:" Do an ls of the current dir to find the swap file, remove the leading dot
[?25l:  [?12l[?25h:" to make the result the same for all systems.
[?25l:  [?12l[?25h:  r!ls .X*.swp[m
[?25l:  [?12l[?25h:  s/\.*X/X/
[?25l:  [?12l[?25h:  .w >>test.out[?25l"test.out" [60;12H[K[60;12H1L, 11C appended
:  [?12l[?25h:  undo
[?25l1 line less; before #1  0 seconds ago
:  [?12l[?25h:else
[?25l:  [?12l[?25h:  !ls X*.swp >>test.out
[?25l:  [?12l[?25h:endif[27m[23m[m[H[2J[?25l[1;1Hstart of testfile
line 2 Abcdefghij
line 3 Abcdefghij
end of testfile
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h!echo under Xtest1.swp >>test.out[?25l[34C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xtest2[?25l[14C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hset dir=./Xtest2,.,~[?25l[27m[23m[m[H[2J[1;1Hstart of testfile
line 2 Abcdefghij
line 3 Abcdefghij
end of testfile
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25he Xtest1[?25l"Xtest1" 4L, 70C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h!ls X*.swp >>test.out[?25l[22C[?1l>[?12l[?25h[?1049l
ls: cannot access X*.swp: No such file or directory

shell returned 2

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!echo under under >>test.out[?25l[29C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!ls Xtest2 >>test.out[?25l[22C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!echo under Xtest1.swp >>test.out[?25l[34C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xtest.je[?25l[16C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h/start of testfile/,/end of testfile/w! Xtest2/Xtest3[?25l[31msearch hit BOTTOM, continuing at TOP[m[60;37H[K[60;1H"Xtest2/Xtest3" [60;17H[K[60;17H[New] 4L, 70C written[27m[23m[m[H[2J[1;1Hstart of testfile
line 2 Abcdefghij
line 3 Abcdefghij
end of testfile
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H"Xtest2/Xtest3" [New] 4L, 70C written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset dir=Xtest.je,~[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtest2/Xtest3[?25l"Xtest2/Xtest3" 4L, 70C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hswap[?25lXtest.je/Xtest3.swp[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h!ls Xtest2 >>test.out[?25l[22C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!echo under Xtest3 >>test.out[?25l[30C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!ls Xtest.je >>test.out[?25l[24C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!echo under Xtest3.swp >>test.out[?25l[34C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test13.failed test.ok test.out X* viminfo
cp test13.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test13.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test13.in" 58 lines, 1133 characters[1;1HTests for autocommands on :close command

Write three files and open them, each in a window.
Then go to next window, with autocommand that deletes the previous one.
Do this twice, writing the file.

Also test deleting the buffer on a Unload event.  If this goes wrong there
will be the ATTENTION prompt.

Also test changing buffers in a BufDel autocommand.  If this goes wrong there
are ml_line errors and/or a Crash.

STARTTEST
:so small.vim
:/^start of testfile/,/^end of testfile/w! Xtestje1
:/^start of testfile/,/^end of testfile/w! Xtestje2
:/^start of testfile/,/^end of testfile/w! Xtestje3
:e Xtestje1
otestje1[34m^[[m
:w
:sp Xtestje2
otestje2[34m^[[m
:w
:sp Xtestje3
otestje3[34m^[[m
:w
[34m^W^W[m
:au WinLeave Xtestje2 bwipe
[34m^W^W[m
:w! test.out
:au WinLeave Xtestje1 bwipe Xtestje3
:close
:w >>test.out
:e Xtestje1
:bwipe Xtestje2 Xtestje3 test.out
:au!
:au! BufUnload Xtestje1 bwipe
:e Xtestje3
:w >>test.out
:e Xtestje2
:sp Xtestje1
:e
:w >>test.out
:au!
:only
:e Xtestje1
:bwipe Xtestje2 Xtestje3 test.out test13.in
:au BufWipeout Xtestje1 buf Xtestje1
:bwipe
:w >>test.out
:qa!
ENDTEST

start of testfile[55;9Hcontents[56;9Hcontents[57;9Hcontents
end of testfile
[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for autocommands on :close command[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[13;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[14;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 38 lines, 631 characters written[14;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[14;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[52;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestje1[?25l"Xtestje1" [60;13H[K[60;12H[New File] 5 lines, 64 characters written[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestje2[?25l"Xtestje2" [60;13H[K[60;12H[New File] 5 lines, 64 characters written[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestje3[?25l"Xtestje3" [60;13H[K[60;12H[New File] 5 lines, 64 characters written[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestje1[?25l"Xtestje1" 5 lines, 64 characters[1;1Hstart of testfile[1;18H[K[2;9Hcontents
        contents[3;17H[K[4;1H        contents[4;17H[K[5;1Hend of testfile[5;16H[K[6;1H[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [1;1H[?12l[?25h[?25l[2;59r[m[2;1H[L[1;60r[2;1Htestje1[60;1H[K[2;7H[?12l[?25h[3;8H[?25l[60;1H:[?12l[?25hw[?25l"Xtestje1" 6 lines, 72 characters written[3;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xtestje2[?25l"Xtestje2" [60;12H[K[60;12H5 lines, 64 characters[2;1H        contents


end of testfile[5;16H[K[6;1H[1m[34m~                                                                                                 [m[30;1H[1m[7mXtestje2                                                                                          [m[31;1Htestje1[31;8H[K[32;1H        contents[32;17H[K[33;1H        contents[33;17H[K[34;1H        contents[34;17H[K[35;1Hend of testfile[35;16H[K[59;1H[7mXtestje1                                                                                          [1;1H[?12l[?25h[?25l[2;29r[m[2;1H[L[1;60r[2;1Htestje2[30;10H[1m[7m[+][m[60;1H[K[2;7H[?12l[?25h[3;8H[?25l[60;1H:[?12l[?25hw[?25l"Xtestje2" 6 lines, 72 characters written[30;10H[1m[7m    [3;8H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hsp Xtestje3[?25l"Xtestje3" [60;12H[K[60;12H5 lines, 64 characters[27m[23m[m[H[2J[1;1Hstart of testfile[2;9Hcontents[3;9Hcontents[4;9Hcontents
end of testfile
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [m[20;1H[1m[7mXtestje3                                                                                          [m[21;1Htestje2[22;9Hcontents[23;9Hcontents[24;9Hcontents
end of testfile
[1m[34m~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [m[40;1H[7mXtestje2                                                                                          [m[41;9Hcontents[42;9Hcontents[43;9Hcontents
end of testfile
[1m[34m~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7mXtestje1                                                                                          [1;1H[?12l[?25h[?25l[2;19r[m[2;1H[L[1;60r[2;1Htestje3[20;10H[1m[7m[+][2;7H[?12l[?25h[3;8H[?25l[60;1H[m:[?12l[?25hw[?25l"Xtestje3" 6 lines, 72 characters written[20;10H[1m[7m    [3;8H[?12l[?25h[m[20;1H[7mXtestje3[m[1m[7m [m[7m                                                                                          [m[40;1H[1m[7mXtestje2                                                                                          [22;8H[23;8H[?25l[m[60;1H[K[60;1H:[?12l[?25hau WinLeave Xtestje2 bwipe[?25l[23;8H[?12l[?25h[27m[23m[m[H[2J[?25l[1;1Hstart of testfile
testje3[3;9Hcontents[4;9Hcontents[5;9Hcontents
end of testfile
[1m[34m~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [m[29;1H[7mXtestje3                                                                                          [m[30;1Htestje1[31;9Hcontents[32;9Hcontents[33;9Hcontents
end of testfile
[1m[34m~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[1m[7mXtestje1                                                                                          [31;8H[?12l[?25h[32;8H[?25l[60;1H[m:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 6 lines, 72 characters written[32;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau WinLeave Xtestje1 bwipe Xtestje3[?25l[32;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose[?25l[2;7H1[29;1H[1m[34m~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [59;1H~                                                                                                 [4;8H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H6 lines, 72 characters appended[4;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestje1[?25l"Xtestje1" 6 lines, 72 characters[4;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe Xtestje2 Xtestje3 test.out[?25l[1m[37m[41mE94: No matching buffer for Xtestje2 Xtestje3 test.out[4;9H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau![?25l[4;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau! BufUnload Xtestje1 bwipe[?25l[4;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestje3[?25l"Xtestje3" 6 lines, 72 characters[2;7H3[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H6 lines, 72 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestje2[?25l"Xtestje2" 6 lines, 72 characters[2;7H2[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xtestje1[?25l"Xtestje1" [60;12H[K[60;12H6 lines, 72 characters[2;7H1[30;1H[1m[7mXtestje1                                                                                          [m[31;1Hstart of testfile[31;18H[K[32;1Htestje2[32;8H[K[33;1H        contents[33;17H[K[34;1H        contents[34;17H[K[35;1H        contents[35;17H[K[36;1Hend of testfile[36;16H[K[59;1H[7mXtestje2                                                                                          [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he[?25l[1m[37m[41mE143: Autocommands unexpectedly deleted new buffer Xtestje1[m[2;7H2[30;8H[1m[7m2 [m[60;1H"Xtestje2" line 1 of 6 --16%-- col 1[1m[37m[41mt[m[60;37H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H6 lines, 72 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau![?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25honly[?25l[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xtestje1[?25l"Xtestje1" 6 lines, 72 characters[2;7H1[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe Xtestje2 Xtestje3 test.out test13.in[?25l4 buffers wiped out[60;20H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufWipeout Xtestje1 buf Xtestje1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe[?25l"Xtestje1" 6 lines, 72 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H6 lines, 72 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test14.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test14.in" 86 lines, 1434 characters[1;1HTests 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
/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\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>"
:else
: let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
:endif
:exe "normal " . tt
:unlet tt
:.w >>test.out
:set vb
/^Piece
2]maA[34m^[[m:.w >>test.out
j]maB[34m^[[m:.w >>test.out
]maC[34m^[[m:.w >>test.out
[maD[34m^[[m:.w >>test.out
k2[maE[34m^[[m:.w >>test.out
3[maF[34m^[[m:.w >>test.out
]MaG[34m^[[m:.w >>test.out
j2]MaH[34m^[[m:.w >>test.out
]M]MaI[34m^[[m:.w >>test.out
2[MaJ[34m^[[m:.w >>test.out
k[MaK[34m^[[m:.w >>test.out
3[MaL[34m^[[m:.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:])
:/^search()/,$w >>test.out
:qa!
ENDTEST

- Bug in "vPPPP" on this text (Webb):[55;9H{[56;17Hcmd;[57;17H{[58;25Hcmd;    /* <-- Start cursor here */[59;25H{[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for "vaBiB", end could be wrong.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[7;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 44 lines, 989 characters written[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[8;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[52;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[53;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hStart cursor here[?25l[58;40H[?12l[?25h[?25l[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[55;17H[7m{ 
                        cmd;    /* <-- Start cursor here */ 
                        { 
                        } 
                [m}[60;1H[K[59;17H[?12l[?25h[?25l[54;1H[7m                cmd; 
                [59;17H}[?12l[?25h[?25l[m
6 fewer lines[54;1H        }[54;10H[K[55;1H[K[56;1HPiece of Java[56;14H[K[57;1H{[57;2H[K[58;1H        tt m1 {[58;16H[K[59;1H                t1;[54;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h?Bug?,/Piece/-2w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 3 lines, 44 characters written[54;9H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^- Bug[?25l[31msearch hit BOTTOM, continuing at TOP[52;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hs/u/~u~/[?25l[52;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hs/i/~u~/[?25l[52;7Huuun "vPPPP" on this text (Webb):[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hs/o/~~~/[?25l[52;20Huuuuuuuuun this text (Webb):[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 48 characters appended[52;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("ebcdic")[?25l
:  [?12l[?25h: let tt = "o\<C-V>193\<C-V>xc2\<C-V>o303 \<C-V>90a\<C-V>xfg\<C-V>o578\<Esc>"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: let tt = "o\<C-V>65\<C-V>x42\<C-V>o103 \<C-V>33a\<C-V>xfg\<C-V>o78\<Esc>"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HAlso test for ^Vxff and ^Vo123 in Insert mode.
Also test "[m", "]m", "[M" and "]M"
Also test search()[60;1H[K[52;1H[?12l[?25h[?25l[60;1H:[?12l[?25hexe "normal " . tt[?25l[53;59r[53;1H[L[1;60r[53;1HABC !a[34m^O[mg[34m^G[m8[60;1H[K[53;12H[?12l[?25h[?25l[60;1H:[?12l[?25hunlet tt[?25l[53;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[53;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset vb[?25l[53;12H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Piece[?25l[57;1H[?12l[?25h[59;15H[?25l{A[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;16H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;17Ht1;[60;1H[K[59;16H[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[57;9H} e1[59;9Htt m2 {[?12l[?25h[?25l{B[?12l[?25h[?25l
:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;16H[?12l[?25h[?25l[1;59r[1;1H[4M[1;60r[56;17Ht2;[57;9H} e2[59;9Htt m3 {[60;1H[K[59;15H[?12l[?25h[?25l{C[?12l[?25h[?25l
:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;16H[?12l[?25h[?25l{DC[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[59;16H[?12l[?25h[58;1H[51;15H[?25l{EA[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[51;16H[?12l[?25h[50;1H[?25l{F[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 3 characters appended[50;2H[?12l[?25h[53;9H[?25l}G e1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[53;10H[?12l[?25h
[?25l[1;59r[1;1H[5M[1;60r[55;17Hif (x)[56;17H{[57;25Ht3;[58;17H}[59;9H} e3[60;1H[K[59;9H[?12l[?25h[?25l}H e3[?12l[?25h[?25l
:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[59;10H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[60;1H[K[59;1H[?12l[?25h[?5h[?5l[?25l}I[?12l[?25h[?25l
:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 3 characters appended[59;2H[?12l[?25h[58;9H[?25l}JH e3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 8 characters appended[58;10H[?12l[?25h[57;16H[51;9H[?25l}K e2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[51;10H[?12l[?25h[44;1H[?25l{LF[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 4 characters appended[44;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[44;2H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^foobar[?25l[1;59r[1;1H[2M[1;60r[59;1Hfoobar[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet startline = line('.')[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall search('foobar', 'c')[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), line('.') - startline)[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hcall search('^$', 'c')[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), line('.') - startline)[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall search('^$', 'bc')[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), line('.') - startline)[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25htwo[?25l[1;59r[1;1H[2M[1;60r[59;1Hone two[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25hcall search('.', 'c')[?25l[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), getline('.')[col('.') - 1:])[?25l[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^search()/,$w >>test.out[?25l"test.out" [60;12H[K[60;12H5 lines, 19 characters appended[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test15.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test15.in" 136 lines, 2246 characters[1;1HTests 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[34m^R[m
:map gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq
/^aa
ggu
:?test for :left?,$w! test.out
:qa!
ENDTEST[25;9Htest for :left[26;11Ha[13Ca[27;13Hfa[10Ca[28;11Hdfa[11Ca[29;17Hsdfa[12Ca[30;11Hasdfa[9Ca[31;17Hxasdfa[10Ca
asxxdfa[9Ca[34;9Htest for :center[35;11Ha[13Ca[36;13Hfa[10Cafd asdf[37;11Hdfa[11Ca[38;17Hsdfa[12Cafd asdf[39;11Hasdfa[9Ca[40;17Hxasdfa[10Casdfasdfasdfasdfasdf
asxxdfa[9Ca[43;9Htest for :right[44;9Ha[15Ca[45;9Hfa[14Ca[46;9Hdfa[13Ca[47;9Hsdfa[12Ca[48;9Hasdfa[11Ca[49;9Hxasdfa[10Ca[50;9Hasxxdfa[9Ca[51;9Hasxa;ofa[16Ca[52;9Hasdfaqwer[15Ca[53;9Ha[15Cax[54;9Hfa[14Cax[55;9Hdfa[13Cax[56;9Hsdfa[12Cax[57;9Hasdfa[11Cax[58;9Hxasdfa[10Cax[59;9Hasxxdfa[9Cax[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for :right on text with embedded TAB.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 17 lines, 401 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[23;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset tw=65[?25l[24;1H[?12l[?25h[25;8H[?25l[60;1H[K[60;1H:[?12l[?25h/^\s*test for :left/,/^\s*test for :center/ left[?25l[31msearch hit BOTTOM, continuing at TOP[m[60;37H[K[25;1Htest for :left[25;15H[K[26;1Ha[9C      a[26;25H[K[27;1Hfa[10C    a[27;25H[K[28;1Hdfa[7C      a[28;25H[K[29;1Hsdfa[12Ca[29;18H[K[30;1Hasdfa           a[30;25H[K[31;1Hxasdfa[10Ca[31;18H[K[34;1Htest for :cente[34;18H[K[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^\s*test for :center/,/^\s*test for :right/ center[?25l[34;1H                [8Ctest for :center[35;11H [13C a[14Ca[36;13H  [8Cfa        [8Cafd asdf[37;11H   [11C dfa[12Ca[38;17H    sdfa[8C        afd asdf[39;11H     [9C asdfa[10Ca[40;15Hxasdfa  
       [9C [7Casxxdfa[9Ca[43;9H                 test for :right[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^\s*test for :right/,/^xxx/-1 right[?25l[43;26H               [10Ctest for :right[44;9H [15C [29Ca[9Ca[45;9H  [14C [28Cfa[9Ca[46;9H   [13C [27Cdfa[9Ca[47;9H    [12C [26Csdfa[9Ca[48;9H     [11C [25Casdfa[9Ca[49;9H      [10C [24Cxasdfa[9Ca[50;9H       [9C [23Casxxdfa[9Ca[51;9H        [16C [14Casxa;ofa[9Ca[52;9H         [15C [13Casdfaqwer[9Ca[53;9H [15C  [20Ca[9Cax[54;9H  [14C  [19Cfa[9Cax[55;9H   [13C  [18Cdfa[9Cax[56;9H    [12C  [17Csdfa[9Cax[57;9H     [11C  [16Casdfa[9Cax[58;9H      [10C  [15Cxasdfa[9Cax[59;9H       [9C  [14Casxxdfa[9Cax[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fo+=tcroql tw=72[?25l[25;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hxxxxxxxx$[?25l[27m[23m[m[H[2J[1;40Hasxa;ofa[9Caxxx[2;39Hasdfaqwer[9Caxxx[3;47Ha[9Caxxxo[4;46Hfa[9Caxxxo[5;45Hdfa[9Caxxxo[6;44Hsdfa[9Caxxxo[7;43Hasdfa[9Caxxxo[8;42Hxasdfa[9Caxxxo[9;41Hasxxdfa[9Caxxxo[10;40Hasxa;ofa[9Caxxxo[11;39Hasdfaqwer[9Caxxxo[12;47Ha[9Caxxxoi[13;46Hfa[9Caxxxoi[14;45Hdfa[9Caxxxoi[15;44Hsdfa[9Caxxxoi[16;43Hasdfa[9Caxxxoi[17;42Hxasdfa[9Caxxxoi[18;41Hasxxdfa[9Caxxxoi[19;40Hasxa;ofa[9Caxxxoi[20;39Hasdfaqwer[9Caxxxoi[21;47Ha[9Caxxxoik[22;46Hfa[9Caxxxoik[23;45Hdfa[9Caxxxoik[24;44Hsdfa[9Caxxxoik[25;43Hasdfa[9Caxxxoik[26;42Hxasdfa[9Caxxxoik[27;41Hasxxdfa[9Caxxxoik[28;40Hasxa;ofa[9Caxxxoik[29;39Hasdfaqwer[9Caxxxoik[30;47Ha[9Caxxxoike[31;46Hfa[9Caxxxoike[32;45Hdfa[9Caxxxoike[33;44Hsdfa[9Caxxxoike[34;43Hasdfa[9Caxxxoike[35;42Hxasdfa[9Caxxxoike[36;41Hasxxdfa[9Caxxxoike[37;40Hasxa;ofa[9Caxxxoike[38;39Hasdfaqwer[9Caxxxoike[39;47Ha[9Caxxxoikey[40;46Hfa[9Caxxxoikey[41;45Hdfa[9Caxxxoikey[42;44Hsdfa[9Caxxxoikey[43;43Hasdfa[9Caxxxoikey[44;42Hxasdfa[9Caxxxoikey[45;41Hasxxdfa[9Caxxxoikey[46;40Hasxa;ofa[9Caxxxoikey[47;39Hasdfaqwer[9Caxxxoikey

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[55;50H[?12l[?25h[?25l[49;59r[59;1H
[1;60r[49;6H xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx[50;62Hxx xxxxxxx.
xxxx xxxx.[51;11H[K[53;65Hxxxxxx[54;9Hx: xxxx xxxxxxx, xx xxxx[7C xxxxxxx[54;51H[K[59;1H[1m[34m~                                                                                                 [54;1H[?12l[?25h[53;1H
[?25l[60;1H[m:[?12l[?25hset nocp viminfo+=nviminfo[?25l[54;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" undo/redo here to make the next undo only work on the following changes[?25l[54;1H[?12l[?25h[?25l[60;1H1 more line; before #1  0 seconds ago[60;38H[K[27m[23m[m[H[2J[1;1HTests 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[34m^R[m
:map gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq
/^aa
ggu
:?test for :left?,$w! test.out
:qa!
ENDTEST[25;9Htest for :left[26;11Ha[13Ca[27;13Hfa[10Ca[28;11Hdfa[11Ca[29;17Hsdfa[12Ca[30;11Hasdfa[9Ca[31;17Hxasdfa[10Ca
asxxdfa[9Ca[34;9Htest for :center[35;11Ha[13Ca[36;13Hfa[10Cafd asdf[37;11Hdfa[11Ca[38;17Hsdfa[12Cafd asdf[39;11Hasdfa[9Ca[40;17Hxasdfa[10Casdfasdfasdfasdfasdf
asxxdfa[9Ca[43;9Htest for :right[44;9Ha[15Ca[45;9Hfa[14Ca[46;9Hdfa[13Ca[47;9Hsdfa[12Ca[48;9Hasdfa[11Ca[49;9Hxasdfa[10Ca[50;9Hasxxdfa[9Ca[51;9Hasxa;ofa[16Ca[52;9Hasdfaqwer[15Ca[53;9Ha[15Cax[54;9Hfa[14Cax[55;9Hdfa[13Cax[56;9Hsdfa[12Cax[57;9Hasdfa[11Cax[58;9Hxasdfa[10Cax[59;9Hasxxdfa[9Cax[25;8H[?12l[?25h[?25l[60;1H1 line less; after #1  0 seconds ago[25;1Htest for :left[25;15H[K[26;1Ha[9C      a[26;25H[K[27;1Hfa[10C    a[27;25H[K[28;1Hdfa[7C      a[28;25H[K[29;1Hsdfa[12Ca[29;18H[K[30;1Hasdfa           a[30;25H[K[31;1Hxasdfa[10Ca[31;18H[K[34;9H                test for :center[35;11H [13C a[14Ca[36;13H  [8Cfa        [8Cafd asdf[37;11H   [11C dfa[12Ca[38;17H    sdfa[8C        afd asdf[39;11H     [9C asdfa[10Ca[40;15Hxasdfa  
       [9C [7Casxxdfa[9Ca[43;9H               [27Ctest for :right[44;9H [15C [29Ca[9Ca[45;9H  [14C [28Cfa[9Ca[46;9H   [13C [27Cdfa[9Ca[47;9H    [12C [26Csdfa[9Ca[48;9H     [11C [25Casdfa[9Ca[49;9H      [10C [24Cxasdfa[9Ca[50;9H       [9C [23Casxxdfa[9Ca[51;9H        [16C [14Casxa;ofa[9Ca[52;9H         [15C [13Casdfaqwer[9Ca[53;9H [15C  [20Ca[9Cax[54;9H  [14C  [19Cfa[9Cax[55;9H   [13C  [18Cdfa[9Cax[56;9H    [12C  [17Csdfa[9Cax[57;9H     [11C  [16Casdfa[9Cax[58;9H      [10C  [15Cxasdfa[9Cax[59;9H       [9C  [14Casxxdfa[9Cax[25;1H[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hmap gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq[?25l[26;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^aa[?25l[27m[23m[m[H[2J[1;41Hasxxdfa[9Caxxx[2;40Hasxa;ofa[9Caxxx[3;39Hasdfaqwer[9Caxxx[4;47Ha[9Caxxxo[5;46Hfa[9Caxxxo[6;45Hdfa[9Caxxxo[7;44Hsdfa[9Caxxxo[8;43Hasdfa[9Caxxxo[9;42Hxasdfa[9Caxxxo[10;41Hasxxdfa[9Caxxxo[11;40Hasxa;ofa[9Caxxxo[12;39Hasdfaqwer[9Caxxxo[13;47Ha[9Caxxxoi[14;46Hfa[9Caxxxoi[15;45Hdfa[9Caxxxoi[16;44Hsdfa[9Caxxxoi[17;43Hasdfa[9Caxxxoi[18;42Hxasdfa[9Caxxxoi[19;41Hasxxdfa[9Caxxxoi[20;40Hasxa;ofa[9Caxxxoi[21;39Hasdfaqwer[9Caxxxoi[22;47Ha[9Caxxxoik[23;46Hfa[9Caxxxoik[24;45Hdfa[9Caxxxoik[25;44Hsdfa[9Caxxxoik[26;43Hasdfa[9Caxxxoik[27;42Hxasdfa[9Caxxxoik[28;41Hasxxdfa[9Caxxxoik[29;40Hasxa;ofa[9Caxxxoik[30;39Hasdfaqwer[9Caxxxoik[31;47Ha[9Caxxxoike[32;46Hfa[9Caxxxoike[33;45Hdfa[9Caxxxoike[34;44Hsdfa[9Caxxxoike[35;43Hasdfa[9Caxxxoike[36;42Hxasdfa[9Caxxxoike[37;41Hasxxdfa[9Caxxxoike[38;40Hasxa;ofa[9Caxxxoike[39;39Hasdfaqwer[9Caxxxoike[40;47Ha[9Caxxxoikey[41;46Hfa[9Caxxxoikey[42;45Hdfa[9Caxxxoikey[43;44Hsdfa[9Caxxxoikey[44;43Hasdfa[9Caxxxoikey[45;42Hxasdfa[9Caxxxoikey[46;41Hasxxdfa[9Caxxxoikey[47;40Hasxa;ofa[9Caxxxoikey[48;39Hasdfaqwer[9Caxxxoikey

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[57;1H[?12l[?25h[?25l


:.,.+2s/^/x/3 substitutions on 3 lines[57;1Hxaa aa aa aa
xbb bb bb bb
xcc cc cc cc[?12l[?25h[58;1H[57;1H[?25l[60;1H[K[60;1H:set tw=3[57;1H[?12l[?25h[?25l


3 more lines[1;59r[59;1H
[1;60r[56;5H[K[57;1Haa[57;3H[K[58;1Haa[58;3H[K[59;1Haa[60;1H[K[60;1H3 more lines[59;1H[?12l[?25h[?25l
3 fewer lines; before #2  0 seconds ago[56;1Haa aa aa aa
bb bb bb bb
cc cc cc cc
[1m[34m~                                                                                                 [56;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25h?test for :left?,$w! test.out[?25l"test.out"[60;12H[K[60;12H[New] 111L, 2304C written[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test17.failed test.ok test.out X* viminfo
cp test17.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test17.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test17.in" 141 lines, 2634 characters[1;1HTests for:
- "gf" on ${VAR},
- ":checkpath!" with various 'include' settings.

STARTTEST
:so small.vim
:if has("ebcdic")
: set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
:else
: set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
:endif
:function! DeleteDirectory(dir)
: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
:  exec "silent !rmdir /Q /S " . a:dir
: else
:  exec "silent !rm -rf " . a:dir
: endif
:endfun
:if has("unix")
:let $CDIR = "."
/CDIR
:else
:if has("amiga")
:let $TDIR = "/testdir"
:else
:let $TDIR = "."
:endif
/TDIR
:endif
:" Dummy writing for making that sure gf doesn't fail even if the current
:" file is modified. It can be occurred when executing the following command
:" directly on Windows without fixing the 'fileformat':
:"  > nmake -f Make_dos.mak test17.out
:w! test.out
gf
:set ff=unix
:w! test.out
:brewind
ENDTEST[41;9H${CDIR}/test17a.in[42;9H$TDIR/test17a.in

STARTTEST
:" check for 'include' without \zs or \ze
:lang C
:call delete("./Xbase.a")
:call DeleteDirectory("Xdir1")
:!mkdir Xdir1
:!mkdir "Xdir1/dir2"
:e! Xdir1/dir2/foo.a
i#include   "bar.a"[34m^[[m
:w
:e Xdir1/dir2/bar.a
i#include      "baz.a"[34m^[[m
:w
:e Xdir1/dir2/baz.a
i#include[12C"foo.a"[34m^[[m
:w[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for:[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 33 lines, 771 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[39;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("ebcdic")[?25l
:  [?12l[?25h: set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HTests for:
- "gf" on ${VAR},
- ":checkpath!" with various 'include' settings.[60;1H[K[40;1H[?12l[?25h[?25l[60;1H:[?12l[?25hfunction! DeleteDirectory(dir)[?25l
:  [?12l[?25h: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
[?25l:    [?12l[?25h:  exec "silent !rmdir /Q /S " . a:dir
[?25l:    [?12l[?25h: else
[?25l:    [?12l[?25h:  exec "silent !rm -rf " . a:dir
[?25l:    [?12l[?25h: endif
[?25l:  [?12l[?25h:endfun[1;1H[6L[?25l[1;1HTests for:
- "gf" on ${VAR},
- ":checkpath!" with various 'include' settings.

STARTTEST
:so small.vim[60;1H[K[40;1H[?12l[?25h[?25l[60;1H:[?12l[?25hif has("unix")[?25l
:  [?12l[?25h:let $CDIR = "."
[?25l:  [?12l[?25h/CDIR
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:if has("amiga")
[?25l:    [?12l[?25h:let $TDIR = "/testdir"
[?25l:    [?12l[?25h:else
[?25l:    [?12l[?25h:let $TDIR = "."
[?25l:    [?12l[?25h:endif
[?25l:  [?12l[?25h/TDIR
[?25l:  [?12l[?25h:endif[1;1H[10L[?25l[1;1HTests for:
- "gf" on ${VAR},
- ":checkpath!" with various 'include' settings.

STARTTEST
:so small.vim
:if has("ebcdic")
: set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
:else
: set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}[60;1H[K[41;9H[?12l[?25h[?25l[60;1H:[?12l[?25h" Dummy writing for making that sure gf doesn't fail even if the current[?25l[41;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" file is modified. It can be occurred when executing the following command[?25l[41;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" directly on Windows without fixing the 'fileformat':[?25l[41;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"  > nmake -f Make_dos.mak test17.out[?25l[41;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 141 lines, 2634 characters written[41;9H[?12l[?25h[?25l[60;2H/sources/vim74/src/testdir/./test17a.in" [60;43H[K[60;43H3 lines, 88 characters[1;2Hhis file is just to test "gf" in test 17.
The contents is not important.
Just testing![3;14H[K[4;1H[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25hset ff=unix[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H3 lines, 88 characters written[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbrewind[?25l"test17.in" 141 lines, 2634 characters[1;1H:function! DeleteDirectory(dir)[1;32H[K[2;1H: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
:  exec "silent !rmdir /Q /S " . a:dir
: else[4;7H[K[5;1H:  exec "silent !rm -rf " . a:dir[5;34H[K[6;1H: endif[6;8H[K[7;1H:endfun[7;8H[K[8;1H:if has("unix")[8;16H[K[9;1H:let $CDIR = "."[9;17H[K[10;1H/CDIR[10;6H[K[11;1H:else[11;6H[K[12;1H:if has("amiga")[12;17H[K[13;1H:let $TDIR = "/testdir"[13;24H[K[14;1H:else[14;6H[K[15;1H:let $TDIR = "."[15;17H[K[16;1H:endif[16;7H[K[17;1H/TDIR[17;6H[K[18;1H:endif[18;7H[K[19;1H:" Dummy writing for making that sure gf doesn't fail even if the current[19;74H[K[20;1H:" file is modified. It can be occurred when executing the following command[20;77H[K[21;1H:" directly on Windows without fixing the 'fileformat':[21;56H[K[22;1H:"  > nmake -f Make_dos.mak test17.out[22;39H[K[23;1H:w! test.out[23;13H[K[24;1Hgf[24;3H[K[25;1H:set ff=unix[25;13H[K[26;1H:w! test.out[26;13H[K[27;1H:brewind[27;9H[K[28;1HENDTEST[28;8H[K[29;1H[K[30;1H        ${CDIR}/test17a.in[30;27H[K[31;1H        $TDIR/test17a.in[31;25H[K[32;1H[K[33;1HSTARTTEST[33;10H[K[34;1H:" check for 'include' without \zs or \ze[34;42H[K[35;1H:lang C[35;8H[K[36;1H:call delete("./Xbase.a")[36;26H[K[37;1H:call DeleteDirectory("Xdir1")[37;31H[K[38;1H:!mkdir Xdir1[38;14H[K[39;1H:!mkdir "Xdir1/dir2"[39;21H[K[40;1H:e! Xdir1/dir2/foo.a[40;21H[K[41;1Hi#include   "bar.a"[34m^[[m[41;22H[K[42;1H:w[42;3H[K[43;1H:e Xdir1/dir2/bar.a[43;20H[K[44;1Hi#include      "baz.a"[34m^[[m[44;25H[K[45;1H:w[45;3H[K[46;1H:e Xdir1/dir2/baz.a[46;20H[K[47;1Hi#include            "foo.a"[34m^[[m[47;31H[K[48;1H:w[48;3H[K[49;1H:e Xbase.a[49;11H[K[50;1H:set path=Xdir1/dir2[50;21H[K[51;1Hi#include    <foo.a>[34m^[[m[51;23H[K[52;1H:w[52;3H[K[53;1H:redir! >>test.out[53;19H[K[54;1H:checkpath![54;12H[K[55;1H:redir END[55;11H[K[56;1H:brewind[56;9H[K[57;1HENDTEST[57;8H[K[58;1H[K[59;1HSTARTTEST[59;10H[K[30;8H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[33;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H23 lines, 395 characters written[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[34;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[57;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" check for 'include' without \zs or \ze[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlang C[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall delete("./Xbase.a")[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall DeleteDirectory("Xdir1")[?25l[?1l>[?12l[?25h[?1049l[?1049h[?1h=[58;1H[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xdir1[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir "Xdir1/dir2"[?25l[20C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25he! Xdir1/dir2/foo.a[?25l"Xdir1/dir2/foo.a" [New File][27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m#include   "bar.a"[?12l[?25h[?25l[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/foo.a" [New File] 1 line, 19 characters written[1;18H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xdir1/dir2/bar.a[?25l"Xdir1/dir2/bar.a" [New File][1;1H[K[1;1H[?12l[?25h[?25l#include      "baz.a"[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/bar.a" [New File] 1 line, 22 characters written[1;21H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xdir1/dir2/baz.a[?25l"Xdir1/dir2/baz.a" [New File][1;1H[K[1;1H[?12l[?25h[?25l#include[12C"foo.a"[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/baz.a" [New File] 1 line, 28 characters written[1;27H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xbase.a[?25l"Xbase.a" [New File][1;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset path=Xdir1/dir2[?25l[1;1H[?12l[?25h[?25l#include    <foo.a>[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xbase.a" [New File] 1 line, 20 characters written[1;19H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir! >>test.out[?25l[1;19H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcheckpath![?25l[60;1H[K[60;1H[35m--- Included files in path ---[m
[34mXdir1/dir2/foo.a[m
Xdir1/dir2/foo.a -->
  [34mXdir1/dir2/bar.a[m
  Xdir1/dir2/bar.a -->
    [34mXdir1/dir2/baz.a[m
    Xdir1/dir2/baz.a -->
      [34m"foo.a"[m  (Already listed)
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[8L[1;1H#include    <foo.a>
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [m[60;1H[K[1;19H[?12l[?25h[?25l[60;1H:[?12l[?25hbrewind[?25l"test17.in" 141 lines, 2634 characters[1;1H[K[2;1H        ${CDIR}/test17a.in[2;27H[K[3;1H        $TDIR/test17a.in[3;25H[K[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:" check for 'include' without \zs or \ze[6;42H[K[7;1H:lang C[7;8H[K[8;1H:call delete("./Xbase.a")[8;26H[K[9;1H:call DeleteDirectory("Xdir1")[9;31H[K[10;1H:!mkdir Xdir1[10;14H[K[11;1H:!mkdir "Xdir1/dir2"[11;21H[K[12;1H:e! Xdir1/dir2/foo.a[12;21H[K[13;1Hi#include   "bar.a"[34m^[[m[13;22H[K[14;1H:w[14;3H[K[15;1H:e Xdir1/dir2/bar.a[15;20H[K[16;1Hi#include      "baz.a"[34m^[[m[16;25H[K[17;1H:w[17;3H[K[18;1H:e Xdir1/dir2/baz.a[18;20H[K[19;1Hi#include            "foo.a"[34m^[[m[19;31H[K[20;1H:w[20;3H[K[21;1H:e Xbase.a[21;11H[K[22;1H:set path=Xdir1/dir2[22;21H[K[23;1Hi#include    <foo.a>[34m^[[m[23;23H[K[24;1H:w[24;3H[K[25;1H:redir! >>test.out[25;19H[K[26;1H:checkpath![26;12H[K[27;1H:redir END[27;11H[K[28;1H:brewind[28;9H[K[29;1HENDTEST[29;8H[K[30;1H[K[31;1HSTARTTEST[31;10H[K[32;1H:" check for 'include' with \zs and \ze[32;40H[K[33;1H:call delete("./Xbase.b")[33;26H[K[34;1H:call DeleteDirectory("Xdir1")[34;31H[K[35;1H:!mkdir Xdir1[35;14H[K[36;1H:!mkdir "Xdir1/dir2"[36;21H[K[37;1H:let &include='^\s*%inc\s*/\zs[^/]\+\ze'[37;41H[K[38;1H:function! DotsToSlashes()[38;27H[K[39;1H:  return substitute(v:fname, '\.', '/', 'g') . '.b'[39;53H[K[40;1H:endfunction[40;13H[K[41;1H:let &includeexpr='DotsToSlashes()'[41;36H[K[42;1H:e! Xdir1/dir2/foo.b[42;21H[K[43;1Hi%inc   /bar/[34m^[[m[43;16H[K[44;1H:w[44;3H[K[45;1H:e Xdir1/dir2/bar.b[45;20H[K[46;1Hi%inc      /baz/[34m^[[m[46;19H[K[47;1H:w[47;3H[K[48;1H:e Xdir1/dir2/baz.b[48;20H[K[49;1Hi%inc            /foo/[34m^[[m[49;25H[K[50;1H:w[50;3H[K[51;1H:e Xbase.b[51;11H[K[52;1H:set path=Xdir1/dir2[52;21H[K[53;1Hi%inc    /foo/[34m^[[m[53;17H[K[54;1H:w[54;3H[K[55;1H:redir! >>test.out[55;19H[K[56;1H:checkpath![56;12H[K[57;1H:redir END[57;11H[K[58;1H:brewind[58;9H[K[59;1HENDTEST[59;8H[K[30;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[31;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H27 lines, 531 characters written[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[32;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" check for 'include' with \zs and \ze[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall delete("./Xbase.b")[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall DeleteDirectory("Xdir1")[?25l[?1l>[?12l[?25h[?1049l[?1049h[?1h=[59;1H[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xdir1[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir "Xdir1/dir2"[?25l[20C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hlet &include='^\s*%inc\s*/\zs[^/]\+\ze'[?25l[27m[23m[m[H[2J[1;9H${CDIR}/test17a.in[2;9H$TDIR/test17a.in

STARTTEST
:" check for 'include' without \zs or \ze
:lang C
:call delete("./Xbase.a")
:call DeleteDirectory("Xdir1")
:!mkdir Xdir1
:!mkdir "Xdir1/dir2"
:e! Xdir1/dir2/foo.a
i#include   "bar.a"[34m^[[m
:w
:e Xdir1/dir2/bar.a
i#include      "baz.a"[34m^[[m
:w
:e Xdir1/dir2/baz.a
i#include[12C"foo.a"[34m^[[m
:w
:e Xbase.a
:set path=Xdir1/dir2
i#include    <foo.a>[34m^[[m
:w
:redir! >>test.out
:checkpath!
:redir END
:brewind
ENDTEST

STARTTEST
:" check for 'include' with \zs and \ze
:call delete("./Xbase.b")
:call DeleteDirectory("Xdir1")
:!mkdir Xdir1
:!mkdir "Xdir1/dir2"
:let &include='^\s*%inc\s*/\zs[^/]\+\ze'
:function! DotsToSlashes()
:  return substitute(v:fname, '\.', '/', 'g') . '.b'
:endfunction
:let &includeexpr='DotsToSlashes()'
:e! Xdir1/dir2/foo.b
i%inc   /bar/[34m^[[m
:w
:e Xdir1/dir2/bar.b
i%inc      /baz/[34m^[[m
:w
:e Xdir1/dir2/baz.b
i%inc[12C/foo/[34m^[[m
:w
:e Xbase.b
:set path=Xdir1/dir2
i%inc    /foo/[34m^[[m
:w
:redir! >>test.out
:checkpath!
:redir END
:brewind
ENDTEST
[?12l[?25h[?25l
:[?12l[?25hfunction! DotsToSlashes()[?25l
:  [?12l[?25h:  return substitute(v:fname, '\.', '/', 'g') . '.b'
[?25l:  [?12l[?25h:endfunction[1;1H[2L[?25l[1;9H${CDIR}/test17a.in[2;9H$TDIR/test17a.in[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet &includeexpr='DotsToSlashes()'[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xdir1/dir2/foo.b[?25l"Xdir1/dir2/foo.b" [New File][1;9H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m%inc   /bar/[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/foo.b" [New File] 1 line, 13 characters written[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xdir1/dir2/bar.b[?25l"Xdir1/dir2/bar.b" [New File][1;1H[K[1;1H[?12l[?25h[?25l%inc      /baz/[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/bar.b" [New File] 1 line, 16 characters written[1;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xdir1/dir2/baz.b[?25l"Xdir1/dir2/baz.b" [New File][1;1H[K[1;1H[?12l[?25h[?25l%inc[12C/foo/[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/baz.b" [New File] 1 line, 22 characters written[1;21H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xbase.b[?25l"Xbase.b" [New File][1;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset path=Xdir1/dir2[?25l[1;1H[?12l[?25h[?25l%inc    /foo/[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xbase.b" [New File] 1 line, 14 characters written[1;13H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir! >>test.out[?25l[1;13H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcheckpath![?25l[60;1H[K[60;1H[35m--- Included files in path ---[m
[34mXdir1/dir2/foo.b[m
Xdir1/dir2/foo.b -->
  [34mXdir1/dir2/bar.b[m
  Xdir1/dir2/bar.b -->
    [34mXdir1/dir2/baz.b[m
    Xdir1/dir2/baz.b -->
      [34mfoo[m  (Already listed)
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[8L[1;1H%inc    /foo/
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [m[60;1H[K[1;13H[?12l[?25h[?25l[60;1H:[?12l[?25hbrewind[?25l"test17.in" 141 lines, 2634 characters[1;1HSTARTTEST[1;10H[K[2;1H:" check for 'include' with \zs and \ze[2;40H[K[3;1H:call delete("./Xbase.b")[3;26H[K[4;1H:call DeleteDirectory("Xdir1")[4;31H[K[5;1H:!mkdir Xdir1[5;14H[K[6;1H:!mkdir "Xdir1/dir2"[6;21H[K[7;1H:let &include='^\s*%inc\s*/\zs[^/]\+\ze'[7;41H[K[8;1H:function! DotsToSlashes()[8;27H[K[9;1H:  return substitute(v:fname, '\.', '/', 'g') . '.b'[9;53H[K[10;1H:endfunction[10;13H[K[11;1H:let &includeexpr='DotsToSlashes()'[11;36H[K[12;1H:e! Xdir1/dir2/foo.b[12;21H[K[13;1Hi%inc   /bar/[34m^[[m[13;16H[K[14;1H:w[14;3H[K[15;1H:e Xdir1/dir2/bar.b[15;20H[K[16;1Hi%inc      /baz/[34m^[[m[16;19H[K[17;1H:w[17;3H[K[18;1H:e Xdir1/dir2/baz.b[18;20H[K[19;1Hi%inc            /foo/[34m^[[m[19;25H[K[20;1H:w[20;3H[K[21;1H:e Xbase.b[21;11H[K[22;1H:set path=Xdir1/dir2[22;21H[K[23;1Hi%inc    /foo/[34m^[[m[23;17H[K[24;1H:w[24;3H[K[25;1H:redir! >>test.out[25;19H[K[26;1H:checkpath![26;12H[K[27;1H:redir END[27;11H[K[28;1H:brewind[28;9H[K[29;1HENDTEST[29;8H[K[30;1H[K[31;1HSTARTTEST[31;10H[K[32;1H:" check for 'include' with \zs and no \ze[32;43H[K[33;1H:call delete("./Xbase.c")[33;26H[K[34;1H:call DeleteDirectory("Xdir1")[34;31H[K[35;1H:!mkdir Xdir1[35;14H[K[36;1H:!mkdir "Xdir1/dir2"[36;21H[K[37;1H:let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'[37;73H[K[38;1H:function! StripNewlineChar()[38;30H[K[39;1H:  if v:fname =~ '\n$'[39;23H[K[40;1H:    return v:fname[:-2][40;25H[K[41;1H:  endif[41;9H[K[42;1H:  return v:fname[42;18H[K[43;1H:endfunction[43;13H[K[44;1H:let &includeexpr='StripNewlineChar()'[44;39H[K[45;1H:e! Xdir1/dir2/foo.c[45;21H[K[46;1Hi%inc   bar.c[34m^[[m[46;16H[K[47;1H:w[47;3H[K[48;1H:e Xdir1/dir2/bar.c[48;20H[K[49;1Hi%inc      baz.c[34m^[[m[49;19H[K[50;1H:w[50;3H[K[51;1H:e Xdir1/dir2/baz.c[51;20H[K[52;1Hi%inc            foo.c[34m^[[m[52;25H[K[53;1H:w[53;3H[K[54;1H:e Xdir1/dir2/FALSE.c[54;22H[K[55;1Hi%inc            foo.c[34m^[[m[55;25H[K[56;1H:w[56;3H[K[57;1H:e Xbase.c[57;11H[K[58;1H:set path=Xdir1/dir2[58;21H[K[59;1Hi%inc    FALSE.c foo.c[34m^[[m[59;25H[K[30;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[31;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H39 lines, 743 characters written[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[32;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[12M[1;60r[48;1H:w
:redir! >>test.out
:checkpath!
:redir END
:brewind
:" change "\" to "/" for Windows and fix 'fileformat'
:e test.out
:%s#\\#/#g
:set ff&
:w
:q
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" check for 'include' with \zs and no \ze[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall delete("./Xbase.c")[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall DeleteDirectory("Xdir1")[?25l[?1l>[?12l[?25h[?1049l[?1049h[?1h=[59;1H[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xdir1[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir "Xdir1/dir2"[?25l[20C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hlet &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'[?25l[27m[23m[m[H[2J[1;1H:w
:e Xdir1/dir2/bar.b
i%inc      /baz/[34m^[[m
:w
:e Xdir1/dir2/baz.b
i%inc[12C/foo/[34m^[[m
:w
:e Xbase.b
:set path=Xdir1/dir2
i%inc    /foo/[34m^[[m
:w
:redir! >>test.out
:checkpath!
:redir END
:brewind
ENDTEST

STARTTEST
:" check for 'include' with \zs and no \ze
:call delete("./Xbase.c")
:call DeleteDirectory("Xdir1")
:!mkdir Xdir1
:!mkdir "Xdir1/dir2"
:let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'
:function! StripNewlineChar()
:  if v:fname =~ '\n$'
:    return v:fname[:-2]
:  endif
:  return v:fname
:endfunction
:let &includeexpr='StripNewlineChar()'
:e! Xdir1/dir2/foo.c
i%inc   bar.c[34m^[[m
:w
:e Xdir1/dir2/bar.c
i%inc      baz.c[34m^[[m
:w
:e Xdir1/dir2/baz.c
i%inc[12Cfoo.c[34m^[[m
:w
:e Xdir1/dir2/FALSE.c
i%inc[12Cfoo.c[34m^[[m
:w
:e Xbase.c
:set path=Xdir1/dir2
i%inc    FALSE.c foo.c[34m^[[m
:w
:redir! >>test.out
:checkpath!
:redir END
:brewind
:" change "\" to "/" for Windows and fix 'fileformat'
:e test.out
:%s#\\#/#g
:set ff&
:w
:q
ENDTEST
[?12l[?25h[?25l
:[?12l[?25hfunction! StripNewlineChar()[?25l
:  [?12l[?25h:  if v:fname =~ '\n$'
[?25l:    [?12l[?25h:    return v:fname[:-2]
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:  return v:fname
[?25l:  [?12l[?25h:endfunction[1;1H[5L[?25l[1;1H:w
:e Xdir1/dir2/bar.b
i%inc      /baz/[34m^[[m
:w
:e Xdir1/dir2/baz.b[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet &includeexpr='StripNewlineChar()'[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xdir1/dir2/foo.c[?25l"Xdir1/dir2/foo.c" [New File][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m%inc   bar.c[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/foo.c" [New File] 1 line, 13 characters written[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xdir1/dir2/bar.c[?25l"Xdir1/dir2/bar.c" [New File][1;1H[K[1;1H[?12l[?25h[?25l%inc      baz.c[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/bar.c" [New File] 1 line, 16 characters written[1;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xdir1/dir2/baz.c[?25l"Xdir1/dir2/baz.c" [New File][1;1H[K[1;1H[?12l[?25h[?25l%inc[12Cfoo.c[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/baz.c" [New File] 1 line, 22 characters written[1;21H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xdir1/dir2/FALSE.c[?25l"Xdir1/dir2/FALSE.c" [New File][1;1H[K[1;1H[?12l[?25h[?25l%inc[12Cfoo.c[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xdir1/dir2/FALSE.c" [New File] 1 line, 22 characters written[1;21H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xbase.c[?25l"Xbase.c" [New File][1;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset path=Xdir1/dir2[?25l[1;1H[?12l[?25h[?25l%inc    FALSE.c foo.c[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xbase.c" [New File] 1 line, 22 characters written[1;21H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir! >>test.out[?25l[1;21H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcheckpath![?25l[60;1H[K[60;1H[35m--- Included files in path ---[m
[34mXdir1/dir2/foo.c[m
Xdir1/dir2/foo.c -->
  [34mXdir1/dir2/bar.c[m
  Xdir1/dir2/bar.c -->
    [34mXdir1/dir2/baz.c[m
    Xdir1/dir2/baz.c -->
      [34mfoo.c[m  (Already listed)
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[8L[1;1H%inc    FALSE.c foo.c
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [m[60;1H[K[1;21H[?12l[?25h[?25l[60;1H:[?12l[?25hbrewind[?25l"test17.in" 141 lines, 2634 characters[1;1H:w[1;3H[K[2;1H:e Xdir1/dir2/bar.b[2;20H[K[3;1Hi%inc      /baz/[34m^[[m[3;19H[K[4;1H:w[4;3H[K[5;1H:e Xdir1/dir2/baz.b[5;20H[K[6;1Hi%inc            /foo/[34m^[[m[6;25H[K[7;1H:w[7;3H[K[8;1H:e Xbase.b[8;11H[K[9;1H:set path=Xdir1/dir2[9;21H[K[10;1Hi%inc    /foo/[34m^[[m[10;17H[K[11;1H:w[11;3H[K[12;1H:redir! >>test.out[12;19H[K[13;1H:checkpath![13;12H[K[14;1H:redir END[14;11H[K[15;1H:brewind[15;9H[K[16;1HENDTEST[16;8H[K[17;1H[K[18;1HSTARTTEST[18;10H[K[19;1H:" check for 'include' with \zs and no \ze[19;43H[K[20;1H:call delete("./Xbase.c")[20;26H[K[21;1H:call DeleteDirectory("Xdir1")[21;31H[K[22;1H:!mkdir Xdir1[22;14H[K[23;1H:!mkdir "Xdir1/dir2"[23;21H[K[24;1H:let &include='^\s*%inc\s*\%([[:upper:]][^[:space:]]*\s\+\)\?\zs\S\+\ze'[24;73H[K[25;1H:function! StripNewlineChar()[25;30H[K[26;1H:  if v:fname =~ '\n$'[26;23H[K[27;1H:    return v:fname[:-2][27;25H[K[28;1H:  endif[28;9H[K[29;1H:  return v:fname[29;18H[K[30;1H:endfunction[30;13H[K[31;1H:let &includeexpr='StripNewlineChar()'[31;39H[K[32;1H:e! Xdir1/dir2/foo.c[32;21H[K[33;1Hi%inc   bar.c[34m^[[m[33;16H[K[34;1H:w[34;3H[K[35;1H:e Xdir1/dir2/bar.c[35;20H[K[36;1Hi%inc      baz.c[34m^[[m[36;19H[K[37;1H:w[37;3H[K[38;1H:e Xdir1/dir2/baz.c[38;20H[K[39;1Hi%inc            foo.c[34m^[[m[39;25H[K[40;1H:w[40;3H[K[41;1H:e Xdir1/dir2/FALSE.c[41;22H[K[42;1Hi%inc            foo.c[34m^[[m[42;25H[K[43;1H:w[43;3H[K[44;1H:e Xbase.c[44;11H[K[45;1H:set path=Xdir1/dir2[45;21H[K[46;1Hi%inc    FALSE.c foo.c[34m^[[m[46;25H[K[47;1H:w[47;3H[K[48;1H:redir! >>test.out[48;19H[K[49;1H:checkpath![49;12H[K[50;1H:redir END[50;11H[K[51;1H:brewind[51;9H[K[52;1H:" change "\" to "/" for Windows and fix 'fileformat'[52;54H[K[53;1H:e test.out[53;12H[K[54;1H:%s#\\#/#g[54;11H[K[55;1H:set ff&[55;9H[K[56;1H:w[56;3H[K[57;1H:q[57;3H[K[58;1HENDTEST[58;8H[K[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" change "\" to "/" for Windows and fix 'fileformat'[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he test.out[?25l"test.out" 33 lines, 655 characters[1;1HThis file is just to test "gf" in test 17.
The contents is not important.
Just testing![3;14H[K[4;1H[K[5;1H[K[6;1H--- Included files in path ---
Xdir1/dir2/foo.a
Xdir1/dir2/foo.a -->
  Xdir1/dir2/bar.a[9;19H[K[10;1H  Xdir1/dir2/bar.a -->
    Xdir1/dir2/baz.a
    Xdir1/dir2/baz.a -->
      "foo.a"  (Already listed)[14;1H[K[15;1H[K[16;1H--- Included files in path ---
Xdir1/dir2/foo.b
Xdir1/dir2/foo.b -->
  Xdir1/dir2/bar.b[19;19H[K[20;1H  Xdir1/dir2/bar.b -->[20;23H[K[21;1H    Xdir1/dir2/baz.b[21;21H[K[22;1H    Xdir1/dir2/baz.b -->
      foo  (Already listed)[24;1H[K[25;1H[K[26;1H--- Included files in path ---
Xdir1/dir2/foo.c[27;17H[K[28;1HXdir1/dir2/foo.c -->
  Xdir1/dir2/bar.c
  Xdir1/dir2/bar.c -->
    Xdir1/dir2/baz.c[31;21H[K[32;1H   [12Cbaz.c -->
      foo.c  (Already listed)
[1m[34m~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h%s#\\#/#g[?25l[1m[37m[41mE486: Pattern not found: \\[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset ff&[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 33 lines, 655 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq[?25l[?1l>[?12l[?25h[?1049l
# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test18.failed test.ok test.out X* viminfo
cp test18.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test18.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test18.in" 16 lines, 213 characters[1;1HTests for not doing smart indenting when it isn't set.

STARTTEST
:so small.vim
:set nocin nosi ai
/some
2cc#test[34m^[[m
:?start?,$w! test.out
:qa!
ENDTEST

start text[13;17Hsome test text[14;17Htest text
test text[16;17Htest text
[1m[34m~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for not doing smart indenting when it isn't set.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 6 lines, 76 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[10;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocin nosi ai[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hsome[?25l[13;17H[?12l[?25h[?25l[13;59r[59;1H
[1;60r[13;17H#test[13;22H[K[59;1H[1m[34m~                                                                                                 [m[60;1H[K[13;21H[?12l[?25h[14;9H[?25l[60;1H:[?12l[?25h?start?,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 4 lines, 41 characters written[14;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test19.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test19.in" 33 lines, 692 characters[1;1HTests for "r<Tab>" 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=[34m^V[mx7f t_kb=[34m^V[mx08
/some
r[7C:set noexpandtab
/other
r
:" Test replacing with Tabs and then backspacing to undo it
0wR[21C[34m^H^H^H^[[m
:" Test replacing with Tabs
0wR[21C[34m^[[m
:" Test that copyindent works with expandtab set
:set expandtab smartindent copyindent ts=8 sw=8 sts=8
o{
x[34m^[[m:set nosol
/Second line/
fwdv_:?^start?,$w! test.out
:qa!
ENDTEST

start text[27;17Hsome test text
test text[29;17Hother test text
    a cde
    f ghi
test text
  Second line beginning with whitespace
[1m[34m~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 19 lines, 447 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[24;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset smarttab expandtab ts=8 sw=4[?25l[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" make sure that backspace works, no matter what termcap is used[?25l[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset t_kD=^[34m^?[m t_kb=^[34m^H[?25l[27m[23m[m[H[2J[1;1HTests for "r<Tab>" 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=[34m^V[mx7f t_kb=[34m^V[mx08
/some
r[7C:set noexpandtab
/other
r
:" Test replacing with Tabs and then backspacing to undo it
0wR[21C[34m^H^H^H^[[m
:" Test replacing with Tabs
0wR[21C[34m^[[m
:" Test that copyindent works with expandtab set
:set expandtab smartindent copyindent ts=8 sw=8 sts=8
o{
x[34m^[[m:set nosol
/Second line/
fwdv_:?^start?,$w! test.out
:qa!
ENDTEST

start text[27;17Hsome test text
test text[29;17Hother test text
    a cde
    f ghi
test text
  Second line beginning with whitespace
[1m[34m~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [25;1H[?12l[?25h[?25l[60;1H[m/[?12l[?25hsome[?25l[27;17H[?12l[?25h[?25l    ome test text[27;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noexpandtab[?25l[27;20H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hother[?25l[29;17H[?12l[?25h[?25l    ther test text[29;20H[?12l[?25h[30;9H[?25l[60;1H[K[60;1H:[?12l[?25h" Test replacing with Tabs and then backspacing to undo it[?25l[30;9H[?12l[?25h    [?25l[?12l[?25h
   [?25l[60;1H[K[60;1H:[?12l[?25h" Test replacing with Tabs[?25l[31;4H[?12l[?25h    [?25l     [7Chi[?12l[?25h[32;9H[?25l[60;1H[K[60;1H:[?12l[?25h" Test that copyindent works with expandtab set[?25l[32;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset expandtab smartindent copyindent ts=8 sw=8 sts=8[?25l[32;9H[?12l[?25h[?25l[33;59r[33;1H[2L[1;60r[33;1H{[34;9Hx[60;1H[K[34;9H[?12l[?25h[?25l[60;1H:[?12l[?25hset nosol[?25l[34;9H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hSecond line/[?25l[60;13H[K[60;1H[35;3H[?12l[?25h[22C[?25l  with whitespace[35;18H[K[35;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h?^start?,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 10 lines, 121 characters written[35;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test20.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test20.in" 22 lines, 361 characters[1;1HTests 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$
[34m^V[mjjlld
:/here$/,$-1w! test.out
:qa!
ENDTEST

test text test tex start here[18;17Hsome text[19;17Htest text
test text

Ox[34m^[[mjAy[34m^[[mkdd
[1m[34m~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests Blockwise Visual when there are TABs before the text.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 9 lines, 92 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[15;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[16;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso tiny.vim[?25l[16;1H[?12l[?25h[22;1H[21;1H[?25l[21;59r[21;1H[L[1;60r[21;1Hx[60;1H[K[21;1H[?12l[?25h
[?25ly[?12l[?25h[21;1H[?25l[21;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [21;1H[?12l[?25h[?25l[m[60;1H2 changes; before #1  0 seconds ago[21;1H[K[21;1H[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;1H[34m^V[mjjlld[31;8H[K[32;1H:/here$/,$-1w! test.out[32;24H[K[33;1H:qa![33;5H[K[34;1HENDTEST[34;8H[K[35;1H[K[36;1Htest text test tex start here[36;30H[K[37;1H                some text[37;26H[K[38;1H                test text[38;26H[K[39;1Htest text[39;10H[K[40;1H[K[41;1HOx[34m^[[mjAy[34m^[[mkdd[41;13H[K[59;1H[7mtest20.in                                                                                         [1;1H[?12l[?25h[?25l[1;29r[m[1;1H[L[1;60r[1;1Hx[30;11H[1m[7m[+][m[60;1H[K[1;1H[?12l[?25h
[?25ly[?12l[?25h[1;1H[?25l[1;29r[29;1H
[1;60r[29;1H[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H1 line less; before #1  0 seconds ago[1;1H[K[30;11H[1m[7m    [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hquit![?25l[1;1HTests Blockwise Visual when there are TABs before the text.
First test for undo working properly when executing commands from a register.[2;78H[K[3;1HAlso test this in an empty buffer.[3;35H[K[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so tiny.vim[6;13H[K[7;1HG0"ay$k@au[7;11H[K[8;1H:new[8;5H[K[9;1H@auY:quit![9;11H[K[10;1HGP[10;3H[K[11;1H/start here$[11;13H[K[12;1H[34m^V[mjjlld[12;8H[K[13;1H:/here$/,$-1w! test.out[13;24H[K[14;1H:qa![14;5H[K[15;1HENDTEST[15;8H[K[16;1H[K[17;1Htest text test tex start here[17;30H[K[18;1H                some text[18;26H[K[19;1H                test text[19;26H[K[20;1Htest text[20;10H[K[21;1H[K[22;1HOx[34m^[[mjAy[34m^[[mkdd[22;13H[K[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [59;1H~                                                                                                 [22;1H[?12l[?25h[?25l[22;59r[m[22;1H[L[1;60r[60;1H[K[22;1H[?12l[?25h
[?25l[60;1H/[?12l[?25hstart here$[?25l[31msearch hit BOTTOM, continuing at TOP[17;20H[?12l[?25h[?25l[?12l[?25h[?25l[m[7ms[18;20H[?12l[?25h[?25le[19;20H[?12l[?25h[?25l[17;21Ht[18;21H [19;20Ht[?12l[?25h[?25l[17;22Ha[18;22Ht[19;21H [?12l[?25h[?25l[m[17;20Hrt here[17;27H[K[18;20Hext[18;23H[K[19;20Hex[19;23H[K[17;20H[?12l[?25h[18;20H[?25l[60;1H[K[60;1H:[?12l[?25h/here$/,$-1w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 6 lines, 57 characters written[18;20H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test21.failed test.ok test.out X* viminfo
cp test21.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test21.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test21.in" 19 lines, 297 characters[1;1HTests for [ CTRL-I with a count and CTRL-W CTRL-I with a count

STARTTEST
:so small.vim
/start
6[      :.w! test.out
?start here
6[34m^W[m     :.w >>test.out
:qa!
ENDTEST

#include test21.in

/* test text test tex start here[15;17Hsome text[16;17Htest text[17;17Hstart OK if found this line[18;9Hstart found wrong line
test text
[1m[34m~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for [ CTRL-I with a count and CTRL-W CTRL-I with a count[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 6 lines, 73 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[10;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hstart[?25l[14;23H[?12l[?25h[17;17H[?25l[60;1H[K[60;1H:[?12l[?25h.w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 30 characters written[17;17H[?12l[?25h[?25l[60;1H[K[60;1H?[?12l[?25hstart here[?25l[14;23H[?12l[?25h[?25l[1;1H6[34m^W[m     :.w >>test.ou[1;23H[K[2;1H:qa!
ENDTEST[3;8H[K[4;1H[K[5;1H#include test21.in[6;1H[K[7;1H/* test text test tex start here
                some text
    [12Ctest text
       [9Cstart OK if found this line[11;9Hstart found wrong line
test text[12;10H[K[13;1H[1m[34m~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [m[30;1H[1m[7mtest21.in                                                                                         [m[31;1H6[34m^W[m     :.w >>test.out[31;23H[K[32;1H:qa![32;5H[K[33;1HENDTEST[33;8H[K[34;1H[K[35;1H#include test21.in[35;19H[K[36;1H[K[37;1H/* test text test tex start here[37;33H[K[38;1H                some text[38;26H[K[39;1H                test text[39;26H[K[40;1H                start OK if found this line[40;44H[K[41;1H        start found wrong line[41;31H[K[42;1Htest text[42;10H[K[59;1H[7mtest21.in                                                                                         [10;17H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 30 characters appended[10;17H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test22.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test22.in" 13 lines, 197 characters[1;1HTests for file with some lines ending in CTRL-M, some not[34m^M
^M[m
STARTTEST
:set ta tx
:e!
:$-3,$w! test.out
:qa!
ENDTEST

this lines ends in a[34m^M[m
this one doesn't
this one does[34m^M[m
and the last one doesn't
[1m[34m~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for file with some lines ending in CTRL-M, some not[34m^M[m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 4 lines, 38 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[8;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ta tx[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he![?25l"test22.in" 13 lines, 197 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$-3,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 4 lines, 79 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test23.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test23.in" 15 lines, 282 characters[1;1HTests 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
[1m[34m~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for complicated + argument to :edit command[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 7 lines, 125 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[11;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$-1w! Xfile1[?25l"Xfile1" [60;10H[K[60;10H[New File] 1 line, 8 characters written[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$w! Xfile2[?25l"Xfile2" [60;10H[K[60;10H[New File] 1 line, 8 characters written[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hedit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w[?25l"Xfile1" [60;10H[K[60;10H1 line, 8 characters
foo|bar
"Xfile1" 1 line, 11 characters written
"Xfile2" 1 line, 8 characters
foo/bar
"Xfile2" 1 line, 12 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 12 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xfile1[?25l"Xfile1" 1 line, 11 characters[1;1H[7L[1;1HfooPIPEbar
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [m[60;1H[K[60;1H"Xfile1" 1 line, 11 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >> test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test24.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test24.in" 89 lines, 1301 characters[1;1HTests 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\)\@<!bar/A/

:s/\(an\_s\+\)\@<=file/A/

:s/^\(\h\w*\%(->\|\.\)\=\)\+=/XX/

:s/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/

:s/aaa/xyz/

:s/~/bcd/

:s/~\+/BB/
:"
:?start?,$w! test.out
:qa!
ENDTEST

start
test \text test text[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for regexp with backslash and other special characters inside [][60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 51 lines, 519 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[56;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h[\x][?25l[59;6H[?12l[?25h[?25ltext test text[59;20H[K[59;6H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h[\t\]][?25l[1;59r[59;1H
[1;60r[59;1Htest    text test text[60;1H[K[59;8H[?12l[?25h[?25ltext test tex[59;20H[K[59;6H[?12l[?25h[?25l
/[?12l[?25h[]y][?25l[1;59r[59;1H
[1;60r[59;1Htest text ]test text[60;1H[K[59;11H[?12l[?25h[?25ltest text[59;20H[K[59;11H[?12l[?25h[?25l
/[?12l[?25h[\]][?25l[1;59r[59;1H
[1;60r[59;1Htest ]text test text[60;1H[K[59;6H[?12l[?25h[?25ltext test text[59;20H[K[59;6H[?12l[?25h[?25l
/[?12l[?25h[y^][?25l[1;59r[59;1H
[1;60r[59;1Htest text te^st text[60;1H[K[59;13H[?12l[?25h[?25lst text[59;20H[K[59;13H[?12l[?25h[?25l
/[?12l[?25h[$y][?25l[1;59r[59;1H
[1;60r[59;1Htest te$xt test text[60;1H[K[59;8H[?12l[?25h[?25lxt test text[59;20H[K[59;8H[?12l[?25h[?25l
/[?12l[?25h[\x61][?25l[1;59r[59;1H
[1;60r[59;1Htest taext test text  x61[60;1H[K[59;7H[?12l[?25h[?25lext test text  x61[59;25H[K[59;7H[?12l[?25h[?25l
/[?12l[?25h[\x60-\x64][?25l[1;59r[59;1H
[1;60r[59;1Htest tbext test text  x60-x64[60;1H[K[59;7H[?12l[?25h[?25lext test text  x60-x64[59;29H[K[59;7H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Htest 5text test text  x78 5[59;7H[?12l[?25h[?25l
/[?12l[?25h[\x785][?25l[59;6H[?12l[?25h[?25ltext test text  x78 5[59;27H[K[59;6H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h[\o143][?25l[1;59r[59;1H
[1;60r[59;1Htestc text test text  o143[60;1H[K[59;5H[?12l[?25h[?25l text test text  o143[59;26H[K[59;5H[?12l[?25h[?25l
/[?12l[?25h[\o140-\o144][?25l[1;59r[59;1H
[1;60r[59;1Htesdt text test text  o140-o144[60;1H[K[59;4H[?12l[?25h[?25lt text test text  o140-o14[59;31H[K[59;4H[?12l[?25h[?25l
/[?12l[?25h[\o417][?25l[1;59r[59;1H
[1;60r[59;1Htest7 text test text  o41 7[60;1H[K[59;5H[?12l[?25h[?25l text test text  o41 7[59;27H[K[59;5H[?12l[?25h[?25l
/[?12l[?25h\%x42[?25l[1;59r[59;1H
[1;60r[59;1Htest text tBest text  \%x42[60;1H[K[59;12H[?12l[?25h[?25lest text  \%x42[59;27H[K[59;12H[?12l[?25h[?25l
/[?12l[?25h\%o103[?25l[1;59r[59;1H
[1;60r[59;1Htest text teCst text  \%o103[60;1H[K[59;13H[?12l[?25h[?25lst text  \%o103[59;28H[K[59;13H[?12l[?25h[?25l
/[?12l[?25h[\x00][?25l[1;59r[59;1H
[1;60r[59;1Htest text [34m^@[mtest text  [\x00][60;1H[K[59;11H[?12l[?25h[?25ltest text  [\x00][59;28H[K[59;11H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Htest te[34m^@[mxt t[34m^D[mest t[34m^P[mext  [\x00-\x10][59;11H[?12l[?25h[?25l
:[?12l[?25hs/[\x00-\x10]//g[?25l3 substitutions on 1 line[59;8Hxt test text  [\x00-\x10][59;33H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Htest \xyztext test text  [\x-z][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/[\x-z]\+//[?25l[59;6Htext test text  [\x-z][59;28H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Htest text tev\uyst text  [\u-z][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/[\u-z]\{2,}//[?25l[59;13Hst text  [\u-z][59;28H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx aaaaa xx a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(a\)\+//[?25l[59;4H xx [59;10H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx aaaaa xx a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(a*\)\+//[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx aaaaa xx a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(a*\)*//[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx aaaaa xx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(a\)\{2,3}/A/[?25l[59;4HAaa xx[59;10H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx aaaaa xx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(a\)\{-2,3}/A/[?25l[59;4HAaaa x[59;11H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx aaa12aa xx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(a\)*\(12\)\@>/A/[?25l[59;4HAaa xx[59;10H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx foobar xbar xx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(foo\)\@<!bar/A/[?25l[59;12HA xx[59;16H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxx an file xx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(an\_s\+\)\@<=file/A/[?25l[59;7HA xx[59;12H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hx= 9;[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/^\(\h\w*\%(->\|\.\)\=\)\+=/XX/[?25l[59;1HXX[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hhh= 77;[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/[?25l[59;1HYY 77;[59;7H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2Haaa[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/aaa/xyz/[?25l[59;2Hxyz [?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2Hxyz[60;1H[K[59;2H[?12l[?25h[?25l
:[?12l[?25hs/~/bcd/[?25l[59;2Hbcd [?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2Hbcdbcdbcd[60;1H[K[59;2H[?12l[?25h[?25l
:[?12l[?25hs/~\+/BB/[?25l[59;2HBB[59;4H[K[59;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h?start?,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New] 32L, 586C written[59;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test25.failed test.ok test.out X* viminfo
cp test25.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test25.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test25.in" 31 lines, 840 characters[1;1HTest for jumping to a tag with 'hidden' set, with symbolic link in path of tag.
This only works for Unix, because of the symbolic link.

STARTTEST
:so small.vim
:set hidden
:" Create a link from test25.dir to the current directory.
:!rm -f test25.dir
:!ln -s . test25.dir
:" Create tags.text, with the current directory name inserted.
/tags line
:r !pwd
d$/test
hP:.w! tags.test
:" Try jumping to a tag in the current file, but with a path that contains a
:" symbolic link.  When wrong, this will give the ATTENTION message.  The next
:" space will then be eaten by hit-return, instead of moving the cursor to 'd'.
:set tags=tags.test
G[34m^][m x:.w! test.out
:!rm -f test25.dir tags.test
:qa!
ENDTEST

tags line:
SECTION_OFF     /test25.dir/test25.in   /^#define  SECTION_OFF  3$/

/*tx.c*/
#define  SECTION_OFF  3
#define  NUM_SECTIONS 3

SECTION_OFF
[1m[34m~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for jumping to a tag with 'hidden' set, with symbolic link in path of tag.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 17 lines, 540 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[22;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset hidden[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Create a link from test25.dir to the current directory.[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h!rm -f test25.dir[?25l[18C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!ln -s . test25.dir[?25l[20C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h" Create tags.text, with the current directory name inserted.[?25l[27m[23m[m[H[2J[1;1HTest for jumping to a tag with 'hidden' set, with symbolic link in path of tag.
This only works for Unix, because of the symbolic link.

STARTTEST
:so small.vim
:set hidden
:" Create a link from test25.dir to the current directory.
:!rm -f test25.dir
:!ln -s . test25.dir
:" Create tags.text, with the current directory name inserted.
/tags line
:r !pwd
d$/test
hP:.w! tags.test
:" Try jumping to a tag in the current file, but with a path that contains a
:" symbolic link.  When wrong, this will give the ATTENTION message.  The next
:" space will then be eaten by hit-return, instead of moving the cursor to 'd'.
:set tags=tags.test
G[34m^][m x:.w! test.out
:!rm -f test25.dir tags.test
:qa!
ENDTEST

tags line:
SECTION_OFF     /test25.dir/test25.in   /^#define  SECTION_OFF  3$/

/*tx.c*/
#define  SECTION_OFF  3
#define  NUM_SECTIONS 3

SECTION_OFF
[1m[34m~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [23;1H[?12l[?25h[?25l[60;1H[m/[?12l[?25htags line[?25l[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hr !pwd[?25l[?12l[?25h[27m[23m[m[H[2J[?25l[1;1HTest for jumping to a tag with 'hidden' set, with symbolic link in path of tag.
This only works for Unix, because of the symbolic link.

STARTTEST
:so small.vim
:set hidden
:" Create a link from test25.dir to the current directory.
:!rm -f test25.dir
:!ln -s . test25.dir
:" Create tags.text, with the current directory name inserted.
/tags line
:r !pwd
d$/test
hP:.w! tags.test
:" Try jumping to a tag in the current file, but with a path that contains a
:" symbolic link.  When wrong, this will give the ATTENTION message.  The next
:" space will then be eaten by hit-return, instead of moving the cursor to 'd'.
:set tags=tags.test
G[34m^][m x:.w! test.out
:!rm -f test25.dir tags.test
:qa!
ENDTEST

tags line:
/sources/vim74/src/testdir
SECTION_OFF     /test25.dir/test25.in   /^#define  SECTION_OFF  3$/

/*tx.c*/
#define  SECTION_OFF  3
#define  NUM_SECTIONS 3

SECTION_OFF
[1m[34m~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [25;1H[?12l[?25h[?25l[m[25;1H[K[25;1H[?12l[?25h[?25l[60;1H/[?12l[?25htest[?25l[26;18H[?12l[?25h[?25l/sources/vim74/src/testdir/test25.dir/test25.in /^#define  SECTION_OFF  3$/[26;42H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w! tags.test[?25l"tags.test" [60;13H[K[60;13H[New File] 1 line, 88 characters written[26;42H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Try jumping to a tag in the current file, but with a path that contains a[?25l[26;42H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" symbolic link.  When wrong, this will give the ATTENTION message.  The next[?25l[26;42H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" space will then be eaten by hit-return, instead of moving the cursor to 'd'.[?25l[26;42H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset tags=tags.test[?25l[26;42H[?12l[?25h[32;1H[29;1H#[?25lefine  SECTION_OFF  3[29;23H[K[29;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 23 characters written[29;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h!rm -f test25.dir tags.test[?25l[28C[?1l>[?12l[?25h[?1049l
[No write since last change]

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test26.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test26.in" 44 lines, 750 characters[1;1HTest 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[34m^V^[[m
:    if i == 9
:      break
:    endif
:    if i == 5
:      continue
:    else
:      let j = 9
:      while j > 0
:[8Cif has("ebcdic")
:[10Cexecute "normal" j . "a" . j . "\x27"
:[8Celse
:[10Cexecute "normal" j . "a" . j . "\x1b"
:[8Cendif
:[8Clet 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

[1m[34m~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for :execute, :while and :if[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 39 lines, 696 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[43;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet i = 0[?25l[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwhile i < 12[?25l
:  [?12l[?25h:  let i = i + 1
[?25l:  [?12l[?25h:  if has("ebcdic")
[?25l:    [?12l[?25h:    execute "normal o" . i . "\047"
[?25l:    [?12l[?25h:  else
[?25l:    [?12l[?25h:    execute "normal o" . i . "\033"
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:  if i % 2
[?25l:    [?12l[?25h:    normal Ax^[34m^[[m
[?25l:    [?12l[?25h:    if i == 9
[?25l:      [?12l[?25h:      break
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:    if i == 5
[?25l:      [?12l[?25h:      continue
[?25l:      [?12l[?25h:    else
[?25l:      [?12l[?25h:      let j = 9
[?25l:      [?12l[?25h:      while j > 0
[?25l:[8C[?12l[?25h:        if has("ebcdic")
[?25l:[10C[?12l[?25h:          execute "normal" j . "a" . j . "\x27"
[?25l:[10C[?12l[?25h:        else
[?25l:[10C[?12l[?25h:          execute "normal" j . "a" . j . "\x1b"
[?25l:[10C[?12l[?25h:        endif
[?25l:[8C[?12l[?25h:        let j = j - 1
[?25l:[8C[?12l[?25h:      endwhile
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:  if i == 9
[?25l:    [?12l[?25h:    if has("ebcdic")
[?25l:      [?12l[?25h:      execute "normal Az\047"
[?25l:      [?12l[?25h:    else
[?25l:      [?12l[?25h:      execute "normal Az\033"
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endwhile[1;1H[33L[?25l[1;1HTest 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[34m^V^[[m
:    if i == 9
:      break
:    endif
:    if i == 5
:      continue
:    else
:      let j = 9
:      while j > 0
:[8Cif has("ebcdic")
:[10Cexecute "normal" j . "a" . j . "\x27"
:[8Celse
:[10Cexecute "normal" j . "a" . j . "\x1b"
:[8Cendif
:[8Clet j = j - 1
:      endwhile
:    endif
:  endif
:  if i == 9
:    if has("ebcdic")[45;1H1x999999999888888887777777666666555554444333221[45;48H[K[46;1H2[46;2H[K[47;1H3x999999999888888887777777666666555554444333221[47;48H[K[48;1H4[48;2H[K[49;1H5x[49;3H[K[50;1H6[50;2H[K[51;1H7x999999999888888887777777666666555554444333221[51;48H[K[52;1H8[52;2H[K[53;1H9x[53;3H[K[60;1H[K[53;2H[?12l[?25h[?25l[60;1H:[?12l[?25hunlet i j[?25l[53;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h't,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 10 lines, 159 characters written[53;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test27.failed test.ok test.out X* viminfo
cp test27.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test27.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test27.in" 20 lines, 270 characters[1;1HTest for expanding file names

STARTTEST
:!mkdir Xdir1
:!mkdir Xdir2
:!mkdir Xdir3
:cd Xdir3
:!mkdir Xdir4
:cd ..
:w Xdir1/file
:w Xdir3/Xdir4/file
:n Xdir?/*/file
Go[34m^R[m%[34m^[[m:.w! test.out
:n! Xdir?/*/nofile
Go[34m^R[m%[34m^[[m:.w >>test.out
:e! xx
:!rm -rf Xdir1 Xdir2 Xdir3
:qa!
ENDTEST

[1m[34m~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for expanding file names[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 15 lines, 220 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[19;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xdir1[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xdir2[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25h!mkdir Xdir3[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hcd Xdir3[?25l/sources/vim74/src/testdir/Xdir3[27m[23m[m[H[2J[1;1HTest for expanding file names

STARTTEST
:!mkdir Xdir1
:!mkdir Xdir2
:!mkdir Xdir3
:cd Xdir3
:!mkdir Xdir4
:cd ..
:w Xdir1/file
:w Xdir3/Xdir4/file
:n Xdir?/*/file
Go[34m^R[m%[34m^[[m:.w! test.out
:n! Xdir?/*/nofile
Go[34m^R[m%[34m^[[m:.w >>test.out
:e! xx
:!rm -rf Xdir1 Xdir2 Xdir3
:qa!
ENDTEST

[1m[34m~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [20;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h!mkdir Xdir4[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src/testdir[27m[23m[m[H[2J[1;1HTest for expanding file names

STARTTEST
:!mkdir Xdir1
:!mkdir Xdir2
:!mkdir Xdir3
:cd Xdir3
:!mkdir Xdir4
:cd ..
:w Xdir1/file
:w Xdir3/Xdir4/file
:n Xdir?/*/file
Go[34m^R[m%[34m^[[m:.w! test.out
:n! Xdir?/*/nofile
Go[34m^R[m%[34m^[[m:.w >>test.out
:e! xx
:!rm -rf Xdir1 Xdir2 Xdir3
:qa!
ENDTEST

[1m[34m~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [20;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw Xdir1/file[?25l"Xdir1/file" [New File] 20 lines, 270 characters written[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw Xdir3/Xdir4/file[?25l"Xdir3/Xdir4/file" [New File] 20 lines, 270 characters written[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hn Xdir?/*/file[?25l"Xdir3/Xdir4/file" 20 lines, 270 characters[1;1H[?12l[?25h[20;1H[?25l
Xdir3/Xdir4/file[21;17H[K[21;16H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 17 characters written[21;16H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hn! Xdir?/*/nofile[?25l"Xdir?/*/nofile" [New DIRECTORY][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m
Xdir?/*/nofile[2;15H[K[2;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 15 characters appended[2;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! xx[?25l"xx" [New File][2;1H[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h!rm -rf Xdir1 Xdir2 Xdir3[?25l[26C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test28.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test28.in" 23 lines, 364 characters[1;1HTest for sourcing a file with CTRL-V's at the end of the line

STARTTEST
:/firstline/+1,/lastline/-1w! Xtestfile
:so Xtestfile
Gmm__1[34m^[^[[m__2[34m^[[m__3[34m^[^[[m__4[34m^[[m__5[34m^[[m:'m,$s/[34m^@[m/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[34m^V[m
map __2 asd[34m^V^V[m
map __3 asd[34m^V^V[m
map __4 asd[34m^V^V^V[m
map __5 asd[34m^V^V^V[m
lastline

[1m[34m~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for sourcing a file with CTRL-V's at the end of the line[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 5 lines, 114 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[9;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/firstline/+1,/lastline/-1w! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H[New File] 10 lines, 148 characters written[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso Xtestfile[?25l[10;1H[?12l[?25h[23;1H[24;12H[?25l[23;1Hsd
map __2 asd[34m^[[m[24;14H[K[24;12H[?12l[?25h[?25l[2Csecond[?12l[?25hd  [?25lsd[34m^[[?12l[?25h^[[m  [13C[?25l[24;24Hsd[34m^@[mmap __5 asd[34m^@[?12l[?25h[?25l[m[2Cfifth[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h'm,$s/[34m^@[m/0/g[?25l[24;26H0map __5 asd0fifth[24;44H[K[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h'm,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 2 lines, 45 characters written[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test29.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test29.in" 202 lines, 3656 characters[1;1HTest 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[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for joining lines and marks in them[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 11 lines, 478 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[18;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nojoinspaces[?25l[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpoptions-=j[?25l[19;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hfirstline/[?25l[60;11H[K[60;1H[20;1H[?12l[?25h
[?25l[60;1H[K[60;1H/[?12l[?25h^STARTTEST/-1[?25l[12C+-137 fewer lines[60;15H[K[21;1HSTARTTEST
/^{/+1
:set comments=s1:/*,mb:*,ex:*/,://
:set nojoinspaces fo=j
:set backspace=eol,start
:.,+3join
j4J[27;4H[K[28;1H:.,+2join
j3J[29;4H[K[30;1H:.,+2join
j3J[31;4H[K[32;1H:.,+2join
jj3J[33;5H[K[34;1HENDTEST[35;1H[K[36;1H{[36;2H[K[37;1H[K[38;1H/*[38;3H[K[39;1H * Make sure the previous comment leader is not removed.
 */[40;4H[K[41;1H[K[42;1H/*[42;3H[K[43;1H * Make sure the previous comment leader is not removed.
 */[44;4H[K[45;1H[K[46;1H// Should the next comment leader be left alone?
// Yes.[47;8H[K[48;1H[K[49;1H// Should the next comment leader be left alone?
// Yes.[51;1H[K[52;1H/* Here the comment leader should be left intact. */
// And so should this one.[54;1H[K[55;1H/* Here the comment leader should be left intact. */
// And so should this one.

if (condition) // Remove the next comment leader!
      [9C// OK, I will.[21;1H[?12l[?25h[?25l[60;4Hmore lines[60;14H[K[21;1Hasdfasdf.
asdf[22;5H[K[23;1Hasdfasdf. [23;11H[K[24;1Hasdf[24;6H[K[25;1Hasdfasdf.  [25;12H[K[26;1Hasdf[26;5H[K[27;1Hasdfasdf.
asdf[28;5H[K[29;1Hasdfasdf.
asdf[30;5H[K[31;1Hasdfasdf.
asdf[32;5H[K[33;1Hasdfasdf.
asdf[34;5H[K[35;1Hasdfasdf
asdf
asdfasdf
asdf
asdfasdf  [39;11H[K[40;1Hasdf
asdfasdf
asdf
asdfasdf        [43;18H[K[44;1Hasdf
asdfasdf
asdf[46;5H[K[47;1Hasdfasdf
asdf
zx cvn.[49;8H[K[50;1Has dfg?
hjkl iop!
ert[52;4H[K[53;1Hzx cvn.[53;8H[K[54;1Has dfg?
hjkl iop![55;10H[K[56;1Hert[56;4H[K[58;1HSTARTTEST[58;10H[K[59;1H/^{/+1[59;16H[K[21;1H[?12l[?25h[?25l[21;59r[59;1H
[1;60r[21;5Hasdf. asdf[59;1H:set comments=s1:/*,mb:*,ex:*/,://[60;1H[K[21;10H[?12l[?25h[22;10H[?25l[22;59r[59;1H
[1;60r[22;5Hasdf. asdf[59;1H:set nojoinspaces fo=j[22;11H[?12l[?25h[23;11H[?25l[23;59r[59;1H
[1;60r[23;5Hasdf.  asdf[59;1H:set backspace=eol,start[23;12H[?12l[?25h[24;16H[?25l[24;59r[59;1H
[1;60r[24;5Hasdf.[7Casdf[59;1H:.,+3join[24;17H[?12l[?25h[25;16H[?25l[25;59r[59;1H
[1;60r[25;5Hasdf.[7Casdf[59;1Hj4J[25;17H[?12l[?25h[26;17H[?25l[26;59r[59;1H
[1;60r[26;5Hasdf.[8Casdf[59;1H:.,+2join[26;18H[?12l[?25h[27;24H[?25l[27;59r[59;1H
[1;60r[27;5Hasdf.[15Casdf[59;1Hj3J[27;25H[?12l[?25h[28;8H[?25l[28;59r[59;1H
[1;60r[28;5Hasdf asdf[59;1H:.,+2join[28;9H[?12l[?25h[29;9H[?25l[29;59r[59;1H
[1;60r[29;5Hasdf asdf[59;1Hj3J[29;10H[?12l[?25h[30;10H[?25l[30;59r[59;1H
[1;60r[30;5Hasdf  asdf[59;1H:.,+2join[30;11H[?12l[?25h[31;16H[?25l[31;59r[59;1H
[1;60r[31;5Hasdf[8Casdf[59;1Hjj3J[31;17H[?12l[?25h[32;17H[?25l[32;59r[59;1H
[1;60r[32;5Hasdf[9Casdf[59;1HENDTEST[32;18H[?12l[?25h[33;16H[?25l[33;59r[59;1H
[1;60r[33;5Hasdf[8Casdf[?12l[?25h[34;24H[?25l[34;59r[59;1H
[1;60r[34;5Hasdf[16Casdf[59;1H{[34;25H[?12l[?25h[35;7Hzx cv[37;6Hhjkl i[35;7H[?25l[35;59r[35;1H[3M[1;60r[35;1Hzx cvn. as dfg? hjkl iop! ert[58;1H/*
 * Make sure the previous comment leader is not removed.[35;26H[?12l[?25h er[?25lt er[?12l[?25hzx cv[26C[?25lrn[?12l[?25h[35;23H[10C[?25lnop[?12l[?25h[?25l[60;1H:[?12l[?25hset cpoptions+=j[?25l[35;35H[?12l[?25h[36;7Hzx cv[38;6Hhjkl i[36;7H[?25l[36;59r[36;1H[3M[1;60r[36;1Hzx cvn. as dfg? hjkl iop! ert[57;2H*/

/*[60;1H[K[36;26H[?12l[?25h er[?25lt er[?12l[?25hzx cv[26C[?25lrn[?12l[?25h[36;23H[10C[?25lnop[?12l[?25h[?25l[60;1H:[?12l[?25hset cpoptions-=j joinspaces[?25l[36;35H[?12l[?25h
[?25l[60;1H37 more lines[60;14H[K[38;1Hasdfasdf.
asdf[39;5H[K[40;1Hasdfasdf. [40;11H[K[41;1Hasdf[41;6H[K[42;1Hasdfasdf.  [42;12H[K[43;1Hasdf[43;5H[K[44;1Hasdfasdf.
asdf[45;5H[K[46;1Hasdfasdf.
asdf[47;5H[K[48;1Hasdfasdf.
asdf[49;5H[K[50;1Hasdfasdf.
asdf[51;5H[K[52;1Hasdfasdf
asdf
asdfasdf
asdf
asdfasdf  [56;11H[K[57;1Hasdf
asdfasdf
asdf[38;1H[?12l[?25h[?25l[38;59r[59;1H
[1;60r[38;5Hasdf.  asdf[59;1Hasdfasdf[60;1H[K[38;10H[?12l[?25h[39;10H[?25l[39;59r[59;1H
[1;60r[39;5Hasdf.  asdf[59;1Hasdf[39;11H[?12l[?25h[40;11H[?25l[40;59r[59;1H
[1;60r[40;5Hasdf.  asdf[59;1Hasdfasdf[40;12H[?12l[?25h[41;16H[?25l[41;59r[59;1H
[1;60r[41;5Hasdf.[7Casdf[59;1Hasdf[41;17H[?12l[?25h[42;16H[?25l[42;59r[59;1H
[1;60r[42;5Hasdf.[7Casdf[59;1Hasdfasdf[42;17H[?12l[?25h[43;17H[?25l[43;59r[59;1H
[1;60r[43;5Hasdf.[8Casdf[59;1Hasdf[43;18H[?12l[?25h[44;24H[?25l[44;59r[59;1H
[1;60r[44;5Hasdf.[15Casdf[59;1Hzx cvn.[44;25H[?12l[?25h[45;8H[?25l[45;59r[59;1H
[1;60r[45;5Hasdf asdf[59;1Has dfg?[45;9H[?12l[?25h[46;9H[?25l[46;59r[59;1H
[1;60r[46;5Hasdf asdf[59;1Hhjkl iop![46;10H[?12l[?25h[47;10H[?25l[47;59r[59;1H
[1;60r[47;5Hasdf  asdf[59;1Hert[47;11H[?12l[?25h[48;16H[?25l[48;59r[59;1H
[1;60r[48;5Hasdf[8Casdf[59;1Hzx cvn.[48;17H[?12l[?25h[49;17H[?25l[49;59r[59;1H
[1;60r[49;5Hasdf[9Casdf[59;1Has dfg?[49;18H[?12l[?25h[50;16H[?25l[50;59r[59;1H
[1;60r[50;5Hasdf[8Casdf[59;1Hhjkl iop![50;17H[?12l[?25h[51;24H[?25l[51;59r[59;1H
[1;60r[51;5Hasdf[16Casdf[59;1Hert[51;25H[?12l[?25h[52;7Hzx cv[54;6Hhjkl i[52;7H[?25l[52;59r[52;1H[3M[1;60r[52;1Hzx cvn.  as dfg?  hjkl iop!  ert[58;1HSTARTTEST
/^{/+1[52;28H[?12l[?25h  er[?25lt  e[?12l[?25hzx cv[29C[?25len[?12l[?25h[52;25H[11C[?25lnop[?12l[?25h[?25l[60;1H:[?12l[?25hset cpoptions+=j[?25l[52;38H[?12l[?25h[53;7Hzx cv[55;6Hhjkl i[53;7H[?25l[53;59r[53;1H[3M[1;60r[53;1Hzx cvn.  as dfg? hjkl iop! ert[57;1H:set comments=s1:/*,mb:*,ex:*/,://
:set nojoinspaces fo=j
:set backspace=eol,start[60;1H[K[53;27H[?12l[?25h er[?25lt er[?12l[?25hzx cv[27C[?25lrn[?12l[?25h[53;24H[10C[?25lnop[?12l[?25h[?25l[60;1H:[?12l[?25hset cpoptions-=j nojoinspaces compatible[?25l[53;36H[?12l[?25h
[?25l[60;1H37 more lines[60;14H[K[55;1Hasdfasdf.
asdf[56;5H[K[57;1Hasdfasdf. [57;11H[K[58;1Hasdf[58;6H[K[59;1Hasdfasdf.  [59;12H[K[55;1H[?12l[?25h[?25l[55;59r[59;1H
[1;60r[55;5Hasdf.  asdf[59;1Hasdf[60;1H[K[55;10H[?12l[?25h[56;10H[?25l[56;59r[59;1H
[1;60r[56;5Hasdf.  asdf


asdfasdf.[56;11H[?12l[?25h[57;11H[?25l asdf
asdfasdf.[59;5H[K[57;12H[?12l[?25h[58;16H[?25l asdf
asdfasdf.[58;17H[?12l[?25h[59;16H[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf.[7C[?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf.[14C[?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf[?12l[?25h[?25lf asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf[?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf [?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf[7C[?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf[8C[?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf[7C[?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hasdfasdf[15C[?12l[?25h[?25l asdf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hzx cvn.[?12l[?25h[?25l.  as dfg? hjkl iop! ert[59;8H[?12l[?25h[22C[?25lt  a[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hzx cvn.[?12l[?25h[?25l
/[?12l[?25hSTARTTEST/-2[?25l[11C+-24 fewer lines[60;14H[K[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[59;1H
[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H12 lines, 147 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[12M[1;60r[48;1H:set comments=s1:/*,mb:*,ex:*/,://
:set nojoinspaces fo=j
:set backspace=eol,start
:.,+3join
j4J
:.,+2join
j3J
:.,+2join
j3J
:.,+2join
jj3J
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset comments=s1:/*,mb:*,ex:*/,://[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nojoinspaces fo=j[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset backspace=eol,start[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,+3join[?25l[59;1H/* Make sure the previous comment leader is not removed. */[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l/* Make sure the previous comment leader is not removed. */[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+2join[?25l[59;1H// Should the next comment leader be left alone? Yes.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l// Should the next comment leader be left alone? Yes.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+2join[?25l[59;1H/* Here the comment leader should be left intact. */ // And so should this one.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l/* Here the comment leader should be left intact. */ // And so should this one.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+2join[?25l[59;1Hif (condition) // Remove the next comment leader! OK, I will.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Haction();[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25lif (condition) // Remove the next comment leader! OK, I will.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Haction();[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[3M[1;60r[57;1H}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H21 lines, 356 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[21M[1;60r[39;1H: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![34m^M[m// Make sure backspacing does not remove this comment leader.[34m^[[m0i[34m^H^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset comments=sO:*\ -,mO:*\ \ ,exO:*/[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset comments+=s1:/*,mb:*,ex:*/,://[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset comments+=s1:>#,mb:#,ex:#<,:<[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpoptions-=j joinspaces fo=j[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset backspace=eol,start[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.,+3join[?25l[59;1H/* Make sure the previous comment leader is not removed.  */[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l/* Make sure the previous comment leader is not removed.  */[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+8join[?25l[59;1H/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l/* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+2join[?25l[59;1H// Should the next comment leader be left alone?  Yes.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l// Should the next comment leader be left alone?  Yes.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+2join[?25l[59;1H/* Here the comment leader should be left intact. */ // And so should this one.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l/* Here the comment leader should be left intact. */ // And so should this one.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+2join[?25l[59;1Hif (condition) // Remove the next comment leader!  OK, I will.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Haction();[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25lif (condition) // Remove the next comment leader!  OK, I will.[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Haction();[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+2join[?25l[59;1Hint i = 7 /* foo *// 3 // comment[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2H;[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25lint i = 7 /* foo *// 3 // comment[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2H;[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:[?12l[?25h.,+5join[?25l[59;1H># Note that the last character of the ending comment leader (left angle bracket) is a comment lea[59;1H[1m[34m@                                                                                                 [1;59r[m[1;1H[2M[1;60r[57;1H># Note that the last character of the ending comment leader (left angle bracket) is a comment leaa[58;1Hder itself. Make sure that this comment leader is not removed from the next line #< < On this linee[59;1H a new comment is opened which spans 2 lines. This comment should retain its comment leader.[60;1H[K[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l># Note that the last character of the ending comment leader (left angle bracket) is a comment lea[59;1H[1m[34m@                                                                                                 [1;59r[m[1;1H[2M[1;60r[57;1H># Note that the last character of the ending comment leader (left angle bracket) is a comment leaa[58;1Hder itself. Make sure that this comment leader is not removed from the next line #< < On this linee[59;1H a new comment is opened which spans 2 lines. This comment should retain its comment leader.[57;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1HSome code!
// Make sure backspacing does not remove this comment leader.[?12l[?25h[?25l[58;11H// Make sure backspacing does not remove this comment leader.
}[59;2H[K[58;10H[?12l[?25h
[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:g/^STARTTEST/.,/^ENDTEST/d[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 61 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[59;19H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:?firstline?+1,$w! test.out[60;1H[K[59;19H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l55 fewer lines[60;15H[K[1;1H}[1;5H[K[2;1H[K[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h?firstline?+1,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 88 lines, 2789 characters written[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test30.failed test.ok test.out X* viminfo
cp test30.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test30.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test30.in" 222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option

Note: This test will fail if "cat" is not available.

STARTTEST
:so small.vim
:" first write three test files, one in each format
:set fileformat=unix
:set fileformats=
:/^1/w! XX1
:/^2/w! XX2
:/^3/w! XX3
:/^4/w! XX4
:/^5/w! XX5
:/^6/w! XX6
:/^7/w! XX7
:/^8/w! XX8
:/^9/w! XX9
:/^10/w! XX10
:/^unix/;/eof/-1w! XXUnix
:/^dos/;/eof/-1w! XXDos
:set bin noeol
:$w! XXMac
:set nobin eol
:bwipe XXUnix XXDos XXMac
:" create mixed format files
:if has("vms")
: !copy XXUnix,XXDos XXUxDs.
: !copy XXUnix,XXMac XXUxMac.
: !copy XXDos,XXMac  XXDosMac.
: !copy XXUnix,XXDos,XXMac XXUxDsMc.
:elseif has("win32")
: !copy /b XXUnix+XXDos XXUxDs
: !copy /b XXUnix+XXMac XXUxMac
: !copy /b XXDos+XXMac XXDosMac
: !copy /b XXUnix+XXDos+XXMac XXUxDsMc
:else
: !cat XXUnix XXDos >XXUxDs
: !cat XXUnix XXMac >XXUxMac
: !cat XXDos XXMac >XXDosMac
: !cat XXUnix XXDos XXMac >XXUxDsMc
:endif
:"
:" try reading and writing with 'fileformats' empty
:set fileformat=unix
:e! XXUnix
:w! test.out
:e! XXDos
:w! XXtt01
:e! XXMac
:w! XXtt02
:bwipe XXUnix XXDos XXMac
:set fileformat=dos
:e! XXUnix
:w! XXtt11
:e! XXDos
:w! XXtt12
:e! XXMac
:w! XXtt13[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for a lot of variations of the 'fileformats' option[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 195 lines, 3271 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:w >>XXtt92
:w >>XXtt93
:"
:" Concatenate the results.
:" Make fileformat of test.out the native fileformat.
:" Add a newline at the end.
:set binary
:e! test.out
:$r XXtt01
:$r XXtt02
Go1[34m^[[m:$r XXtt11
:$r XXtt12
:$r XXtt13
Go2[34m^[[m:$r XXtt21
:$r XXtt22
:$r XXtt23
Go3[34m^[[m:$r XXtt31
:$r XXtt32
:$r XXtt33
Go4[34m^[[m:$r XXtt41
:$r XXtt42
:$r XXtt43
Go5[34m^[[m:$r XXtt51
:$r XXtt52
:$r XXtt53
Go6[34m^[[m:$r XXtt61
:$r XXtt62
:$r XXtt63
Go7[34m^[[m:$r XXtt71
Go8[34m^[[m:$r XXtt81
Go9[34m^[[m:$r XXtt91
:$r XXtt92
:$r XXtt93
Go10[34m^[[m:$r XXUnix
:set nobinary ff&
:w
:qa!
ENDTEST

1
2
3
4
5
6
7
8
9
10

unix
unix
eof

dos[34m^M[m
dos[34m^M[m
eof

mac[34m^M[mmac[34m^M[38;1H[?12l[?25h
[?25l[60;1H[m:so! Xdotest[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" first write three test files, one in each format[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformat=unix[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^1/w! XX1[?25l"XX1" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^2/w! XX2[?25l"XX2" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^3/w! XX3[?25l"XX3" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^4/w! XX4[?25l"XX4" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^5/w! XX5[?25l"XX5" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^6/w! XX6[?25l"XX6" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^7/w! XX7[?25l"XX7" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^8/w! XX8[?25l"XX8" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^9/w! XX9[?25l"XX9" [60;7H[K[60;7H[New File] 1 line, 2 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^10/w! XX10[?25l"XX10" [60;8H[K[60;8H[New File] 1 line, 3 characters written[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^unix/;/eof/-1w! XXUnix[?25l"XXUnix" [60;10H[K[60;10H[New File] 2 lines, 10 characters written[51;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^dos/;/eof/-1w! XXDos[?25l"XXDos" [60;9H[K[60;9H[New File] 2 lines, 10 characters written[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bin noeol[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$w! XXMac[?25l"XXMac" [60;9H[K[60;9H[New File][Incomplete last line] 1 line, 8 characters written[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nobin eol[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l3 buffers wiped out[60;21H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" create mixed format files[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has("vms")[?25l
:  [?12l[?25h: !copy XXUnix,XXDos XXUxDs.
[?25l:  [?12l[?25h: !copy XXUnix,XXMac XXUxMac.
[?25l:  [?12l[?25h: !copy XXDos,XXMac  XXDosMac.
[?25l:  [?12l[?25h: !copy XXUnix,XXDos,XXMac XXUxDsMc.
[?25l:  [?12l[?25h:elseif has("win32")
[?25l:  [?12l[?25h: !copy /b XXUnix+XXDos XXUxDs
[?25l:  [?12l[?25h: !copy /b XXUnix+XXMac XXUxMac
[?25l:  [?12l[?25h: !copy /b XXDos+XXMac XXDosMac
[?25l:  [?12l[?25h: !copy /b XXUnix+XXDos+XXMac XXUxDsMc
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: !cat XXUnix XXDos >XXUxDs
[?25l:!cat XXUnix XXDos >XXUxDs[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:  :[?12l[?25h !cat XXUnix XXMac >XXUxMac
[?25l:!cat XXUnix XXMac >XXUxMac[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:  :[?12l[?25h !cat XXDos XXMac >XXDosMac
[?25l:!cat XXDos XXMac >XXDosMac[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:  :[?12l[?25h !cat XXUnix XXDos XXMac >XXUxDsMc
[?25l:!cat XXUnix XXDos XXMac >XXUxDsMc[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:  :[?12l[?25hendif[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[27m[23m[m[H[2J[1;1H:w >>XXtt92
:w >>XXtt93
:"
:" Concatenate the results.
:" Make fileformat of test.out the native fileformat.
:" Add a newline at the end.
:set binary
:e! test.out
:$r XXtt01
:$r XXtt02
Go1[34m^[[m:$r XXtt11
:$r XXtt12
:$r XXtt13
Go2[34m^[[m:$r XXtt21
:$r XXtt22
:$r XXtt23
Go3[34m^[[m:$r XXtt31
:$r XXtt32
:$r XXtt33
Go4[34m^[[m:$r XXtt41
:$r XXtt42
:$r XXtt43
Go5[34m^[[m:$r XXtt51
:$r XXtt52
:$r XXtt53
Go6[34m^[[m:$r XXtt61
:$r XXtt62
:$r XXtt63
Go7[34m^[[m:$r XXtt71
Go8[34m^[[m:$r XXtt81
Go9[34m^[[m:$r XXtt91
:$r XXtt92
:$r XXtt93
Go10[34m^[[m:$r XXUnix
:set nobinary ff&
:w
:qa!
ENDTEST

1
2
3
4
5
6
7
8
9
10

unix
unix
eof

dos[34m^M[m
dos[34m^M[m
eof

mac[34m^M[mmac[34m^M[55;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h" try reading and writing with 'fileformats' empty[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformat=unix[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUnix[?25l"XXUnix" [60;10H[K[60;10H2 lines, 10 characters[1;1Hunix[1;5H[K[2;1Hunix[2;5H[K[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 2 lines, 10 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXDos[?25l"XXDos" [60;9H[K[60;9H2 lines, 10 characters[1;1Hdos[34m^M[m
dos[34m^M[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt01[?25l"XXtt01" [60;10H[K[60;10H[New File] 2 lines, 10 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXMac[?25l"XXMac" [60;9H[K[60;9H[Incomplete last line] 1 line, 8 characters[1;1Hmac[2Cmac[34m^M[m
[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt02[?25l"XXtt02" [60;10H[K[60;10H[New File] 1 line, 9 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters
3 buffers wiped out
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset fileformat=dos[?25l[1;1H[2L[1;1H:w >>XXtt92
:w >>XXtt93
:"[3;3H[K[4;1H:" Concatenate the results.[4;28H[K[5;1H:" Make fileformat of test.out the native fileformat.[5;54H[K[6;1H:" Add a newline at the end.[6;29H[K[7;1H:set binary[7;12H[K[8;1H:e! test.out[8;13H[K[9;1H:$r XXtt01[9;11H[K[10;1H:$r XXtt02[10;11H[K[11;1HGo1[34m^[[m:$r XXtt11[11;16H[K[12;1H:$r XXtt12[12;11H[K[13;1H:$r XXtt13[13;11H[K[14;1HGo2[34m^[[m:$r XXtt21[14;16H[K[15;1H:$r XXtt22[15;11H[K[16;1H:$r XXtt23[16;11H[K[17;1HGo3[34m^[[m:$r XXtt31[17;16H[K[18;1H:$r XXtt32[18;11H[K[19;1H:$r XXtt33[19;11H[K[20;1HGo4[34m^[[m:$r XXtt41[20;16H[K[21;1H:$r XXtt42[21;11H[K[22;1H:$r XXtt43[22;11H[K[23;1HGo5[34m^[[m:$r XXtt51[23;16H[K[24;1H:$r XXtt52[24;11H[K[25;1H:$r XXtt53[25;11H[K[26;1HGo6[34m^[[m:$r XXtt61[26;16H[K[27;1H:$r XXtt62[27;11H[K[28;1H:$r XXtt63[28;11H[K[29;1HGo7[34m^[[m:$r XXtt71[29;16H[K[30;1HGo8[34m^[[m:$r XXtt81[30;16H[K[31;1HGo9[34m^[[m:$r XXtt91[31;16H[K[32;1H:$r XXtt92[32;11H[K[33;1H:$r XXtt93[33;11H[K[34;1HGo10[34m^[[m:$r XXUnix[34;17H[K[35;1H:set nobinary ff&[35;18H[K[36;1H:w[36;3H[K[37;1H:qa![37;5H[K[38;1HENDTEST[38;8H[K[39;1H[K[40;1H1[40;2H[K[41;1H2[41;2H[K[42;1H3[42;2H[K[43;1H4[43;2H[K[44;1H5[44;2H[K[45;1H6[45;2H[K[46;1H7[46;2H[K[47;1H8[47;2H[K[48;1H9[48;2H[K[49;1H10[49;3H[K[50;1H[K[51;1Hunix[51;5H[K[52;1Hunix[52;5H[K[53;1Heof[53;4H[K[54;1H[K[55;1Hdos[34m^M[m[55;6H[K[56;1Hdos[34m^M[m[56;6H[K[57;1Heof[57;4H[K[58;1H[K[59;1Hmac[34m^M[mmac[34m^M[m[59;11H[K[60;1H[K[55;1H[?12l[?25h[?25l[60;1H:[?12l[?25he! XXUnix[?25l"XXUnix" [60;10H[K[60;10H[CR missing][dos format] 2 lines, 10 characters[1;1Hunix[1;5H[K[2;1Hunix[2;5H[K[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt11[?25l"XXtt11" [60;10H[K[60;10H[New File][dos format] 2 lines, 12 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXDos[?25l"XXDos" [60;9H[K[60;9H[dos format] 2 lines, 10 characters[1;1Hdos[1;4H[K[2;1Hdos[2;4H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! XXtt12[?25l"XXtt12" [60;10H[K[60;10H[New File][dos format] 2 lines, 10 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXMac[?25l"XXMac" [60;9H[K[60;9H[Incomplete last line][dos format] 1 line, 8 characters[1;1Hmac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt13[?25l"XXtt13" [60;10H[K[60;10H[New File][dos format] 1 line, 10 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l"test30.in" [60;13H[K[60;13H[CR missing][dos format] 222 lines, 3463 characters
3 buffers wiped out
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset fileformat=mac[?25l[1;1H[2L[1;1H:w >>XXtt92
:w >>XXtt93
:"[3;3H[K[4;1H:" Concatenate the results.[4;28H[K[5;1H:" Make fileformat of test.out the native fileformat.[5;54H[K[6;1H:" Add a newline at the end.[6;29H[K[7;1H:set binary[7;12H[K[8;1H:e! test.out[8;13H[K[9;1H:$r XXtt01[9;11H[K[10;1H:$r XXtt02[10;11H[K[11;1HGo1[34m^[[m:$r XXtt11[11;16H[K[12;1H:$r XXtt12[12;11H[K[13;1H:$r XXtt13[13;11H[K[14;1HGo2[34m^[[m:$r XXtt21[14;16H[K[15;1H:$r XXtt22[15;11H[K[16;1H:$r XXtt23[16;11H[K[17;1HGo3[34m^[[m:$r XXtt31[17;16H[K[18;1H:$r XXtt32[18;11H[K[19;1H:$r XXtt33[19;11H[K[20;1HGo4[34m^[[m:$r XXtt41[20;16H[K[21;1H:$r XXtt42[21;11H[K[22;1H:$r XXtt43[22;11H[K[23;1HGo5[34m^[[m:$r XXtt51[23;16H[K[24;1H:$r XXtt52[24;11H[K[25;1H:$r XXtt53[25;11H[K[26;1HGo6[34m^[[m:$r XXtt61[26;16H[K[27;1H:$r XXtt62[27;11H[K[28;1H:$r XXtt63[28;11H[K[29;1HGo7[34m^[[m:$r XXtt71[29;16H[K[30;1HGo8[34m^[[m:$r XXtt81[30;16H[K[31;1HGo9[34m^[[m:$r XXtt91[31;16H[K[32;1H:$r XXtt92[32;11H[K[33;1H:$r XXtt93[33;11H[K[34;1HGo10[34m^[[m:$r XXUnix[34;17H[K[35;1H:set nobinary ff&[35;18H[K[36;1H:w[36;3H[K[37;1H:qa![37;5H[K[38;1HENDTEST[38;8H[K[39;1H[K[40;1H1[40;2H[K[41;1H2[41;2H[K[42;1H3[42;2H[K[43;1H4[43;2H[K[44;1H5[44;2H[K[45;1H6[45;2H[K[46;1H7[46;2H[K[47;1H8[47;2H[K[48;1H9[48;2H[K[49;1H10[49;3H[K[50;1H[K[51;1Hunix[51;5H[K[52;1Hunix[52;5H[K[53;1Heof[53;4H[K[54;1H[K[55;1Hdos[55;4H[K[56;1Hdos[56;4H[K[57;1Heof[57;4H[K[58;1H[K[59;1Hmac[34m^J[mmac[59;9H[K[60;1H[K[55;1H[?12l[?25h[?25l[60;1H:[?12l[?25he! XXUnix[?25l"XXUnix" [60;10H[K[60;10H[Incomplete last line][mac format] 1 line, 10 characters[1;1Hunix[34m^J[munix[34m^J[m
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt21[?25l"XXtt21" [60;10H[K[60;10H[New File][mac format] 1 line, 11 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXDos[?25l"XXDos" [60;9H[K[60;9H[Incomplete last line][mac format] 3 lines, 10 characters[1;1Hdos[1;4H[K[2;1H[34m^J[mdos[2;6H[K[3;1H[34m^J[m[3;3H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! XXtt22[?25l"XXtt22" [60;10H[K[60;10H[New File][mac format] 3 lines, 11 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXMac[?25l"XXMac" [60;9H[K[60;9H[mac format] 2 lines, 8 characters[1;1Hmac
mac[2;4H[K[3;1H[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt23[?25l"XXtt23" [60;10H[K[60;10H[New File][mac format] 2 lines, 8 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l"test30.in" [60;13H[K[60;13H[Incomplete last line][mac format] 5 lines, 3463 characters
3 buffers wiped out
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[2L[1;1HTest for a lot of variations of the 'fileformats' option[34m^J^J[mNote: This test will fail if "cat" is  [2;1Hnot available.[34m^J^J[mSTARTTEST[34m^J[m:so small.vim[34m^J[m:" first write three test files, one in each format[34m^J[m::[3;1Hset fileformat=unix[34m^J[m:set fileformats=[34m^J[m:/^1/w! XX1[34m^J[m:/^2/w! XX2[34m^J[m:/^3/w! XX3[34m^J[m:/^4/w! XX4[34m^J[m:/^5/ww[4;1H! XX5[34m^J[m:/^6/w! XX6[34m^J[m:/^7/w! XX7[34m^J[m:/^8/w! XX8[34m^J[m:/^9/w! XX9[34m^J[m:/^10/w! XX10[34m^J[m:/^unix/;/eof/-1w! XXUnii[5;1Hx[34m^J[m:/^dos/;/eof/-1w! XXDos[34m^J[m:set bin noeol[34m^J[m:$w! XXMac[34m^J[m:set nobin eol[34m^J[m:bwipe XXUnix XXDos XXMac[34m^^[6;1HJ[m:" create mixed format files[34m^J[m:if has("vms")[34m^J[m: !copy XXUnix,XXDos XXUxDs.[34m^J[m: !copy XXUnix,XXMac  [7;1HXXUxMac.[34m^J[m: !copy XXDos,XXMac  XXDosMac.[34m^J[m: !copy XXUnix,XXDos,XXMac XXUxDsMc.[34m^J[m:elseif has("win322[8;1H")[34m^J[m: !copy /b XXUnix+XXDos XXUxDs[34m^J[m: !copy /b XXUnix+XXMac XXUxMac[34m^J[m: !copy /b XXDos+XXMac XXDosMM[9;1Hac[34m^J[m: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[34m^J[m:else[34m^J[m: !cat XXUnix XXDos >XXUxDs[34m^J[m: !cat XXUnix XXMaa[10;1Hc >XXUxMac[34m^J[m: !cat XXDos XXMac >XXDosMac[34m^J[m: !cat XXUnix XXDos XXMac >XXUxDsMc[34m^J[m:endif[34m^J[m:"[34m^J[m:" try  [11;1Hreading and writing with 'fileformats' empty[34m^J[m:set fileformat=unix[34m^J[m:e! XXUnix[34m^J[m:w! test.out[34m^J[m:e!  [12;1HXXDos[34m^J[m:w! XXtt01[34m^J[m:e! XXMac[34m^J[m:w! XXtt02[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:set fileformat=dos[34m^J[m:e! XXUnn[13;1Hix[34m^J[m:w! XXtt11[34m^J[m:e! XXDos[34m^J[m:w! XXtt12[34m^J[m:e! XXMac[34m^J[m:w! XXtt13[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:set filee[14;1Hformat=mac[34m^J[m:e! XXUnix[34m^J[m:w! XXtt21[34m^J[m:e! XXDos[34m^J[m:w! XXtt22[34m^J[m:e! XXMac[34m^J[m:w! XXtt23[34m^J[m:bwipe XXUnix XXX[15;1HDos XXMac[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to one format[34m^J[m:set fileformats=uu[16;1Hnix[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt31[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt32[34m^J[m:bb[17;1Hwipe XXUxDsMc[34m^J[m:set fileformats=mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt33[34m^J[m:bwipe XXUxDsMc[34m^J[m:"[34m^J[m:" try readingg[18;1H and writing with 'fileformats' set to two formats[34m^J[m:set fileformats=unix,dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XX[19;1HXtt41[34m^J[m:bwipe XXUxDsMc[34m^J[m:e! XXUxMac[34m^J[m:w! XXtt42[34m^J[m:bwipe XXUxMac[34m^J[m:e! XXDosMac[34m^J[m:w! XXtt43[34m^J[m:bwipe  [20;1HXXDosMac[34m^J[m:set fileformats=unix,mac[34m^J[m:e! XXUxDs[34m^J[m:w! XXtt51[34m^J[m:bwipe XXUxDs[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXttt[21;1H52[34m^J[m:bwipe XXUxDsMc[34m^J[m:e! XXDosMac[34m^J[m:w! XXtt53[34m^J[m:bwipe XXDosMac[34m^J[m:set fileformats=dos,mac[34m^J[m:e! XXUxx[22;1HDs[34m^J[m:w! XXtt61[34m^J[m:bwipe XXUxDs[34m^J[m:e! XXUxMac[34m^J[m:w! XXtt62[34m^J[m:bwipe XXUxMac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt63[34m^JJ[m[23;1H:bwipe XXUxDsMc[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to three formats[34m^J[m:set filee[24;1Hformats=unix,dos,mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt71[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=mac,dos,unix[34m^J[m:ee[25;1H! XXUxDsMc[34m^J[m:w! XXtt81[34m^J[m:bwipe XXUxDsMc[34m^J[m:" try with 'binary' set[34m^J[m:set fileformats=mac,unix,dos[34m^JJ[m[26;1H:set binary[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt91[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXX[27;1Htt92[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt93[34m^J[m:"[34m^J[m:" Append "END" to eachh[28;1H file so that we can see what the last written char was.[34m^J[m:set fileformat=unix nobin[34m^J[mggdGaEND[34m^[[m:ww[29;1H >>XXtt01[34m^J[m:w >>XXtt02[34m^J[m:w >>XXtt11[34m^J[m:w >>XXtt12[34m^J[m:w >>XXtt13[34m^J[m:w >>XXtt21[34m^J[m:w >>XXtt22[34m^J[m:w >>XXttt[30;1H23[34m^J[m:w >>XXtt31[34m^J[m:w >>XXtt32[34m^J[m:w >>XXtt33[34m^J[m:w >>XXtt41[34m^J[m:w >>XXtt42[34m^J[m:w >>XXtt43[34m^J[m:w >>XXtt51[34m^J[m:w  [31;1H>>XXtt52[34m^J[m:w >>XXtt53[34m^J[m:w >>XXtt61[34m^J[m:w >>XXtt62[34m^J[m:w >>XXtt63[34m^J[m:w >>XXtt71[34m^J[m:w >>XXtt81[34m^J[m:w >>XXtt99[32;1H1[34m^J[m:w >>XXtt92[34m^J[m:w >>XXtt93[34m^J[m:"[34m^J[m:" Concatenate the results.[34m^J[m:" Make fileformat of test.out the nn[33;1Hative fileformat.[34m^J[m:" Add a newline at the end.[34m^J[m:set binary[34m^J[m:e! test.out[34m^J[m:$r XXtt01[34m^J[m:$r XXtt022[34;1H[34m^J[mGo1[34m^[[m:$r XXtt11[34m^J[m:$r XXtt12[34m^J[m:$r XXtt13[34m^J[mGo2[34m^[[m:$r XXtt21[34m^J[m:$r XXtt22[34m^J[m:$r XXtt23[34m^J[mGo3[34m^[[m:$r XXtt33[35;1H1[34m^J[m:$r XXtt32[34m^J[m:$r XXtt33[34m^J[mGo4[34m^[[m:$r XXtt41[34m^J[m:$r XXtt42[34m^J[m:$r XXtt43[34m^J[mGo5[34m^[[m:$r XXtt51[34m^J[m:$r XXtt52[34m^J[m::[36;1H$r XXtt53[34m^J[mGo6[34m^[[m:$r XXtt61[34m^J[m:$r XXtt62[34m^J[m:$r XXtt63[34m^J[mGo7[34m^[[m:$r XXtt71[34m^J[mGo8[34m^[[m:$r XXtt81[34m^J[mGo9[34m^[[m:$r XXtt[37;1Ht91[34m^J[m:$r XXtt92[34m^J[m:$r XXtt93[34m^J[mGo10[34m^[[m:$r XXUnix[34m^J[m:set nobinary ff&[34m^J[m:w[34m^J[m:qa![34m^J[mENDTEST[34m^J^J[m1[34m^J[m2[34m^J[m3[34m^J[m4[34m^^[38;1HJ[m5[34m^J[m6[34m^J[m7[34m^J[m8[34m^J[m9[34m^J[m10[34m^J^J[munix[34m^J[munix[34m^J[meof[34m^J^J[mdos[38;45H[K[39;1H[34m^J[mdos[39;6H[K[40;1H[34m^J[meof[34m^J^J[mmac[40;13H[K[41;1Hmac[41;4H[K[42;1H[34m^J[m[42;3H[K[60;1H[K[42;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" try reading and writing with 'fileformats' set to one format[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=unix[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix[2;5H[K[3;1Hdos[34m^M[m[3;6H[K[4;1Hdos[34m^M[m[4;6H[K[5;1Hmac[34m^M[mmac[34m^M[m[5;11H[K[6;1H[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt31[?25l"XXtt31" [60;10H[K[60;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=dos[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line][CR missing][dos format] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[3;4H[K[4;1Hdos
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt32[?25l"XXtt32" [60;10H[K[60;10H[New File][dos format] 5 lines, 32 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H[CR missing][dos format] 222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=mac[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[mac format] 4 lines, 28 characters[1;1Hunix[34m^J[munix[34m^J[mdos[1;16H[K[2;1H[34m^J[mdos
[34m^J[mmac[3;7H[K[4;1Hmac
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt33[?25l"XXtt33" [60;10H[K[60;10H[New File][mac format] 4 lines, 28 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H[Incomplete last line][mac format] 5 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[34m^J^J[mNote: This test will fail if "cat" is  [2;1Hnot available.[34m^J^J[mSTARTTEST[34m^J[m:so small.vim[34m^J[m:" first write three test files, one in each format[34m^J[m::[3;1Hset fileformat=unix[34m^J[m:set fileformats=[34m^J[m:/^1/w! XX1[34m^J[m:/^2/w! XX2[34m^J[m:/^3/w! XX3[34m^J[m:/^4/w! XX4[34m^J[m:/^5/ww[4;1H! XX5[34m^J[m:/^6/w! XX6[34m^J[m:/^7/w! XX7[34m^J[m:/^8/w! XX8[34m^J[m:/^9/w! XX9[34m^J[m:/^10/w! XX10[34m^J[m:/^unix/;/eof/-1w! XXUnii[5;1Hx[34m^J[m:/^dos/;/eof/-1w! XXDos[34m^J[m:set bin noeol[34m^J[m:$w! XXMac[34m^J[m:set nobin eol[34m^J[m:bwipe XXUnix XXDos XXMac[34m^^[6;1HJ[m:" create mixed format files[34m^J[m:if has("vms")[34m^J[m: !copy XXUnix,XXDos XXUxDs.[34m^J[m: !copy XXUnix,XXMac  [7;1HXXUxMac.[34m^J[m: !copy XXDos,XXMac  XXDosMac.[34m^J[m: !copy XXUnix,XXDos,XXMac XXUxDsMc.[34m^J[m:elseif has("win322[8;1H")[34m^J[m: !copy /b XXUnix+XXDos XXUxDs[34m^J[m: !copy /b XXUnix+XXMac XXUxMac[34m^J[m: !copy /b XXDos+XXMac XXDosMM[9;1Hac[34m^J[m: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[34m^J[m:else[34m^J[m: !cat XXUnix XXDos >XXUxDs[34m^J[m: !cat XXUnix XXMaa[10;1Hc >XXUxMac[34m^J[m: !cat XXDos XXMac >XXDosMac[34m^J[m: !cat XXUnix XXDos XXMac >XXUxDsMc[34m^J[m:endif[34m^J[m:"[34m^J[m:" try  [11;1Hreading and writing with 'fileformats' empty[34m^J[m:set fileformat=unix[34m^J[m:e! XXUnix[34m^J[m:w! test.out[34m^J[m:e!  [12;1HXXDos[34m^J[m:w! XXtt01[34m^J[m:e! XXMac[34m^J[m:w! XXtt02[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:set fileformat=dos[34m^J[m:e! XXUnn[13;1Hix[34m^J[m:w! XXtt11[34m^J[m:e! XXDos[34m^J[m:w! XXtt12[34m^J[m:e! XXMac[34m^J[m:w! XXtt13[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:set filee[14;1Hformat=mac[34m^J[m:e! XXUnix[34m^J[m:w! XXtt21[34m^J[m:e! XXDos[34m^J[m:w! XXtt22[34m^J[m:e! XXMac[34m^J[m:w! XXtt23[34m^J[m:bwipe XXUnix XXX[15;1HDos XXMac[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to one format[34m^J[m:set fileformats=uu[16;1Hnix[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt31[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt32[34m^J[m:bb[17;1Hwipe XXUxDsMc[34m^J[m:set fileformats=mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt33[34m^J[m:bwipe XXUxDsMc[34m^J[m:"[34m^J[m:" try readingg[18;1H and writing with 'fileformats' set to two formats[34m^J[m:set fileformats=unix,dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XX[19;1HXtt41[34m^J[m:bwipe XXUxDsMc[34m^J[m:e! XXUxMac[34m^J[m:w! XXtt42[34m^J[m:bwipe XXUxMac[34m^J[m:e! XXDosMac[34m^J[m:w! XXtt43[34m^J[m:bwipe  [20;1HXXDosMac[34m^J[m:set fileformats=unix,mac[34m^J[m:e! XXUxDs[34m^J[m:w! XXtt51[34m^J[m:bwipe XXUxDs[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXttt[21;1H52[34m^J[m:bwipe XXUxDsMc[34m^J[m:e! XXDosMac[34m^J[m:w! XXtt53[34m^J[m:bwipe XXDosMac[34m^J[m:set fileformats=dos,mac[34m^J[m:e! XXUxx[22;1HDs[34m^J[m:w! XXtt61[34m^J[m:bwipe XXUxDs[34m^J[m:e! XXUxMac[34m^J[m:w! XXtt62[34m^J[m:bwipe XXUxMac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt63[34m^JJ[m[23;1H:bwipe XXUxDsMc[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to three formats[34m^J[m:set filee[24;1Hformats=unix,dos,mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt71[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=mac,dos,unix[34m^J[m:ee[25;1H! XXUxDsMc[34m^J[m:w! XXtt81[34m^J[m:bwipe XXUxDsMc[34m^J[m:" try with 'binary' set[34m^J[m:set fileformats=mac,unix,dos[34m^JJ[m[26;1H:set binary[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt91[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXX[27;1Htt92[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt93[34m^J[m:"[34m^J[m:" Append "END" to eachh[28;1H file so that we can see what the last written char was.[34m^J[m:set fileformat=unix nobin[34m^J[mggdGaEND[34m^[[m:ww[29;1H >>XXtt01[34m^J[m:w >>XXtt02[34m^J[m:w >>XXtt11[34m^J[m:w >>XXtt12[34m^J[m:w >>XXtt13[34m^J[m:w >>XXtt21[34m^J[m:w >>XXtt22[34m^J[m:w >>XXttt[30;1H23[34m^J[m:w >>XXtt31[34m^J[m:w >>XXtt32[34m^J[m:w >>XXtt33[34m^J[m:w >>XXtt41[34m^J[m:w >>XXtt42[34m^J[m:w >>XXtt43[34m^J[m:w >>XXtt51[34m^J[m:w  [31;1H>>XXtt52[34m^J[m:w >>XXtt53[34m^J[m:w >>XXtt61[34m^J[m:w >>XXtt62[34m^J[m:w >>XXtt63[34m^J[m:w >>XXtt71[34m^J[m:w >>XXtt81[34m^J[m:w >>XXtt99[32;1H1[34m^J[m:w >>XXtt92[34m^J[m:w >>XXtt93[34m^J[m:"[34m^J[m:" Concatenate the results.[34m^J[m:" Make fileformat of test.out the nn[33;1Hative fileformat.[34m^J[m:" Add a newline at the end.[34m^J[m:set binary[34m^J[m:e! test.out[34m^J[m:$r XXtt01[34m^J[m:$r XXtt022[34;1H[34m^J[mGo1[34m^[[m:$r XXtt11[34m^J[m:$r XXtt12[34m^J[m:$r XXtt13[34m^J[mGo2[34m^[[m:$r XXtt21[34m^J[m:$r XXtt22[34m^J[m:$r XXtt23[34m^J[mGo3[34m^[[m:$r XXtt33[35;1H1[34m^J[m:$r XXtt32[34m^J[m:$r XXtt33[34m^J[mGo4[34m^[[m:$r XXtt41[34m^J[m:$r XXtt42[34m^J[m:$r XXtt43[34m^J[mGo5[34m^[[m:$r XXtt51[34m^J[m:$r XXtt52[34m^J[m::[36;1H$r XXtt53[34m^J[mGo6[34m^[[m:$r XXtt61[34m^J[m:$r XXtt62[34m^J[m:$r XXtt63[34m^J[mGo7[34m^[[m:$r XXtt71[34m^J[mGo8[34m^[[m:$r XXtt81[34m^J[mGo9[34m^[[m:$r XXtt[37;1Ht91[34m^J[m:$r XXtt92[34m^J[m:$r XXtt93[34m^J[mGo10[34m^[[m:$r XXUnix[34m^J[m:set nobinary ff&[34m^J[m:w[34m^J[m:qa![34m^J[mENDTEST[34m^J^J[m1[34m^J[m2[34m^J[m3[34m^J[m4[34m^^[38;1HJ[m5[34m^J[m6[34m^J[m7[34m^J[m8[34m^J[m9[34m^J[m10[34m^J^J[munix[34m^J[munix[34m^J[meof[34m^J^J[mdos[38;45H[K[39;1H[34m^J[mdos[39;6H[K[40;1H[34m^J[meof[34m^J^J[mmac[40;13H[K[41;1Hmac[41;4H[K[42;1H[34m^J[m[42;3H[K[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" try reading and writing with 'fileformats' set to two formats[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=unix,dos[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix[2;5H[K[3;1Hdos[34m^M[m[3;6H[K[4;1Hdos[34m^M[m[4;6H[K[5;1Hmac[34m^M[mmac[34m^M[m[5;11H[K[6;1H[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt41[?25l"XXtt41" [60;10H[K[60;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxMac[?25l"XXUxMac" [60;11H[K[60;11H[Incomplete last line] 3 lines, 18 characters[1;1Hunix[1;6H[K[2;1Hunix
mac[34m^M[mmac[34m^M[m[3;12H[K[4;1H[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt42[?25l"XXtt42" [60;10H[K[60;10H[New File] 3 lines, 19 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxMac[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXDosMac[?25l"XXDosMac" [60;12H[K[60;12H[Incomplete last line][dos format] 3 lines, 18 characters[1;1Hdo[1;4H[K[2;1Hdos
mac[34m^M[mmac[34m^M[m[3;12H[K[4;1H[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt43[?25l"XXtt43" [60;10H[K[60;10H[New File][dos format] 3 lines, 20 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXDosMac[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=unix,mac[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDs[?25l"XXUxDs" [60;10H[K[60;10H4 lines, 20 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[34m^M[m[3;7H[K[4;1Hdos[34m^M[m
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt51[?25l"XXtt51" [60;10H[K[60;10H[New File] 4 lines, 20 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDs[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[34m^M[m[3;7H[K[4;1Hdos[34m^M[m
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt52[?25l"XXtt52" [60;10H[K[60;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXDosMac[?25l"XXDosMac" [60;12H[K[60;12H[mac format] 4 lines, 18 characters[1;1Hdo[1;4H[K[2;1H[34m^J[mdos
[34m^J[mmac[3;7H[K[4;1Hmac
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt53[?25l"XXtt53" [60;10H[K[60;10H[New File][mac format] 4 lines, 18 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXDosMac[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=dos,mac[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDs[?25l"XXUxDs" [60;10H[K[60;10H[CR missing][dos format] 4 lines, 20 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[3;4H[K[4;1Hdos
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt61[?25l"XXtt61" [60;10H[K[60;10H[New File][dos format] 4 lines, 22 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDs[?25l"test30.in" [60;13H[K[60;13H[CR missing][dos format] 222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxMac[?25l"XXUxMac" [60;11H[K[60;11H[Incomplete last line][CR missing][dos format] 3 lines, 18 characters[1;1Hunix[1;6H[K[2;1Hunix
mac[34m^M[mmac[34m^M[m[3;12H[K[4;1H[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt62[?25l"XXtt62" [60;10H[K[60;10H[New File][dos format] 3 lines, 22 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxMac[?25l"test30.in" [60;13H[K[60;13H[CR missing][dos format] 222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line][CR missing][dos format] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[3;4H[K[4;1Hdos
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt63[?25l"XXtt63" [60;10H[K[60;10H[New File][dos format] 5 lines, 32 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H[CR missing][dos format] 222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" try reading and writing with 'fileformats' set to three formats[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=unix,dos,mac[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[34m^M[m[3;7H[K[4;1Hdos[34m^M[m
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt71[?25l"XXtt71" [60;10H[K[60;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=mac,dos,unix[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[34m^M[m[3;7H[K[4;1Hdos[34m^M[m
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt81[?25l"XXtt81" [60;10H[K[60;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" try with 'binary' set[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=mac,unix,dos[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset binary[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[34m^M[m[3;7H[K[4;1Hdos[34m^M[m
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt91[?25l"XXtt91" [60;10H[K[60;10H[New File][Incomplete last line] 5 lines, 28 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=mac[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[34m^M[m[3;7H[K[4;1Hdos[34m^M[m
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt92[?25l"XXtt92" [60;10H[K[60;10H[New File][Incomplete last line] 5 lines, 28 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [60;13H[K[60;13H222 lines, 3463 characters[1;1HTest for a lot of variations of the 'fileformats' option[2;1H[K[3;1HNote: This test will fail if "cat" is not available.[4;1H[K[5;1HSTARTTEST[5;10H[K[6;1H:so small.vim[6;14H[K[7;1H:" first write three test files, one in each format[7;52H[K[8;1H:set fileformat=unix[8;21H[K[9;1H:set fileformats=[9;18H[K[10;1H:/^1/w! XX1[10;12H[K[11;1H:/^2/w! XX2[11;12H[K[12;1H:/^3/w! XX3[12;12H[K[13;1H:/^4/w! XX4[13;12H[K[14;1H:/^5/w! XX5[14;12H[K[15;1H:/^6/w! XX6[15;12H[K[16;1H:/^7/w! XX7[16;12H[K[17;1H:/^8/w! XX8[17;12H[K[18;1H:/^9/w! XX9[18;12H[K[19;1H:/^10/w! XX10[19;14H[K[20;1H:/^unix/;/eof/-1w! XXUnix[20;26H[K[21;1H:/^dos/;/eof/-1w! XXDos[21;24H[K[22;1H:set bin noeol[22;15H[K[23;1H:$w! XXMac[23;11H[K[24;1H:set nobin eol[24;15H[K[25;1H:bwipe XXUnix XXDos XXMac[25;26H[K[26;1H:" create mixed format files[26;29H[K[27;1H:if has("vms")[27;15H[K[28;1H: !copy XXUnix,XXDos XXUxDs.[28;29H[K[29;1H: !copy XXUnix,XXMac XXUxMac.[29;30H[K[30;1H: !copy XXDos,XXMac  XXDosMac.[30;31H[K[31;1H: !copy XXUnix,XXDos,XXMac XXUxDsMc.[31;37H[K[32;1H:elseif has("win32")[32;21H[K[33;1H: !copy /b XXUnix+XXDos XXUxDs[33;31H[K[34;1H: !copy /b XXUnix+XXMac XXUxMac[34;32H[K[35;1H: !copy /b XXDos+XXMac XXDosMac[35;32H[K[36;1H: !copy /b XXUnix+XXDos+XXMac XXUxDsMc[36;39H[K[37;1H:else[37;6H[K[38;1H: !cat XXUnix XXDos >XXUxDs[38;28H[K[39;1H: !cat XXUnix XXMac >XXUxMac[39;29H[K[40;1H: !cat XXDos XXMac >XXDosMac[40;29H[K[41;1H: !cat XXUnix XXDos XXMac >XXUxDsMc[41;36H[K[42;1H:endif[42;7H[K[43;1H:"[43;3H[K[44;1H:" try reading and writing with 'fileformats' empty[44;52H[K[45;1H:set fileformat=unix[45;21H[K[46;1H:e! XXUnix[46;11H[K[47;1H:w! test.out[47;13H[K[48;1H:e! XXDos[48;10H[K[49;1H:w! XXtt01[49;11H[K[50;1H:e! XXMac[50;10H[K[51;1H:w! XXtt02[51;11H[K[52;1H:bwipe XXUnix XXDos XXMac[52;26H[K[53;1H:set fileformat=dos[53;20H[K[54;1H:e! XXUnix[54;11H[K[55;1H:w! XXtt11[55;11H[K[56;1H:e! XXDos[56;10H[K[57;1H:w! XXtt12[57;11H[K[58;1H:e! XXMac[58;10H[K[59;1H:w! XXtt13[59;11H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=dos[?25l[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [60;12H[K[60;12H[Incomplete last line] 5 lines, 28 characters[1;1Hunix[1;6H[K[2;1Hunix
dos[34m^M[m[3;7H[K[4;1Hdos[34m^M[m
mac[34m^M[mmac[34m^M[m
[1m[34m~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! XXtt93[?25l"XXtt93" [60;10H[K[60;10H[New File][Incomplete last line] 5 lines, 28 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Append "END" to each file so that we can see what the last written char was.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformat=unix nobin[?25l[1;1H[?12l[?25h[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [m[60;1H--No lines in buffer--[60;23H[K[1;1H[?12l[?25h[?25lEND[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt01[?25l"XXtt01" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt02[?25l"XXtt02" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt11[?25l"XXtt11" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt12[?25l"XXtt12" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt13[?25l"XXtt13" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt21[?25l"XXtt21" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt22[?25l"XXtt22" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt23[?25l"XXtt23" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt31[?25l"XXtt31" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt32[?25l"XXtt32" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt33[?25l"XXtt33" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt41[?25l"XXtt41" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt42[?25l"XXtt42" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt43[?25l"XXtt43" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt51[?25l"XXtt51" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt52[?25l"XXtt52" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt53[?25l"XXtt53" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt61[?25l"XXtt61" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt62[?25l"XXtt62" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt63[?25l"XXtt63" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt71[?25l"XXtt71" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt81[?25l"XXtt81" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt91[?25l"XXtt91" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt92[?25l"XXtt92" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XXtt93[?25l"XXtt93" [60;10H[K[60;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Concatenate the results.[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Make fileformat of test.out the native fileformat.[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Add a newline at the end.[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset binary[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! test.out[?25l"test.out" [60;12H[K[60;12H2 lines, 10 characters[1;1Hunix
unix[2;5H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt01[?25l"XXtt01" [60;10H[K[60;10H3 lines, 14 characters[3;1Hdos[34m^M[m[3;6H[K[4;1Hdos[34m^M[m[4;6H[K[5;1HEND[5;4H[K[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt02[?25l"XXtt02" [60;10H[K[60;10H2 lines, 13 characters[6;1Hmac[34m^M[mmac[34m^M[m[6;11H[K[7;1HEND[7;4H[K[6;1H[?12l[?25h
[?25l
1[8;2H[K[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt11[?25l"XXtt11" [60;10H[K[60;10H3 lines, 16 characters[9;1Hunix[34m^M[m[9;7H[K[10;1Hunix[34m^M[m[10;7H[K[11;1HEND[11;4H[K[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt12[?25l"XXtt12" [60;10H[K[60;10H3 lines, 14 characters[12;1Hdos[34m^M[m[12;6H[K[13;1Hdos[34m^M[m[13;6H[K[14;1HEND[14;4H[K[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt13[?25l"XXtt13" [60;10H[K[60;10H2 lines, 14 characters[15;1Hmac[34m^M[mmac[34m^M^M[m[15;13H[K[16;1HEND[16;4H[K[15;1H[?12l[?25h
[?25l
2[17;2H[K[17;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt21[?25l"XXtt21" [60;10H[K[60;10H3 lines, 15 characters[18;1Hunix[18;5H[K[19;1Hunix[19;5H[K[20;1H[34m^M[mEND[20;6H[K[18;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt22[?25l"XXtt22" [60;10H[K[60;10H3 lines, 15 characters[21;1Hdos[34m^M[m[21;6H[K[22;1Hdos[34m^M[m[22;6H[K[23;1H[34m^M[mEND[23;6H[K[21;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt23[?25l"XXtt23" [60;10H[K[60;10H1 line, 12 characters[24;1Hmac[34m^M[mmac[34m^M[mEND[24;14H[K[24;1H[?12l[?25h[?25l
3[25;2H[K[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt31[?25l"XXtt31" [60;10H[K[60;10H6 lines, 33 characters[26;1Hunix[26;5H[K[27;1Hunix[27;5H[K[28;1Hdos[34m^M[m[28;6H[K[29;1Hdos[34m^M[m[29;6H[K[30;1Hmac[34m^M[mmac[34m^M[m[30;11H[K[31;1HEND[31;4H[K[26;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt32[?25l"XXtt32" [60;10H[K[60;10H6 lines, 36 characters[32;1Hunix[34m^M[m[32;7H[K[33;1Hunix[34m^M[m[33;7H[K[34;1Hdos[34m^M[m[34;6H[K[35;1Hdos[34m^M[m[35;6H[K[36;1Hmac[34m^M[mmac[34m^M^M[m[36;13H[K[37;1HEND[37;4H[K[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt33[?25l"XXtt33" [60;10H[K[60;10H5 lines, 32 characters[38;1Hunix[38;5H[K[39;1Hunix[39;5H[K[40;1Hdos[34m^M[m[40;6H[K[41;1Hdos[34m^M[m[41;6H[K[42;1Hmac[34m^M[mmac[34m^M[mEND[42;14H[K[38;1H[?12l[?25h[42;1H[?25l
4[43;2H[K[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt41[?25l"XXtt41" [60;10H[K[60;10H6 lines, 33 characters[44;1Hunix[44;5H[K[45;1Hunix[45;5H[K[46;1Hdos[34m^M[m[46;6H[K[47;1Hdos[34m^M[m[47;6H[K[48;1Hmac[34m^M[mmac[34m^M[m[48;11H[K[49;1HEND[49;4H[K[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt42[?25l"XXtt42" [60;10H[K[60;10H4 lines, 23 characters[50;1Hunix[50;5H[K[51;1Hunix[51;5H[K[52;1Hmac[34m^M[mmac[34m^M[m[52;11H[K[53;1HEND[53;4H[K[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt43[?25l"XXtt43" [60;10H[K[60;10H4 lines, 24 characters[54;1Hdos[34m^M[m[54;6H[K[55;1Hdos[34m^M[m[55;6H[K[56;1Hmac[34m^M[mmac[34m^M^M[m[56;13H[K[57;1HEND[57;4H[K[54;1H[?12l[?25h


[?25l
5[58;2H[K[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt51[?25l"XXtt51" [60;10H[K[60;10H5 lines, 24 characters[59;1Hunix[59;5H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XXtt52[?25l"XXtt52" [60;10H[K[60;10H6 lines, 33 characters[1;59r[1;1H[5M[1;60r[55;1Hunix
dos[34m^M[m
dos[34m^M[m
END
unix[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt53[?25l"XXtt53" [60;10H[K[60;10H3 lines, 22 characters[1;59r[1;1H[6M[1;60r[54;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[m
END
dos[34m^M[m[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hdos[34m^M[m
mac[34m^M[mmac[34m^M[mEND[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H6[?12l[?25h[?25l
:[?12l[?25h$r XXtt61[?25l"XXtt61" [60;10H[K[60;10H5 lines, 26 characters[1;59r[59;1H
[1;60r[59;1Hunix[34m^M[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt62[?25l"XXtt62" [60;10H[K[60;10H4 lines, 26 characters[1;59r[1;1H[5M[1;60r[55;1Hunix[34m^M[m
dos[34m^M[m
dos[34m^M[m
END
unix[34m^M[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt63[?25l"XXtt63" [60;10H[K[60;10H6 lines, 36 characters[1;59r[1;1H[4M[1;60r[56;1Hunix[34m^M[m
mac[34m^M[mmac[34m^M^M[m
END
unix[34m^M[m[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[5M[1;60r[55;1Hunix[34m^M[m
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M^M[m
END[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H7[?12l[?25h[?25l
:[?12l[?25h$r XXtt71[?25l"XXtt71" [60;10H[K[60;10H6 lines, 33 characters[1;59r[59;1H
[1;60r[59;1Hunix[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[5M[1;60r[55;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[m
END[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H8[?12l[?25h[?25l
:[?12l[?25h$r XXtt81[?25l"XXtt81" [60;10H[K[60;10H6 lines, 33 characters[1;59r[59;1H
[1;60r[59;1Hunix[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[5M[1;60r[55;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[m
END[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H9[?12l[?25h[?25l
:[?12l[?25h$r XXtt91[?25l"XXtt91" [60;10H[K[60;10H5 lines, 32 characters[1;59r[59;1H
[1;60r[59;1Hunix[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt92[?25l"XXtt92" [60;10H[K[60;10H5 lines, 32 characters[1;59r[1;1H[5M[1;60r[55;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[mEND
unix[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt93[?25l"XXtt93" [60;10H[K[60;10H5 lines, 32 characters[1;59r[1;1H[5M[1;60r[55;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[mEND
unix[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[4M[1;60r[56;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[mEND[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H10[?12l[?25h[?25l
:[?12l[?25h$r XXUnix[?25l"XXUnix" [60;10H[K[60;10H2 lines, 10 characters[1;59r[59;1H
[1;60r[59;1Hunix[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset nobinary ff&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 121 lines, 664 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test31.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test31.in" 75 lines, 1545 characters[1;1HTest for commands that close windows and/or buffers:
:quit
:close
:hide
:only
:sall
:all
:ball
:buf
:edit

STARTTEST
:so tiny.vim
GA 1[34m^[[m:$w! Xtest1
$r2:$w! Xtest2
$r3:$w! Xtest3
:n! Xtest1 Xtest2
A 1[34m^[[m: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[34m^[[m: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[34m^[[m: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[34m^[[m:q!
:w >>test.out
:unhide
:w >>test.out
:" test ":hide" hides anyway when 'hidden' not set; write "testtext 3"
:set nohidden
A 2[34m^[[m:hide
:w >>test.out
:" test ":edit" failing in modified buffer when 'hidden' not set
:" write "testtext 3 3"
A 3[34m^[[m: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[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for commands that close windows and/or buffers:[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[12;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 60 lines, 1410 characters written[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[13;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[14M[1;60r[46;1HA 3[34m^[[m:close
:w >>test.out
:" test ":close!" does hide when 'hidden' not set in modified buffer;
:" write "testtext 1"
A 3[34m^[[m:close!
:w >>test.out
:set nohidden
:" test ":all!" hides changed buffer; write "testtext 2 2 2"
:sp Xtest4
GA 4[34m^[[m:all!
:1wincmd w
:w >>test.out
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso tiny.vim[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Htesttext[60;1H[K[59;1H[?12l[?25h[?25l[9C1[?12l[?25h[?25l
:[?12l[?25h$w! Xtest1[?25l"Xtest1" [60;10H[K[60;10H[New File] 1 line, 11 characters written[59;10H[?12l[?25h[?25l2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$w! Xtest2[?25l"Xtest2" [60;10H[K[60;10H[New File] 1 line, 11 characters written[59;10H[?12l[?25h[?25l3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$w! Xtest3[?25l"Xtest3" [60;10H[K[60;10H[New File] 1 line, 11 characters written[59;10H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hn! Xtest1 Xtest2[?25l"Xtest1" [60;10H[K[60;10H1 line, 11 characters[1;1Htesttext [1;12H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[11C1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset hidden[?25l[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for working :n when hidden set; write "testtext 2"[?25l[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hn[?25l"Xtest2" 1 line, 11 characters[1;10H2[1;12H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 11 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for failing :rew when hidden not set; write "testtext 2 2"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[11C2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hrew[?25l[1m[37m[41mE37: No write since last change (add ! to override)[1;12H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 13 characters appended[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for working :rew when hidden set; write "testtext 1 1"[?25l[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset hidden[?25l[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hrew[?25l"Xtest1" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)[1;10H1 1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 13 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for :all keeping a buffer when it's modified; write "testtext 1 1 1"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[13C1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp[?25l[30;1H[1m[7mXtest1 [+]                                                                                        [m[31;1Htesttext 1 1 1[31;15H[K[59;1H[7mXtest1 [+]                                                                                        [1;14H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hn Xtest2 Xtest3[?25l"Xtest2" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)[1;10H2 2[1;14H[K[30;6H[1m[7m2 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hall[?25l"Xtest3" 1 line, 11 characters[27m[23m[m[H[2J[1;1Htesttext 1 1 1
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [m[20;1H[7mXtest1 [+]                                                                                        [m[21;1Htesttext 2 2
[1m[34m~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [m[39;1H[1m[7mXtest2 [+]                                                                                        [m[40;1Htesttext 3
[1m[34m~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7mXtest3                                                                                            [21;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h1wincmd w[?25l[20;1H[1m[7mXtest1 [+]                                                                                        [m[39;1H[7mXtest2 [+][m[1m[7m [m[7m                                                                                        [1;14H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 15 characters appended[1;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test abandoning changed buffer, should be unloaded even when 'hidden' set[?25l[1;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" write "testtext 2 2" twice[?25l[1;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset hidden[?25l[1;14H[?12l[?25h[?25l1 1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[27m[23m[m[H[2J[1;1Htesttext 2 2
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7mXtest2 [+]                                                                                        [m[31;1Htesttext 3
[1m[34m~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7mXtest3                                                                                            [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 13 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunhide[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 13 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test ":hide" hides anyway when 'hidden' not set; write "testtext 3"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[13C2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhide[?25l[1;10H3[1;12H[K[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test ":edit" failing in modified buffer when 'hidden' not set[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" write "testtext 3 3"[?25l[1;1H[?12l[?25h[?25l[11C3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtest1[?25l[1m[37m[41mE37: No write since last change (add ! to override)[1;12H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 13 characters appended[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1"[?25l[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset hidden[?25l[1;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtest1[?25l"Xtest1" 1 line, 11 characters[1;10H1[1;12H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test ":close" not hiding when 'hidden' not set in modified buffer;[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" write "testtext 3 3 3"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xtest3[?25l"Xtest3" [Modified] line 1 of 1 --100%-- col 1 (file 2 of 2)[1;10H3 3[30;1H[1m[7mXtest3 [+]                                                                                        [m[31;1Htesttext 1[31;11H[K[59;1H[7mXtest1                                                                                            [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[13C3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose[?25l[1m[37m[41mE37: No write since last change (add ! to override)[1;14H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 15 characters appended[1;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test ":close!" does hide when 'hidden' not set in modified buffer;[?25l[1;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" write "testtext 1"[?25l[1;14H[?12l[?25h[?25l3 3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose![?25l[1;10H1[1;12H[K[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test ":all!" hides changed buffer; write "testtext 2 2 2"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp Xtest4[?25l"Xtest4" [New File][1;1H[K[30;1H[1m[7mXtest4                                                                                            [m[31;1Htesttext 1[31;11H[K[59;1H[7mXtest1                                                                                            [1;1H[?12l[?25h[?25l[m 4[30;8H[1m[7m[+][1;2H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hall![?25l"Xtest2" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)
"Xtest3" [Modified] line 1 of 1 --100%-- col 1 (file 2 of 2)
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1wincmd w[?25l[1;1H[2L[1;1Htesttext 2 2 2
[1m[34m~                                                                                                 [m[29;1H[1m[7mXtest2 [+]                                                                                        [m[30;1Htesttext 3 3 3 3[30;17H[K[31;1H[1m[34m~                                                                                                 [m[59;6H[7m3 [+][m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 15 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test32.failed test.ok test.out X* viminfo
cp test32.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test32.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test32.in" 57 lines, 1242 characters[1;1HTest for insert expansion

:se cpt=.,w
* add-expands (word from next line) from other window
* add-expands (current buffer first)
* Local expansion, ends in an empty line (unless it becomes a global expansion)
* starts Local and switches to global add-expansion
:se cpt=.,w,i
* i-add-expands and switches to local
* add-expands lines (it would end in an empty line if it didn't ignored it self)
:se cpt=kXtestfile
* checks k-expansion, and file expansion (use Xtest11 instead of test11,
* because TEST11.OUT may match first on DOS)
:se cpt=w
* checks make_cyclic in other window
:se cpt=u nohid
* checks unloaded buffer expansion
* checks adding mode abortion
:se cpt=t,d
* tag expansion, define add-expansion interrupted
* t-expansion

STARTTEST
:so small.vim
:se nocp viminfo+=nviminfo cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff&
:se cot=
[34m^W[mnO#include "Xtestfile"
ru[34m^N^N^X^N^[^A[m
O[34m^P^X^N
^X^P^P^P^P^P
^X^P^P^X^X^N^X^N^N^[[m
:se cpt=.,w,i
kOM[34m^N^X^N^X^N^X^X^X^P
^X^L^X^L^P^P^[[m
:se cpt=kXtestfile
:w Xtest11.one
:w Xtest11.two
O[34m^N^[[mIX[34m^[[mA[34m^X^F^N^[[m
:se cpt=w
OST[34m^N^P^P^P^P^[[m
:se cpt=u nohid
[34m^W[moOEN[34m^N[m
unl[34m^N^X^X^P^[[m
:se cpt=t,d def=^\\k* tags=Xtestfile notagbsearch
O[34m^X^]^X^D^X^D^X^X^D^X^D^X^D^X^D[m
a[34m^N^[[m
:wq! test.out
ENDTEST

start of testfile
run1
run2
end of testfile

test11  36Gepeto[8C/Tag/
asd     test11file      36G
Makefile[8Cto      run
[1m[34m~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for insert expansion[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[23;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 24 lines, 384 characters written[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[24;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[48;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[49;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[49;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hse nocp viminfo+=nviminfo cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff&[?25l"Xtestfile" [60;13H[K[60;13H[New] 3L, 57C written[49;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hse cot=[?25l[49;1H[?12l[?25h[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;1H:se cot=[31;9H[K[32;1H[34m^W[mnO#include "Xtestfile"
ru[34m^N^N^X^N^[^A[m[33;15H[K[34;1HO[34m^P^X^N[m[34;8H[K[35;1H[34m^X^P^P^P^P^P[m[35;13H[K[36;1H[34m^X^P^P^X^X^N^X^N^N^[[m
:se cpt=.,w,i[37;14H[K[38;1HkOM[1C[34mN^X^N^X^N^X^X^X^P
^X^L^X^L^P^P^[[m
:se cpt=kXtestfile
:w Xtest11.one[41;15H[K[42;1H:w Xtest11.two
O[34m^N^[[mIX[1C[34m[[mA[34m^X^F^N^[[m[44;9Hw[44;10H[K[45;2HST[1C[34mN^P^P^P^P^[[m[45;16H[K[46;1H:se cpt=u nohid
[34m^W[moOEN[34m^N[m[47;9H[K[48;1Hunl[34m^N^X^X^P^[[m
:se cpt=t,d def=^\\k* tags=Xtestfile notagbsearch
O[34m^X^]^X^D^X^D^X^X^D^X^D^X^D^X^D[m
a[34m^N^[[m
:wq! test.out
ENDTEST[53;8H[K[55;1Hstart of testfile[55;25H[K[56;1Hrun1[56;9H[K[57;1Hrun2[57;5H[K[58;1Hend of testfile[58;16H[K[59;1H[7mtest32.in                                                                                         [1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 4[2;3H[m[60;29H[K[60;1Hmatch in file test32.in[1m^[m[60;24H[K[60;1H[1m-- Keyword completion (^N^P) [m[32mmatch 2 of 4[2;5H[m[60;29H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1Hmatch in file test32.in[1m-- Adding Keyword completion (^N^P) Word from other line[2;10H[1;29r[m[1;1H[2L[1;60r[1;1H#include "Xtestfile"
run1 run2[30;11H[1m[7m[+][2;10H[?12l[?25h[m[60;1H[K[?25l[60;1H[1m-- Adding Keyword completion (^N^P) Word from other line[m[60;1H[K[60;1H[1m-- INSERT --[m[60;1H[K[2;9H[?12l[?25h[?25l3[?12l[?25h
[?25l[60;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1H[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 103[3;5H[m[60;29H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1H[1m-- Adding Keyword completion (^N^P) Word from other line[3;10H[m[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mKeyword Local completion (^N^P) -- Searching...[m[60;36H[32mmatch 1 of 4[m[1m.[m[60;48H[K[4;5H[60;35H[K[60;35H[1m [m[32mmatch 2 of 4[4;5H[m[60;35H[K[60;35H[1m [m[32mmatch 3 of 4[4;10H[m[60;35H[K[60;35H[1m [m[32mmatch 4 of 4[4;8H[m[60;35H[K[60;35H[1m [m[31mBack at original[4;1H[m[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mKeyword Local completion (^N^P) -- Searching...[m[60;36H[32mmatch 1 of 4[m[1m.[m[60;48H[K[5;5H[60;35H[K[60;35H[1m [m[32mmatch 2 of 4[5;5H[m[60;35H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1H[1m-- Keyword completion (^N^P) The only match[5;5H[m[60;29H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1H[1m-- Adding Keyword completion (^N^P) [m[32mmatch 1 of 2[5;10H[m[60;36H[K[60;1Hmatch in file test32.in[1me[m[60;24H[K[60;1H[1m-- Adding Keyword completion (^N^P) Word from other line[5;10H[3;29r[m[3;1H[3L[1;60r[3;1Hrun3 run3

run1 run2[?12l[?25h[60;1H[K[?25l[60;1H[1m-- Adding Keyword completion (^N^P) Word from other line[m[60;1H[K[60;1H[1m-- INSERT --[m[60;1H[K[5;9H[?12l[?25h
[?25l[60;1H:[?12l[?25hse cpt=.,w,i[?25l[6;1H[?12l[?25h[5;9H[?25l[60;1H[1m-- INSERT --[m[60;13H[K[60;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;9H[32m included file: Xtestfile[mmatch in file test32.in[60;24H[K[60;1H[1m-- Keyword completion (^N^P) The only match[5;9H[m[60;29H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;9H[32m included file: Xtestfile[mmatch in file test32.in[60;24H[K[60;1H[1m-- Adding Keyword completion (^N^P) The only match[5;19H[m[60;36H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;9H[32m included file: Xtestfile[mmatch in file test32.in[60;24H[K[60;1H[1m-- Adding Keyword completion (^N^P) The only match[5;28H[m[60;36H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mKeyword Local completion (^N^P) -- Searching...[m[60;36H[32mmatch 1 of 3[m[1m.[m[60;48H[K[5;29H[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- Whole line completion (^L^N^P)^ U-- Searching...[m[32mScanning: test32.in[m[1me[m[60;20H[K[60;1H[1m-- Whole line completion (^L^N^P) [m[32mmatch 1 of 54[6;29H[m[60;4H[1mINSERT --e[m[60;13H[K[60;1H[K[60;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) [m[32mmatch 1 of 54[m[60;4H[1mAddinge Whole line completion (^L^N^P) -- Searching...[m[32mScanning: test32.in[m[1me[m[60;20H[K[60;1H[1m-- Adding Whole line completion (^L^N^P) The only match[7;29H[m[60;41H[K[60;41H[1m [m[31mBack at original[7;1H[m[60;41H[K[60;41H[1m The only match[7;29H[5;29r[m[5;1H[3L[1;60r[5;1HMakefile[8Cto      run3
Makefile[8Cto      run3
Makefile[8Cto      run3[?12l[?25h[60;1H[K[?25l[60;1H[1m-- INSERT --[m[60;1H[K[7;28H[?12l[?25h[8;9H[?25l[60;1H:[?12l[?25hse cpt=kXtestfile[?25l[8;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw Xtest11.one[?25l"Xtest11.one" [New] 9L, 104C written[30;1H[1m[7mXtest11.one+   [8;9H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw Xtest11.two[?25l"Xtest11.two" [New] 9L, 104C written[8;9H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;13H[K[60;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning dictionary: Xtestfile[m[1m-[m[60;31H[K[60;1Hmatch in file Xtestfile[60;24H[K[60;1H[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 9[8;7H[8;29r[m[8;1H[L[1;60r[8;1Htest11[30;13H[1m[7m[+][8;7H[mI[?12l[?25h [60;1H[K[?25l[60;1H[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 9[m[60;1H[K[60;1H[1m-- INSERT --[m[60;1H[K[8;6H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[8;1HXtest11[?12l[?25h[?25l[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- File name completion (^F^N^P)s ^-- Searching...[m[60;34H[32mmatch 1 of 2[m[1m.[m[60;46H[K[8;12H[60;33H[K[60;33H[1m [m[32mmatch 2 of 2[8;12H[m.two[?12l[?25h[60;1H[K[?25l[60;1H[1m-- INSERT --[m[60;1H[K[8;11H[?12l[?25h[9;9H[?25l[60;1H:[?12l[?25hse cpt=w[?25l[9;9H[?12l[?25h[?25l[60;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) The only match[9;10H[m[60;29H[K[60;29H[1m [m[31mBack at original[9;3H[m[60;29H[K[60;1Hmatch in file test32.in[1m^[m[60;24H[K[60;1H[1m-- Keyword completion (^N^P) The only match[9;10H[m[60;29H[K[60;29H[1m [m[31mBack at original[9;3H[m[60;29H[K[60;1Hmatch in file test32.in[1m^[m[60;24H[K[60;1H[1m-- Keyword completion (^N^P) The only match[9;10H[9;29r[m[9;1H[L[1;60r[9;1HSTARTTEST[?12l[?25h[60;1H[K[?25l[60;1H[1m-- Keyword completion (^N^P) The only match[m[60;1H[K[60;1H[1m-- INSERT --[m[60;1H[K[9;9H[?12l[?25h[10;9H[?25l[60;1H:[?12l[?25hse cpt=u nohid[?25l[10;9H[?12l[?25h[?25l[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [10;9H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) The only match[10;8H[m[60;1H[K[60;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 3[11;7H[m[60;29H[K[60;1H[K[60;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[60;13H[K[60;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[60;20H[K[60;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) The only match[11;7H[10;59r[m[10;1H[2L[1;60r[10;1HENDTEST
unless[?12l[?25h[60;1H[K[?25l[60;1H[1m-- Keyword completion (^N^P) The only match[m[60;1H[K[60;1H[1m-- INSERT --[m[60;1H[K[11;6H[?12l[?25h[12;6H[?25l[60;1H:[?12l[?25hse cpt=t,d def=^\\k* tags=Xtestfile notagbsearch[?25l[12;6H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;13H[K[60;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- Tag completion (^]^N^P)^ N-- Searching...[m[60;28H[32mmatch 1 of 3[m[1m.[m[60;40H[K[12;7H[60;4H[1mINSERTm --e[m[60;13H[K[60;1H[K[60;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) [m[32mmatch 1 of 3[m[60;4H[1mDefinition completion (^D^N^P)^ U-- Searching...[m[60;50H[K[60;1H[32mScanning included file: Xtestfile[m[1m [m[60;34H[K[60;1Hmatch in file Xtestfile[60;24H[K[60;1H[1m-- Definition completion (^D^N^P) The only match[12;11H[60;4HINSERTt --n[m[60;13H[K[60;1H[K[60;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match-- Addinge Definition completion (^D^N^P) -- Searching...[m[32mScanning included file: Xtestfile[m[1m^[m[60;34H[K[60;1Hmatch in file Xtestfile[60;24H[K[60;1H[1m-- Adding Definition completion (^D^N^P) The only match[12;20H[60;4HINSERT --f[m[60;13H[K[60;1H[K[60;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match-- INSERTe --^[m[60;13H[K[60;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- Definition completion (^D^N^P)^ U-- Searching...[m[32mScanning included file: Xtestfile[m[1m [m[60;34H[K[60;1Hmatch in file Xtestfile[60;24H[K[60;1H[1m-- Definition completion (^D^N^P) The only match[12;25H[60;4HINSERTt --n[m[60;13H[K[60;1H[K[60;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match-- Addinge Definition completion (^D^N^P) -- Searching...[m[32mScanning included file: Xtestfile[m[1m^[m[60;34H[K[60;1Hmatch in file Xtestfile[60;24H[K[60;1H[1m-- Adding Definition completion (^D^N^P) The only match[12;37H[60;4HINSERT --f[m[60;13H[K[60;1H[K[60;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match-- Addinge Definition completion (^D^N^P) -- Searching...[m[32mScanning included file: Xtestfile[m[1m^[m[60;34H[K[60;1Hmatch in file Xtestfile[60;24H[K[60;1H[1m-- Adding Definition completion (^D^N^P) The only match[12;38H[60;4HINSERT --f[m[60;13H[K[60;1H[K[60;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match-- Addinge Definition completion (^D^N^P) -- Searching...[m[32mScanning included file: Xtestfile[m[1m^[m[60;34H[K[60;1Hmatch in file Xtestfile[60;24H[K[60;1H[1m-- Adding Definition completion (^D^N^P) Word from other line[12;42H[60;4HINSERT --f[m[60;13H[K[60;1H[K[60;1H[1m-- Keyword completion (^N^P) -- Searching...[m[32mScanning tags.[m[1mp[m[60;15H[K[60;10H[32mincluded file: Xtestfile[m[1m-- Keyword completion (^N^P) The only match[13;4H[12;59r[m[12;1H[2L[1;60r[12;1Htest11file      36Gepeto[8C/Tag/ asd
asd[?12l[?25h[60;1H[K[?25l[60;1H[1m-- Keyword completion (^N^P) The only match[m[60;1H[K[60;1H[1m-- INSERT --[m[60;1H[K[13;3H[?12l[?25h
ru[?25l[60;1H:[?12l[?25hwq! test.out[?25l"test.out" [60;12H[K[60;12H[New] 15L, 175C written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test33.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test33.in" 34 lines, 616 characters[1;1HTest 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 "<a href=\"~A\">" (html-file ,dest))
,@body
(princ "</a>")))
[1m[34m~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for 'lisp'[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 5 lines, 63 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[10;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset lisp[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^(defun[?25l[12;1H[?12l[?25h[?25l[60;1H22 lines to indent...23[7Cindented [60;19H[K[13;1H  (format nil "~(~A~).html" base))


  (let ((ti (gensym)))
       `(with-open-file (*standard-output*
                 [8C(html-file ,name)
                  [7C:direction :output
                         :if-exists :supersede)
                        (let ((,ti ,title))
              [15C(as title ,ti)
            [17C(with center
                            [7C(as h2 (string-upcase ,ti)))
       [22C(brs 3)
          [19C,@body))))[31;1H  `(progn
    (format t "<a href=\"~A\">" (html-file ,dest))
    ,@body
    (princ "</a>")))[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^(defun/,$w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 23 lines, 544 characters written[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test34.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test34.in" 76 lines, 1435 characters[1;1HTest for user functions.
Also test an <expr> mapping calling a function.
Also test that a builtin function cannot be replaced.

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 <expr> ( ListItem()
:inoremap <expr> [ ListReset()
:imap <expr> + Expr1()
:imap <expr> * Expr2()
:let retval = "nop"
/^here
C[34m^R[m=Table("xxx", 4, "asdf")
 [34m^R[m=Compute(45, 0, "retval")
 [34m^R[m=retval
 [34m^R[m=Compute(45, 5, "retval")
 [34m^R[m=retval
 [34m^R[m=g:FuncRef(333)

XX+-XX
---*---[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for user functions.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 68 lines, 1283 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[15M[1;60r[45;1H(one
(two
[(one again[34m^[[m:call append(line('$'), max([1, 2, 3]))
:call extend(g:, {'max': function('min')})
:call append(line('$'), max([1, 2, 3]))
:$-7,$w! test.out
:delfunc Table
:delfunc Compute
:delfunc Expr1
:delfunc Expr2
:delfunc ListItem
:delfunc ListReset
:unlet retval counter
:q!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction Table(title, ...)[?25l
:  [?12l[?25h:  let ret = a:title
[?25l:  [?12l[?25h:  let idx = 1
[?25l:  [?12l[?25h:  while idx <= a:0
[?25l:    [?12l[?25h:    exe "let ret = ret . a:" . idx
[?25l:    [?12l[?25h:    let idx = idx + 1
[?25l:    [?12l[?25h:  endwhile
[?25l:  [?12l[?25h:  return ret
[?25l:  [?12l[?25h:endfunction[1;1H[8L[?25l[1;1H:  if a:n2 == 0
:    return "fail"
:  endif
:  exe "let g:" . a:divname . " = ". a:n1 / a:n2
:  return "ok"
:endfunction
:func Expr1()
:  normal! v[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunction Compute(n1, n2, divname)[?25l
:  [?12l[?25h:  if a:n2 == 0
[?25l:    [?12l[?25h:    return "fail"
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:  exe "let g:" . a:divname . " = ". a:n1 / a:n2
[?25l:  [?12l[?25h:  return "ok"
[?25l:  [?12l[?25h:endfunction[1;1H[6L[?25l[1;1H:  if a:n2 == 0
:    return "fail"
:  endif
:  exe "let g:" . a:divname . " = ". a:n1 / a:n2
:  return "ok"
:endfunction[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunc Expr1()[?25l
:  [?12l[?25h:  normal! v
[?25l:  [?12l[?25h:  return "111"
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1H:  if a:n2 == 0
:    return "fail"
:  endif[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunc Expr2()[?25l
:  [?12l[?25h:  call search('XX', 'b')
[?25l:  [?12l[?25h:  return "222"
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1H:  if a:n2 == 0
:    return "fail"
:  endif[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunc ListItem()[?25l
:  [?12l[?25h:  let g:counter += 1
[?25l:  [?12l[?25h:  return g:counter . '. '
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1H:  if a:n2 == 0
:    return "fail"
:  endif[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunc ListReset()[?25l
:  [?12l[?25h:  let g:counter = 0
[?25l:  [?12l[?25h:  return ''
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1H:  if a:n2 == 0
:    return "fail"
:  endif[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunc FuncWithRef(a)[?25l
:  [?12l[?25h:  unlet g:FuncRef
[?25l:  [?12l[?25h:  return a:a
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1H:  if a:n2 == 0
:    return "fail"
:  endif[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet g:FuncRef=function("FuncWithRef")[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet counter = 0[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hinoremap <expr> ( ListItem()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hinoremap <expr> [ ListReset()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25himap <expr> + Expr1()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25himap <expr> * Expr2()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet retval = "nop"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^here[?25l[1;59r[59;1H
[1;60r[59;1Hhere[60;1H[K[59;1H[?12l[?25h[?25lher$
=[?12l[?25hTable("xxx", 4, "asdf")[?25l[60;1H[K[60;1H=[?12l[?25hCompute(45, 0, "retval")[?25l[60;1H[K[60;1H=[?12l[?25hretval[?25l[60;1H[K[60;1H=[?12l[?25hCompute(45, 5, "retval")[?25l[60;1H[K[60;1H=[?12l[?25hretval[?25l[60;1H[K[60;1H=[?12l[?25hg:FuncRef(333)
[?25l[1m[37m[41mError detected while processing function Expr1:[m
[33mline    1:[m
[1m[37m[41mE523: Not allowed here[m
[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[4L[?25l[1;1H:func Expr1()
:  normal! v
:  return "111"
:endfunc
:func Expr2()
:  call search('XX', 'b')
:  return "222"
:endfunc[8;9H[K[9;2Hfunc ListItem()
:  let g:counter += 1
:  return g:counter . '. '
:endfunc[12;9H[K[13;2Hfunc ListReset()
:  let g:counter = 0
:  return ''[15;13H[K[16;2Hendfunc[16;9H[K[17;2Hfunc FuncWithRef(a)
:  unlet g:FuncRef
:  return a:a[19;14H[K[20;2Hendfunc[20;9H[K[21;2Hlet g:FuncRef=function("FuncWithRef")
:let counter = 0[22;17H[K[23;2Hinoremap <expr> ( ListItem()
:inoremap <expr> [ ListReset()
:imap <expr> + Expr1()
:imap <expr> * Expr2()[26;23H[K[27;6Hretval = "nop"
/^he[28;7H[K[29;1HC[34m^R[m=Table("xxx", 4, "asdf")[29;28H[K[30;1H [34m^R[m=Compute(45, 0, "retval")
 [34m^R[m=retval[31;11H[K[32;1H [34m^R[m=Compute(45, 5, "retval")
 [34m^R[m=retval
 [3Cg:FuncRef(333)[34;19H[K[35;2H[K[36;1HXX+-XX[36;7H[K[37;1H---*---[37;8H[K[38;1H(one[38;5H[K[39;1H(two[39;5H[K[40;1H[(one again[34m^[[m:call append(line('$'), max([1, 2, 3]))
:call extend(g:, {'max': function('min')})
:call append(line('$'), max([1, 2, 3]))
:$-7,$w! test.out
:delfunc Table
:delfunc Compute[45;17H[K[46;2Hdelfunc Expr1[46;15H[K[47;2Hdelfunc Expr2[47;15H[K[48;2Hdelfunc ListItem[49;10HListReset
:unlet retval counter
:q![51;4H[K[52;1HENDTEST[52;8H[K[53;1H[K[54;1Hxxx4asdf fail nop ok 9 333
XX111-XX[55;9H[K[56;1H---222---
1. one[57;7H[K[58;1H2. two[59;1H[K[60;1H[K[59;1H[?12l[?25h[?25l1. one again[?12l[?25h[?25l
:[?12l[?25hcall append(line('$'), max([1, 2, 3]))[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall extend(g:, {'max': function('min')})[?25l[1m[37m[41mE704: Funcref variable name must start with a capital: max[59;12H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), max([1, 2, 3]))[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$-7,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 8 lines, 77 characters written[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc Table[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc Compute[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc Expr1[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc Expr2[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc ListItem[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc ListReset[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet retval counter[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test35.failed test.ok test.out X* viminfo
cp test35.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test35.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test35.in" 21 lines, 448 characters[1;1HTest Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal,
and octal numbers.

STARTTEST
/^start-here
:set nrformats=octal,hex
j[34m^A[m102[34m^X^A[ml[34m^X[ml[34m^A[m64[34m^A[m128[34m^X[m$[34m^X[m
:set nrformats=octal
0[34m^A[m102[34m^X^A[ml[34m^X[m2[34m^A[mw65[34m^A[m129[34m^X[mblx6lD
:set nrformats=hex
0101[34m^X[ml257[34m^X^A[mTxldt [34m^A[m [34m^X[m [34m^X[m
:set nrformats=
0200[34m^X[ml100[34m^X[mw78[34m^X^A[mk
:$-3,$wq! test.out
ENDTEST

start-here
100     0x100     077     0
100     0x100     077
100     0x100     077     0xfF     0xFf
100     0x100     077
[1m[34m~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal,[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 10 lines, 200 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[15;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[16;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start-here[?25l[17;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nrformats=octal,hex[?25l[17;1H[?12l[?25h
[?25l101[?12l[?25h[?25l-1     0x100     077     0[18;27H[K[18;2H[?12l[?25h[?25l0     0x100     077     0[18;26H[K[18;1H[?12l[?25h0[?25l[7C0ff[?12l[?25hf[?25l     0100     0[18;20H[?12l[?25h[?25l20[?12l[?25h[?25l00[?12l[?25h0     [?25l-1[?12l[?25h[19;26H[?25l[60;1H[K[60;1H:[?12l[?25hset nrformats=octal[?25l[19;26H[?12l[?25h[?25l101[?12l[?25h[?25l-1     0x100     077 -[?12l[?25h[?25l0     0x100     077 [?12l[?25h0[?25l     -1x100     077[19;8H[?12l[?25h[?25l1x100     077 [19;7H[?12l[?25h[10C[?25l0200[?12l[?25h[?25l1777777777777777777777[?12l[?25h[19;17H0[?25l7[20C [19;18H[?12l[?25h777777[?25l[19;24H[K[19;23H[?12l[?25h[20;23H[?25l[60;1H[K[60;1H:[?12l[?25hset nrformats=hex[?25l[20;23H[?12l[?25h[?25l-1     0x100     077     0xfF     0xFf[20;39H[K[20;2H[?12l[?25h1[?25l[7Cffffffffffffffff     077     0xfF     0xFf[20;25H[?12l[?25h[?25l[20;10H0000000000000000[?12l[?25h[20;10H0[?25l     077     0xfF     0xFf[20;39H[K[20;11H[?12l[?25h[?25l[7C8[?12l[?25h8[?25l[7CFE[?12l[?25hE[?25l[7Cfe[?12l[?25h[21;26H[?25l[60;1H[K[60;1H:[?12l[?25hset nrformats=[?25l[21;26H[?12l[?25h[?25l-100     0x100     077-10[?12l[?25h0[?25l     -100x100     077[21;13H[?12l[?25h[10C[?25l-001[?12l[?25h[?25l000 [?12l[?25h[20;25H[21;25H[?25l[60;1H[K[60;1H:[?12l[?25h$-3,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 4 lines, 120 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test36.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test36.in" 105 lines, 1950 characters[1;1HTest 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[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest character classes in regexp using regexpengine 0, 1, 2.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 98 lines, 1775 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[43M[1;60r[17;1Hp: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\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
:/^start-here/+1,$wq! test.out
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start-here/+1[?25l[1;59r[1;1H[2M[1;60r[58;1Hstart-here[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;8H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\d//g[?25l10 substitutions on 1 line[59;29H:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;87H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\d//g[?25l10 substitutions on 1 line[59;29H:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;87H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\d//g[?25l10 substitutions on 1 line[59;29H:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;87H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[0-9]//g[?25l10 substitutions on 1 line[59;29H:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;87H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[0-9]//g[?25l10 substitutions on 1 line[59;29H:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;87H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[0-9]//g[?25l10 substitutions on 1 line[59;29H:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;87H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\D//g[?25l72 substitutions on 1 line[59;1H0123456789[59;11H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\D//g[?25l72 substitutions on 1 line[59;1H0123456789[59;11H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\D//g[?25l72 substitutions on 1 line[59;1H0123456789[59;11H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^0-9]//g[?25l72 substitutions on 1 line[59;1H0123456789[59;11H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^0-9]//g[?25l72 substitutions on 1 line[59;1H0123456789[59;11H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^0-9]//g[?25l72 substitutions on 1 line[59;1H0123456789[59;11H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\o//g[?25l8 substitutions on 1 line[59;29H89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;89H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\o//g[?25l8 substitutions on 1 line[59;29H89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;89H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\o//g[?25l8 substitutions on 1 line[59;29H89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;89H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[0-7]//g[?25l8 substitutions on 1 line[59;29H89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;89H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[0-7]//g[?25l8 substitutions on 1 line[59;29H89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;89H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[0-7]//g[?25l8 substitutions on 1 line[59;29H89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;89H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\O//g[?25l74 substitutions on 1 line[59;1H01234567[59;9H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\O//g[?25l74 substitutions on 1 line[59;1H01234567[59;9H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\O//g[?25l74 substitutions on 1 line[59;1H01234567[59;9H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^0-7]//g[?25l74 substitutions on 1 line[59;1H01234567[59;9H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^0-7]//g[?25l74 substitutions on 1 line[59;1H01234567[59;9H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^0-7]//g[?25l74 substitutions on 1 line[59;1H01234567[59;9H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\x//g[?25l22 substitutions on 1 line[59;29H:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;75H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\x//g[?25l22 substitutions on 1 line[59;29H:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;75H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\x//g[?25l22 substitutions on 1 line[59;29H:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;75H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[0-9A-Fa-f]//g[?25l22 substitutions on 1 line[59;29H:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;75H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[0-9A-Fa-f]//g[?25l22 substitutions on 1 line[59;29H:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;75H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[0-9A-Fa-f]//g[?25l22 substitutions on 1 line[59;29H:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;75H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\X//g[?25l60 substitutions on 1 line[59;1H0123456789ABCDEFabcdef[59;23H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\X//g[?25l60 substitutions on 1 line[59;1H0123456789ABCDEFabcdef[59;23H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\X//g[?25l60 substitutions on 1 line[59;1H0123456789ABCDEFabcdef[59;23H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^0-9A-Fa-f]//g[?25l60 substitutions on 1 line[59;1H0123456789ABCDEFabcdef[59;23H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^0-9A-Fa-f]//g[?25l60 substitutions on 1 line[59;1H0123456789ABCDEFabcdef[59;23H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^0-9A-Fa-f]//g[?25l60 substitutions on 1 line[59;1H0123456789ABCDEFabcdef[59;23H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\w//g[?25l36 substitutions on 1 line[59;29H:;<=>?@[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;61H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\w//g[?25l36 substitutions on 1 line[59;29H:;<=>?@[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;61H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\w//g[?25l36 substitutions on 1 line[59;29H:;<=>?@[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;61H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[0-9A-Za-z_]//g[?25l36 substitutions on 1 line[59;29H:;<=>?@[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;61H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[0-9A-Za-z_]//g[?25l36 substitutions on 1 line[59;29H:;<=>?@[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;61H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[0-9A-Za-z_]//g[?25l36 substitutions on 1 line[59;29H:;<=>?@[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;61H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\W//g[?25l46 substitutions on 1 line[59;1H0123456789ABCDEFGHIXYZ_abcdefghiwxyz[59;37H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\W//g[?25l46 substitutions on 1 line[59;1H0123456789ABCDEFGHIXYZ_abcdefghiwxyz[59;37H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\W//g[?25l46 substitutions on 1 line[59;1H0123456789ABCDEFGHIXYZ_abcdefghiwxyz[59;37H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^0-9A-Za-z_]//g[?25l46 substitutions on 1 line[59;1H0123456789ABCDEFGHIXYZ_abcdefghiwxyz[59;37H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^0-9A-Za-z_]//g[?25l46 substitutions on 1 line[59;1H0123456789ABCDEFGHIXYZ_abcdefghiwxyz[59;37H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^0-9A-Za-z_]//g[?25l46 substitutions on 1 line[59;1H0123456789ABCDEFGHIXYZ_abcdefghiwxyz[59;37H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\h//g[?25l26 substitutions on 1 line[59;46H[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;71H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\h//g[?25l26 substitutions on 1 line[59;46H[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;71H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\h//g[?25l26 substitutions on 1 line[59;46H[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;71H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[A-Za-z_]//g[?25l26 substitutions on 1 line[59;46H[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;71H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[A-Za-z_]//g[?25l26 substitutions on 1 line[59;46H[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;71H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[A-Za-z_]//g[?25l26 substitutions on 1 line[59;46H[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;71H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\H//g[?25l56 substitutions on 1 line[59;1HABCDEFGHIXYZ_abcdefghiwxyz[59;27H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\H//g[?25l56 substitutions on 1 line[59;1HABCDEFGHIXYZ_abcdefghiwxyz[59;27H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\H//g[?25l56 substitutions on 1 line[59;1HABCDEFGHIXYZ_abcdefghiwxyz[59;27H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^A-Za-z_]//g[?25l56 substitutions on 1 line[59;1HABCDEFGHIXYZ_abcdefghiwxyz[59;27H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^A-Za-z_]//g[?25l56 substitutions on 1 line[59;1HABCDEFGHIXYZ_abcdefghiwxyz[59;27H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^A-Za-z_]//g[?25l56 substitutions on 1 line[59;1HABCDEFGHIXYZ_abcdefghiwxyz[59;27H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\a//g[?25l25 substitutions on 1 line[59;46H[\]^_`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;72H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\a//g[?25l25 substitutions on 1 line[59;46H[\]^_`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;72H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\a//g[?25l25 substitutions on 1 line[59;46H[\]^_`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;72H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[A-Za-z]//g[?25l25 substitutions on 1 line[59;46H[\]^_`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;72H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[A-Za-z]//g[?25l25 substitutions on 1 line[59;46H[\]^_`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;72H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[A-Za-z]//g[?25l25 substitutions on 1 line[59;46H[\]^_`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;72H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\A//g[?25l57 substitutions on 1 line[59;1HABCDEFGHIXYZabcdefghiwxyz[59;26H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\A//g[?25l57 substitutions on 1 line[59;1HABCDEFGHIXYZabcdefghiwxyz[59;26H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\A//g[?25l57 substitutions on 1 line[59;1HABCDEFGHIXYZabcdefghiwxyz[59;26H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^A-Za-z]//g[?25l57 substitutions on 1 line[59;1HABCDEFGHIXYZabcdefghiwxyz[59;26H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^A-Za-z]//g[?25l57 substitutions on 1 line[59;1HABCDEFGHIXYZabcdefghiwxyz[59;26H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^A-Za-z]//g[?25l57 substitutions on 1 line[59;1HABCDEFGHIXYZabcdefghiwxyz[59;26H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\l//g[?25l13 substitutions on 1 line[59;64H{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;84H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\l//g[?25l13 substitutions on 1 line[59;64H{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;84H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\l//g[?25l13 substitutions on 1 line[59;64H{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;84H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[a-z]//g[?25l13 substitutions on 1 line[59;64H{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;84H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[a-z]//g[?25l13 substitutions on 1 line[59;64H{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;84H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[a-z]//g[?25l13 substitutions on 1 line[59;64H{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;84H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\L//g[?25l69 substitutions on 1 line[59;1Habcdefghiwxyz[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\L//g[?25l69 substitutions on 1 line[59;1Habcdefghiwxyz[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\L//g[?25l69 substitutions on 1 line[59;1Habcdefghiwxyz[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^a-z]//g[?25l69 substitutions on 1 line[59;1Habcdefghiwxyz[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^a-z]//g[?25l69 substitutions on 1 line[59;1Habcdefghiwxyz[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^a-z]//g[?25l69 substitutions on 1 line[59;1Habcdefghiwxyz[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\u//g[?25l12 substitutions on 1 line[59;46H[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;85H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\u//g[?25l12 substitutions on 1 line[59;46H[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;85H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\u//g[?25l12 substitutions on 1 line[59;46H[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;85H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[A-Z]//g[?25l12 substitutions on 1 line[59;46H[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;85H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[A-Z]//g[?25l12 substitutions on 1 line[59;46H[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;85H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[A-Z]//g[?25l12 substitutions on 1 line[59;46H[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[59;85H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0\U//g[?25l70 substitutions on 1 line[59;1HABCDEFGHIXYZ[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1\U//g[?25l70 substitutions on 1 line[59;1HABCDEFGHIXYZ[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2\U//g[?25l70 substitutions on 1 line[59;1HABCDEFGHIXYZ[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=0[^A-Z]//g[?25l70 substitutions on 1 line[59;1HABCDEFGHIXYZ[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=1[^A-Z]//g[?25l70 substitutions on 1 line[59;1HABCDEFGHIXYZ[59;14H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[60;1H[K[59;9H[?12l[?25h[?25l
:[?12l[?25hs/\%#=2[^A-Z]//g[?25l70 substitutions on 1 line[59;1HABCDEFGHIXYZ[59;14H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start-here/+1,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 96 lines, 4032 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test37.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test37.in" 116 lines, 3262 characters[1;1HTest for 'scrollbind'. <eralston@computer.org>   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
[34m^W[mt:
:resize 8
/^start of window 1$/
zt:
:set scrollbind
[34m^W[mj:
:resize 7
/^start of window 2$/
zt:
:set scrollbind
:" -- start of tests --
:" TEST scrolling down
L5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:
:" TEST scrolling up
[34m^W[mtH4k[34m^W[mjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[34m^W[mtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:
:" TEST horizontal scrolling
:set scrollopt+=hor
gg"zyyG"zpG[34m^W[mt015zly$[34m^W[mbp"zpG[34m^W[mky$[34m^W[mbp"zpG:
[34m^W[mk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:
:set scrollopt-=hor
:" ****** tests using two different buffers *****
[34m^W[mt[34m^W[mj:
:close
[34m^W[mt:
:set noscrollbind
:/^start of window 2$/,/^end of window 2$/y
:new
[34m^W[mt[34m^W[mj4"zpGp:
[34m^W[mt/^start of window 1$/
zt:
:set scrollbind
[34m^W[mj:
/^start of window 2$/
zt:
:set scrollbind
:" -- start of tests --
:" TEST scrolling down
L5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:
:" TEST scrolling up
[34m^W[mtH4k[34m^W[mjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[34m^W[mtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:
:" TEST horizontal scrolling
:set scrollopt+=hor
gg"zyyG"zpG[34m^W[mt015zly$[34m^W[mbp"zpG[34m^W[mky$[34m^W[mbp"zpG:
[34m^W[mk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:
:set scrollopt-=hor
:" TEST syncbind
[34m^W[mt:set noscb[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for 'scrollbind'. <eralston@computer.org>   Do not add a line below![60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[2;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 72 lines, 1498 characters written[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[3;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[16M[1;60r[44;1HggL[34m^W[mj:set noscb
ggL:set scb
[34m^W[mt:set scb
G[34m^W[mjG:syncbind
Hk[34m^W[mtH[34m^W[mjHyy[34m^W[mbp[34m^W[mtyy[34m^W[mbp:
[34m^W[mt:set noscb
ggL[34m^W[mj:set noscb
ggL:set scb
[34m^W[mt:set scb
[34m^W[mtG[34m^W[mjG[34m^W[mt:syncbind
Hk[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
[34m^W[mtH3k[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
:" ***** done with tests *****
:w! test.out[13C" Write contents of this file
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noscrollbind[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollopt=ver,jump[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrolloff=2[?25l[1;1H/^start of window 2$/
zt:[2;4H[K[3;1H:set scrollb[3;16H[K[4;1H:" -- start of tests --
:" TEST scrolling down
L5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:[7;19Hup[7;21H[K[8;1H[34m^W[mtH4k[2CjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[2CtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:[9;9Hhorizontal scrolling
:set scrollopt+=hor[10;20H[K[11;1Hgg"zyyG"zpG[34m^W[mt015zly$[34m^W[mbp"zpG[34m^W[mky$[34m^W[mbp"zpG:
[34m^W[mk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:
:set scrollopt-=hor[13;20H[K[14;1H:" ****** tests using two different buffers *****
[34m^W[mt[34m^W[mj:[15;8H[K[16;2Hclose[16;7H[K[17;4H:[17;5H[K[18;2Hset noscrollbind
:/^start of window 2$/,/^end of window 2$/y
:new[20;6H[K[21;1H[34m^W[mt[34m^W[mj4"zpGp:[21;14H[K[22;1H[34m^W[mt/^start of window 1$/
zt:[23;4H[K[24;1H:set scrollbind[24;16H[K[25;1H[34m^W[mj:
/^start of window 2$/
zt:[27;4H[K[28;1H:set scrollb[28;16H[K[29;1H:" -- start of tests --
:" TEST scrolling down
L5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:[32;19Hup[32;21H[K[33;1H[34m^W[mtH4k[2CjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[2CtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:[34;9Hhorizontal scrolling
:set scrollopt+=hor[35;20H[K[36;1Hgg"zyyG"zpG[34m^W[mt015zly$[34m^W[mbp"zpG[34m^W[mky$[34m^W[mbp"zpG:
[34m^W[mk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:
:set scrollopt-=hor[38;20H[K[39;1H:" TEST syncbind[39;17H[K[40;1H[34m^W[mt:set noscb[40;14H[K[41;1HggL[34m^W[mj:set noscb
ggL:set scb[42;12H[K[43;1H[34m^W[mt:set scb[43;12H[K[44;1HG[34m^W[mjG:syncbind
Hk[34m^W[mtH[34m^W[mjHyy[34m^W[mbp[34m^W[mtyy[34m^W[mbp:
[34m^W[mt:set noscb[46;14H[K[47;1HggL[34m^W[mj:set noscb[47;17H[K[48;1HggL:set scb[48;12H[K[49;1H[34m^W[mt:set scb[49;12H[K[50;1H[34m^W[mtG[34m^W[mjG[34m^W[mt:syncbind
Hk[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:[52;4HH3k[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
:" ***** done with tests *****
:w! test.out             " Write contents of this file
:qa![55;5H[K[56;1HENDTEST[56;8H[K[57;1H[K[58;1H[K[59;1Hstart of window 1[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nowrap[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noequalalways[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset splitbelow[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST using two windows open to one buffer, one extra empty window[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsplit[?25l[1;1HL5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:
:" TEST scrolling up
[34m^W[mtH4k[34m^W[mjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[34m^W[mtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:
:" TEST horizontal scrolling
:set scrollopt+=hor[5;20H[K[6;1Hgg"zyyG"zpG[34m^W[mt015zly$[34m^W[mbp"zpG[34m^W[mky$[34m^W[mbp"zpG:[6;44H[K[7;1H[34m^W[mk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:
:set scrollopt-=hor[8;20H[K[9;9Hsyncbind[9;17H[K[10;1H[34m^W[mt:set noscb[10;14H[K[11;3HL[34m^W[mj:set noscb[11;17H[K[12;1HggL:set scb[12;12H[K[13;1H[34m^W[mt:set scb[13;12H[K[14;1HG[34m^W[mjG:syncbind[14;15H[K[15;1HHk[34m^W[mtH[34m^W[mjHyy[34m^W[mbp[34m^W[mtyy[34m^W[mbp:
[34m^W[mt:set noscb
ggL[34m^W[mj:set noscb
ggL:set scb[18;12H[K[19;1H[34m^W[mt:set scb[19;13H[K[20;1H[34m^W[mtG[34m^W[mjG[34m^W[mt:syncbind
Hk[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:[22;4HH3k[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
:" ***** done with tests *****
:w! test.out   [10C" Write contents of this file
:qa!
ENDTEST[26;9H[K[27;1H[K[28;1H[K[29;1H[7mtest37.in                                                                                         [m[30;1HL5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:
:" TEST scrolling up[31;21H[K[32;1H[34m^W[mtH4k[34m^W[mjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[34m^W[mtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:
:" TEST horizontal scrolling[33;29H[K[34;2Hset scrollopt+=hor[34;20H[K[35;1Hgg"zyyG"zpG[34m^W[mt015zly$[34m^W[mbp"zpG[34m^W[mky$[34m^W[mbp"zpG:
[34m^W[mk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:[36;40H[K[37;1H:set scrollopt-=hor[37;20H[K[38;2H" TEST syncbind[38;17H[K[39;1H[34m^W[mt:set nos[39;14H[K[40;1HggL[34m^W[mj:set noscb
ggL:set scb[41;12H[K[42;1H[34m^W[mt
G[34m^W[mjG:syncbind
Hk[34m^W[mtH[34m^W[mjHyy[34m^W[mbp[34m^W[mtyy[34m^W[mbp:
[34m^W[mt:set noscb[45;14H[K[46;1HggL[34m^W[mj:set noscb
ggL:set scb[47;12H[K[48;1H[34m^W[mt[49;4HG[34m^W[mjG[34m^W[mt:syncbind
Hk[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
[34m^W[mtH3k[2CjH[34m^W[mtHyy[2Cbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
:" ***** done with tests *****[52;31H[K[53;2Hw! test.out             " Write contents of this file
:qa![54;5H[K[55;1HENDTEST[56;1H[K[58;1Hstart of window 1
[1m[7mtest37.in                                                                                         [56;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hnew[?25l[30;1HHk[34m^W[mtH[2CjHyy[2Cbp[34m^W[mtyy[34m^W[mbp:[30;27H[K[31;1H[34m^W[mt:set noscb[31;14H[K[32;1HggL[34m^W[mj:set noscb[32;17H[K[33;1HggL:set scb[33;12H[K[34;1H[34m^W[mt:set scb[34;12H[K[35;1H[34m^W[mtG[34m^W[mjG[34m^W[mt:syncbind[35;21H[K[36;1HHk[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:[36;30H[K[37;1H[34m^W[mtH3k[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
:" ***** done with tests *****
:w! test.out [12C" Write contents of this file
:qa![40;5H[K[41;1HENDTEST[41;9H[K[42;1H[K[43;1H[K[44;1H[7mtest37.in                                                                                         [m[45;1H[K[46;1H[1m[34m~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[1m[7m[No Name] [45;1H[?12l[?25h[?25l[1;28r[m[28;1H
[1;60r[28;1Hstart of window 1
[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name][m[1m[7m [m[7m                                                                                         [m[60;1H[K[26;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[26;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hresize 8[?25l[1;1H[34m^W[mtH3k[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
:" ***** done with tests *****[2;31H[K[3;2Hw! test.out             " Write contents of this file
:qa![4;6H[K[5;1HENDTEST[5;8H[K[6;1H[K[7;1H[K[8;1Hstart of window 1
[1m[7mtest37.in                                                                                         [m[10;1H/^start of window 2$/
zt:[11;4H[K[12;1H:set scrollbind
:" -- start of tests --
:" TEST scrolling down[14;23H[K[15;1HL5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:
:" TEST scrolling up
[34m^W[mtH4k[34m^W[mjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[34m^W[mtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:
:" TEST horizontal scrolling
:set scrollopt+=hor[19;20H[K[20;1Hgg"zyyG"zpG[34m^W[mt015zly$[34m^W[mbp"zpG[34m^W[mky$[34m^W[mbp"zpG:[21;3Hk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:
:set scrollopt-=hor[22;20H[K[23;2H" TEST syncbind[23;26H[K[24;1H[34m^W[mt:set noscb
ggL[34m^W[mj:set noscb
ggL:set scb
[34m^W[mt:set scb
G[34m^W[mjG:syncbind[28;15H[K[29;1HHk[34m^W[mtH[34m^W[mjHyy[34m^W[mbp[34m^W[mtyy[34m^W[mbp:[29;27H[K[30;1H[34m^W[mt:set noscb[30;14H[K[31;1HggL[34m^W[mj:set noscb
ggL:set scb[32;12H[K[33;1H[34m^W[mt[34;4HG[34m^W[mjG[34m^W[mt:syncbind
Hk[34m^W[mjH[34m^W[mtHyy[34m^W[mbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
[34m^W[mtH3k[2CjH[34m^W[mtHyy[2Cbp[34m^W[mt[34m^W[mjyy[34m^W[mbp:
:" ***** done with tests *****[37;31H[K[38;2Hw! test.out             " Write contents of this file
:qa![39;5H[K[40;1HENDTEST[41;1H[K[43;1Hstart of window 1[6;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start of window 1$/[?25l[60;21H[K[60;1H[1;8r[1;1H[2M[1;60r[7;1H. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[60;1H[K[6;1H[?12l[?25h[?25l[1;8r[1;1H[3M[1;60r[6;1H. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03
. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04
. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollbind[?25l[3;1H[?12l[?25h[9;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[44;1H[1m[7mtest37.in                                                                                         [41;1H[?25l[m[60;1H[K[60;1H:[?12l[?25h[?25l[41;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hresize 7[?25l[10;1H:" ***** done with tests *****
:w! test.out[13C" Write contents of this file
:qa![12;6H[K[13;1HENDTEST[13;8H[K[14;1H[K[15;1H[K[16;1Hstart of window 1[16;19H[K[17;1H[1m[7mtest37.in                                                                                         [m[18;1H[K[19;1H[1m[34m~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [14;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25h^start of window 2$/[?25l[60;21H[K[60;1H[10;1Hend of window 1[10;16H[K[11;1H[K[12;1H[K[13;1Hstart of window 2
. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03[13;1H[?12l[?25h[?25l[10;16r[16;1H
[1;60r[16;1H. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04[60;1H[K[12;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollbind[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" -- start of tests --[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST scrolling down[?25l[12;1H[?12l[?25h

[?25l[1;8r[1;1H[5M[1;60r[4;1H. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
. line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07
. line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08
. line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09
. line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10[10;16r[10;1H[5M[1;60r[12;1H. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09[60;1H[K[14;1H[?12l[?25h[12;1H[17;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name]                                                                                         [18;1H[?25l[m
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[19;50H[K[59;11H[1m[7m[+][19;1H[?12l[?25h[?25l[m0[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[9;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [19;1H[?25l[m
. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[20;50H[K[20;1H[?12l[?25h[?25l1[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H


[?25l[1;8r[m[1;1H[6M[1;60r[3;1H. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
. line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12
. line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13
. line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14
. line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15
end of window 1[10;16r[10;1H[6M[1;60r[11;1H. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13
. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14
. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15[6;1H[?12l[?25h[3;1H[9;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [20;1H[?25l[m
. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[21;50H[K[21;1H[?12l[?25h[?25l2[?12l[?25h[17;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [12;1H[17;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [21;1H[?25l[m
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[22;50H[K[22;1H[?12l[?25h[?25l3[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[22;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST scrolling up[?25l[22;1H[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[1;8r[m[1;1H[5L[1;60r[1;1H. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04
. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05
. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
. line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07
. line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08[10;9H4[39C4[11;8H05[38C05[12;8H06[38C06[13;8H07[38C07[14;8H08[38C08[15;8H09[38C09[16;9H0[39C0[60;1H[K[4;1H[?12l[?25h[9;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7mtest37.in                                                                                         [14;1H[12;1H[9;1Htest37.in                                                                                         [m[17;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [4;1H[3;1H[9;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [22;1H[?25l[m
. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06[23;50H[K[23;1H[?12l[?25h[?25l4[?12l[?25h[17;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [12;1H[17;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [23;1H[?25l[m
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06[24;50H[K[24;1H[?12l[?25h[?25l5[?12l[?25h[17;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [12;1H[?25l[1;8r[m[1;1H[4L[1;60r[1;1Hstart of window 1
. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03[10;16r[10;1H[4L[1;60r[10;1Hstart of window 2
. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[17;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [6;1H[3;1H[9;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7mtest37.in                                                                                         [13;1H[12;1H[m[17;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [24;1H[?25l[m
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[25;50H[K[25;1H[?12l[?25h[?25l6[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[9;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [25;1H[?25l[m
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[26;50H[K[26;1H[?12l[?25h[?25l7[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[26;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST horizontal scrolling[?25l[26;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollopt+=hor[?25l[26;1H[?12l[?25h[18;1H[26;1H[?25l[27;1H[K[27;1H[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[m[1;1H 1[1;3H[K[2;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01[2;35H[K[3;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[3;35H[K[4;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03[4;35H[K[5;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04[5;35H[K[6;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[6;35H[K[7;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06[7;35H[K[8;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07[8;35H[K[10;1H 2[10;3H[K[11;1HUTSRQPONMLKJIHGREDCBA9876543210 01[11;35H[K[12;1HUTSRQPONMLKJIHGREDCBA9876543210 02[12;35H[K[13;1HUTSRQPONMLKJIHGREDCBA9876543210 03[13;35H[K[14;1HUTSRQPONMLKJIHGREDCBA9876543210 04[14;35H[K[15;1HUTSRQPONMLKJIHGREDCBA9876543210 05[15;35H[K[16;1HUTSRQPONMLKJIHGREDCBA9876543210 06[16;35H[K[3;1H[?12l[?25h[9;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [27;1H[?25l[m56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?12l[?25h[?25l[28;1H[K[28;1H[?12l[?25h[17;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [12;1H[17;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [28;1H[?25l[mUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l[29;1H[K[29;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[29;1H[?12l[?25h[17;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [12;1H[?25l[m[1;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09[2;33H10[3;33H11[4;33H12[5;33H13[6;33H14[7;33H15[8;1H[K[10;1HUTSRQPONMLKJIHGREDCBA9876543210 09[11;33H10[12;33H11[13;33H12[14;33H13[15;33H14[16;33H15[13;1H[?12l[?25h[?25l[1;1H. 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[12;1H[?12l[?25h[?25l[?12l[?25h[17;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [29;1H[?25l[m. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?12l[?25h[?25l[30;1H[K[30;1H[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;16H[9;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [30;1H[?25l[m. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h[?25l[31;1H[K[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollopt-=hor[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" ****** tests using two different buffers *****[?25l[31;1H[?12l[?25h[9;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[9;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7mtest37.in                                                                                         [12;1H[?25l[m[60;1H[K[60;1H:[?12l[?25h[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose[?25l[9;1H[K[10;1H[K[11;1Hstart of window 2[11;18H[K[12;8H0[39C0[13;8H0[39C0[14;8H0[39C0[15;8H0[39C0[16;8H0[39C0[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noscrollbind[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of window 2$/,/^end of window 2$/y[?25l18 lines yanked[60;16H[K[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[8;1H[7mtest37.in                                                                                         [m[10;1H[1m[34m~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [m[17;1H[1m[7m[No Name] [9;1H[?12l[?25h[8;1Htest37.in                                                                                         [m[17;1H[7m[No Name][m[1m[7m [m[7m                                                                                         [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name]                                                                                         [9;1H[?25l[m[60;1H4 more lines[10;1H[K[11;1H[K[12;1H[K[13;1H[K[17;11H[1m[7m[+][10;1H[?12l[?25h


[?25l[m[60;1H18 more lines[14;1Hstart of window 2[14;18H[K[15;1H. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01[15;50H[K[16;1H. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[16;50H[K[14;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[14;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[m[60;1H[K[60;1H/[?12l[?25h^start of window 1$/[?25l[60;21H[K[60;1H[31msearch hit BOTTOM, continuing at TOP[m[1;1HENDTEST[1;8H[K[2;1H[K[3;1H[K[4;1Hstart of window 1[4;18H[K[5;8H01[38C01[6;8H02[38C02[7;8H03[38C03[4;1H[?12l[?25h[?25l[1;7r[7;1H
[1;60r[7;1H. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollbind[?25l[3;1H[?12l[?25h[8;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [14;1H[?25l[m[60;1H[K[60;1H:[?12l[?25h[?25l[14;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start of window 2$/[?25l[60;21H[K[60;1H[31msearch hit BOTTOM, continuing at TOP[14;1H[?12l[?25h[?25l[9;16r[m[9;1H[3M[1;60r[14;1H. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03
. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[60;1H[K[11;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollbind[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" -- start of tests --[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST scrolling down[?25l[11;1H[?12l[?25h


[?25l[1;7r[1;1H[5M[1;60r[3;1H. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05
. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
. line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07
. line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08
. line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09[9;16r[9;1H[5M[1;60r[12;1H. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09
. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10[60;1H[K[14;1H[?12l[?25h[11;1H[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [31;1H[?25l[m
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[32;50H[K[32;1H[?12l[?25h[?25l0[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [32;1H[?25l[m
. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[33;50H[K[33;1H[?12l[?25h[?25l1[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H

[?25l[1;7r[m[1;1H[6M[1;60r[2;1H. line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10
. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
. line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12
. line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13
. line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14
. line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15[9;16r[9;1H[6M[1;60r[11;1H. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13
. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14
. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[5;1H[?12l[?25h[3;1H[8;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [33;1H[?25l[m
. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[34;50H[K[34;1H[?12l[?25h[?25l2[?12l[?25h[17;1H[1m[7m[No Name] [+]                                                                                     [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [11;1H[17;1H[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [34;1H[?25l[m
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[35;50H[K[35;1H[?12l[?25h[?25l3[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST scrolling up[?25l[35;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[m[1;9H4[39C4[2;8H05[38C05[3;8H06[38C06[4;8H07[38C07[5;8H08[38C08[6;8H09[38C09[7;9H0[39C0[9;16r[9;1H[5L[1;60r[9;1H. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08[60;1H[K[4;1H[?12l[?25h[8;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [14;1H[11;1H[8;1Htest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [4;1H[3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [35;1H[?25l[m
. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06[36;50H[K[36;1H[?12l[?25h[?25l4[?12l[?25h[17;1H[1m[7m[No Name] [+]                                                                                     [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [11;1H[17;1H[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [36;1H[?25l[m
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06[37;50H[K[37;1H[?12l[?25h[?25l5[?12l[?25h[17;1H[1m[7m[No Name] [+]                                                                                     [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [11;1H[?25l[1;7r[m[1;1H[4L[1;60r[1;1Hstart of window 1
. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03[9;16r[9;1H[4L[1;60r[9;1Hstart of window 2
. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [5;1H[3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [12;1H[11;1H[m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [37;1H[?25l[m
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[38;50H[K[38;1H[?12l[?25h[?25l6[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [38;1H[?25l[m
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[39;50H[K[39;1H[?12l[?25h[?25l7[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST horizontal scrolling[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollopt+=hor[?25l[39;1H[?12l[?25h[18;1H[39;1H[?25l[40;1H[K[40;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[m[1;1H 1[1;3H[K[2;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01[2;35H[K[3;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[3;35H[K[4;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03[4;35H[K[5;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04[5;35H[K[6;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[6;35H[K[7;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06[7;35H[K[9;1H 2[9;3H[K[10;1HUTSRQPONMLKJIHGREDCBA9876543210 01[10;35H[K[11;1HUTSRQPONMLKJIHGREDCBA9876543210 02[11;35H[K[12;1HUTSRQPONMLKJIHGREDCBA9876543210 03[12;35H[K[13;1HUTSRQPONMLKJIHGREDCBA9876543210 04[13;35H[K[14;1HUTSRQPONMLKJIHGREDCBA9876543210 05[14;35H[K[15;1HUTSRQPONMLKJIHGREDCBA9876543210 06[15;35H[K[16;1HUTSRQPONMLKJIHGREDCBA9876543210 07[16;35H[K[3;1H[?12l[?25h[8;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [40;1H[?25l[m56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[?12l[?25h[?25l[41;1H[K[41;1H[?12l[?25h[17;1H[1m[7m[No Name] [+]                                                                                     [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [11;1H[17;1H[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [41;1H[?25l[mUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l[42;1H[K[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[42;1H[?12l[?25h[17;1H[1m[7m[No Name] [+]                                                                                     [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [11;1H[?25l[m[1;1H56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09[2;33H10[3;33H11[4;33H12[5;33H13[6;33H14[7;33H15

UTSRQPONMLKJIHGREDCBA9876543210 09[10;33H10[11;33H11[12;33H12[13;33H13[14;33H14[15;33H15[16;33H16[12;1H[?12l[?25h[?25l[1;1H. 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[11;1H[?12l[?25h[?25l[?12l[?25h[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [42;1H[?25l[m. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[?12l[?25h[?25l[43;1H[K[43;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;16H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [43;1H[?25l[m. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h[?25l[44;1H[K[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset scrollopt-=hor[?25l[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TEST syncbind[?25l[44;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hset noscb[?25l[3;1H[?12l[?25h[?25l[1;1HTest for 'scrollbind'. <eralston@computer.org>   Do not add a line below!
STARTTEST[2;11H[K[3;1H:so small.vim[3;14H[K[4;1H:set noscrollbind[4;18H[K[5;1H:set scrollopt=ver,jump[5;24H[K[6;1H:set scrolloff=2[6;17H[K[7;1H:set nowrap[7;12H[K[1;1H[?12l[?25h[5;1H


[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [11;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hset noscb[?25l[11;1H[?12l[?25h[?25l[9;1H[K[10;1H[K[11;1H[K[12;1H[K[13;1H[K[14;1Hstart of window 2[14;18H[K[15;8H01[38C01[16;8H02[38C02[9;1H[?12l[?25h[14;1H[?25l[60;1H[K[60;1H:[?12l[?25hset scb[?25l[14;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [5;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hset scb[?25l[5;1H[?12l[?25h[?25l[1;1H. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13[1;50H[K[2;1H. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14
. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
end of window 2[5;16H[K[6;1H[K[7;1Hend of test37.in (please don't delete this line)

end of window 2
[1m[34m~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [7;1H[?12l[?25h[?25l[m[1;1Hzt:[1;4H[K[2;1H:set scrollbind[2;16H[K[3;1H:" -- start of tests --[3;24H[K[4;1H:" TEST scrolling down[4;23H[K[5;1HL5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:
:" TEST scrolling up
[34m^W[mtH4k[34m^W[mjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[34m^W[mtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:
[7mtest37.in[m[1m[7m [m[7m                                                                                         [9;16r[m[9;1H[2L[1;60r[9;1H. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[17;1H[1m[7m[No Name] [+]                                                                                     [m[60;1H[K[11;1H[?12l[?25h[?25l[60;1H:[?12l[?25hsyncbind[?25l[11;1H[?12l[?25h[?25l[1;7r[1;1H[L[1;60r[1;1H/^start of window 2$/[9;16r[9;1H[L[1;60r[9;1H. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[60;1H[K[11;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [5;1H[3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [11;1H[m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [44;1H[?25l[m
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[45;50H[K[45;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [45;1H[?25l[m
:set scrollbind[46;16H[K[46;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[46;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hset noscb[?25l[3;1H[?12l[?25h[?25l[1;1HTest for 'scrollbind'. <eralston@computer.org>   Do not add a line below!
STARTTEST
:so small.vim[3;14H[K[4;2Hset noscrollbind[4;18H[K[5;2Hset scrollopt=ver,jump
:set scrolloff=2[6;17H[K[7;2Hset nowrap[7;12H[K[1;1H[?12l[?25h[5;1H


[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [11;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hset noscb[?25l[11;1H[?12l[?25h[?25l[9;1H[K[10;1H[K[11;1H[K[12;1H[K[13;1H[K[14;1Hstart of window 2[14;18H[K[15;1H. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01[15;50H[K[16;1H. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[16;50H[K[9;1H[?12l[?25h[14;1H[?25l[60;1H[K[60;1H:[?12l[?25hset scb[?25l[14;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [5;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hset scb[?25l[5;1H[?12l[?25h[?25l[1;1H. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13[1;50H[K[2;1H. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14
. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
end of window 2[5;16H[K[6;1H[K[7;1Hend of test37.in (please don't delete this line)

end of window 2
[1m[34m~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [7;1H[?12l[?25h[?25l[m[1;1Hzt:[1;4H[K[2;1H:set scrollbind[2;16H[K[3;1H:" -- start of tests --[3;24H[K[4;1H:" TEST scrolling down[4;23H[K[5;1HL5jHyy[34m^W[mbpr0[34m^W[mtHyy[34m^W[mbpr1[34m^W[mtL6jHyy[34m^W[mbpr2[34m^W[mkHyy[34m^W[mbpr3:
:" TEST scrolling up
[34m^W[mtH4k[34m^W[mjH[34m^W[mtHyy[34m^W[mbpr4[34m^W[mkHyy[34m^W[mbpr5[34m^W[mk3k[34m^W[mtH[34m^W[mjHyy[34m^W[mbpr6[34m^W[mtHyy[34m^W[mbpr7:
[7mtest37.in[m[1m[7m [m[7m                                                                                         [9;16r[m[9;1H[2L[1;60r[9;1H. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[17;1H[1m[7m[No Name] [+]                                                                                     [m[60;1H[K[11;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [5;1H[?25l[60;1H[m:[?12l[?25hsyncbind[?25l[5;1H[?12l[?25h[3;1H[?25l[1;7r[1;1H[L[1;60r[1;1H/^start of window 2$/[9;16r[9;1H[2L[1;60r[9;1H. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13
. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[60;1H[K[3;1H[?12l[?25h[?25l[1;7r[1;1H[L[1;60r[1;1H:resize 7[8;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [12;1H[?12l[?25h[11;1H[8;1Htest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [4;1H[3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [46;1H[?25l[m
zt:[47;4H[K[47;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [11;1H[m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [47;1H[?25l[m
. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15[48;50H[K[48;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[48;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[?25l[1;7r[m[1;1H[4L[1;60r[1;1H/^start of window 1$/
zt:
:set scrollbind
[34m^W[mj:[9;16r[9;1H[4L[1;60r[9;1H. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09
. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12[60;1H[K[4;1H[?12l[?25h[8;1H[7mtest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [14;1H[11;1H[8;1Htest37.in                                                                                         [m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [4;1H[3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[59;1H[1m[7m[No Name] [+]                                                                                     [48;1H[?25l[m
:set scrollbind[49;16H[K[49;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                         [m[59;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                         [m[17;1H[1m[7m[No Name] [+]                                                                                     [11;1H[m[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7m[No Name] [+]                                                                                     [49;1H[?25l[m
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[50;50H[K[50;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" ***** done with tests *****[?25l[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out             " Write contents of this file[?25l"test.out" [60;12H[K[60;12H[New File] 33 lines, 1329 characters written[59;1H[1m[7mtest.out]      [50;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test38.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test38.in" 35 lines, 455 characters[2;1HTest Virtual replace mode.

STARTTEST
:so small.vim
:" make sure that backspace works, no matter what termcap is used
:set t_kD=[34m^V[mx7f t_kb=[34m^V[mx08
ggdGa
abcdefghi
jk      lmn
    opq rst
[34m^D[muvwxyz
[34m^[[mgg:set ai
:set bs=2
gR0[34m^D[m 1
A
BCDEFGHIJ[18;9HKL
MNO
PQR[34m^[[mG:ka
o0[34m^D[m
abcdefghi
jk      lmn
    opq rst
[34m^D[muvwxyz
[34m^[[m'ajgR0[34m^D[m 1
A
BCDEFGHIJ[29;9HKL
MNO
PQR[34m^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^[[m:$
iab     cdefghi jkl[34m^[[m0gRAB......CDEFGHI.J[34m^[[mo[34m^[[m:
iabcdefghijklmnopqrst[34m^[[m0gRAB    IJKLMNO QR[34m^[[m:wq! test.out
ENDTEST

[1m[34m~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 29 lines, 407 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[34;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" make sure that backspace works, no matter what termcap is used[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset t_kD=^[34m^?[m t_kb=^[34m^H[?25l[27m[23m[m[H[2J[2;1HTest Virtual replace mode.

STARTTEST
:so small.vim
:" make sure that backspace works, no matter what termcap is used
:set t_kD=[34m^V[mx7f t_kb=[34m^V[mx08
ggdGa
abcdefghi
jk      lmn
    opq rst
[34m^D[muvwxyz
[34m^[[mgg:set ai
:set bs=2
gR0[34m^D[m 1
A
BCDEFGHIJ[18;9HKL
MNO
PQR[34m^[[mG:ka
o0[34m^D[m
abcdefghi
jk      lmn
    opq rst
[34m^D[muvwxyz
[34m^[[m'ajgR0[34m^D[m 1
A
BCDEFGHIJ[29;9HKL
MNO
PQR[34m^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^[[m:$
iab     cdefghi jkl[34m^[[m0gRAB......CDEFGHI.J[34m^[[mo[34m^[[m:
iabcdefghijklmnopqrst[34m^[[m0gRAB    IJKLMNO QR[34m^[[m:wq! test.out
ENDTEST

[1m[34m~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [35;1H[?12l[?25h[1;1H[?25l
~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25l
abcdefghi[2;10H[K[3;1Hjk      lmn[3;12H[K[4;1H    opq rst[4;12H[K[5;1Huvwxyz[5;7H[K[6;1H[K[6;1H[?12l[?25h[1;1H[?25l[60;1H[K[60;1H:[?12l[?25hset ai[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bs=2[?25l[1;1H[?12l[?25h[?25l 1
 A[2;3H[K[3;1H BCDEFGHIJ[3;11H[K[4;5H    KL[4;11H[K[5;1H        MNO[6;9HPQR[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hka[?25l[6;9H[?12l[?25h[?25l[7;1H[K[8;1Habcdefghi[8;10H[K[9;1Hjk      lmn[9;12H[K[10;1H    opq rst[10;12H[K[11;1Huvwxyz[11;7H[K[12;1H[K[12;1H[?12l[?25h[6;9H
[?25l 1[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$[?25l[12;1H[?12l[?25h[?25lab      cdefghi jkl[?12l[?25h[?25lAB......CDEFGHI.J[?12l[?25h[?25l[13;1H[K[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[13;1H[?12l[?25h[?25labcdefghijklmnopqrst[?12l[?25h[?25lAB      IJKLMNO QR[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 13 lines, 107 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test39.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test39.in" 43 lines, 916 characters[2;1HTest Visual block mode commands
And test "U" in Visual mode, also on German sharp S.

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[34m^V[mjj>wll[34m^V[mjlll>
:" Test shift-left of a block
G$hhhh[34m^V[mkk<
:" Test block-insert
Gkl[34m^V[mkkkIxyz[34m^[[m
:" Test block-replace
Gllll[34m^V[mkkklllrq
:" Test block-change
G$khhh[34m^V[mhhkkcmno[34m^[[m
:$-4,$w! test.out
:" gUe must uppercase a whole word, also when ß changes to SS
Gothe youtußeuu end[34m^[[mYpk0wgUe
:" gUfx must uppercase until x, inclusive.
O- youßtußexu -[34m^[[m0fogUfx
:" VU must uppercase a whole line
YpkVU
:" same, when it's the last line in the buffer
YPGi111[34m^[[mVUddP
:" Uppercase two lines
Oblah di
doh dut[34m^[[mVkUj
:" Uppercase part of two lines
ddppi333[34m^[[mk0i222[34m^[[mfyllvjfuUk
:/^the/,$w >> test.out
:qa!
ENDTEST

abcdefghijklm
abcdefghijklm
abcdefghijklm
abcdefghijklm
abcdefghijklm
[1m[34m~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 31 lines, 740 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[37;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[38;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[38;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[38;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" This only works when 'encoding' is "latin1", don't depend on the environment[?25l[38;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset enc=latin1[?25l[27m[23m[m[H[2J[2;1HTest Visual block mode commands
And test "U" in Visual mode, also on German sharp S.

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[34m^V[mjj>wll[34m^V[mjlll>
:" Test shift-left of a block
G$hhhh[34m^V[mkk<
:" Test block-insert
Gkl[34m^V[mkkkIxyz[34m^[[m
:" Test block-replace
Gllll[34m^V[mkkklllrq
:" Test block-change
G$khhh[34m^V[mhhkkcmno[34m^[[m
:$-4,$w! test.out
:" gUe must uppercase a whole word, also when ß changes to SS
Gothe youtußeuu end[34m^[[mYpk0wgUe
:" gUfx must uppercase until x, inclusive.
O- youßtußexu -[34m^[[m0fogUfx
:" VU must uppercase a whole line
YpkVU
:" same, when it's the last line in the buffer
YPGi111[34m^[[mVUddP
:" Uppercase two lines
Oblah di
doh dut[34m^[[mVkUj
:" Uppercase part of two lines
ddppi333[34m^[[mk0i222[34m^[[mfyllvjfuUk
:/^the/,$w >> test.out
:qa!
ENDTEST

abcdefghijklm
abcdefghijklm
abcdefghijklm
abcdefghijklm
abcdefghijklm
[1m[34m~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [38;1H[?12l[?25h[?25l[60;1H[m/[?12l[?25h^abcde[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test shift-right of a block[?25l[39;1H[?12l[?25h
abcd[?25l[?12l[?25h[?25l[7me
[mabcd[?12l[?25h[?25l[7me
[mabcd[?12l[?25h[?25l[60;1H3 lines >ed 1 time[60;19H[K[40;5H        efghijklm
abcd        efghijklm
abcd        efghijklm[40;8H[?12l[?25h     ef[?25l[?12l[?25h[?25l[7mg[41;15H[?12l[?25h[?25l[40;16Hh[41;15Hg[?12l[?25h[?25l[40;17Hi[41;16Hh[?12l[?25h[?25l[40;18Hj[41;17Hi[?12l[?25h[?25l[m[40;15H        ghijklm[41;15H        ghijklm[40;16H[?12l[?25h[41;16H[?25l[60;1H[K[60;1H:[?12l[?25h" Test shift-left of a block[?25l[41;16H[?12l[?25h

[12C[?25l[?12l[?25h[?25l[7mi[42;9H[?12l[?25h[?25l [41;9H[?12l[?25h[?25l[m[60;1H3 lines <ed 1 time[60;20H[K[41;9Hef    [42;9Hefghijklm[42;18H[K[43;9Hi[41;9H[?12l[?25h[42;9H[?25l[60;1H[K[60;1H:[?12l[?25h" Test block-insert[?25l[42;9H[?12l[?25h
[42;1Ha[?25l[?12l[?25h[?25l[7mb[41;2H[?12l[?25h[?25lb[40;2H[?12l[?25h[?25lb[39;2H[?12l[?25h[?25l[m
ab
ab
ab[39;2Hxyzbcdefghijklm
axyzbcd
axyzbcd
axyzbcd[39;2H[?12l[?25h
a[?25l[60;1H[K[60;1H:[?12l[?25h" Test block-replace[?25l[40;2H[?12l[?25h


abcd[?25l[?12l[?25h[?25l[7me[42;5H[?12l[?25h[?25lb[41;5H[?12l[?25h[?25lb[40;5H[?12l[?25h[?25lb[41;6Hc[42;6Hc[43;6Hf[40;6H[?12l[?25h[?25lc[41;7Hd[42;7Hd[43;7Hg[40;7H[?12l[?25h[?25ld[41;8H [42;8H [43;8Hh[40;8H[?12l[?25h[?25l[mqqqq
axyzqqqq
axyzqqqq
abcdqqqq[40;5H[?12l[?25h
axyz[?25l[60;1H[K[60;1H:[?12l[?25h" Test block-change[?25l[41;5H[?12l[?25h

[12C[42;17H[?25l[?12l[?25h[?25l[7mj[?12l[?25h[?25li[?12l[?25h[?25l[41;12H     [42;11Hghijkl[41;11H[?12l[?25h[?25l[40;13Hef[m[41;15H  [42;11Hg[3Ckl[40;12H[?12l[?25h[?25lmno[41;12Hmno[42;12Hmno[40;14H[?12l[?25h[41;14H[?25l[60;1H[K[60;1H:[?12l[?25h$-4,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 5 lines, 108 characters written[41;14H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" gUe must uppercase a whole word, also when ß changes to SS[?25l[41;14H[?12l[?25h

[?25l
the youtußeuu end[44;18H[K[44;17H[?12l[?25h[?25l
the youtußeuu end[45;18H[K[45;1H[?12l[?25h[44;1Hthe [?25lYOUTUSSEUU endthe [?12l[?25h
the [?25l[60;1H[K[60;1H:[?12l[?25h" gUfx must uppercase until x, inclusive.[?25l[45;5H[?12l[?25h[?25l[45;59r[45;1H[L[1;60r[45;1H- youßtußexu -[60;1H[K[45;14H[?12l[?25h- y[?25lOUSSTUSSEXu -- y[?12l[?25h
the[?25l[60;1H:[?12l[?25h" VU must uppercase a whole line[?25l[46;4H[?12l[?25h[?25l
the youtußeuu end[47;18H[K[47;1H[?12l[?25h[46;1H[?25lt[7mhe youtußeuu end [?12l[?25h[?25l[mTHE YOUTUSSEUU END[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25h" same, when it's the last line in the buffer[?25l[47;1H[?12l[?25h[?25l[47;59r[47;1H[L[1;60r[47;1Hthe youtußeuu end[60;1H[K[47;1H[?12l[?25h
[?25l111the youtußeuu end11[?12l[?25h[?25l[7m11[m1[7mthe youtußeuu end 11[?12l[?25h[?25l[m111THE YOUTUSSEUU END[?12l[?25h[?25l[1m[34m~                                                                                                 [47;1H[?12l[?25h[?25l[47;59r[m[47;1H[L[1;60r[47;1H111THE YOUTUSSEUU END[?12l[?25h
[?25l[60;1H:[?12l[?25h" Uppercase two lines[?25l[48;1H[?12l[?25h[?25l[48;59r[48;1H[2L[1;60r[48;1Hblah di
doh dut[60;1H[K[49;7H[?12l[?25h[?25l[7mdoh du[mt[7m [?12l[?25h[?25l[48;1Hblah d[mi[7m [49;7Ht[48;7H[?12l[?25h[?25l[mBLAH DI[48;8H[K[49;1HDOH DUT[49;8H[K[48;7H[?12l[?25h[49;7H[50;7H[?25l[60;1H:[?12l[?25h" Uppercase part of two lines[?25l[50;7H[?12l[?25h[?25l[1m[34m~                                                                                                 [49;1H[?12l[?25h[?25l[m
the youtußeuu end[50;18H[K[50;1H[?12l[?25h[?25l
the youtußeuu end[51;18H[K[51;1H[?12l[?25h[?25l333the youtußeuu end33[?12l[?25h[50;3H[?25l222the youtußeuu end22[?12l[?25h2the yo[?25l[?12l[?25h[?25l[7mutußeuu end 
333the yo[?12l[?25h[?25lut[?12l[?25h[?25l[m[50;10HUTUSSEUU END
333THE YOUTU[50;10H[?12l[?25h[49;7H[50;10H[?25l[60;1H[K[60;1H:[?12l[?25h/^the/,$w >> test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H8 lines, 136 characters appended[50;10H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test40.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test40.in" 63 lines, 1536 characters[1;1HTest for "*Cmd" autocommands

STARTTEST
:so small.vim
:/^start/,$w! Xxx[15C" write lines below to Xxx
:au BufReadCmd XtestA 0r Xxx|$del
:e XtestA[23C" will read text of Xxd instead
:au BufWriteCmd XtestA call append(line("$"), "write")
:w[30C" will append a line to the file
:r XtestA[23C" should not read anything
:[31C" now we have:
:[31C" 1     start of Xxx
:[31C" 2[13Ctest40
:[31C" 3     end of Xxx
:[31C" 4     write
:au FileReadCmd XtestB '[r Xxx
:2r XtestB[22C" will read Xxx below line 2 instead
:[31C" 1     start of Xxx
:[31C" 2[13Ctest40
:[31C" 3     start of Xxx
:[31C" 4[13Ctest40
:[31C" 5     end of Xxx
:[31C" 6     end of Xxx
:[31C" 7     write
:au FileWriteCmd XtestC '[,']copy $
4GA1[34m^[[m
:4,5w XtestC[20C" will copy lines 4 and 5 to the end
:r XtestC[23C" should not read anything
:[31C" 1     start of Xxx
:[31C" 2[13Ctest40
:[31C" 3     start of Xxx
:[31C" 4[13Ctest401
:[31C" 5     end of Xxx
:[31C" 6     end of Xxx
:[31C" 7     write
:[31C" 8[13Ctest401
:[31C" 9     end of Xxx
:au FILEAppendCmd XtestD '[,']w! test.out
:w >>XtestD[21C" will write all lines to test.out
:$r XtestD[22C" should not read anything
:$w >>test.out[18C" append "end of Xxx" to test.out
:au BufReadCmd XtestE 0r test.out|$del
:sp XtestE[22C" split window with test.out
5Goasdf[34m^[^W^W[m:"
:au BufWriteCmd XtestE w! test.out
:wall[27C" will write other window to test.out
:[31C" 1     start of Xxx
:[31C" 2[13Ctest40
:[31C" 3     start of Xxx
:[31C" 4[13Ctest401
:[31C" 5     end of Xxx
:[31C" 6     asdf
:[31C" 7     end of Xxx
:[31C" 8     write
:[31C" 9[13Ctest401
:[31C" 10    end of Xxx
:[31C" 11    end of Xxx
:qa!
ENDTEST[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for "*Cmd" autocommands[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 55 lines, 1455 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start/,$w! Xxx[34m^I^I[m" write lines below to Xxx[?25l"Xxx" [60;7H[K[60;7H[New File] 3 lines, 32 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufReadCmd XtestA 0r Xxx|$del[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he XtestA[34m^I^I^I[m" will read text of Xxd instead[?25l"Xxx" [60;7H[K[60;7H3 lines, 32 characters[1;1Hstart of Xxx
        test40
end of Xxx[3;11H[K[4;1H[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [3;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hau BufWriteCmd XtestA call append(line("$"), "write")[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[34m^I^I^I^I[m" will append a line to the file[?25l[4;1Hwrite[4;6H[K[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hr XtestA[34m^I^I^I[m" should not read anything[?25l[1m[37m[41mE484: Can't open file XtestA[m[60;29H[K[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" now we have:[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mend of Xxx[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I[mwrite[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FileReadCmd XtestB '[r Xxx[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h2r XtestB[34m^I^I^I[m" will read Xxx below line 2 instead[?25l"Xxx" [60;7H[K[60;7H3 lines, 32 characters[3;59r[3;1H[3L[1;60r[3;1Hstart of Xxx[4;9Htest40
end of Xxx[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mstart of Xxx[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I^I[mtest40[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 5[34m^I[mend of Xxx[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 6[34m^I[mend of Xxx[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 7[34m^I[mwrite[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FileWriteCmd XtestC '[,']copy $[?25l[3;1H[?12l[?25h[4;9H[?25ltest401[?12l[?25h[5;10H[?25l[60;1H[K[60;1H:[?12l[?25h4,5w XtestC[34m^I^I^I[m" will copy lines 4 and 5 to the end[?25l[8;1H        test401[8;16H[K[9;1Hend of Xxx[9;11H[K[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hr XtestC[34m^I^I^I[m" should not read anything[?25l[1m[37m[41mE484: Can't open file XtestC[m[60;29H[K[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mstart of Xxx[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I^I[mtest401[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 5[34m^I[mend of Xxx[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 6[34m^I[mend of Xxx[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 7[34m^I[mwrite[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 8[34m^I^I[mtest401[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 9[34m^I[mend of Xxx[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau FILEAppendCmd XtestD '[,']w! test.out[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>XtestD[34m^I^I^I[m" will write all lines to test.out[?25l"test.out" [60;12H[K[60;12H[New File] 9 lines, 91 characters written[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r XtestD[34m^I^I^I[m" should not read anything[?25l[1m[37m[41mE484: Can't open file XtestD[m[60;30H[K[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$w >>test.out[34m^I^I^I[m" append "end of Xxx" to test.out[?25l"test.out" [60;12H[K[60;12H1 line, 11 characters appended[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufReadCmd XtestE 0r test.out|$del[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsp XtestE[34m^I^I^I[m" split window with test.out[?25l"test.out" [60;12H[K[60;12H10 lines, 102 characters[10;1Hend of Xxx[10;11H[K[30;1H[1m[7mXtestE                                                                                            [m[31;1Hend of Xxx[31;11H[K[32;1Hend of Xxx[32;11H[K[33;1Hwrite[33;6H[K[34;1H        test401[34;16H[K[35;1Hend of Xxx[35;11H[K[59;1H[7mXtestA                                                                                            [10;1H[?12l[?25h[5;1H[?25l[6;29r[m[6;1H[L[1;60r[6;1Hasdf[30;8H[1m[7m[+][m[60;1H[K[6;4H[?12l[?25h[30;1H[7mXtestE [+][m[1m[7m [m[7m                                                                                        [m[59;1H[1m[7mXtestA                                                                                            [35;1H[?25l[60;1H[m:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufWriteCmd XtestE w! test.out[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwall[34m^I^I^I^I[m" will write other window to test.out[?25l"test.out" [60;12H[K[60;12H11 lines, 107 characters written[30;8H[7m   [35;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mstart of Xxx[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I^I[mtest401[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 5[34m^I[mend of Xxx[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 6[34m^I[masdf[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 7[34m^I[mend of Xxx[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 8[34m^I[mwrite[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 9[34m^I^I[mtest401[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 10[34m^I[mend of Xxx[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[34m^I^I^I^I[m" 11[34m^I[mend of Xxx[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test41.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test41.in" 24 lines, 421 characters[1;1HTest 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[34m^[[mkY3000p2GY3000p
:w! Xtest
:%d
:e! Xtest
:.w! test.out
3003G:.w >>test.out
6005G:.w >>test.out
:qa!
ENDTEST

[1m[34m~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for writing and reading a file of over 100 Kbyte[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[9;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 13 lines, 196 characters written[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[10;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[23;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%d[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25lThis is the start
This is the leader[2;19H[K[3;1HThis is the middle[3;19H[K[4;1HThis is the trailer[4;20H[K[5;1HThis is the end[5;16H[K[5;15H[?12l[?25h[4;15H[?25l[60;1H3000 more lines[60;16H[K[5;13Htrailer
This is the trailer[6;20H[K[7;1HThis is the trailer[7;20H[K[8;1HThis is the trailer[8;20H[K[9;1HThis is the trailer[9;20H[K[10;1HThis is the trailer[10;20H[K[11;1HThis is the trailer[11;20H[K[12;1HThis is the trailer[12;20H[K[13;1HThis is the trailer[13;20H[K[14;1HThis is the trailer[14;20H[K[15;1HThis is the trailer[15;20H[K[16;1HThis is the trailer[16;20H[K[17;1HThis is the trailer[17;20H[K[18;1HThis is the trailer[18;20H[K[19;1HThis is the trailer[19;20H[K[20;1HThis is the trailer[20;20H[K[21;1HThis is the trailer[21;20H[K[22;1HThis is the trailer[22;20H[K[23;1HThis is the trailer[23;20H[K[24;1HThis is the trailer[24;20H[K[25;1HThis is the trailer[25;20H[K[26;1HThis is the trailer[26;20H[K[27;1HThis is the trailer[27;20H[K[28;1HThis is the trailer[28;20H[K[29;1HThis is the trailer[29;20H[K[30;1HThis is the trailer[30;20H[K[31;1HThis is the trailer[31;20H[K[32;1HThis is the trailer[32;20H[K[33;1HThis is the trailer[33;20H[K[34;1HThis is the trailer[34;20H[K[35;1HThis is the trailer[35;20H[K[36;1HThis is the trailer[36;20H[K[37;1HThis is the trailer[37;20H[K[38;1HThis is the trailer[38;20H[K[39;1HThis is the trailer[39;20H[K[40;1HThis is the trailer[40;20H[K[41;1HThis is the trailer[41;20H[K[42;1HThis is the trailer[42;20H[K[43;1HThis is the trailer[43;20H[K[44;1HThis is the trailer[44;20H[K[45;1HThis is the trailer[45;20H[K[46;1HThis is the trailer[46;20H[K[47;1HThis is the trailer[47;20H[K[48;1HThis is the trailer[48;20H[K[49;1HThis is the trailer[49;20H[K[50;1HThis is the trailer[50;20H[K[51;1HThis is the trailer[51;20H[K[52;1HThis is the trailer[52;20H[K[53;1HThis is the trailer[53;20H[K[54;1HThis is the trailer[54;20H[K[55;1HThis is the trailer[55;20H[K[56;1HThis is the trailer[56;20H[K[57;1HThis is the trailer[57;20H[K[58;1HThis is the trailer[58;20H[K[59;1HThis is the trailer[59;20H[K[5;1H[?12l[?25h[2;1H[?25l[3;13Hleader[4;13Hleader[4;19H[K[5;13Hleader[5;19H[K[6;13Hleader[6;19H[K[7;13Hleader[7;19H[K[8;13Hleader[8;19H[K[9;13Hleader[9;19H[K[10;13Hleader[10;19H[K[11;13Hleader[11;19H[K[12;13Hleader[12;19H[K[13;13Hleader[13;19H[K[14;13Hleader[14;19H[K[15;13Hleader[15;19H[K[16;13Hleader[16;19H[K[17;13Hleader[17;19H[K[18;13Hleader[18;19H[K[19;13Hleader[19;19H[K[20;13Hleader[20;19H[K[21;13Hleader[21;19H[K[22;13Hleader[22;19H[K[23;13Hleader[23;19H[K[24;13Hleader[24;19H[K[25;13Hleader[25;19H[K[26;13Hleader[26;19H[K[27;13Hleader[27;19H[K[28;13Hleader[28;19H[K[29;13Hleader[29;19H[K[30;13Hleader[30;19H[K[31;13Hleader[31;19H[K[32;13Hleader[32;19H[K[33;13Hleader[33;19H[K[34;13Hleader[34;19H[K[35;13Hleader[35;19H[K[36;13Hleader[36;19H[K[37;13Hleader[37;19H[K[38;13Hleader[38;19H[K[39;13Hleader[39;19H[K[40;13Hleader[40;19H[K[41;13Hleader[41;19H[K[42;13Hleader[42;19H[K[43;13Hleader[43;19H[K[44;13Hleader[44;19H[K[45;13Hleader[45;19H[K[46;13Hleader[46;19H[K[47;13Hleader[47;19H[K[48;13Hleader[48;19H[K[49;13Hleader[49;19H[K[50;13Hleader[50;19H[K[51;13Hleader[51;19H[K[52;13Hleader[52;19H[K[53;13Hleader[53;19H[K[54;13Hleader[54;19H[K[55;13Hleader[55;19H[K[56;13Hleader[56;19H[K[57;13Hleader[57;19H[K[58;13Hleader[58;19H[K[59;13Hleader[59;19H[K[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest[?25l"Xtest" [60;9H[K[60;9H[New File] 6005 lines, 117092 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%d[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest[?25l"Xtest" [60;9H[K[60;9H6005 lines, 117092 characters[1;1HThis is the start
This is the leader[2;19H[K[3;1HThis is the leader[3;19H[K[4;1HThis is the leader[4;19H[K[5;1HThis is the leader[5;19H[K[6;1HThis is the leader[6;19H[K[7;1HThis is the leader[7;19H[K[8;1HThis is the leader[8;19H[K[9;1HThis is the leader[9;19H[K[10;1HThis is the leader[10;19H[K[11;1HThis is the leader[11;19H[K[12;1HThis is the leader[12;19H[K[13;1HThis is the leader[13;19H[K[14;1HThis is the leader[14;19H[K[15;1HThis is the leader[15;19H[K[16;1HThis is the leader[16;19H[K[17;1HThis is the leader[17;19H[K[18;1HThis is the leader[18;19H[K[19;1HThis is the leader[19;19H[K[20;1HThis is the leader[20;19H[K[21;1HThis is the leader[21;19H[K[22;1HThis is the leader[22;19H[K[23;1HThis is the leader[23;19H[K[24;1HThis is the leader[24;19H[K[25;1HThis is the leader[25;19H[K[26;1HThis is the leader[26;19H[K[27;1HThis is the leader[27;19H[K[28;1HThis is the leader[28;19H[K[29;1HThis is the leader[29;19H[K[30;1HThis is the leader[30;19H[K[31;1HThis is the leader[31;19H[K[32;1HThis is the leader[32;19H[K[33;1HThis is the leader[33;19H[K[34;1HThis is the leader[34;19H[K[35;1HThis is the leader[35;19H[K[36;1HThis is the leader[36;19H[K[37;1HThis is the leader[37;19H[K[38;1HThis is the leader[38;19H[K[39;1HThis is the leader[39;19H[K[40;1HThis is the leader[40;19H[K[41;1HThis is the leader[41;19H[K[42;1HThis is the leader[42;19H[K[43;1HThis is the leader[43;19H[K[44;1HThis is the leader[44;19H[K[45;1HThis is the leader[45;19H[K[46;1HThis is the leader[46;19H[K[47;1HThis is the leader[47;19H[K[48;1HThis is the leader[48;19H[K[49;1HThis is the leader[49;19H[K[50;1HThis is the leader[50;19H[K[51;1HThis is the leader[51;19H[K[52;1HThis is the leader[52;19H[K[53;1HThis is the leader[53;19H[K[54;1HThis is the leader[54;19H[K[55;1HThis is the leader[55;19H[K[56;1HThis is the leader[56;19H[K[57;1HThis is the leader[57;19H[K[58;1HThis is the leader[58;19H[K[59;1HThis is the leader[59;19H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 18 characters written[1;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HThis 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[30;1H[?12l[?25h[?25l[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 19 characters appended[30;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HThis 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[?12l[?25h[?25l
:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 16 characters appended[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test42.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test42.in" 130 lines, 2368 characters[1;1HTest 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[11C" 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[22C" Ignore change from setting 'ff'
o[34m^V^@^[[m:set noeol
:w
:set ffs& nobinary[14C" Allow default test42.in format
:e #
:set ff=unix[20C" 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[22C" ! for when setting 'ff' is a change
o[34m^V^@^V^@^V^@^[[m: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[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for writing and reading a file starting with a BOM[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 111 lines, 2116 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:" --- 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&[15C" Write the file in default format
:w! test.out
:qa!
ENDTEST

latin-1
þþlatin-1
utf-8
ï»¿utf-8
utf-8-err
ï»¿utf-8[34m~@[merr
ucs-2
þÿ[34m^@[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[m
ucs-2le
ÿþu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m
ucs-4
[34m^@^@[mþÿ[34m^@^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[m
ucs-4le
ÿþ[34m^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[44;1H[?12l[?25h
[?25l[60;1H[m:so! Xdotest[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset encoding=utf-8[?25l[27m[23m[m[H[2J[1;1H:" --- 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&[15C" Write the file in default format
:w! test.out
:qa!
ENDTEST

latin-1
[34m<fe><fe>[mlatin-1
utf-8
[34m<feff>[mutf-8
utf-8-err
[34m<feff>[mutf-8[34m<80>[merr
ucs-2
[34m<fe><ff>^@[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[m
ucs-2le
[34m<ff><fe>[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m
ucs-4
[34m^@^@<fe><ff>^@^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[m
ucs-4le
[34m<ff><fe>^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[45;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hset fileencodings=ucs-bom,latin-1[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ff=unix ffs=unix           " This changes the file for DOS and MAC[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Write the test files[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^latin-1$/+1w! Xtest0[?25l"Xtest0" [60;10H[K[60;10H[New File] 1 line, 10 characters written[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^utf-8$/+1w! Xtest1[?25l"Xtest1" [60;10H[K[60;10H[New File] 1 line, 9 characters written[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^utf-8-err$/+1w! Xtest2[?25l"Xtest2" [60;10H[K[60;10H[New File] 1 line, 13 characters written[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^ucs-2$/+1w! Xtest3[?25l"Xtest3" [60;10H[K[60;10H[New File] 1 line, 14 characters written[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^ucs-2le$/+1w! Xtest4[?25l"Xtest4" [60;10H[K[60;10H[New File] 1 line, 17 characters written[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Need to add a NUL byte after the NL byte[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bin[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest4                      " Ignore change from setting 'ff'[?25l"Xtest4" [60;10H[K[60;10H1 line, 17 characters[1;1H[34m<ff><fe>[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h
[?25l[m[34m^@[m[2;3H[K[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noeol[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xtest4" [Incomplete last line] 2 lines, 18 characters written[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ffs& nobinary              " Allow default test42.in format[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he #[?25l"test42.in" [converted] 130 lines, 2385 characters[1;1H:" --- Check ucs-2le[1;21H[K[2;1H:e! Xtest4
:redir >>test.out[3;18H[K[4;1H:set fileencoding bomb?[4;24H[K[5;1H:redir END[5;11H[K[6;1H:set fenc=latin-1[6;18H[K[7;1H:w >>test.out[7;14H[K[8;1H:set fenc=ucs-2le[8;18H[K[9;1H:w! Xtest4x[9;12H[K[10;1H:"[10;3H[K[11;1H:" --- Check ucs-4[11;19H[K[12;1H:e! Xtest5[12;11H[K[13;1H:redir >>test.out[13;18H[K[14;1H:set fileencoding bomb?[14;24H[K[15;1H:redir END[15;11H[K[16;1H:set fenc=latin-1[16;18H[K[17;1H:w >>test.out[17;14H[K[18;1H:set fenc=ucs-4[18;16H[K[19;1H:w! Xtest5x[19;12H[K[20;1H:"[20;3H[K[21;1H:" --- Check ucs-4le[21;21H[K[22;1H:e! Xtest6[22;11H[K[23;1H:redir >>test.out[23;18H[K[24;1H:set fileencoding bomb?[24;24H[K[25;1H:redir END[25;11H[K[26;1H:set fenc=latin-1[26;18H[K[27;1H:w >>test.out[27;14H[K[28;1H:set fenc=ucs-4le[28;18H[K[29;1H:w! Xtest6x[29;12H[K[30;1H:"[30;3H[K[31;1H:" --- Check the files written with BOM[31;40H[K[32;1H:set bin[32;9H[K[33;1H:e! test.out[33;13H[K[34;1H:$r Xtest0x[34;12H[K[35;1H:$r Xtest1x[35;12H[K[36;1H:$r Xtest2x[36;12H[K[37;1H:$r Xtest3x[37;12H[K[38;1H:$r Xtest4x[38;12H[K[39;1H:$r Xtest5x[39;12H[K[40;1H:$r Xtest6x[40;12H[K[41;1H:set nobin ff&               " Write the file in default format[41;64H[K[42;1H:w! test.out[42;13H[K[43;1H:qa![43;5H[K[44;1HENDTEST[44;8H[K[45;1H[K[46;1Hlatin-1[46;8H[K[47;1HÃ¾Ã¾latin-1[47;10H[K[48;1Hutf-8[48;6H[K[49;1HÃ¯Â»Â¿utf-8[49;9H[K[50;1Hutf-8-err[50;10H[K[51;1HÃ¯Â»Â¿utf-8[34m<80>[merr[51;16H[K[52;1Hucs-2[52;6H[K[53;1HÃ¾Ã¿[34m^@[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[m[53;20H[K[54;1Hucs-2le[54;8H[K[55;1HÃ¿Ã¾u[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m[55;24H[K[56;1Hucs-4[56;6H[K[57;1H[34m^@^@[mÃ¾Ã¿[34m^@^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[m[57;48H[K[58;1Hucs-4le[58;8H[K[59;1HÃ¿Ã¾[34m^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[m[59;56H[K[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ff=unix                    " Format for files to write[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^ucs-4$/+1w! Xtest5[?25l"Xtest5" [60;10H[K[60;10H[converted][New File] 1 line, 30 characters written[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^ucs-4le$/+1w! Xtest6[?25l"Xtest6" [60;10H[K[60;10H[converted][New File] 1 line, 35 characters written[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Need to add three NUL bytes after the NL byte[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bin[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest6                      " ! for when setting 'ff' is a change[?25l"Xtest6" [60;10H[K[60;10H1 line, 33 characters[1;1H[34m<ff><fe>^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[m
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h
~   [?25l[m[34m^@^@^@[m[2;7H[K[2;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noeol[?25l[2;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xtest6" [Incomplete last line] 2 lines, 36 characters written[2;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nobin[?25l[2;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he #[?25l"test42.in" [converted] 130 lines, 2385 characters[1;1H:" --- Check ucs-2le[1;21H[K[2;1H:e! Xtest4
:redir >>test.out[3;18H[K[4;1H:set fileencoding bomb?[4;24H[K[5;1H:redir END[5;11H[K[6;1H:set fenc=latin-1[6;18H[K[7;1H:w >>test.out[7;14H[K[8;1H:set fenc=ucs-2le[8;18H[K[9;1H:w! Xtest4x[9;12H[K[10;1H:"[10;3H[K[11;1H:" --- Check ucs-4[11;19H[K[12;1H:e! Xtest5[12;11H[K[13;1H:redir >>test.out[13;18H[K[14;1H:set fileencoding bomb?[14;24H[K[15;1H:redir END[15;11H[K[16;1H:set fenc=latin-1[16;18H[K[17;1H:w >>test.out[17;14H[K[18;1H:set fenc=ucs-4[18;16H[K[19;1H:w! Xtest5x[19;12H[K[20;1H:"[20;3H[K[21;1H:" --- Check ucs-4le[21;21H[K[22;1H:e! Xtest6[22;11H[K[23;1H:redir >>test.out[23;18H[K[24;1H:set fileencoding bomb?[24;24H[K[25;1H:redir END[25;11H[K[26;1H:set fenc=latin-1[26;18H[K[27;1H:w >>test.out[27;14H[K[28;1H:set fenc=ucs-4le[28;18H[K[29;1H:w! Xtest6x[29;12H[K[30;1H:"[30;3H[K[31;1H:" --- Check the files written with BOM[31;40H[K[32;1H:set bin[32;9H[K[33;1H:e! test.out[33;13H[K[34;1H:$r Xtest0x[34;12H[K[35;1H:$r Xtest1x[35;12H[K[36;1H:$r Xtest2x[36;12H[K[37;1H:$r Xtest3x[37;12H[K[38;1H:$r Xtest4x[38;12H[K[39;1H:$r Xtest5x[39;12H[K[40;1H:$r Xtest6x[40;12H[K[41;1H:set nobin ff&               " Write the file in default format[41;64H[K[42;1H:w! test.out[42;13H[K[43;1H:qa![43;5H[K[44;1HENDTEST[44;8H[K[45;1H[K[46;1Hlatin-1[46;8H[K[47;1HÃ¾Ã¾latin-1[47;10H[K[48;1Hutf-8[48;6H[K[49;1HÃ¯Â»Â¿utf-8[49;9H[K[50;1Hutf-8-err[50;10H[K[51;1HÃ¯Â»Â¿utf-8[34m<80>[merr[51;16H[K[52;1Hucs-2[52;6H[K[53;1HÃ¾Ã¿[34m^@[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[m[53;20H[K[54;1Hucs-2le[54;8H[K[55;1HÃ¿Ã¾u[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m[55;24H[K[56;1Hucs-4[56;6H[K[57;1H[34m^@^@[mÃ¾Ã¿[34m^@^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[m[57;48H[K[58;1Hucs-4le[58;8H[K[59;1HÃ¿Ã¾[34m^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[m[59;56H[K[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check that editing a latin-1 file doesn't see a BOM[?25l[45;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest0[?25l"Xtest0" [60;10H[K[60;10H[converted] 1 line, 12 characters[1;1HÃ¾Ã¾latin-1[1;10H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir! >test.out[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileencoding bomb?[?25l[60;1H[K[60;1H  fileencoding=latin1
nobomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1HÃ¾Ã¾latin-1
[1m[34m~                                                                                                 [m[60;3H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H[converted] 1 line, 12 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bomb fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest0x[?25l"Xtest0x" [60;11H[K[60;11H[converted][New File] 1 line, 12 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check utf-8[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest1[?25l"Xtest1" [60;10H[K[60;10H1 line, 9 characters[1;1Hutf-8[1;6H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileencoding bomb?[?25l[60;1H[K[60;1H  fileencoding=utf-8
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hutf-8
[1m[34m~                                                                                                 [m[60;3H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H[converted] 1 line, 6 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fenc=utf-8[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest1x[?25l"Xtest1x" [60;11H[K[60;11H[New File] 1 line, 9 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check utf-8 with an error (will fall back to latin-1)[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest2[?25l"Xtest2" [60;10H[K[60;10H[converted] 1 line, 17 characters[1;1HÃ¯Â»Â¿utf-8[34m<80>[merr[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileencoding bomb?[?25l[60;1H[K[60;1H  fileencoding=latin1
nobomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1HÃ¯Â»Â¿utf-8[34m<80>[merr
[1m[34m~                                                                                                 [m[60;3H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H[converted] 1 line, 17 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fenc=utf-8[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest2x[?25l"Xtest2x" [60;11H[K[60;11H[New File] 1 line, 17 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check ucs-2[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest3[?25l"Xtest3" [60;10H[K[60;10H[converted] 1 line, 8 characters[1;1Hucs-2[1;6H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileencoding bomb?[?25l[60;1H[K[60;1H  fileencoding=utf-16
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-2
[1m[34m~                                                                                                 [m[60;3H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H[converted] 1 line, 6 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fenc=ucs-2[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest3x[?25l"Xtest3x" [60;11H[K[60;11H[converted][New File] 1 line, 8 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check ucs-2le[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest4[?25l"Xtest4" [60;10H[K[60;10H[converted] 1 line, 10 characters[1;6Hle[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileencoding bomb?[?25l[60;1H[K[60;1H  fileencoding=utf-16le
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-2le
[1m[34m~                                                                                                 [m[60;3H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H[converted] 1 line, 8 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fenc=ucs-2le[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest4x[?25l"Xtest4x" [60;11H[K[60;11H[converted][New File] 1 line, 10 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check ucs-4[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest5[?25l"Xtest5" [60;10H[K[60;10H[converted] 1 line, 10 characters[1;5H4[1;6H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileencoding bomb?[?25l[60;1H[K[60;1H  fileencoding=ucs-4
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-4
[1m[34m~                                                                                                 [m[60;3H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H[converted] 1 line, 6 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fenc=ucs-4[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest5x[?25l"Xtest5x" [60;11H[K[60;11H[converted][New File] 1 line, 10 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check ucs-4le[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest6[?25l"Xtest6" [60;10H[K[60;10H[converted] 1 line, 12 characters[1;6Hle[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileencoding bomb?[?25l[60;1H[K[60;1H  fileencoding=ucs-4le
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-4le
[1m[34m~                                                                                                 [m[60;3H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H[converted] 1 line, 8 characters appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fenc=ucs-4le[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtest6x[?25l"Xtest6x" [60;11H[K[60;11H[converted][New File] 1 line, 12 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check the files written with BOM[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bin[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! test.out[?25l"test.out" [60;12H[K[60;12H35 lines, 275 characters[1;1H[K[2;1H[K[3;1H  fileencoding=latin1[3;22H[K[4;1Hnobomb[4;7H[K[5;1H[34m<fe><fe>[mlatin-1[5;16H[K[6;1H[K[7;1H[K[8;1H  fileencoding=utf-8[8;21H[K[9;1H  bomb[9;7H[K[10;1Hutf-8[10;6H[K[11;1H[K[12;1H[K[13;1H  fileencoding=latin1[13;22H[K[14;1Hnobomb[14;7H[K[15;1H[34m<feff>[mutf-8[34m<80>[merr[15;19H[K[16;1H[K[17;1H[K[18;1H  fileencoding=utf-16[18;22H[K[19;1H  bomb[19;7H[K[20;1Hucs-2[20;6H[K[21;1H[K[22;1H[K[23;1H  fileencoding=utf-16le[23;24H[K[24;1H  bomb[24;7H[K[25;1Hucs-2le[25;8H[K[26;1H[K[27;1H[K[28;1H  fileencoding=ucs-4[28;21H[K[29;1H  bomb[29;7H[K[30;1Hucs-4[30;6H[K[31;1H[K[32;1H[K[33;1H  fileencoding=ucs-4le[33;23H[K[34;1H  bomb[34;7H[K[35;1Hucs-4le[35;8H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtest0x[?25l"Xtest0x" [60;11H[K[60;11H1 line, 10 characters[36;1H[34m<fe><fe>[mlatin-1[36;16H[K[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtest1x[?25l"Xtest1x" [60;11H[K[60;11H1 line, 9 characters[37;1H[34m<feff>[mutf-8[37;12H[K[37;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtest2x[?25l"Xtest2x" [60;11H[K[60;11H1 line, 17 characters[38;1HÃ¯Â»Â¿utf-8[34m<80>[merr[38;16H[K[38;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtest3x[?25l"Xtest3x" [60;11H[K[60;11H1 line, 14 characters[39;1H[34m<fe><ff>^@[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[m[39;26H[K[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtest4x[?25l"Xtest4x" [60;11H[K[60;11H[Incomplete last line] 2 lines, 18 characters[40;1H[34m<ff><fe>[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m[40;30H[K[41;1H[34m^@[m[41;3H[K[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtest5x[?25l"Xtest5x" [60;11H[K[60;11H1 line, 28 characters[42;1H[34m^@^@<fe><ff>^@^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[m[42;54H[K[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$r Xtest6x[?25l"Xtest6x" [60;11H[K[60;11H[Incomplete last line] 2 lines, 36 characters[43;1H[34m<ff><fe>^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[m[43;62H[K[44;1H[34m^@^@^@[m[44;7H[K[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nobin ff&               " Write the file in default format[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H44 lines, 409 characters written[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test43.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test43.in" 34 lines, 473 characters[1;1HTests 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

[1m[34m~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for regexp with various magic settings.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 19 lines, 268 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[23;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[24;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^1[?25l[25;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25ha*b\{2}c\+/e[?25l[25;17H[?12l[?25h[?25l[25;17H[K[25;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\Md\*e\{2}f\+/e[?25l[26;17H[?12l[?25h[?25l[26;17H[K[26;16H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nomagic[?25l[26;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hg\*h\{2}i\+/e[?25l[27;17H[?12l[?25h[?25l[27;17H[K[27;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\mj*k\{2}l\+/e[?25l[28;17H[?12l[?25h[?25l[28;17H[K[28;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\vm*n{2}o+/e[?25l[29;17H[?12l[?25h[?25l[29;17H[K[29;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\V^aa$[?25l[30;5H[?12l[?25h[?25laa$ x[30;10H[K[30;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic[?25l[30;5H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\v(a)(b)\2\1\1/e[?25l[31;14H[?12l[?25h[?25l[31;14H[K[31;13H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\V[ab]\(\[xy]\)\1[?25l[32;7H[?12l[?25h[?25lab]x[32;12H[K[32;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$[?25l[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset undolevels=100[?25l[34;1H[?12l[?25h[?25l[60;1H[K[60;1H?[?12l[?25hbar?[?25l[60;5H[K[60;1H[33;6H[K[34;1H[1m[34m~                                                                                                 [33;5H[?12l[?25h[?25l[m[60;1H1 more line; before #2  0 seconds ago[33;6Hbar[34;1H[K[33;6H[?12l[?25h[?25l[34;59r[34;1H[L[1;60r[34;1H9 foo[60;1H[K[34;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h?^1?,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New] 11L, 137C written[34;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test44.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test44.in" 66 lines, 2543 characters[1;1HTests for regexp with multi-byte encoding and various magic settings.
Test matchstr() with a count and multi-byte chars.

STARTTEST
:so mbyte.vim
:set nocompatible encoding=utf-8 termencoding=latin1 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:" Now search for multi-byte without composing char
/à¸¡
x:" Now search for multi-byte with composing char
/à¸¡à¹[34m~H[m
x:" find word by change of word class
/ã[34m~A[m¡\<ã[34m~B[m«ã[34m~C[m¨\>ã[34m~A[m¯
x:" Test \%u, [\u] and friends
/\%u20ac
x/[\u4f7f\u5929]\+
x/\%U12345678
x/[\U1234abcd\u1234\uabcd]
x/\%d21879b
x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K==[31;1H]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=VV[32;1H=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e
x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k==[34;1H]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=vv[35;1H=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e
x:" Test backwards search from a multi-byte char
/x
x?.
x:let @w=':%s#comb[i]nations#Å[34m~S[mÌ[34m~D[má¹£Ì[34m~A[mmÌ¥Ì[34m~D[mÎ±Ì[34m~D[mÌ[34m~F[mÌ[34m~A[m#g'
:@w
:?^1?,$w! test.out
:e! test.out
G:put =matchstr(\"×[34m~P[m×[34m~Q[m×[34m~R[m×[34m~S[m\", \".\", 0, 2) " ×[34m~Q[m
:put =matchstr(\"×[34m~P[m×[34m~Q[m×[34m~R[m×[34m~S[m\", \"..\", 0, 2) " ×[34m~Q[m×[34m~R[m
:put =matchstr(\"×[34m~P[m×[34m~Q[m×[34m~R[m×[34m~S[m\", \".\", 0, 0) " ×[34m~P[m
:put =matchstr(\"×[34m~P[m×[34m~Q[m×[34m~R[m×[34m~S[m\", \".\", 4, -1) " ×[34m~R[m
:w!
:qa!
ENDTEST

1 a aa abb abbccc
2 d dd dee deefff
3 g gg ghh ghhiii
4 j jj jkk jkklll
5 m mm mnn mnnooo
6 x ^aa$ x
7 (a)(b) abbaa
8 axx [ab]xx
9 à¸«à¸¡à¹[34m~H[mx à¸­à¸¡x[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for regexp with multi-byte encoding and various magic settings.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 40 lines, 1352 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[49;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo[?25l[27m[23m[m[H[2J[1;1HTests for regexp with multi-byte encoding and various magic settings.
Test matchstr() with a count and multi-byte chars.

STARTTEST
:so mbyte.vim
:set nocompatible encoding=utf-8 termencoding=latin1 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:" 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
/\%u20ac
x/[\u4f7f\u5929]\+
x/\%U12345678
x/[\U1234abcd\u1234\uabcd]
x/\%d21879b
x/ [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K==[31;1H]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=VV[32;1H=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e
x/ [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k==[34;1H]]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=vv[35;1H=]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e
x:" Test backwards search from a multi-byte char
/x
x?.
x:let @w=':%s#comb[i]nations#¿¿m¿#g'
:@w
:?^1?,$w! test.out
:e! test.out
G:put =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿
:put =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿
:put =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿
:put =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿
:w!
:qa!
ENDTEST

1 a aa abb abbccc
2 d dd dee deefff
3 g gg ghh ghhiii
4 j jj jkk jkklll
5 m mm mnn mnnooo
6 x ^aa$ x
7 (a)(b) abbaa
8 axx [ab]xx
9 ¿¿x ¿¿x[50;1H[?12l[?25h[?25l[60;1H/[?12l[?25h^1[?25l[51;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25ha*b\{2}c\+/e[?25l[51;17H[?12l[?25h[?25l[51;17H[K[51;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\Md\*e\{2}f\+/e[?25l[52;17H[?12l[?25h[?25l[52;17H[K[52;16H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nomagic[?25l[52;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hg\*h\{2}i\+/e[?25l[53;17H[?12l[?25h[?25l[53;17H[K[53;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\mj*k\{2}l\+/e[?25l[54;17H[?12l[?25h[?25l[54;17H[K[54;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\vm*n{2}o+/e[?25l[55;17H[?12l[?25h[?25l[55;17H[K[55;16H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\V^aa$[?25l[56;5H[?12l[?25h[?25laa$ x[56;10H[K[56;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic[?25l[56;5H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\v(a)(b)\2\1\1/e[?25l[57;14H[?12l[?25h[?25l[57;14H[K[57;13H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\V[ab]\(\[xy]\)\1[?25l[58;7H[?12l[?25h[?25lab]x[58;12H[K[58;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Now search for multi-byte without composing char[?25l[58;7H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h¿[?25l[59;8H[?12l[?25h[?25lx[59;9H[K[59;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Now search for multi-byte with composing char[?25l[59;8H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h¿¿[?25l[1;59r[59;1H
[1;60r[59;1Ha ¿¿x ¿¿x[60;1H[K[59;8H[?12l[?25h[?25lx[59;9H[K[59;8H[?12l[?25h[?25l
:[?12l[?25h" find word by change of word class[?25l[59;8H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h¿?\<¿?¿?\>¿?[?25l[1;59r[59;1H
[1;60r[59;1Hb ¿?¿?¿?¿?[60;1H[K[59;3H[?12l[?25h[?25l¿?¿?¿?[59;9H[K[59;3H[?12l[?25h[?25l
:[?12l[?25h" Test \%u, [\u] and friends[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\%u20ac[?25l[1;59r[59;1H
[1;60r[59;1Hc x ¬¿x[60;1H[K[59;6H[?12l[?25h[?25lx[59;7H[K[59;6H[?12l[?25h[?25l
/[?12l[?25h[\u4f7f\u5929]\+[?25l[1;59r[59;1H
[1;60r[59;1Hd ¿?¿?x[60;1H[K[59;3H[?12l[?25h[?25l¿?x [59;7H[K[59;3H[?12l[?25h[?25l
/[?12l[?25h\%U12345678[?25l[1;59r[59;1H
[1;60r[59;1He ¿y[60;1H[K[59;3H[?12l[?25h[?25ly[59;4H[K[59;3H[?12l[?25h[?25l
/[?12l[?25h[\U1234abcd\u1234\uabcd][?25l[1;59r[59;1H
[1;60r[59;1Hf ¿z[60;1H[K[59;3H[?12l[?25h[?25lz[59;4H[K[59;3H[?12l[?25h[?25l
/[?12l[?25h\%d21879b[?25l[1;59r[59;1H
[1;60r[59;1Hg a¿?bb[60;1H[K[59;4H[?12l[?25h[?25lbb[59;6H[K[59;4H[?12l[?25h[?25l
/[?12l[?25h [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K=
[59;98H][60;1H]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=V
[59;98H=[60;1H]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e[?25l[58;1H[1m[37m[41mE868: Error building NFA with equivalence class![m[58;49H[K[59;1H[K[60;1H[K[59;1H[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[2L[?25l[1;1H/g\*h\{2}i\+/e
x/\mj*k\{2}l\+/e
x/\vm*n{2}o+/e
x/\V^aa$[4;9H[K[5;2H:set magic[5;12H[K[6;1H/\v(a)(b)\2\1\1/e
x/\V[ab]\(\[xy]\)\1
x:" Now search for multi-byte without composing char
/¿[9;3H[K[10;2H:" Now search for multi-byte with composing char
/¿[11;3H[K[12;1Hx:" find word by change of word class
/¿?\<¿?¿?\>¿?[13;14H[K[14;1Hx:" Test \%u, [\u] and friends
/\%u20ac[15;10H[K[16;1Hx/[\u4f7f\u5929]\+
x/\%U12345678[17;15H[K[18;1Hx/[\U1234abcd\u1234\uabcd]
x/\%d21879b[19;12H[K[20;3H [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K==[21;1H]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=VV[22;1H=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e[23;7Ha[8Cb[8Cc[8Cd[8Ce[8Cf[8Cg[8Ch[8Ci[8Cj[8Ck==[24;1H]]* [[=l[8Cm[8Cn[8Co[8Cp[8Cq[8Cr[8Cs[8Ct[8Cu[8Cvv[25;1H=[7Cw[8Cx[8Cy[8Cz
x:" Test backwards search from a multi-byte char[26;49H[K[27;1H/x[27;3H[K[28;1Hx?.[28;4H[K[29;3Hlet @w=':%s#comb[i]nations#¿¿m¿#g'[29;37H[K[30;1H:@w
:?^1?,$w! test.out
:e! test.out[32;13H[K[33;1HG:put =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿
:put =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿
:put =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿
:put =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿
:w![37;4H[K[38;2Hqa![38;6H[K[39;1HENDTEST[39;8H[K[40;1H[K[41;1H1 a aa abb abbcc
2 d dd dee deeff
3 g gg ghh ghhii
4 j jj jkk jkkll
5 m mm mnn mnnoo
6 x aa$ x[46;10H[K[47;1H7 (a)(b) abba[47;14H[K[48;1H8 axx ab]xx[48;12H[K[49;1H9 ¿¿x ¿x[49;9H[K[50;1Ha ¿¿x ¿x[50;10H[K[51;1Hb ¿?¿?¿?[51;9H[K[52;1Hc x ¬x[52;7H[K[53;1Hd ¿?[53;7H[K[54;1He y [54;5H[K[55;1Hf z[55;5H[K[56;1Hg abb
h AÀÁÂÃÄÅ¿¿¿¿¿¿¿ B¿¿ CÇ¿¿¿¿ D¿¿¿¿¿ EÈÉÊË¿¿¿¿¿¿¿ F¿ G¿¿¿¿¿¿¿¿ H¿¿¿¿¿ IÌÍÎÏ¿¿¿¿¿¿¿ J¿ K¿¿¿¿ L¿¿¿¿¿¿  [58;1HM¿¿ NÑ¿¿¿¿¿ OÒÓÔÕÖØ¿¿¿¿¿¿¿¿ P¿¿ Q R¿¿¿¿¿ S¿¿¿¿¿ T¿¿¿¿¿ UÙÚÛÜ¿¿¿¿¿¿¿¿¿ V¿ W¿¿¿¿¿ X¿¿ YÝ¿¿¿¿¿¿ Z¿¿¿¿ [59;1H¿¿[59;3H[K[60;1H[K[59;2H[?12l[?25h[?25l[59;2H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h [[=a=]]* [[=b=]]* [[=c=]]* [[=d=]]* [[=e=]]* [[=f=]]* [[=g=]]* [[=h=]]* [[=i=]]* [[=j=]]* [[=k=
[59;98H][60;1H]* [[=l=]]* [[=m=]]* [[=n=]]* [[=o=]]* [[=p=]]* [[=q=]]* [[=r=]]* [[=s=]]* [[=t=]]* [[=u=]]* [[=v
[59;98H=[60;1H]]* [[=w=]]* [[=x=]]* [[=y=]]* [[=z=]]*/e[?25l[58;1H[1m[37m[41mE868: Error building NFA with equivalence class![m[58;49H[K[59;1H[K[60;1H[K[59;1H[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[2L[?25l[1;1Hx/\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
/¿[6;3H[K[7;2H:" Now search for multi-byte with composing char
/¿[8;3H[K[9;1Hx:" find word by change of word class
/¿?\<¿?¿?\>¿?[10;14H[K[11;1Hx:" Test \%u, [\u] and friends
/\%u20ac[12;10H[K[13;1Hx/[\u4f7f\u5929]\+
x/\%U12345678[14;15H[K[15;1Hx/[\U1234abcd\u1234\uabcd]
x/\%d21879b[16;12H[K[17;3H [[=A=]]* [[=B=]]* [[=C=]]* [[=D=]]* [[=E=]]* [[=F=]]* [[=G=]]* [[=H=]]* [[=I=]]* [[=J=]]* [[=K==[18;1H]]* [[=L=]]* [[=M=]]* [[=N=]]* [[=O=]]* [[=P=]]* [[=Q=]]* [[=R=]]* [[=S=]]* [[=T=]]* [[=U=]]* [[=VV[19;1H=]]* [[=W=]]* [[=X=]]* [[=Y=]]* [[=Z=]]*/e[20;7Ha[8Cb[8Cc[8Cd[8Ce[8Cf[8Cg[8Ch[8Ci[8Cj[8Ck==[21;1H]]* [[=l[8Cm[8Cn[8Co[8Cp[8Cq[8Cr[8Cs[8Ct[8Cu[8Cvv[22;1H=[7Cw[8Cx[8Cy[8Cz
x:" Test backwards search from a multi-byte char[23;49H[K[24;1H/x[24;3H[K[25;1Hx?.[25;4H[K[26;3Hlet @w=':%s#comb[i]nations#¿¿m¿#g'[26;37H[K[27;1H:@w
:?^1?,$w! test.out
:e! test.out[29;13H[K[30;1HG:put =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿
:put =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿
:put =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿
:put =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿
:w![34;4H[K[35;2Hqa![35;6H[K[36;1HENDTEST[36;8H[K[37;1H[K[38;1H1 a aa abb abbcc
2 d dd dee deeff
3 g gg ghh ghhii
4 j jj jkk jkkll
5 m mm mnn mnnoo
6 x aa$ x[43;10H[K[44;1H7 (a)(b) abba[44;14H[K[45;1H8 axx ab]xx[45;12H[K[46;1H9 ¿¿x ¿x[46;9H[K[47;1Ha ¿¿x ¿x[47;10H[K[48;1Hb ¿?¿?¿?[48;9H[K[49;1Hc x ¬x[49;7H[K[50;1Hd ¿?[50;7H[K[51;1He y [51;5H[K[52;1Hf z[52;5H[K[53;1Hg abb
h AÀÁÂÃÄÅ¿¿¿¿¿¿¿ B¿¿ CÇ¿¿¿¿ D¿¿¿¿¿ EÈÉÊË¿¿¿¿¿¿¿ F¿ G¿¿¿¿¿¿¿¿ H¿¿¿¿¿ IÌÍÎÏ¿¿¿¿¿¿¿ J¿ K¿¿¿¿ L¿¿¿¿¿¿  [55;1HM¿¿ NÑ¿¿¿¿¿ OÒÓÔÕÖØ¿¿¿¿¿¿¿¿ P¿¿ Q R¿¿¿¿¿ S¿¿¿¿¿ T¿¿¿¿¿ UÙÚÛÜ¿¿¿¿¿¿¿¿¿ V¿ W¿¿¿¿¿ X¿¿ YÝ¿¿¿¿¿¿ Z¿¿¿¿ [56;1H¿[56;3H[K[57;1Hi aàáâãäå¿¿¿¿¿¿¿ b¿¿ cç¿¿¿¿ d¿¿¿¿¿ eèéêë¿¿¿¿¿¿¿ f¿ g¿¿¿¿¿¿¿¿ h¿¿¿¿¿¿ iìíîï¿¿¿¿¿¿ j¿¿ k¿¿¿¿ l¿¿¿¿¿¿ [58;1H m¿¿ nñ¿¿¿¿¿¿ oòóôõöø¿¿¿¿¿¿¿¿ p¿¿ q r¿¿¿¿¿ s¿¿¿¿¿ t¿¿¿¿¿¿ uùúûü¿¿¿¿¿¿¿¿¿ v¿ w¿¿¿¿¿¿ x¿¿ yýÿ¿¿¿¿¿¿  [59;1Hz¿¿¿¿¿¿[60;1H[K[59;7H[?12l[?25h[?25l[59;7H[K[59;6H[?12l[?25h[?25l
:[?12l[?25h" Test backwards search from a multi-byte char[?25l[59;6H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hx[?25l[1;59r[59;1H
[1;60r[59;1Hj 0123¿x[60;1H[K[59;8H[?12l[?25h[?25l[59;8H[K[59;7H[?12l[?25h[?25l
?[?12l[?25h.[?25l[59;6H[?12l[?25h[?25l¿[59;7H[K[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @w=':%s#comb[i]nations#¿¿¿¿mmm¿¿¿[1C#g'[?25l[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h@w[?25l[1;59r[59;1H
[1;60r[59;1Hk ¿¿m¿[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h?^1?,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New] 20L, 1011C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! test.out[?25l"test.out" [60;12H[K[60;12H20L, 1011C[1;1H1 a aa abb abbcc[1;17H[K[2;1H2 d dd dee deeff[2;17H[K[3;1H3 g gg ghh ghhii[3;17H[K[4;1H4 j jj jkk jkkll
5 m mm mnn mnnoo[5;17H[K[6;1H6 x aa$ x
7 (a)(b) abba[7;15H[K[8;1H8 axx ab]xx[8;12H[K[9;1H9 ¿¿x ¿x[9;10H[K[10;1Ha ¿¿x ¿x
b ¿?¿?¿?[11;9H[K[12;1Hc x ¬x[12;7H[K[13;1Hd ¿?x[13;6H[K[14;1He y[14;4H[K[15;1Hf z[15;4H[K[16;1Hg abb[16;6H[K[17;1Hh AÀÁÂÃÄÅ¿¿¿¿¿¿¿ B¿¿ CÇ¿¿¿¿ D¿¿¿¿¿ EÈÉÊË¿¿¿¿¿¿¿ F¿ G¿¿¿¿¿¿¿¿ H¿¿¿¿¿ IÌÍÎÏ¿¿¿¿¿¿¿ J¿ K¿¿¿¿ L¿¿¿¿¿¿  [18;1HM¿¿ NÑ¿¿¿¿¿ OÒÓÔÕÖØ¿¿¿¿¿¿¿¿ P¿¿ Q R¿¿¿¿¿ S¿¿¿¿¿ T¿¿¿¿¿ UÙÚÛÜ¿¿¿¿¿¿¿¿¿ V¿ W¿¿¿¿¿ X¿¿ YÝ¿¿¿¿¿¿ Z¿¿¿¿ [19;1H¿[19;2H[K[20;1Hi aàáâãäå¿¿¿¿¿¿¿ b¿¿ cç¿¿¿¿ d¿¿¿¿¿ eèéêë¿¿¿¿¿¿¿ f¿ g¿¿¿¿¿¿¿¿ h¿¿¿¿¿¿ iìíîï¿¿¿¿¿¿ j¿¿ k¿¿¿¿ l¿¿¿¿¿¿ [21;1H m¿¿ nñ¿¿¿¿¿¿ oòóôõöø¿¿¿¿¿¿¿¿ p¿¿ q r¿¿¿¿¿ s¿¿¿¿¿ t¿¿¿¿¿¿ uùúûü¿¿¿¿¿¿¿¿¿ v¿ w¿¿¿¿¿¿ x¿¿ yýÿ¿¿¿¿¿¿  [22;1Hz¿¿¿¿¿
j 012¿
k ¿¿m¿[24;7H[K[25;1H[1m[34m~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[24;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿[?25l[25;1H¿[25;2H[K[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿[?25l[26;1H¿¿[26;3H[K[26;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿[?25l[27;1H¿[27;2H[K[27;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿[?25l[28;1H¿[28;2H[K[28;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw![?25l"test.out" 24L, 1025C written[28;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test45.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test45.in" 80 lines, 1824 characters[1;1HTests for folding. vim: set ft=vim :

STARTTEST
:so small.vim
:" 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{{ [34m^[[mr{jj:call append("$", foldlevel("."))
kYpj:call append("$", foldlevel("."))
:" test folding with indent
:set fdm=indent sw=2
/^2 b
i  [34m^[[mjI    [34m^[[m:call append("$", "indent " . foldlevel("."))
k:call append("$", foldlevel("."))
:" 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  [34m^[[mAcommentend[34m^[[m:set fdl=1
3j:call append("$", getline("."))
:set fdl=0
zO[34m^L[mj: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("."))[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for folding. vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 63 lines, 1691 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[8M[1;60r[52;1H/ii$
:call append("$", foldlevel("."))
/kk$
:call append("$", foldlevel("."))
:/^last/+1,$w! test.out
:delfun Flvl
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" We also need the +syntax feature here.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has("syntax")[?25l
:  [?12l[?25h   e! test.ok
[?25l:  [?12l[?25h   w! test.out
[?25l:  [?12l[?25h   qa!
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:endif
:" basic test if a fold can be created, opened, moving to the end and closed
/^1
zf2j:call append("$", "manual " . getline(foldclosed(".")))[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h" basic test if a fold can be created, opened, moving to the end and closed[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^1[?25l[1;59r[59;1H
[1;60r[59;1H1 aa[60;1H[K[59;1H[?12l[?25h[?25l[34m[47m+--  3 lines: 1 aa--------------------------------------------------------------------------------[59;1H[?12l[?25h[?25l
[m:[?12l[?25hcall append("$", "manual " . getline(foldclosed(".")))[?25l[59;1H[?12l[?25h[?25l1 aa[59;5H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", foldclosed("."))[?25l[59;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1H2 bb
3 cc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hcall append("$", getline("."))[?25l[59;1H[?12l[?25h[?25l[57;1H[34m[47m+--  3 lines: 1 aa--------------------------------------------------------------------------------[m[58;1H4 dd {{{
5 ee {{{ }}}[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", getline(foldclosed(".")))[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test folding with markers.[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fdm=marker fdl=1 fdc=3[?25l[1;1H[34m[47m   [mzf2j:call append("$", "manual " . getline(foldclosed(".")))
[34m[47m   [mzo:call append("$", foldclosed("."))
[34m[47m   [m]z:call append("$", getline("."))
[34m[47m   [mzc:call append("$", getline(foldclosed(".")))
[34m[47m   [m:" test folding with markers.
[34m[47m   [m:set fdm=marker fdl=1 fdc=3
[34m[47m   [m/^5
[34m[47m   [m:call append("$", "marker " . foldlevel("."))
[34m[47m   [m[z:call append("$", foldlevel("."))
[34m[47m   [mjo{{ [34m^[[mr{jj:call append("$", foldlevel("."))
[34m[47m   [mkYpj:call append("$", foldlevel("."))
[34m[47m   [m:" test folding with indent
[34m[47m   [m:set fdm=indent sw=2
[34m[47m   [m/^2 b
[34m[47m   [mi  [34m^[[mjI    [34m^[[m:call append("$", "indent " . foldlevel("."))
[34m[47m   [mk:call append("$", foldlevel("."))
[34m[47m   [m:" test syntax folding
[34m[47m   [m:set fdm=syntax fdl=0
[34m[47m   [m:syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3
[34m[47m   [m:syn region Fd1 start="ee" end="ff" fold contained
[34m[47m   [m:syn region Fd2 start="gg" end="hh" fold contained
[34m[47m   [m:syn region Fd3 start="commentstart" end="commentend" fold contained
[34m[47m   [mGzk:call append("$", "folding " . getline("."))
[34m[47m   [mk:call append("$", getline("."))
[34m[47m   [mjAcommentstart  [34m^[[mAcommentend[34m^[[m:set fdl=1
[34m[47m   [m3j:call append("$", getline("."))
[34m[47m   [m:set fdl=0
[34m[47m   [mzO[34m^L[mj:call append("$", getline("."))
[34m[47m   [m:" test expression folding
[34m[47m   [m:fun Flvl()
[34m[47m   [m  let l = getline(v:lnum)
[34m[47m   [m  if l =~ "bb$"
[34m[47m   [m    return 2
[34m[47m   [m  elseif l =~ "gg$"
[34m[47m   [m    return "s1"
[34m[47m   [m  elseif l =~ "ii$"
[34m[47m   [m    return ">2"
[34m[47m   [m  elseif l =~ "kk$"
[34m[47m   [m    return "0"
[34m[47m   [m  endif
[34m[47m   [m  return "="
[34m[47m   [mendfun
[34m[47m   [m:set fdm=expr fde=Flvl()
[34m[47m   [m/bb$
[34m[47m   [m:call append("$", "expr " . foldlevel("."))
[34m[47m   [m/hh$
[34m[47m   [m:call append("$", foldlevel("."))
[34m[47m   [m/ii$
[34m[47m   [m:call append("$", foldlevel("."))
[34m[47m   [m/kk$
[34m[47m   [m:call append("$", foldlevel("."))
[34m[47m   [m:/^last/+1,$w! test.out
[34m[47m   [m:delfun Flvl
[34m[47m   [m:qa!
[34m[47m   [mENDTEST
[34m[47m   
   [m1 aa[57;8H[K[58;1H[34m[47m   [m2 bb[58;8H[K[59;1H[34m[47m   [m3 cc[59;8H[K[59;4H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^5[?25l[1;4H]z:call append("$", getline("."))[1;38H[K[2;5Hc[18Cgetline(foldclosed(".")))[3;4H:" test folding with markers.[3;33H[K[4;4H:set fdm=marker fdl=1 fdc=3[4;31H[K[5;4H/^5[5;7H[K[6;5Hcall append("$", "marker " . foldlevel("."))[7;4H[z:call append("$", foldlevel("."))[8;4Hjo{{ [34m^[[mr{jj:call append("$", foldlevel(".")[8;48H[K[9;4HkYpj:call append("$", foldlevel("."))[10;4H:" test folding with indent[10;31H[K[11;4H:set fdm=indent sw=2[11;24H[K[12;4H/^2 b[12;9H[K[13;4Hi  [34m^[[mjI    [34m^[[m:call append("$", "indent " . foldlevel("."))[14;4Hk:call append("$", foldlevel("."))[15;4H:" test syntax folding[15;26H[K[16;4H:set fdm=syntax fdl=0[16;25H[K[17;5Hsyn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3[18;6Hyn region Fd1 start="ee" end="ff" fold contained[19;16HFd2[8Cgg[7Chh[14Ced[19;54H[K[20;18H3[8Ccommentstart" end="commentend" fold contained[21;4HGzk:call append("$", "folding " . getline("."))[21;51H[K[22;4Hk:call append("$", getline("."))[22;36H[K[23;4HjAcommentstart  [34m^[[mAcommentend[34m^[[m:set fdl=1[23;45H[K[24;4H3j:call append("$", getline("."))[25;4H:set fdl=0[25;14H[K[26;4HzO[34m^L[mj:call append("$", getline("."))[27;5H" test expression folding[28;4H:fun Flvl()[28;15H[K[29;4H  let l = getline(v:lnum)[29;29H[K[30;4H  if l =~ "bb$"[31;6H  return 2[31;16H[K[32;6Helseif l =~ "gg$"[33;15H"s1"[34;19Hii[35;16H>2[36;19Hkk[37;16H0"[37;18H[K[38;7Hndif[38;11H[K[39;6Hreturn "=[39;16H[K[40;4Hendfun[40;10H[K[41;4H:set fdm=expr fde=Flvl()[42;4H/bb$[42;8H[K[43;5Hcall append("$", "expr " . foldlevel("."))[44;5Hhh[45;22Hfoldlevel("."))[45;37H[K[46;5Hii[48;5Hkk[50;4H:/^last/+1,$w! test.out[51;5Hdelfun Flvl[51;16H[K[52;5Hqa![52;8H[K[53;4HENDTEST[53;12H[K[54;4H[K[55;4H1 aa[55;8H[K[56;4H2 bb[57;4H3 cc
[34m[47m-[m[2C4 dd {{{
[34m[47m|-[m[1C5 ee {{{ }}}[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", "marker " . foldlevel("."))[?25l[59;4H[?12l[?25h[58;4H[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[58;4H[?12l[?25h[59;4H[?25l[1;59r[59;1H
[1;60r[59;1H[34m[47m|  [m{{[60;1H[K[59;6H[?12l[?25h[?25l[59;2H[34m[47m-[m[3C{[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[34m[47m|| [m6 ff }}}[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[34m[47m|  [m7 gg[?12l[?25h[?25l
:[?12l[?25hcall append("$", foldlevel("."))[?25l[59;6H[?12l[?25h[58;6H[?25l[59;4H6 ff }}}[59;4H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[34m[47m   [m7 gg[60;1H[K[59;4H[?12l[?25h[?25l
:[?12l[?25hcall append("$", foldlevel("."))[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test folding with indent[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fdm=indent sw=2[?25l[25;1H[34m[47m-
|
|-
|
|-
|
|-
|
|-
|
|[54;1H 
  
  
  
 
   [?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25h^2 b[?25l[31msearch hit BOTTOM, continuing at TOP[52;4H[?12l[?25h[?25l[m[34m[47m-[m[2C  2 bb[?12l[?25h[53;5H[?25l[34m[47m|-[m[1C    3 cc[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", "indent " . foldlevel("."))[?25l[53;7H[?12l[?25h[52;7H[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[52;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test syntax folding[?25l[52;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fdm=syntax fdl=0[?25l[25;1H[34m[47m 
 
  
 
  
 
  
 
  
 
 [52;1H 
  [52;7H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hsyn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3[?25l[54;1H[34m[47m+  +--  8 lines: 4 dd ----------------------------------------------------------------------------[m[55;4Ha jj[55;9H[K[56;4Hb kk[57;4Hlast[57;9H[K[58;4Hmanual 1 aa[59;4H-1[59;6H[K[52;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsyn region Fd1 start="ee" end="ff" fold contained[?25l[52;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsyn region Fd2 start="gg" end="hh" fold contained[?25l[52;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsyn region Fd3 start="commentstart" end="commentend" fold contained[?25l[52;7H[?12l[?25h[?25l[1;59r[1;1H[8M[1;60r[52;1H[34m[47m   [m3 cc
[34m[47m   [m1 aa
[34m[47m   [mmarker 2
[34m[47m   [m1
[34m[47m   [m1
[34m[47m   [m0
[34m[47m   [mindent 2
[34m[47m   [m1[60;1H[K[59;4H[?12l[?25h[46;4H[?25l[60;1H:[?12l[?25hcall append("$", "folding " . getline("."))[?25l[46;4H[?12l[?25h[45;4H[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", getline("."))[?25l[45;4H[?12l[?25h[46;4H[?25l[34m[47m--[m[1C4 dd {{{commentstart  [46;26H[K[47;1H[34m[47m||[m[1C5 ee {{{ }}}
[34m[47m||[m[1C{{{[48;7H[K[49;1H[34m[47m||[m[1C6 ff }}}
[34m[47m||[m[1C6 ff }}}[50;13H[K[51;1H[34m[47m||[m[1C7 gg
[34m[47m||[m[1C8 hh
[34m[47m||[m[1C9 ii
[34m[47m||[m[1Ca jj[54;8H[K[55;1H[34m[47m||[m[1Cb kk
[34m[47m||[m[1Clast
[34m[47m||[m[1Cmanual 1 aa
[34m[47m||[m[1C-1[58;6H[K[59;1H[34m[47m||[m[1C3 cc[46;25H[?12l[?25h[?25l[46;2H[34m[47m [m[23Ccommentend[47;2H[34m[47m-[50;2H 
|-

| 
  
  
  
  
  
  [46;35H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset fdl=1[?25l[47;2H[34m[47m+ +---  3 lines: 5 ee ---------------------------------------------------------------------------[48;2H [m[1C6 ff }}}[49;2H[34m[47m+ +---  2 lines: 7 gg----------------------------------------------------------------------------[m[50;4H9 ii[50;9H[K[51;1H[34m[47m  [m[1Ca jj
[34m[47m  [m[1Cb kk
[34m[47m [m[2Clast[54;4Hmanual 1 aa[55;4H-1[55;6H[K[56;4H3 cc[57;4H1 aa[57;8H[K[58;4Hmarker 2[59;4H1[59;6H[K[46;35H[?12l[?25h[49;4H[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", getline("."))[?25l[49;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fdl=0[?25l[46;1H[34m[47m+  +--  8 lines: 4 dd commentstart  commentend----------------------------------------------------[47;1H  [m[1Ca jj[47;8H[K[48;1H[34m[47m [m[2Cb kk[48;9H[K[49;1H[34m[47m  [m[1Clast[49;8H[K[50;1H[34m[47m [m[2Cmanual 1 aa[51;4H-1[51;6H[K[52;4H3 cc[53;4H1 aa[54;6Hrker 2[54;13H[K[55;4H1[55;5H[K[56;4H1[56;6H[K[57;4H0[57;6H[K[58;4Hindent[46;4H[?12l[?25h[?25l[34m[47m-[m[2C4 dd {{{commentstart  commentend[46;36H[K[47;1H[34m[47m|-[m[1C5 ee {{{ }}}
[34m[47m||[m[1C{{{[48;7H[K[49;1H[34m[47m||[m[1C6 ff }}}
[34m[47m|[m[2C6 ff }}}[50;13H[K[51;1H[34m[47m|-[m[1C7 gg
[34m[47m||[m[1C8 hh
[34m[47m|[m[2C9 ii[54;4Ha jj[54;8H[K[55;4Hb kk[56;4Hlast[57;4Hmanual 1 aa[58;4H-1[58;6H[K[59;4H3 cc[51;7H[?12l[?25h[27m[23m[m[H[2J[?25l[1;1H[34m[47m   [mi  [34m^[[mjI    [34m^[[m:call append("$", "indent " . foldlevel("."))
[34m[47m   [mk:call append("$", foldlevel("."))
[34m[47m   [m:" test syntax folding
[34m[47m   [m:set fdm=syntax fdl=0
[34m[47m   [m:syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3
[34m[47m   [m:syn region Fd1 start="ee" end="ff" fold contained
[34m[47m   [m:syn region Fd2 start="gg" end="hh" fold contained
[34m[47m   [m:syn region Fd3 start="commentstart" end="commentend" fold contained
[34m[47m   [mGzk:call append("$", "folding " . getline("."))
[34m[47m   [mk:call append("$", getline("."))
[34m[47m   [mjAcommentstart  [34m^[[mAcommentend[34m^[[m:set fdl=1
[34m[47m   [m3j:call append("$", getline("."))
[34m[47m   [m:set fdl=0
[34m[47m   [mzO[34m^L[mj:call append("$", getline("."))
[34m[47m   [m:" test expression folding
[34m[47m   [m:fun Flvl()
[34m[47m   [m  let l = getline(v:lnum)
[34m[47m   [m  if l =~ "bb$"
[34m[47m   [m    return 2
[34m[47m   [m  elseif l =~ "gg$"
[34m[47m   [m    return "s1"
[34m[47m   [m  elseif l =~ "ii$"
[34m[47m   [m    return ">2"
[34m[47m   [m  elseif l =~ "kk$"
[34m[47m   [m    return "0"
[34m[47m   [m  endif
[34m[47m   [m  return "="
[34m[47m   [mendfun
[34m[47m   [m:set fdm=expr fde=Flvl()
[34m[47m   [m/bb$
[34m[47m   [m:call append("$", "expr " . foldlevel("."))
[34m[47m   [m/hh$
[34m[47m   [m:call append("$", foldlevel("."))
[34m[47m   [m/ii$
[34m[47m   [m:call append("$", foldlevel("."))
[34m[47m   [m/kk$
[34m[47m   [m:call append("$", foldlevel("."))
[34m[47m   [m:/^last/+1,$w! test.out
[34m[47m   [m:delfun Flvl
[34m[47m   [m:qa!
[34m[47m   [mENDTEST
[34m[47m   
   [m1 aa
[34m[47m   [m  2 bb
[34m[47m   [m    3 cc
[34m[47m-  [m4 dd {{{commentstart  commentend
[34m[47m|- [m5 ee {{{ }}}
[34m[47m|| [m{{{
[34m[47m|| [m6 ff }}}
[34m[47m|  [m6 ff }}}
[34m[47m|- [m7 gg
[34m[47m|| [m8 hh
[34m[47m|  [m9 ii
[34m[47m   [ma jj
[34m[47m   [mb kk
[34m[47m   [mlast
[34m[47m   [mmanual 1 aa
[34m[47m   [m-1
[34m[47m   [m3 cc[51;7H[?12l[?25h[52;4H[?25l[60;1H:[?12l[?25hcall append("$", getline("."))[?25l[52;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test expression folding[?25l[52;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfun Flvl()[?25l
:  [?12l[?25h  let l = getline(v:lnum)
[?25l:  [?12l[?25h  if l =~ "bb$"
[?25l:    [?12l[?25h    return 2
[?25l:    [?12l[?25h  elseif l =~ "gg$"
[?25l:    [?12l[?25h    return "s1"
[?25l:    [?12l[?25h  elseif l =~ "ii$"
[?25l:    [?12l[?25h    return ">2"
[?25l:    [?12l[?25h  elseif l =~ "kk$"
[?25l:    [?12l[?25h    return "0"
[?25l:    [?12l[?25h  endif
[?25l:  [?12l[?25h  return "="
[?25l:  [?12l[?25hendfun[1;1H[12L[?25l[1;1H[34m[47m   [mi  [34m^[[mjI    [34m^[[m:call append("$", "indent " . foldlevel("."))
[34m[47m   [mk:call append("$", foldlevel("."))
[34m[47m   [m:" test syntax folding
[34m[47m   [m:set fdm=syntax fdl=0
[34m[47m   [m:syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3
[34m[47m   [m:syn region Fd1 start="ee" end="ff" fold contained
[34m[47m   [m:syn region Fd2 start="gg" end="hh" fold contained
[34m[47m   [m:syn region Fd3 start="commentstart" end="commentend" fold contained
[34m[47m   [mGzk:call append("$", "folding " . getline("."))
[34m[47m   [mk:call append("$", getline("."))
[34m[47m   [mjAcommentstart  [34m^[[mAcommentend[34m^[[m:set fdl=1
[34m[47m   [m3j:call append("$", getline("."))[60;1H[K[52;4H[?12l[?25h[?25l[60;1H:[?12l[?25hset fdm=expr fde=Flvl()[?25l[44;1H[34m[47m+  +-- 11 lines: 2 bb-----------------------------------------------------------------------------[m[45;4Hb kk[45;8H[K[46;1H[34m[47m [m[2Clast[46;9H[K[47;1H[34m[47m  [m[1Cmanual 1 aa[47;15H[K[48;1H[34m[47m  [m[1C-1[48;6H[K[49;1H[34m[47m  [m[1C3 cc[49;9H[K[50;1H[34m[47m [m[2C1 aa[50;9H[K[51;1H[34m[47m  [m[1Cmarker 2
[34m[47m  [m[1C1[52;6H[K[53;1H[34m[47m [m[2C1[53;6H[K[54;4H0[54;6H[K[55;4Hindent 2[56;4H1[56;5H[K[57;1H[34m[47m+  +--  4 lines: folding 9 ii---------------------------------------------------------------------[m[58;4H[1m[34m~                                                                                              [59;4H~                                                                                              [44;4H[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25hbb$[?25l[31msearch hit BOTTOM, continuing at TOP[m[44;1H[34m[47m--[m[1C  2 bb[44;10H[K[45;1H[34m[47m||[m[1C    3 cc
[34m[47m||[m[1C4 dd {{{commentstart  commentend
[34m[47m||[m[1C5 ee {{{ }}}
[34m[47m||[m[1C{{{
[34m[47m||[m[1C6 ff }}}
[34m[47m||[m[1C6 ff }}}
[34m[47m||[m[1C7 gg[51;8H[K[52;1H[34m[47m|[m[2C8 hh
[34m[47m|+ +---  2 lines: 9 ii----------------------------------------------------------------------------[m[54;4Hb kk[55;4Hlast[55;8H[K[56;4Hmanual 1 aa
[34m[47m [m[2C-1[57;6H[K[58;4H3 cc[58;8H[K[59;4H1 aa[59;8H[K[44;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", "expr " . foldlevel("."))[?25l[44;8H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hhh$[?25l[52;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[52;6H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hii$[?25l[53;2H[34m[47m-[m[1C9 ii[53;8H[K[54;1H[34m[47m||[m[1Ca jj[55;4Hb kk[56;4Hlast[56;8H[K[57;4Hmanual 1 aa[58;4H-1[58;6H[K[59;4H3 cc[53;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[53;6H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hkk$[?25l[55;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[55;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^last/+1,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 18 lines, 96 characters written[55;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfun Flvl[?25l[55;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test46.failed test.ok test.out X* viminfo
cp test46.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test46.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test46.in" 27 lines, 431 characters[1;1HTests for multi-line regexps with ":s". vim: set ft=vim :

STARTTEST
:" test if replacing a line break works with a back reference
:/^1/,/^2/s/\n\(.\)/ \1/
:" test if inserting a line break works with a back reference
:/^3/,/^4/s/\(.\)$/\r\1/
:" test if replacing a line break with another line break works
:/^5/,/^6/s/\(\_d\{3}\)/x\1x/
:/^1/,$w! test.out
:qa!
ENDTEST

1 aa
bb
cc
2 dd
ee
3 ef
gh
4 ij
5 a8
8b c9
9d
6 e7
77f
xxxxx
[1m[34m~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for multi-line regexps with ":s". vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 8 lines, 292 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[12;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test if replacing a line break works with a back reference[?25l[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^1/,/^2/s/\n\(.\)/ \1/[?25l4 substitutions on 1 line[14;59r[14;1H[4M[1;60r[14;1H1 aa bb cc 2 dd ee[56;1H[1m[34m~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[60;1H4 substitutions on 1 line[14;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test if inserting a line break works with a back reference[?25l[14;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^3/,/^4/s/\(.\)$/\r\1/[?25l3 substitutions on 3 lines[18;59r[18;1H[3L[1;60r[15;4H[K[16;1Hf[16;2H[K[17;1Hg[17;3H[K[18;1Hh
4 i
j[60;1H[K[60;1H3 substitutions on 3 lines[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test if replacing a line break with another line break works[?25l[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^5/,/^6/s/\(\_d\{3}\)/x\1x/[?25l3 substitutions on 2 lines[60;27H[K[21;4Hx8
8xb cx9
9xd
6 ex7
7x7f[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^1/,$w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 13 lines, 70 characters written[25;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test47.failed test.ok test.out X* viminfo
cp test47.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test47.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test47.in" 62 lines, 1351 characters[1;1HTests for vertical splits and filler lines in diff mode

STARTTEST
:so small.vim
:" Disable the title to avoid xterm keeping the wrong one.
:set notitle noicon
/^1
yG:new
pkdd:w! Xtest
ddGpkkrXoxxx[34m^[[m:w! Xtest2
:file Nop
ggoyyy[34m^[[mjjjozzzz[34m^[[m
:vert diffsplit Xtest
:vert diffsplit Xtest2
:" jump to second window for a moment to have filler line appear at start of
:" first window
[34m^W^W[mgg[34m^W[mpgg:let one = winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
j:let one = one . "-" . winline()
[34m^W^W[mgg:let two = winline()
j:let two = two . "-" . winline()
j:let two = two . "-" . winline()
j:let two = two . "-" . winline()
j:let two = two . "-" . winline()
[34m^W^W[mgg:let three = winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
[34m^W^W[m:call append("$", one)
:call append("$", two)
:call append("$", three)
:$-2,$w! test.out
:" Test that diffing shows correct filler lines
:diffoff!
:windo :bw!
:enew
:put =range(4,10)
:1d _
:vnew
:put =range(1,10)
:1d _
:windo :diffthis
:wincmd h
:let w0=line('w0')
:enew
:put =w0
:.w >> test.out
:unlet! one two three w0
:qa!
ENDTEST

1 aa
2 bb[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for vertical splits and filler lines in diff mode[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 52 lines, 1250 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[56;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Disable the title to avoid xterm keeping the wrong one.[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset notitle noicon[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^1[?25l[58;1H[?12l[?25h[?25l

5 lines yanked[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[59;1H[7mtest47.in                                                                                         [1;1H[?12l[?25h[?25l[m[60;1H5 more lines[2;1H1 aa[2;5H[K[3;1H2 bb[3;5H[K[4;1H3 cc[4;5H[K[5;1H4 dd[5;5H[K[6;1H5 ee[6;5H[K[30;11H[1m[7m[+][2;1H[?12l[?25h[1;1H[?25l[1;29r[m[29;1H
[1;60r[29;1H[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw! Xtest[?25l"Xtest" [60;9H[K[60;9H[New File] 5 lines, 25 characters written[30;1H[1m[7mXtesta         [1;1H[?12l[?25h[?25l[1;29r[m[29;1H
[1;60r[29;1H[1m[34m~                                                                                                 [m[30;7H[1m[7m[+][m[60;1H[K[1;1H[?12l[?25h


[?25l
1 aa[5;5H[K[5;1H[?12l[?25h[4;1H[3;1H[?25lX[?12l[?25h[?25l[4;29r[4;1H[L[1;60r[4;1Hxxx[?12l[?25h[?25l[60;1H:[?12l[?25hw! Xtest2[?25l"Xtest2" [60;10H[K[60;10H[New File] 6 lines, 29 characters written[30;7H[1m[7m    [4;3H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hfile Nop[?25l"Nop" [Not edited] line 4 of 6 --66%-- col 3[30;1H[1m[7mNops   [4;3H[?12l[?25h[1;1H[?25l[2;29r[m[2;1H[L[1;60r[2;1Hyyy[30;5H[1m[7m[+][m[60;1H[K[2;3H[?12l[?25h
3 
X 
xx[?25l[6;29r[6;1H[L[1;60r[6;1Hzzzz[?12l[?25h
5 e[?25l[60;1H:[?12l[?25hvert diffsplit Xtest[?25l"Xtest" [60;9H[K[60;9H5 lines, 25 characters[1;1H[34m[47m  [m[44m1 aa                                           [m[7m|[m
[34m[47m  [m2 bb[43C[7m|[m
[34m[47m  [m[1m[34m[46m-----------------------------------------------[m[7m|[m
[34m[47m  [m3 cc[43C[7m|[m
[34m[47m  [m[1m[41m4[m[45m dd                                           [m[7m|[m
[34m[47m  [m[1m[34m[46m-----------------------------------------------[m[7m|[m
[34m[47m  [m[1m[34m[46m-----------------------------------------------[m[7m|[m
[34m[47m  [m5 ee[43C[7m|[9;50H|[10;50H|[11;50H|[12;50H|[13;50H|[14;50H|[15;50H|[16;50H|[17;50H|[18;50H|[19;50H|[20;50H|[21;50H|[22;50H|[23;50H|[24;50H|[25;50H|[26;50H|[27;50H|[28;50H|[29;50H|[m[9;1H[34m[47m  [m[1m[34m[46m-----------------------------------------------[m
[34m[47m  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  [m[10;3H[1m[34m~[11;3H~[12;3H~[13;3H~[14;3H~[15;3H~[16;3H~[17;3H~[18;3H~[19;3H~[20;3H~[21;3H~[22;3H~[23;3H~[24;3H~[25;3H~[26;3H~[27;3H~[28;3H~[29;3H~[m
[1m[7mXtest+   [m[1;51H[34m[47m  [m[1m[34m[46m----------------------------------------------[m[2;51H[34m[47m  [m2 bb[3;51H[34m[47m  [m[44myyy                                           [m[4;51H[34m[47m  [m3 cc[5;51H[34m[47m  [m[1m[41mX[m[45m dd                                          [m[6;51H[34m[47m  [m[44mxxx                                           [m[7;51H[34m[47m  [m[44mzzzz                                          [m[8;51H[34m[47m  [m5 ee[9;51H[34m[47m  [m[44m1 aa                                          [m[10;51H[34m[47m  [11;51H  [12;51H  [13;51H  [14;51H  [15;51H  [16;51H  [17;51H  [18;51H  [19;51H  [20;51H  [21;51H  [22;51H  [23;51H  [24;51H  [25;51H  [26;51H  [27;51H  [28;51H  [29;51H  [m[10;53H[1m[34m~[11;53H~[12;53H~[13;53H~[14;53H~[15;53H~[16;53H~[17;53H~[18;53H~[19;53H~[20;53H~[21;53H~[22;53H~[23;53H~[24;53H~[25;53H~[26;53H~[27;53H~[28;53H~[29;53H~[m[30;51H[7mNop [+]                                         [1;3H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hvert diffsplit Xtest2[?25l"Xtest2" [60;10H[K[60;10H6 lines, 29 characters[27m[23m[m[H[2J[1;1H[34m[47m  [m[1m[34m[46m------------------------------[m[7m|[m
[34m[47m  [m2 bb[26C[7m|[m
[34m[47m  [m[1m[34m[46m------------------------------[m[7m|[m
[34m[47m  [m3 cc[26C[7m|[m
[34m[47m  [m[1m[41mX[m[45m dd                          [m[7m|[m
[34m[47m  [m[45mxxx                           [m[7m|[m
[34m[47m  [m[1m[34m[46m------------------------------[m[7m|[m
[34m[47m  [m5 ee[26C[7m|[m
[34m[47m  [m[44m1 aa                          [m[7m|[10;33H|[11;33H|[12;33H|[13;33H|[14;33H|[15;33H|[16;33H|[17;33H|[18;33H|[19;33H|[20;33H|[21;33H|[22;33H|[23;33H|[24;33H|[25;33H|[26;33H|[27;33H|[28;33H|[29;33H|[m[10;1H[34m[47m  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  [m[10;3H[1m[34m~                             [11;3H~                             [12;3H~                             [13;3H~                             [14;3H~                             [15;3H~                             [16;3H~                             [17;3H~                             [18;3H~                             [19;3H~                             [20;3H~                             [21;3H~                             [22;3H~                             [23;3H~                             [24;3H~                             [25;3H~                             [26;3H~                             [27;3H~                             [28;3H~                             [29;3H~                             [m
[1m[7mXtest2                           [m[1;34H[34m[47m  [m[44m1 aa                          [m[7m|[m[2;34H[34m[47m  [m2 bb[26C[7m|[m[3;34H[34m[47m  [m[1m[34m[46m------------------------------[m[7m|[m[4;34H[34m[47m  [m3 cc[26C[7m|[m[5;34H[34m[47m  [m[1m[41m4[m[45m dd                          [m[7m|[m[6;34H[34m[47m  [m[1m[34m[46m------------------------------[m[7m|[m[7;34H[34m[47m  [m[1m[34m[46m------------------------------[m[7m|[m[8;34H[34m[47m  [m5 ee[26C[7m|[9;66H|[10;66H|[11;66H|[12;66H|[13;66H|[14;66H|[15;66H|[16;66H|[17;66H|[18;66H|[19;66H|[20;66H|[21;66H|[22;66H|[23;66H|[24;66H|[25;66H|[26;66H|[27;66H|[28;66H|[29;66H|[m[9;34H[34m[47m  [m[1m[34m[46m------------------------------[m[10;34H[34m[47m  [11;34H  [12;34H  [13;34H  [14;34H  [15;34H  [16;34H  [17;34H  [18;34H  [19;34H  [20;34H  [21;34H  [22;34H  [23;34H  [24;34H  [25;34H  [26;34H  [27;34H  [28;34H  [29;34H  [m[10;36H[1m[34m~                             [11;36H~                             [12;36H~                             [13;36H~                             [14;36H~                             [15;36H~                             [16;36H~                             [17;36H~                             [18;36H~                             [19;36H~                             [20;36H~                             [21;36H~                             [22;36H~                             [23;36H~                             [24;36H~                             [25;36H~                             [26;36H~                             [27;36H~                             [28;36H~                             [29;36H~                             [m[30;34H[7mXtest                            [m[1;67H[34m[47m  [m[1m[34m[46m------------------------------[m[2;67H[34m[47m  [m2 bb[3;67H[34m[47m  [m[44myyy                           [m[4;67H[34m[47m  [m3 cc[5;67H[34m[47m  [m[1m[41mX[m[45m dd                          [m[6;67H[34m[47m  [m[45mxxx                           [m[7;67H[34m[47m  [m[44mzzzz                          [m[8;67H[34m[47m  [m5 ee[9;67H[34m[47m  [m[44m1 aa                          [m[10;67H[34m[47m  [11;67H  [12;67H  [13;67H  [14;67H  [15;67H  [16;67H  [17;67H  [18;67H  [19;67H  [20;67H  [21;67H  [22;67H  [23;67H  [24;67H  [25;67H  [26;67H  [27;67H  [28;67H  [29;67H  [m[10;69H[1m[34m~                             [11;69H~                             [12;69H~                             [13;69H~                             [14;69H~                             [15;69H~                             [16;69H~                             [17;69H~                             [18;69H~                             [19;69H~                             [20;69H~                             [21;69H~                             [22;69H~                             [23;69H~                             [24;69H~                             [25;69H~                             [26;69H~                             [27;69H~                             [28;69H~                             [29;69H~                             [m[30;67H[7mNop [+]                         [m[31;1Hj:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
j:let three = three . "-" . winline()
[34m^W^W[m:call append("$", one)
:call append("$", two)
:call append("$", three)
:$-2,$w! test.out
:" Test that diffing shows correct filler lines
:diffoff!
:windo :bw!
:enew
:put =range(4,10)
:1d _
:vnew
:put =range(1,10)
:1d _
:windo :diffthis
:wincmd h
:let w0=line('w0')
:enew
:put =w0
:.w >> test.out
:unlet! one two three w0
:qa!
ENDTEST

1 aa
[7mtest47.in                                                                                         [2;3H[?12l[?25h[?25l[60;1H[m:[?12l[?25h" jump to second window for a moment to have filler line appear at start of[?25l[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" first window[?25l[2;3H[?12l[?25h[?25l[30;1H[7mXtest2[m[1m[7m [m[7m                           [m[1m[7mXtest                            [1;36H[?12l[?25h[?25l[?12l[?25h[?25l[30;1HXtest2                           [m[7mXtest[m[1m[7m [m[7m                            [2;3H[?12l[?25h[?25l[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet one = winline()[?25l[2;3H[?12l[?25h[?25l[4;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[4;3H[?12l[?25h[?25l[5;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[5;3H[?12l[?25h[?25l[6;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[6;3H[?12l[?25h[?25l[8;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[8;3H[?12l[?25h[?25l[9;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[9;3H[?12l[?25h[?25l[30;1H[7mXtest2[m[1m[7m [m[7m                           [m[1m[7mXtest                            [8;36H[?12l[?25h[?25l[1;36H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet two = winline()[?25l[1;36H[?12l[?25h[?25l[2;36H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[2;36H[?12l[?25h[?25l[4;36H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[4;36H[?12l[?25h[?25l[5;36H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[5;36H[?12l[?25h[?25l[8;36H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[8;36H[?12l[?25h[?25l[30;34H[7mXtest[m[1m[7m [m[7m                            [m[1m[7mNop [+]                         [8;69H[?12l[?25h[?25l[2;69H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet three = winline()[?25l[2;69H[?12l[?25h[?25l[3;69H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[3;69H[?12l[?25h[?25l[4;69H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[4;69H[?12l[?25h[?25l[5;69H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[5;69H[?12l[?25h[?25l[6;69H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[6;69H[?12l[?25h[?25l[7;69H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[7;69H[?12l[?25h[?25l[8;69H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[8;69H[?12l[?25h[30;67H[7mNop [+][m[1m[7m [m[7m                         [m[59;1H[1m[7mtest47.in                                                                                         [58;1H[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append("$", one)[?25l[59;11H[1m[7m[+][58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append("$", two)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append("$", three)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$-2,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 3 lines, 36 characters written[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test that diffing shows correct filler lines[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdiffoff![?25l[1;1H[1m[34m[46m--[m
2 bb  
3 cc                            
X dd  
xxx                             
5 ee                            
1 aa                            
[1m[34m~                               
~                               
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   
~   [m[1;34H1 aa                            [2;34H2 bb  [3;34H3 cc                            [4;34H4 dd  [5;34H5 ee                            [6;34H[1m[34m~                               [7;34H~                               [8;34H~                               [9;34H~                               [10;34H~   [11;34H~   [12;34H~   [13;34H~   [14;34H~   [15;34H~   [16;34H~   [17;34H~   [18;34H~   [19;34H~   [20;34H~   [21;34H~   [22;34H~   [23;34H~   [24;34H~   [25;34H~   [26;34H~   [27;34H~   [28;34H~   [29;34H~   [m[1;67H2 bb[1;71H[K[2;67Hyyy[2;71H[K[3;67H3 cc[3;71H[K[4;67HX dd[4;71H[K[5;67Hxxx[5;70H[K[6;67Hzzzz[6;71H[K[7;67H5 ee[7;71H[K[8;67H1 aa[8;71H[K[9;67H[1m[34m~                               [10;67H~   [11;67H~   [12;67H~   [13;67H~   [14;67H~   [15;67H~   [16;67H~   [17;67H~   [18;67H~   [19;67H~   [20;67H~   [21;67H~   [22;67H~   [23;67H~   [24;67H~   [25;67H~   [26;67H~   [27;67H~   [28;67H~   [29;67H~   [58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwindo :bw![?25l[27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25henew[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hput =range(4,10)[?25l7 more lines[60;13H[K[2;1H4[2;2H[K[3;1H5[3;2H[K[4;1H6[4;2H[K[5;1H7[5;2H[K[6;1H8[6;2H[K[7;1H9[7;2H[K[8;1H10[8;3H[K[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h1d _[?25l[1;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hvnew[?25l[1;1H [48C[7m|[2;50H|[3;50H|[4;50H|[5;50H|[6;50H|[7;50H|[8;50H|[9;50H|[10;50H|[11;50H|[12;50H|[13;50H|[14;50H|[15;50H|[16;50H|[17;50H|[18;50H|[19;50H|[20;50H|[21;50H|[22;50H|[23;50H|[24;50H|[25;50H|[26;50H|[27;50H|[28;50H|[29;50H|[30;50H|[31;50H|[32;50H|[33;50H|[34;50H|[35;50H|[36;50H|[37;50H|[38;50H|[39;50H|[40;50H|[41;50H|[42;50H|[43;50H|[44;50H|[45;50H|[46;50H|[47;50H|[48;50H|[49;50H|[50;50H|[51;50H|[52;50H|[53;50H|[54;50H|[55;50H|[56;50H|[57;50H|[58;50H|[m[2;1H[1m[34m~                                                
~                                                
~                                                
~                                                
~                                                
~                                                [m[59;1H[1m[7m[No Name]                                         [m[1;51H4[2;51H5[3;51H6[4;51H7[5;51H8[6;51H9[7;51H10[8;51H[1m[34m~[9;51H~[10;51H~[11;51H~[12;51H~[13;51H~[14;51H~[15;51H~[16;51H~[17;51H~[18;51H~[19;51H~[20;51H~[21;51H~[22;51H~[23;51H~[24;51H~[25;51H~[26;51H~[27;51H~[28;51H~[29;51H~[30;51H~[31;51H~[32;51H~[33;51H~[34;51H~[35;51H~[36;51H~[37;51H~[38;51H~[39;51H~[40;51H~[41;51H~[42;51H~[43;51H~[44;51H~[45;51H~[46;51H~[47;51H~[48;51H~[49;51H~[50;51H~[51;51H~[52;51H~[53;51H~[54;51H~[55;51H~[56;51H~[57;51H~[58;51H~[m[59;51H[7m[No Name] [+]                                   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput =range(1,10)[?25l10 more lines[60;14H[K[2;1H1                                                
2                                                
3                                                
4                                                
5                                                
6                                                
7                                                
8                                                
9                                                
10                                               [59;11H[1m[7m[+][11;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1d _[?25l[1;1H1                                                
2                                                
3                                                
4                                                
5                                                
6                                                
7                                                
8                                                
9                                                
10                                               
[1m[34m~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                [m
                                                 [1m[34m~                                                [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hwindo :diffthis[?25l[1;1H[34m[47m  [m[44m1                                              [m
[34m[47m  [m[44m2                                              [m
[34m[47m  [m[44m3                                              [m
[34m[47m  [m4
[34m[47m  [m5
[34m[47m  [m6
[34m[47m  [m7
[34m[47m  [m8
[34m[47m  [m9
[34m[47m- [m10
[34m[47m  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  [m[11;3H[1m[34m~[12;3H~[13;3H~[14;3H~[15;3H~[16;3H~[17;3H~[18;3H~[19;3H~[20;3H~[21;3H~[22;3H~[23;3H~[24;3H~[25;3H~[26;3H~[27;3H~[28;3H~[29;3H~[30;3H~[31;3H~[32;3H~[33;3H~[34;3H~[35;3H~[36;3H~[37;3H~[38;3H~[39;3H~[40;3H~[41;3H~[42;3H~[43;3H~[44;3H~[45;3H~[46;3H~[47;3H~[48;3H~[49;3H~[50;3H~[51;3H~[52;3H~[53;3H~[54;3H~[55;3H~[56;3H~[57;3H~[58;3H~[m
[7m[No Name] [+][m[1m[7m [m[7m                                     [m[1;51H[34m[47m  [m[1m[34m[46m----------------------------------------------[m[2;51H[34m[47m  [m[1m[34m[46m----------------------------------------------[m[3;51H[34m[47m  [m[1m[34m[46m----------------------------------------------[m[4;51H[34m[47m  [m4[5;51H[34m[47m  [m5[6;51H[34m[47m  [m6[7;51H[34m[47m  [m7[8;51H[34m[47m  [m8[8;54H[K[9;51H[34m[47m  [m9[9;54H[K[10;51H[34m[47m- [m10[10;55H[K[11;51H[34m[47m  [12;51H  [13;51H  [14;51H  [15;51H  [16;51H  [17;51H  [18;51H  [19;51H  [20;51H  [21;51H  [22;51H  [23;51H  [24;51H  [25;51H  [26;51H  [27;51H  [28;51H  [29;51H  [30;51H  [31;51H  [32;51H  [33;51H  [34;51H  [35;51H  [36;51H  [37;51H  [38;51H  [39;51H  [40;51H  [41;51H  [42;51H  [43;51H  [44;51H  [45;51H  [46;51H  [47;51H  [48;51H  [49;51H  [50;51H  [51;51H  [52;51H  [53;51H  [54;51H  [55;51H  [56;51H  [57;51H  [58;51H  [m[11;53H[1m[34m~[12;53H~[13;53H~[14;53H~[15;53H~[16;53H~[17;53H~[18;53H~[19;53H~[20;53H~[21;53H~[22;53H~[23;53H~[24;53H~[25;53H~[26;53H~[27;53H~[28;53H~[29;53H~[30;53H~[31;53H~[32;53H~[33;53H~[34;53H~[35;53H~[36;53H~[37;53H~[38;53H~[39;53H~[40;53H~[41;53H~[42;53H~[43;53H~[44;53H~[45;53H~[46;53H~[47;53H~[48;53H~[49;53H~[50;53H~[51;53H~[52;53H~[53;53H~[54;53H~[55;53H~[56;53H~[57;53H~[58;53H~[m[59;51H[1m[7m[No Name] [+]                                   [4;53H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd h[?25l[59;1H[1m[7m[No Name] [+]                                     [m[7m[No Name] [+][m[1m[7m [m[7m                                   [1;3H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet w0=line('w0')[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25henew[?25l[1m[37m[41mE37: No write since last change (add ! to override)[1;3H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput =w0[?25l[2;3H[44m1[3;3H2[4;3H3                                              [m[5;3H4[6;3H5[7;3H6[8;3H7[9;3H8
[34m[47m [m[1C9 
[34m[47m-[m[1C10                                             [4;53H[1m[34m[46m----------------------------------------------[m[5;53H4[6;53H5[7;53H6[8;53H7[9;53H8[10;51H[34m[47m [m[1C9[10;54H[K[11;51H[34m[47m-[m[1C10[11;55H[K[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >> test.out[?25l"test.out" [60;12H[K[60;12H1 line, 2 characters appended[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet! one two three w0[?25l[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test48.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test48.in" 78 lines, 1542 characters[1;1HThis 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[34m^N^[[m
:"
:"   Using "C" then then <CR> moves the last remaining character to the next
:"    line.  (Mary Ellen Foster)
j^/are
C[34m^M[mare belong to vim[34m^[[m
:"
:"   When past the end of a line that ends in a single character "b" skips
:"    that word.
^$15lbC7[34m^[[m
:"
:"   Make sure 'i' works
$4li<-- should be 3 ' '[34m^[[m
:"
:"   Make sure 'C' works
$4lC<-- should be 3 ' '[34m^[[m
:"
:"   Make sure 'a' works
$4la<-- should be 4 ' '[34m^[[m
:"
:"   Make sure 'A' works
$4lA<-- should be 0 ' '[34m^[[m
:"
:"   Make sure 'D' works
$4lDi<-- 'D' should be intact[34m^[[m
:"
:"   Test for yank bug reported by Mark Waggoner.
:set ve=block
^2w[34m^V[m3jyGp
:"
:" Test "r" beyond the end of the line
:set ve=all
/^"r"
$5lrxa<-- should be 'x'[34m^[[m
:"
:"   Test to make sure 'x' can delete control characters
:set display=uhex
^xxxxxxi[This line should contain only the text between the brackets.][34m^[[m
:set display=
:"
:"   Test for ^Y/^E due to bad w_virtcol value, reported by
:"   Roy <royl@netropolis.net>.
^O[34m^[[m3li[34m^E^[[m4li[34m^E^[[m4li[34m^E[m   <-- should show the name of a noted text editor[34m^[[m
^o[34m^[[m4li[34m^Y^[[m4li[34m^Y^[[m4li[34m^Y[m   <-- and its version number[34m^[[m-dd
:"
:" Test for yanking and pasting using the small delete register
gg/^foo
dewve"-p[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HThis is a test of 'virtualedit'.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 57 lines, 1331 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H:wq! test.out
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hfoo, bar[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noswf[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ve=all[?25l[59;1H[?12l[?25h[58;1H[?25l

61 fewer lines[1;1Hfoo, bar[1;9H[K[2;1Hkeyword keyw
all your base are belong to us
1 2 3 4 5 6
'i'
'C'[6;6H[K[7;1H'a'[7;7H[K[8;1H'A'
'D'[9;4H[K[10;1Hthis is a test
this is a test[11;16H[K[12;1Hthis is a test[12;15H[K[13;1H"r"[13;4H[K[14;1Ha[1C[34mV[mb[34m^M[msd[14;9H[K[15;1Habcv6efi.him0kl[16;1H[K[17;1H[K[18;1H[1m[34m~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword".[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    Repeating CTRL-N fixes it. (Mary Ellen Foster)[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hw[?25l[2;12H[?12l[?25h[?25l$[60;1H[32mScanning tags.[mThe only match[2;16H[60;1H[K[2;12Hword[?12l[?25h[3;15H[?25l[60;1H:[?12l[?25h"[?25l[3;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Using "C" then then <CR> moves the last remaining character to the next[?25l[3;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    line.  (Mary Ellen Foster)[?25l[3;15H[?12l[?25h[4;15H[?25l[60;1H[K[60;1H/[?12l[?25hare[?25l[31msearch hit BOTTOM, continuing at TOP[3;15H[?12l[?25h[?25l[m[15C$[3;15H[K[4;1Hare belong to vim
1 2 3 4 5 6
'i
'C
'a
'A
'D'[10;4H[K[13;1Hthis is a test
"r"[14;4H[K[15;2H[34m^V[mb[34m^M[msd[15;9H[K[16;1Habcv6efi.him0kl[18;1H[K[4;17H[?12l[?25h[5;17H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[5;17H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   When past the end of a line that ends in a single character "b" skips[?25l[5;17H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    that word.[?25l[5;17H[?12l[?25h[10C[15C[5;11H[?25l$7[?12l[?25h[6;11H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[6;11H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Make sure 'i' works[?25l[6;11H[?12l[?25h'i'   [?25l<-- should be 3 ' '[?12l[?25h[7;25H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[7;25H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Make sure 'C' works[?25l[7;25H[?12l[?25h'C'   [?25l$<-- should be 3 ' '[?12l[?25h[8;25H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[8;25H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Make sure 'a' works[?25l[8;25H[?12l[?25h'a'   [?25l <-- should be 4 ' '[?12l[?25h[9;26H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[9;26H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Make sure 'A' works[?25l[9;26H[?12l[?25h'A'   [?25l<-- should be 0 ' '[?12l[?25h[10;22H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[10;22H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Make sure 'D' works[?25l[10;22H[?12l[?25h'D'   [?25l<-- 'D' should be intact[?12l[?25h[11;30H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[11;30H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Test for yank bug reported by Mark Waggoner.[?25l[11;30H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ve=block[?25l[11;14H[?12l[?25h[8C[?25l[?12l[?25h[?25l[7ma[12;9Ha[13;9Ha[14;9H[?12l[?25h[?25l[m[11;9Ha[12;9Ha[13;9Ha[60;1Hblock of 4 lines yanked[11;9H[?12l[?25h[18;1H[?25l[60;1H3 more lines[60;13H[K[18;1Ha
a[19;2H[K[20;1Ha[20;2H[K[21;1H [21;2H[K[18;1H[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test "r" beyond the end of the line[?25l[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ve=all[?25l[19;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^"r"[?25l[31msearch hit BOTTOM, continuing at TOP[14;1H[?12l[?25h[m"r"    [?25lx[?12l[?25h[?25lx<-- should be 'x'[?12l[?25h[15;25H[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[15;25H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Test to make sure 'x' can delete control characters[?25l[15;25H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset display=uhex[?25l[15;2H[34m<16>[mb[34m<0d>[msd[16C[?12l[?25h[?25l[34m<16>[mb[34m<0d>[msd[15;12H[K[15;1H[?12l[?25h[?25lb[34m<0d>[msd[15;8H[K[15;1H[?12l[?25h[?25l[34m<0d>[msd[15;7H[K[15;1H[?12l[?25h[?25lsd[15;3H[K[15;1H[?12l[?25h[?25ld[15;2H[K[15;1H[?12l[?25h[?25l[15;1H[K[15;1H[?12l[?25h[?25l[This line should contain only the text between the brackets.][?12l[?25h[16;62H[?25l[60;1H[K[60;1H:[?12l[?25hset display=[?25l[16;62H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[16;62H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Test for ^Y/^E due to bad w_virtcol value, reported by[?25l[16;62H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"   Roy <royl@netropolis.net>.[?25l[16;62H[?12l[?25h[?25l[16;59r[16;1H[L[1;60r[60;1H[K[16;1H[?12l[?25h   [?25lv[?12l[?25hv   [?25li[?12l[?25hi   [?25lm   <-- should show the name of a noted text editor[?12l[?25h[17;62H[?25l[18;59r[18;1H[L[1;60r[18;1H[?12l[?25h    [?25l6[?12l[?25h6   [?25l.[?12l[?25h.   [?25l0   <-- and its version number[?12l[?25h[17;1H[?25l[17;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [17;5H[?12l[?25h
[m    [?25l[60;1H:[?12l[?25h"[?25l[18;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test for yanking and pasting using the small delete register[?25l[18;5H[?12l[?25h[1;1H[?25l[60;1H[K[60;1H/[?12l[?25h^foo[?25l[31msearch hit BOTTOM, continuing at TOP[1;1H[?12l[?25h[?25l[m, bar[1;6H[K[1;1H[?12l[?25h, [?25l[?12l[?25h[?25l[7mba[?12l[?25h[?25l[?12l[?25h[?25l[mfoo[?12l[?25h
keyw[?25l[60;1H[K[60;1H:[?12l[?25hwq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 22 lines, 449 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test49.failed test.ok test.out X* viminfo
cp test49.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test49.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test49.in" 30 lines, 632 characters[1;1HThis is a test of the script language.

If after adding a new test, the test output doesn't appear properly in
test49.failed, try to add one ore more "G"s at the line ending in "test.out"

STARTTEST
:so small.vim
:se nocp nomore viminfo+=nviminfo
:lang mess C
:so test49.vim
GGGGGGGGGGGGGG"rp:.-,$w! test.out
:"
:" make valgrind happy
:redir => funclist
:silent func
:redir END
:for line in split(funclist, "\n")
:  let name = matchstr(line, 'function \zs[A-Z]\w*\ze(')
:  if name != ''
:    exe "delfunc " . name
:  endif
:endfor
:for v in keys(g:)
:  silent! exe "unlet " . v
:endfor
:unlet v
:qa!
ENDTEST

Results of test49.vim:
[1m[34m~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HThis is a test of the script language.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 21 lines, 401 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[28;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[29;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[29;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hse nocp nomore viminfo+=nviminfo[?25l[29;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlang mess C[?25l[29;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso test49.vim[?25l[1m[37m[41mError detected while processing function G:[m
[33mline   16:[m
[1m[37m[41mE171: Missing :endif:     endwhile[m
*** Test   1: OK (34695)
   function F()
1      Xpath 1[37C" X: 1
2      let first = 1
3      XloopINIT 2 8
4      while 1
5[10CXloop 1[33C" X: 2      + 0 * 16
6[10Cif first
7[14CXloop 2[29C" X: 4      + 0 * 32
8[14Clet first = 0
9[14CXloopNEXT
10[13Cbreak
11[9Celse
12[13CXloop 4[29C" X: 0      + 0 * 64
13[13Creturn
14[9Cendif
15     endwhile
   endfunction[44;1H"/tmp/vX4jyoq/0"[45;1H[K[46;1H[K[47;1H[K[48;1H[K[49;1H[K[50;1H[K[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[44;18H[noeol] 18L, 528C
15 substitutions on 15 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/0" [46;18H[K[46;18H15L, 476C written"test49.in" [46;13H[K[46;13H30L, 632C
   function G()
1      Xpath 256[35C" X: 256    + 0 * 2048
2      let first = 1
3      XloopINIT 512 8
4      while 1
5[10CXloop 1[33C" X: 512    + 0 * 4096
6[10Cif first
7[14CXloop 2[29C" X: 1024   + 0 * 8192
8[14Clet first = 0
9[14CXloopNEXT
10[13Cbreak
11[9Celse
12[13CXloop 4[29C" X: 0      + 0 * 16384
13[13Creturn
14[9Cendif
15[9Cif 1    " unmatched :if
16     endwhile
   endfunction[43;1H"/tmp/vX4jyoq/1"[44;1H[K[45;1H[K[46;1H[K[47;1H[K[48;1H[K[49;1H[K[50;1H[K[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[43;18H[noeol] 19L, 588C
16 substitutions on 16 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/1" [45;18H[K[45;18H16L, 534C written"test49.in" [45;13H[K[45;13H30L, 632C
[1m[37m[41mError detected while processing /tmp/vX4jyoq/1:[m
[33mline   16:[m
[1m[37m[41mE171: Missing :endif:      endwhile[m
*** Test   2: OK (34695)
*** Test   3: OK (1384648195)
*** Test   4: OK (32883)
   function F()
1      if 1
2[10CXpath 1[33C" X: 1
3[10Clet loops = 3
4[10CXloopINIT 2 16
5[10Cwhile loops > 0[25C"    3:  2:     1:
6[14CXloop 1[29C" X: 2 + 2*16 + 0*16*16
7[14Cif (loops == 2)
8[18CXloop 2[25C" X:     4*16
9[18Creturn
10[17CXloop 4[25C" X:     0
11[13Cendif
12[13CXloop 8[29C" X: 16
13[13Clet loops = loops - 1
14[13CXloopNEXT
15[9Cendwhile
16[9CXpath 8192[30C" X: 0
17     else
18[9CXpath 16384[29C" X: 0
19     endif
   endfunction[40;1H"/tmp/vX4jyoq/2"[41;1H[K[42;1H[K[43;1H[K[44;1H[K[45;1H[K[46;1H[K[47;1H[K[48;1H[K[49;1H[K[50;1H[K[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[40;18H[noeol] 22L, 784C
19 substitutions on 19 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/2" [42;18H[K[42;18H19L, 724C written"test49.in" [42;13H[K[42;13H30L, 632C
*** Test   5: OK (32883)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"/tmp/vX4jyoq/3" [43;18H[K[43;18H[New] 53L, 1582C written[43;18H[K[43;18H14L, 358C appended[43;18H[K[43;18H26L, 824C appended[43;18H[K[43;18H34L, 986C appended
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/4[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[44;1H[K[44;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/4" [44;18H[K[44;18H130L, 2431C appended[44;18H[K[44;18H131L, 2453C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/5[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[46;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =[47;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/5"' -S /tmp/vX4jyoq/4[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[46;1H"/tmp/vX4jyoq/5" [46;18H[K[47;2H[K[46;18H21L, 130C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [46;13H[K[46;13H30L, 632C
*** Test   6: OK (603978947)
[1m[37m[41mError detected while processing /sources/vim74/src/testdir/test49.vim:[m
[33mline  976:[m
[1m[37m[41mE492: Not an editor command: ^Iasdf[m
[33mline  988:[m
[1m[37m[41mE492: Not an editor command: ^Iasdf[m
[33mline  996:[m
[1m[37m[41mE492: Not an editor command: asdf[m
[33mline  999:[m
[1m[37m[41mE492: Not an editor command: asdf | Xpath 32768^I^I^I^I" X: 0[m
*** Test   7: OK (90563)
[1m[37m[41mError detected while processing function F:[m
[33mline    5:[m
[1m[37m[41mE492: Not an editor command: ^I    asdf[m
[33mline    7:[m
[1m[37m[41mE492: Not an editor command: ^I    asdf | Xpath 8^I^I^I" X: 0[m
[33mline   19:[m
[1m[37m[41mE492: Not an editor command: ^I    asdf[m
[33mline   21:[m
[1m[37m[41mE492: Not an editor command: ^I    asdf | Xpath 2048^I^I^I" X: 0[m
[33mline   29:[m
[1m[37m[41mE121: Undefined variable: novar[m
[1m[37m[41mE15: Invalid expression: novar^I^I" returns (default return value 0)[m
[1m[37m[41mError detected while processing function G:[m
[33mline    5:[m
[1m[37m[41mE492: Not an editor command: ^I    asdf^I^I" returns -1[m
[1m[37m[41mError detected while processing function H:[m
[33mline    5:[m
[1m[37m[41mE492: Not an editor command: ^I    asdf^I^I" returns -1[m
*** Test   8: OK (562493431)
[1m[37m[41mError detected while processing function F..G..H..I:[m
[33mline    2:[m
[1m[37m[41mE492: Not an editor command:     asdf^I^I" error[m
*** Test   9: OK (363)
[1m[37m[41mError detected while processing /sources/vim74/src/testdir/test49.vim:[m
[33mline 1201:[m
[1m[37m[41mE15: Invalid expression: | strlen("\"") | Xpath 512^I^I" X: 0[m
[1m[37m[41mE15: Invalid expression: 1 ||| strlen("\"") | Xpath 512^I^I" X: 0[m
[33mline 1211:[m
[1m[37m[41mE15: Invalid expression: | strlen("\"") | Xpath 8192^I^I" X: 0[m
[1m[37m[41mE15: Invalid expression: 1 ||| strlen("\"") | Xpath 8192^I^I" X: 0[m
[33mline 1220:[m
[1m[37m[41mE15: Invalid expression: | strlen("\"") | Xpath 131072^I^I" X: 0[m
[1m[37m[41mE15: Invalid expression: 1 ||| strlen("\"") | Xpath 131072^I^I" X: 0[m
*** Test  10: OK (559615)
[33mline 1252:[m
[1m[37m[41mE492: Not an editor command:     asdf^I^I" error[m
*** Test  11: OK (2049)
1
[33mline 1330:[m
[1m[37m[41mE492: Not an editor command:     asdf^I^I" error[m
[33mline 1338:[m
[1m[37m[41mE492: Not an editor command:     asdf^I^I" error[m
*** Test  12: OK (352256)
[33mline 1357:[m
[1m[37m[41mE121: Undefined variable: asdf[m
[1m[37m[41mE15: Invalid expression: asdf[m
[33mline 1368:[m
[1m[37m[41mE121: Undefined variable: asdf[m
[1m[37m[41mE15: Invalid expression: asdf | Xpath 32 | endwhile | Xpath 64^I" X: 0[m
*** Test  13: OK (145)
[1m[37m[41mError detected while processing function F:[m
[33mline    8:[m
[1m[37m[41mE121: Undefined variable: g:boolvar[m
[1m[37m[41mE15: Invalid expression: g:boolvar^I" possibly undefined[m
*** Test  14: OK (42413)
[1m[37m[41mE121: Undefined variable: g:boolvar[m
[1m[37m[41mE15: Invalid expression: g:boolvar | Xloop 8 | else | Xloop 16 | endif    " X: 8[m
*** Test  15: OK (42413)
[33mline    5:[m
[1m[37m[41mE583: multiple :else:     else^I^I[m
[1m[37m[41mError detected while processing function G:[m
[33mline    5:[m
[1m[37m[41mE584: :elseif after :else:     elseif 1^I^I" aborts function[m
[1m[37m[41mError detected while processing function H:[m
[33mline    7:[m
[1m[37m[41mE583: multiple :else:     else^I^I[m
[1m[37m[41mError detected while processing function I:[m
[33mline    7:[m
[1m[37m[41mE584: :elseif after :else:     elseif 1^I^I" aborts function[m
*** Test  16: OK (8722)
[1m[37m[41mError detected while processing function F:[m
[33mline   18:[m
[1m[37m[41mE171: Missing :endif:     endwhile^I[m
[1m[37m[41mE171: Missing :endif:     endwhile^I[m
[33mline   34:[m
[1m[37m[41mE171: Missing :endif:     endwhile^I[m
[1m[37m[41mE171: Missing :endif:     endwhile^I[m
[1m[37m[41mE171: Missing :endif:     endwhile^I[m
[33mline   47:[m
[1m[37m[41mE580: :endif without :if: ^Iendif^I[m
[1m[37m[41mE580: :endif without :if: ^Iendif^I[m
[1m[37m[41mE580: :endif without :if: ^Iendif^I[m
[1m[37m[41mError detected while processing /sources/vim74/src/testdir/test49.vim:[m
[33mline 1626:[m
[1m[37m[41mE171: Missing :endif: endwhile [m
*** Test  17: OK (285127993)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/6[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/6" [60;18H[K[60;18H16L, 304C appended[60;18H[K[60;18H17L, 326C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/7[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/7"' -c 'breakadd file 8 /tmp/vX4jyoq/6' -S /tmp/vX4
[59;98Hj[60;1Hyoq/6[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/7" [58;18H[K[59;1H[K[60;1H[K[58;18H3L, 6C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/8[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/8" [59;18H[K[59;18H6L, 127C appended[59;18H[K[59;18H7L, 149C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/9[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/9"' -c 'breakadd file 4 /tmp/vX4jyoq/8' -S /tmp/vX4
[59;98Hj[60;1Hyoq/8[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/9" [58;18H[K[59;1H[K[60;1H[K[58;18H1L, 5C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/10[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/10" [59;19H[K[59;19H21L, 486C appended[59;19H[K[59;19H22L, 508C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/11[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/11"' -c 'breakadd func 7 F' -S /tmp/vX4jyoq/10[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/11" [59;19H[K[60;1H[K[59;19H3L, 18C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/12[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/12" [60;19H[K[60;19H13L, 364C appended[60;19H[K[60;19H14L, 386C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/13[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/13"' -c 'breakadd func 3 G' -S /tmp/vX4jyoq/12[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/13" [59;19H[K[60;1H[K[59;19H1L, 9C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  18: OK (67224583)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/14[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/14" [60;19H[K[60;19H12L, 201C appended[60;19H[K[60;19H13L, 223C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/15[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/15"' -S /tmp/vX4jyoq/14[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/15" [59;19H[K[60;2H[K[59;19H2L, 4C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/16[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/16" [60;19H[K[60;19H12L, 205C appended[60;19H[K[60;19H13L, 227C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/17[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/17"' -S /tmp/vX4jyoq/16[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/17" [59;19H[K[60;2H[K[59;19H2L, 7C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/18[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/18" [60;19H[K[60;19H6L, 122C appended[60;19H[K[60;19H7L, 144C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/19[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/19"' -S /tmp/vX4jyoq/18[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/19" [59;19H[K[60;2H[K[59;19H1L, 5C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/20[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/20" [60;19H[K[60;19H8L, 176C appended[60;19H[K[60;19H9L, 198C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/21[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/21"' -S /tmp/vX4jyoq/20[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/21" [59;19H[K[60;2H[K[59;19H1L, 6C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/22[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/22" [60;19H[K[60;19H10L, 215C appended[60;19H[K[60;19H11L, 237C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/23[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/23"' -S /tmp/vX4jyoq/22[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/23" [59;19H[K[60;2H[K[59;19H1L, 8C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/24[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/24" [60;19H[K[60;19H7L, 149C appended[60;19H[K[60;19H8L, 171C[60;19H[K[60;19H8L, 170C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/25[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/25"' -S /tmp/vX4jyoq/24[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/25" [59;19H[K[60;2H[K[59;19H1L, 9C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  19: OK (69275973)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/26[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/26" [60;19H[K[60;19H9L, 135C appended[60;19H[K[60;19H10L, 157C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/27[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/27"' -S /tmp/vX4jyoq/26[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/27" [59;19H[K[60;2H[K[59;19H2L, 4C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/28[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/28" [60;19H[K[60;19H10L, 155C appended[60;19H[K[60;19H11L, 177C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/29[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/29"' -S /tmp/vX4jyoq/28[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/29" [59;19H[K[60;2H[K[59;19H3L, 8C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/30[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/30" [60;19H[K[60;19H12L, 204C appended[60;19H[K[60;19H13L, 226C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/31[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/31"' -S /tmp/vX4jyoq/30[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/31" [59;19H[K[60;2H[K[59;19H4L, 18C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/32[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/32" [60;19H[K[60;19H12L, 214C appended[60;19H[K[60;19H13L, 236C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/33[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/33"' -S /tmp/vX4jyoq/32[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/33" [59;19H[K[60;2H[K[59;19H4L, 22C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/34[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/34" [60;19H[K[60;19H12L, 211C appended[60;19H[K[60;19H13L, 233C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/35[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/35"' -S /tmp/vX4jyoq/34[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/35" [59;19H[K[60;2H[K[59;19H3L, 22C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/36[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/36" [60;19H[K[60;19H14L, 263C appended[60;19H[K[60;19H15L, 285C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/37[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/37"' -S /tmp/vX4jyoq/36[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/37" [59;19H[K[60;2H[K[59;19H4L, 34C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/38[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/38" [60;19H[K[60;19H14L, 277C appended[60;19H[K[60;19H15L, 299C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/39[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/39"' -S /tmp/vX4jyoq/38[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/39" [59;19H[K[60;2H[K[59;19H4L, 40C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  20: OK (1874575085)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/40[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/40" [60;19H[K[60;19H58L, 1022C appended[60;19H[K[60;19H59L, 1044C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/41[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/41"' -S /tmp/vX4jyoq/40[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/41" [59;19H[K[60;2H[K[59;19H9L, 56C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  21: OK (147932225)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/42[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/42" [60;19H[K[60;19H23L, 418C appended[60;19H[K[60;19H24L, 440C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/43[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/43"' -S /tmp/vX4jyoq/42[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/43" [59;19H[K[60;2H[K[59;19H1L, 2C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/44[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/44" [60;19H[K[60;19H23L, 437C appended[60;19H[K[60;19H24L, 459C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/45[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/45"' -c 'breakadd func 2 Interrupt' -S /tmp/vX4jyoq
[59;98H/[60;1H44[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/45" [58;19H[K[59;1H[K[60;1H[K[58;19H1L, 3C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/46[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/46" [59;19H[K[59;19H21L, 386C appended[59;19H[K[59;19H22L, 408C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/47[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/47"' -S /tmp/vX4jyoq/46[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/47" [59;19H[K[60;2H[K[59;19H1L, 5C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  22: OK (4161)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/48[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/48" [60;19H[K[60;19H25L, 432C appended[60;19H[K[60;19H26L, 454C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/49[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/49"' -S /tmp/vX4jyoq/48[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/49" [59;19H[K[60;2H[K[59;19H3L, 8C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  23: OK (49)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/50[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/50" [60;19H[K[60;19H16L, 392C appended[60;19H[K[60;19H17L, 414C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/51[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/51"' -S /tmp/vX4jyoq/50[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/51" [59;19H[K[60;2H[K[59;19H3L, 7C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  24: OK (41)
*** Test  25: OK (260177811)
*** Test  26: OK (1681500476)
*** Test  27: OK (1996459)
   function F()
1      try
2[10CXpath 1[33C" X: 1
3[10Ctry
4[14CXpath 2[29C" X: 2
5[14Creturn
6[14CXpath 4[29C" X: 0
7[10Cfinally
8[14CXpath 8[29C" X: 8
9[10Cendtry
10[9CXpath 16[32C" X: 0
11     finally
12[9CXpath 32[32C" X: 32
13     endtry
14     Xpath 64[36C" X: 0
   endfunction[45;1H"/tmp/vX4jyoq/52"[46;1H[K[47;1H[K[48;1H[K[49;1H[K[50;1H[K[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[45;19H[noeol] 17L, 552C
14 substitutions on 14 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/52" [47;20H[K[47;19H14L, 502C written"test49.in" [47;13H[K[47;13H30L, 632C
   function G()
1      try
2[10CXpath 128[31C" X: 128
3[10Creturn
4[10CXpath 256[31C" X: 0
5      finally
6[10CXpath 512[31C" X: 512
7[10Ccall F()
8[10CXpath 1024[30C" X: 1024
9      endtry
10     Xpath 2048[34C" X: 0
   endfunction[48;1H"/tmp/vX4jyoq/53"[49;1H[K[50;1H[K[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;4H[K[48;19H[noeol] 13L, 406C
10 substitutions on 10 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/53" [50;20H[K[50;19H10L, 378C written"test49.in" [50;13H[K[50;13H30L, 632C
   function H()
1      try
2[10CXpath 4096[30C" X: 4096
3[10Ccall G()
4[10CXpath 8192[30C" X: 8192
5      finally
6[10CXpath 16384[29C" X: 16384
7[10Creturn
8[10CXpath 32768[29C" X: 0
9      endtry
10     Xpath 65536[33C" X: 0
   endfunction[49;1H"/tmp/vX4jyoq/54"[50;1H[K[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[49;19H[noeol] 13L, 409C
10 substitutions on 10 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/54" [51;20H[K[51;19H10L, 381C written"test49.in" [51;13H[K[51;13H30L, 632C
*** Test  28: OK (1996459)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/55[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[53;1H[K[53;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/55" [53;19H[K[53;19H39L, 721C appended[53;19H[K[53;19H40L, 743C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/56[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[55;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =[56;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/56"' -S /tmp/vX4jyoq/55[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[55;1H"/tmp/vX4jyoq/56" [55;19H[K[56;2H[K[55;19H6L, 21C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [55;13H[K[55;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/57[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[56;1H[K[56;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/57" [56;19H[K[56;19H23L, 509C appended[56;19H[K[56;19H24L, 531C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/58[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =[59;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/58"' -S /tmp/vX4jyoq/57[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/58" [58;19H[K[59;2H[K[58;19H4L, 34C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  29: OK (170428555)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/59[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/59" [60;19H[K[60;19H60L, 1101C appended[60;19H[K[60;19H61L, 1123C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/60[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let Ex
[59;98Ht[60;1HraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/60"' -c 'breakadd func 3 F' -c 'breakadd f
[59;98Hi[60;1Hle 19 /tmp/vX4jyoq/59' -c 'breakadd file 31 /tmp/vX4jyoq/59' -S /tmp/vX4jyoq/59[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/60" [58;19H[K[59;1H[K[60;1H[K[58;19H16L, 89C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  30: OK (190905173)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/61[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/61" [60;19H[K[60;19H60L, 1122C appended[60;19H[K[60;19H61L, 1144C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/62[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/62"' -S /tmp/vX4jyoq/61[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/62" [59;19H[K[60;2H[K[59;19H16L, 89C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  31: OK (190905173)
*** Test  32: OK (354833067)
*** Test  33: OK (1216907538)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/63[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/63" [60;19H[K[60;19H63L, 1288C appended[60;19H[K[60;19H64L, 1310C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/64[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -
[59;98Hc[60;2H'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/64"' -c 'breakadd func 16 C' -S /
[59;98Ht[60;1Hmp/vX4jyoq/63[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/64" [58;19H[K[59;2H[K[60;1H[K[58;19H17L, 127C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  34: OK (2146584868)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/65[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/65" [60;19H[K[60;19H63L, 1285C appended[60;19H[K[60;19H64L, 1307C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/66[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -
[59;98Hc[60;2H'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/66"' -c 'breakadd func 16 B' -S /
[59;98Ht[60;1Hmp/vX4jyoq/65[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/66" [58;19H[K[59;2H[K[60;1H[K[58;19H17L, 127C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  35: OK (2146584868)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/67[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/67" [60;19H[K[60;19H66L, 1430C appended[60;19H[K[60;19H67L, 1452C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/68[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c '
[59;98Hl[60;1Het ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/68"' -c 'breakadd func 16 R' -S /tmp
[59;98H/[60;1HvX4jyoq/67[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/68" [58;19H[K[59;1H[K[60;1H[K[58;19H9L, 81C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  36: OK (1071644672)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/69[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/69" [60;19H[K[60;19H73L, 1488C appended[60;19H[K[60;19H74L, 1510C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/70[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/70"' -c 'breakadd func 16 F' -S /tmp/vX4jyoq/69[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/70" [59;19H[K[60;2H[K[59;19H9L, 81C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  37: OK (1071644672)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/71[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/71" [60;19H[K[60;19H82L, 1519C appended[60;19H[K[60;19H83L, 1541C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/72[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -
[59;98Hc[60;2H'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/72"' -c 'breakadd func 16 E' -S /
[59;98Ht[60;1Hmp/vX4jyoq/71[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/72" [58;19H[K[59;2H[K[60;1H[K[58;19H8L, 63C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  38: OK (357908480)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/73[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/73" [60;19H[K[60;19H83L, 1538C appended[60;19H[K[60;19H84L, 1560C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/74[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set
viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/74"' -c 'bre
[59;98Ha[60;1Hkadd func 16 I' -c 'breakadd func 22 I' -S /tmp/vX4jyoq/73[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/74" [58;19H[K[59;1H[K[60;1H[K[58;19H8L, 63C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  39: OK (357908480)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/75[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/75" [60;19H[K[60;19H82L, 1519C appended[60;19H[K[60;19H83L, 1541C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/76[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -
[59;98Hc[60;2H'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/76"' -c 'breakadd func 16 T' -S /
[59;98Ht[60;1Hmp/vX4jyoq/75[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/76" [58;19H[K[59;2H[K[60;1H[K[58;19H8L, 63C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  40: OK (357908480)
*** Test  41: OK (3076095)
*** Test  42: OK (1505155949)
*** Test  43: OK (1157763329)
*** Test  44: OK (1031761407)
*** Test  45: OK (1157763329)
*** Test  46: OK (739407)
*** Test  47: OK (371213935)
*** Test  48: OK (756255461)
*** Test  49: OK (179000669)
   function C()
1      try
2[10CXpath 1[33C" X: 1
3[10Cthrow "arrgh"
4[10CXpath 2[33C" X: 0
5      catch /arrgh/
6[10CXpath 4[33C" X: 4
7      endtry
8      Xpath 8[37C" X: 8
   endfunction[51;1H"/tmp/vX4jyoq/77"[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[51;19H[noeol] 11L, 334C
8 substitutions on 8 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/77" [53;20H[K[53;19H8L, 295C written"test49.in" [53;13H[K[53;13H30L, 632C
   function T1()
1      XloopNEXT
2      try
3[10CXloop 1[33C" X: 16 + 16*16
4[10Cthrow "arrgh"
5[10CXloop 2[33C" X: 0
6      finally
7[10CXloop 4[33C" X: 64 + 64*16
8      endtry
9      Xloop 8[37C" X: 0
   endfunction[50;1H"/tmp/vX4jyoq/78"[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[50;19H[noeol] 12L, 364C
9 substitutions on 9 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/78" [52;20H[K[52;19H9L, 323C written"test49.in" [52;13H[K[52;13H30L, 632C
   function T2()
1      try
2[10CXpath 4096[30C" X: 4096
3[10Ccall T1()
4[10CXpath 8192[30C" X: 0
5      finally
6[10CXpath 16384[29C" X: 16384
7      endtry
8      Xpath 32768[33C" X: 0
   endfunction[51;1H"/tmp/vX4jyoq/79"[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[51;19H[noeol] 11L, 332C
8 substitutions on 8 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/79" [53;20H[K[53;19H8L, 305C written"test49.in" [53;13H[K[53;13H30L, 632C
*** Test  50: OK (363550045)
*** Test  51: OK (40744667)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/81[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[56;1H[K[56;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/81" [56;19H[K[56;19H2L, 41C appended[56;19H[K[56;19H3L, 63C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/82[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/80' -c '[59;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jy[60;1Hoq/82"' -S /tmp/vX4jyoq/81[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/82" [58;19H[K[59;1H[K[60;1H[K[58;19H1L, 2C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/80" [58;19H[K[58;19H8L, 182C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/83[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/83" [59;19H[K[59;19H7L, 115C appended[59;19H[K[59;19H8L, 137C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/84[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/80' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/84"' -S /tmp/vX4jyoq/83[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/84" [58;19H[K[59;1H[K[60;1H[K[58;19H1L, 2C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/80" [58;19H[K[58;19H8L, 181C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/85[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/85" [59;19H[K[59;19H12L, 180C appended[59;19H[K[59;19H13L, 202C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/86[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/80' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/86"' -S /tmp/vX4jyoq/85[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/86" [58;19H[K[59;1H[K[60;1H[K[58;19H2L, 8C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/80" [58;19H[K[58;19H10L, 209C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/87[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/87" [59;19H[K[59;19H8L, 139C appended[59;19H[K[59;19H9L, 161C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/88[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/80' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/88"' -S /tmp/vX4jyoq/87[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/88" [58;19H[K[59;1H[K[60;1H[K[58;19H2L, 11C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/80" [58;19H[K[58;19H10L, 217C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/89[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/89" [59;19H[K[59;19H5L, 87C appended[59;19H[K[59;19H6L, 109C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/90[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/80'
[59;98H-[60;1Hc 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v
[59;98HX[60;1H4jyoq/90"' -c 'breakadd file 4 /tmp/vX4jyoq/89' -S /tmp/vX4jyoq/89[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/90" [58;19H[K[59;1H[K[60;1H[K[58;19H1L, 7C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/80" [58;19H[K[58;19H[noeol] 9L, 202C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/91[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/91" [59;19H[K[59;19H7L, 189C appended[59;19H[K[59;19H8L, 211C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/92[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/80' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/92"' -S /tmp/vX4jyoq/91[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/92" [58;19H[K[59;1H[K[60;1H[K[58;19H1L, 8C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/80" [58;19H[K[58;19H9L, 252C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/93[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/93" [59;19H[K[59;19H7L, 199C appended[59;19H[K[59;19H8L, 221C[59;19H[K[59;19H8L, 220C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/94[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/80' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/94"' -S /tmp/vX4jyoq/93[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/94" [58;19H[K[59;1H[K[60;1H[K[58;19H1L, 10C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/80" [58;19H[K[58;19H9L, 214C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  52: OK (1247112011)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/96[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/96" [60;19H[K[60;19H1L, 10C appended[60;19H[K[60;19H2L, 32C[60;19H[K[60;19H2L, 31C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/97[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/97"' -S /tmp/vX4jyoq/96[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/97" [58;19H[K[59;1H[K[60;1H[K[58;19H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 154C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/98[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/98" [59;19H[K[59;19H3L, 39C appended[59;19H[K[59;19H4L, 61C
3 substitutions on 3 lines"/tmp/vX4jyoq/98" [60;20H[K[60;19H4L, 58C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/99[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/99"' -S /tmp/vX4jyoq/98[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/99" [58;19H[K[59;1H[K[60;1H[K[58;19H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 158C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/100[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/100" [59;20H[K[59;20H4L, 45C appended[59;20H[K[59;20H5L, 67C
4 substitutions on 4 lines"/tmp/vX4jyoq/100"[60;20H[K[60;20H5L, 63C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/101[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/101"' -S /tmp/vX4jyoq/100[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/101" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 159C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/102[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/102" [59;20H[K[59;20H3L, 33C appended[59;20H[K[59;20H4L, 55C
3 substitutions on 3 lines"/tmp/vX4jyoq/102"[60;20H[K[60;20H4L, 52C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/103[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/103"' -S /tmp/vX4jyoq/102[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/103" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 159C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/104[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/104" [59;20H[K[59;20H5L, 65C appended[59;20H[K[59;20H6L, 87C
5 substitutions on 5 lines"/tmp/vX4jyoq/104"[60;20H[K[60;20H6L, 82C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/105[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/105"' -S /tmp/vX4jyoq/104[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/105" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 159C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/106[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/106" [59;20H[K[59;20H1L, 9C appended[59;20H[K[59;20H2L, 31C[59;20H[K[59;20H2L, 30C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/107[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/107"' -S /tmp/vX4jyoq/106[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/107" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 153C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/108[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/108" [59;20H[K[59;20H3L, 38C appended[59;20H[K[59;20H4L, 60C
3 substitutions on 3 lines"/tmp/vX4jyoq/108"[60;20H[K[60;20H4L, 57C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/109[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/109"' -S /tmp/vX4jyoq/108[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/109" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 157C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/110[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/110" [59;20H[K[59;20H4L, 44C appended[59;20H[K[59;20H5L, 66C
4 substitutions on 4 lines"/tmp/vX4jyoq/110"[60;20H[K[60;20H5L, 62C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/111[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/111"' -S /tmp/vX4jyoq/110[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/111" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 157C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/112[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/112" [59;20H[K[59;20H3L, 32C appended[59;20H[K[59;20H4L, 54C
3 substitutions on 3 lines"/tmp/vX4jyoq/112"[60;20H[K[60;20H4L, 51C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/113[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/113"' -S /tmp/vX4jyoq/112[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/113" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 157C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/114[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/114" [59;20H[K[59;20H5L, 64C appended[59;20H[K[59;20H6L, 86C
5 substitutions on 5 lines"/tmp/vX4jyoq/114"[60;20H[K[60;20H6L, 81C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/115[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/115"' -S /tmp/vX4jyoq/114[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/115" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 157C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/116[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/116" [59;20H[K[59;20H1L, 11C appended[59;20H[K[59;20H2L, 33C[59;20H[K[59;20H2L, 32C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/117[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/117"' -S /tmp/vX4jyoq/116[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/117" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 157C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/118[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/118" [59;20H[K[59;20H3L, 40C appended[59;20H[K[59;20H4L, 62C
3 substitutions on 3 lines"/tmp/vX4jyoq/118"[60;20H[K[60;20H4L, 59C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/119[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/119"' -S /tmp/vX4jyoq/118[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/119" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 161C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/120[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/120" [59;20H[K[59;20H4L, 46C appended[59;20H[K[59;20H5L, 68C
4 substitutions on 4 lines"/tmp/vX4jyoq/120"[60;20H[K[60;20H5L, 64C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/121[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/121"' -S /tmp/vX4jyoq/120[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/121" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 161C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/122[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/122" [59;20H[K[59;20H3L, 34C appended[59;20H[K[59;20H4L, 56C
3 substitutions on 3 lines"/tmp/vX4jyoq/122"[60;20H[K[60;20H4L, 53C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/123[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/123"' -S /tmp/vX4jyoq/122[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/123" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 161C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/124[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/124" [59;20H[K[59;20H5L, 66C appended[59;20H[K[59;20H6L, 88C
5 substitutions on 5 lines"/tmp/vX4jyoq/124"[60;20H[K[60;20H6L, 83C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/125[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/125"' -S /tmp/vX4jyoq/124[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/125" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 161C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/126[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/126" [59;20H[K[59;20H4L, 37C appended[59;20H[K[59;20H5L, 59C
4 substitutions on 4 lines"/tmp/vX4jyoq/126"[60;20H[K[60;20H5L, 55C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/127[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/127"' -S /tmp/vX4jyoq/126[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/127" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 150C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/128[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/128" [59;20H[K[59;20H4L, 41C appended[59;20H[K[59;20H5L, 63C
4 substitutions on 4 lines"/tmp/vX4jyoq/128"[60;20H[K[60;20H5L, 59C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/129[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/95' -c
[59;98H'[60;1Hdebuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4j
[59;98Hy[60;1Hoq/129"' -S /tmp/vX4jyoq/128[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/129" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/95" [58;19H[K[58;19H6L, 159C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  53: OK (131071)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/131[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/131" [60;20H[K[60;20H1L, 13C appended[60;20H[K[60;20H2L, 35C[60;20H[K[60;20H2L, 34C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/132[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/132"' -S /tmp/vX4jyoq/131[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/132" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 164C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/133[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/133" [59;20H[K[59;20H3L, 36C appended[59;20H[K[59;20H4L, 58C
3 substitutions on 3 lines"/tmp/vX4jyoq/133"[60;20H[K[60;20H4L, 55C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/134[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/134"' -S /tmp/vX4jyoq/133[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/134" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 168C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/135[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/135" [59;20H[K[59;20H3L, 38C appended[59;20H[K[59;20H4L, 60C
3 substitutions on 3 lines"/tmp/vX4jyoq/135"[60;20H[K[60;20H4L, 57C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/136[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/136"' -S /tmp/vX4jyoq/135[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/136" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 154C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/137[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/137" [59;20H[K[59;20H4L, 48C appended[59;20H[K[59;20H5L, 70C
4 substitutions on 4 lines"/tmp/vX4jyoq/137"[60;20H[K[60;20H5L, 66C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/138[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/138"' -S /tmp/vX4jyoq/137[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/138" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 168C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/139[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/139" [59;20H[K[59;20H4L, 53C appended[59;20H[K[59;20H5L, 75C
4 substitutions on 4 lines"/tmp/vX4jyoq/139"[60;20H[K[60;20H5L, 71C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/140[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/140"' -S /tmp/vX4jyoq/139[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/140" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 155C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/141[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/141" [59;20H[K[59;20H5L, 62C appended[59;20H[K[59;20H6L, 84C
5 substitutions on 5 lines"/tmp/vX4jyoq/141"[60;20H[K[60;20H6L, 79C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/142[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/142"' -S /tmp/vX4jyoq/141[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/142" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 155C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/143[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/143" [59;20H[K[59;20H5L, 64C appended[59;20H[K[59;20H6L, 86C
5 substitutions on 5 lines"/tmp/vX4jyoq/143"[60;20H[K[60;20H6L, 81C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/144[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/144"' -S /tmp/vX4jyoq/143[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/144" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 154C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/145[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/145" [59;20H[K[59;20H3L, 36C appended[59;20H[K[59;20H4L, 58C
3 substitutions on 3 lines"/tmp/vX4jyoq/145"[60;20H[K[60;20H4L, 55C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/146[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/146"' -S /tmp/vX4jyoq/145[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/146" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 168C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/147[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/147" [59;20H[K[59;20H5L, 67C appended[59;20H[K[59;20H6L, 89C
5 substitutions on 5 lines"/tmp/vX4jyoq/147"[60;20H[K[60;20H6L, 84C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/148[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/148"' -S /tmp/vX4jyoq/147[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/148" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 167C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/149[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/149" [59;20H[K[59;20H5L, 68C appended[59;20H[K[59;20H6L, 90C
5 substitutions on 5 lines"/tmp/vX4jyoq/149"[60;20H[K[60;20H6L, 85C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/150[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/150"' -S /tmp/vX4jyoq/149[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/150" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 168C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/151[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/151" [59;20H[K[59;20H7L, 95C appended[59;20H[K[59;20H8L, 117C
7 substitutions on 7 lines"/tmp/vX4jyoq/151"[60;20H[K[60;20H8L, 110C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/152[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/130' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/152"' -S /tmp/vX4jyoq/151[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/152" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/130" [58;20H[K[58;20H6L, 167C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  54: OK (2047)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/154[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/154" [60;20H[K[60;20H1L, 13C appended[60;20H[K[60;20H2L, 35C[60;20H[K[60;20H2L, 34C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/155[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/155"' -S /tmp/vX4jyoq/154[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/155" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 172C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/156[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/156" [59;20H[K[59;20H3L, 36C appended[59;20H[K[59;20H4L, 58C
3 substitutions on 3 lines"/tmp/vX4jyoq/156"[60;20H[K[60;20H4L, 55C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/157[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/157"' -S /tmp/vX4jyoq/156[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/157" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 176C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/158[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/158" [59;20H[K[59;20H4L, 48C appended[59;20H[K[59;20H5L, 70C
4 substitutions on 4 lines"/tmp/vX4jyoq/158"[60;20H[K[60;20H5L, 66C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/159[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/159"' -S /tmp/vX4jyoq/158[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/159" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 176C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/160[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/160" [59;20H[K[59;20H3L, 36C appended[59;20H[K[59;20H4L, 58C
3 substitutions on 3 lines"/tmp/vX4jyoq/160"[60;20H[K[60;20H4L, 55C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/161[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/161"' -S /tmp/vX4jyoq/160[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/161" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 176C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/162[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/162" [59;20H[K[59;20H5L, 68C appended[59;20H[K[59;20H6L, 90C
5 substitutions on 5 lines"/tmp/vX4jyoq/162"[60;20H[K[60;20H6L, 85C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/163[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/163"' -S /tmp/vX4jyoq/162[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/163" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 176C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/164[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/164" [59;20H[K[59;20H1L, 10C appended[59;20H[K[59;20H2L, 32C[59;20H[K[59;20H2L, 31C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/165[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/165"' -S /tmp/vX4jyoq/164[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/165" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 166C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/166[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/166" [59;20H[K[59;20H3L, 33C appended[59;20H[K[59;20H4L, 55C
3 substitutions on 3 lines"/tmp/vX4jyoq/166"[60;20H[K[60;20H4L, 52C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/167[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/167"' -S /tmp/vX4jyoq/166[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/167" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 170C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/168[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/168" [59;20H[K[59;20H4L, 45C appended[59;20H[K[59;20H5L, 67C
4 substitutions on 4 lines"/tmp/vX4jyoq/168"[60;20H[K[60;20H5L, 63C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/169[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/169"' -S /tmp/vX4jyoq/168[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/169" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 170C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/170[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/170" [59;20H[K[59;20H3L, 33C appended[59;20H[K[59;20H4L, 55C
3 substitutions on 3 lines"/tmp/vX4jyoq/170"[60;20H[K[60;20H4L, 52C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/171[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/171"' -S /tmp/vX4jyoq/170[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/171" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 170C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/172[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/172" [59;20H[K[59;20H5L, 65C appended[59;20H[K[59;20H6L, 87C
5 substitutions on 5 lines"/tmp/vX4jyoq/172"[60;20H[K[60;20H6L, 82C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/173[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/153' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/173"' -S /tmp/vX4jyoq/172[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/173" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/153" [58;20H[K[58;20H6L, 170C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  55: OK (1023)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/175[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/175" [60;20H[K[60;20H1L, 11C appended[60;20H[K[60;20H2L, 33C[60;20H[K[60;20H2L, 32C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/176[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/176"' -S /tmp/vX4jyoq/175[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/176" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 158C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/177[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/177" [59;20H[K[59;20H3L, 34C appended[59;20H[K[59;20H4L, 56C
3 substitutions on 3 lines"/tmp/vX4jyoq/177"[60;20H[K[60;20H4L, 53C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/178[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/178"' -S /tmp/vX4jyoq/177[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/178" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 162C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/179[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/179" [59;20H[K[59;20H3L, 40C appended[59;20H[K[59;20H4L, 62C
3 substitutions on 3 lines"/tmp/vX4jyoq/179"[60;20H[K[60;20H4L, 59C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/180[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/180"' -S /tmp/vX4jyoq/179[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/180" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 162C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/181[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/181" [59;20H[K[59;20H3L, 32C appended[59;20H[K[59;20H4L, 54C
3 substitutions on 3 lines"/tmp/vX4jyoq/181"[60;20H[K[60;20H4L, 51C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/182[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/182"' -S /tmp/vX4jyoq/181[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/182" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 152C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/183[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/183" [59;20H[K[59;20H3L, 35C appended[59;20H[K[59;20H4L, 57C
3 substitutions on 3 lines"/tmp/vX4jyoq/183"[60;20H[K[60;20H4L, 54C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/184[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/184"' -S /tmp/vX4jyoq/183[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/184" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 155C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/185[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/185" [59;20H[K[59;20H4L, 44C appended[59;20H[K[59;20H5L, 66C
4 substitutions on 4 lines"/tmp/vX4jyoq/185"[60;20H[K[60;20H5L, 62C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/186[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/186"' -S /tmp/vX4jyoq/185[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/186" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 152C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/187[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/187" [59;20H[K[59;20H4L, 47C appended[59;20H[K[59;20H5L, 69C
4 substitutions on 4 lines"/tmp/vX4jyoq/187"[60;20H[K[60;20H5L, 65C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/188[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/188"' -S /tmp/vX4jyoq/187[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/188" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 155C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/189[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/189" [59;20H[K[59;20H5L, 64C appended[59;20H[K[59;20H6L, 86C
5 substitutions on 5 lines"/tmp/vX4jyoq/189"[60;20H[K[60;20H6L, 81C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/190[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/190"' -S /tmp/vX4jyoq/189[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/190" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 152C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/191[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/191" [59;20H[K[59;20H5L, 67C appended[59;20H[K[59;20H6L, 89C
5 substitutions on 5 lines"/tmp/vX4jyoq/191"[60;20H[K[60;20H6L, 84C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/192[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vX4jyoq/174' -c
'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4
[59;98Hj[60;1Hyoq/192"' -S /tmp/vX4jyoq/191[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/192" [58;21H[K[59;1H[K[60;1H[K[58;20H0L, 0C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/tmp/vX4jyoq/174" [58;20H[K[58;20H6L, 155C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  56: OK (511)
   function FuncException()
1      let g:exception = v:exception
   endfunction[58;1H"/tmp/vX4jyoq/193" [58;20H[K[59;1H[K[60;4H[K[58;20H[noeol] 4L, 80C
Pattern not found: ^\s*$"/tmp/vX4jyoq/193"[59;20H[K[59;20H1L, 36C written"test49.in" [59;13H[K[59;13H30L, 632C
   function FuncThrowpoint()
1      let g:throwpoint = v:throwpoint
   endfunction[58;1H"/tmp/vX4jyoq/194" [58;20H[K[59;1H[K[60;4H[K[58;20H[noeol] 4L, 83C
Pattern not found: ^\s*$"/tmp/vX4jyoq/194"[59;20H[K[59;20H1L, 38C written"test49.in" [59;13H[K[59;13H30L, 632C
   function T(arg, line)
1      if a:line == 2
2[10Cthrow a:arg[13C" in line 2
3      elseif a:line == 4
4[10Cthrow a:arg[13C" in line 4
5      elseif a:line == 6
6[10Cthrow a:arg[13C" in line 6
7      elseif a:line == 8
8[10Cthrow a:arg[13C" in line 8
9      endif
   endfunction[50;1H"/tmp/vX4jyoq/195"[50;20H[K[51;1H[K[52;1H[K[53;1H[K[54;1H[K[55;1H[K[56;1H[K[57;1H[K[58;1H[K[59;1H[K[60;4H[K[50;20H[noeol] 12L, 341C
9 substitutions on 9 lines
8 substitutions on 8 lines
Pattern not found: ^\s*$"/tmp/vX4jyoq/195"[53;20H[K[53;20H9L, 292C written"test49.in" [53;13H[K[53;13H30L, 632C
   function G(arg, line)
1      call T(a:arg, a:line)
   endfunction[54;1H"/tmp/vX4jyoq/196"[54;20H[K[55;1H[K[56;4H[K[54;20H[noeol] 4L, 69C
Pattern not found: ^\s*$"/tmp/vX4jyoq/196"[55;20H[K[55;20H1L, 30C written"test49.in" [55;13H[K[55;13H30L, 632C
   function F(arg, line)
1      call G(a:arg, a:line)
   endfunction[56;1H"/tmp/vX4jyoq/197"[56;20H[K[57;1H[K[58;4H[K[56;20H[noeol] 4L, 69C
Pattern not found: ^\s*$"/tmp/vX4jyoq/197"[57;20H[K[57;20H1L, 30C written"test49.in" [57;13H[K[57;13H30L, 632C
*** Test  57: OK (2147450880)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/198[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/198" [59;20H[K[59;20H87L, 1700C appended[59;20H[K[59;20H88L, 1722C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/199[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/199"' -c 'breakadd func 4 T' -S /tmp/vX4jyoq/198[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/199" [59;20H[K[60;1H[K[59;20H8L, 36C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  58: OK (624945)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/200[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/200" [60;20H[K[60;20H293L, 5789C appended[60;20H[K[60;20H294L, 5811C
3 substitutions on 3 lines"/tmp/vX4jyoq/200"[60;20H[K[60;20H294L, 5808C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/201[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVim
[59;98HB[60;1Hegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/201"' -c 'breakadd file 115 /tmp/vX4jyoq/200' -c
'breakadd file 225 /tmp/vX4jyoq/200' -S /tmp/vX4jyoq/200[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/201"[58;20H[K[59;1H[K[60;1H[K[58;20H28L, 162C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  59: OK (2038431743)"/n/o/n/w/r/i/t/a/b/l/e/_/f/i/l/e""/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/202[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/202" [60;20H[K[60;20H33L, 765C appended[60;20H[K[60;20H34L, 787C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/203[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/203"' -c 'breakadd file 7 /tmp/vX4jyoq/202' -S /tmp
[59;98H/[60;1HvX4jyoq/202[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/203" [58;20H[K[59;1H[K[60;1H[K[58;20H3L, 27C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  60: OK (311511339)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/204[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/204" [60;20H[K[60;20H115L, 2272C appended[60;20H[K[60;20H116L, 2294C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/205[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c '
[59;98Hl[60;1Het ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/205"' -c 'breakadd file 8 /tmp/vX4jy
[59;98Ho[60;1Hq/204' -c 'breakadd file 36 /tmp/vX4jyoq/204' -c 'breakadd file 40 /tmp/vX4jyoq/204' -c 'breakadd
file 69 /tmp/vX4jyoq/204' -c 'breakadd file 95 /tmp/vX4jyoq/204' -c 'breakadd file 97 /tmp/vX4jyo
[59;98Hq[60;1H/204' -S /tmp/vX4jyoq/204[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[56;1H"/tmp/vX4jyoq/205" [56;20H[K[57;1H[K[58;1H[K[59;1H[K[60;1H[K[56;20H14L, 81C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [56;13H[K[56;13H30L, 632C
*** Test  61: OK (374889517)
   function F()
1      while 1
2      " Missing :endwhile
   endfunction[57;1H"/tmp/vX4jyoq/206"[58;1H[K[59;1H[K[60;4H[K[57;20H[noeol] 5L, 73C
Pattern not found: ^\s*$"/tmp/vX4jyoq/206"[58;20H[K[58;20H2L, 40C written"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  62: OK (286331153)"/i/m/p/o/s/s/i/b/l/e" [59;24H[K[60;1H[1m[37m[41mError detected while processing /sources/vim74/src/testdir/test49.vim:[m
[33mline 6342:[m
[1m[37m[41m"/i/m/p/o/s/s/i/b/l/e" E212: Can't open file for writing[m
*** Test  63: OK (236978127)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/207[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/207" [60;20H[K[60;20H149L, 2828C appended[60;20H[K[60;20H150L, 2850C
6 substitutions on 6 lines"/tmp/vX4jyoq/207"[60;20H[K[60;20H150L, 2844C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/208[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/208"' -c 'breakadd file 63 /tmp/vX4jyoq/207' -S /tm
[59;98Hp[60;1H/vX4jyoq/207[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/208" [58;20H[K[59;1H[K[60;1H[K[58;20H16L, 97C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  64: OK (1499645335)
*** Test  65: OK (70187)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/209[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/209" [60;20H[K[60;20H78L, 1520C appended[60;20H[K[60;20H79L, 1542C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/210[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/210"' -c 'breakadd func 8 F' -S /tmp/vX4jyoq/209[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/210" [59;20H[K[60;1H[K[59;20H6L, 22C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  66: OK (5464)
*** Test  67: OK (212514423)
*** Test  68: OK (212514423)
*** Test  69: OK (8995471)
*** Test  70: OK (69544277)
*** Test  71: OK (34886997)
*** Test  72: OK (1789569365)
   function F0()
   endfunction
   function F1()
   endfunction
*** Test  73: OK (9032615)"/tmp/vX4jyoq/211" [New File]"test49.in" [60;13H[K[60;13H30L, 632C"/tmp/vX4jyoq/212" [New File]"test49.in" [60;13H[K[60;13H30L, 632C
*** Test  74: OK (224907669)
*** Test  75: OK (2000403408)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/213[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/213" [60;20H[K[60;20H253L, 6369C appended[60;20H[K[60;20H254L, 6391C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/214[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nvimi
[59;98Hn[60;1Hfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/214"' -c 'breakadd func 2 I
[59;98HN[60;1HT' -S /tmp/vX4jyoq/213[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/214" [58;20H[K[59;1H[K[60;1H[K[58;20H28L, 167C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  76: OK (1610087935)
[1m[37m[41mError detected while processing function ERR:[m
[33mline    2:[m
[1m[37m[41mE492: Not an editor command:     asdf[m
[1m[37m[41mE492: Not an editor command:     asdf[m
[1m[37m[41mE492: Not an editor command:     asdf[m
*** Test  77: OK (1388671)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/215[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/215" [60;20H[K[60;20H161L, 4543C appended[60;20H[K[60;20H162L, 4565C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/216[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/216"' -S /tmp/vX4jyoq/215[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/216" [59;21H[K[60;2H[K[59;20H1L, 10C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  78: OK (134217728)
[1m[37m[41mError detected while processing function NEXT:[m
[33mline    1:[m
[1m[37m[41mE121: Undefined variable: novar[m
[1m[37m[41mE15: Invalid expression: novar | Xloop 1[m
[1m[37m[41mE121: Undefined variable: novar[m
[1m[37m[41mE488: Trailing characters[m
[1m[37m[41mE108: No such variable: "novar"[m
[1m[37m[41mE488: Trailing characters[m
[1m[37m[41mE121: Undefined variable: novar[m
[1m[37m[41mE15: Invalid expression: novar[m
[1m[37m[41mE475: Invalid argument: {novar} | Xloop 1[m
[1m[37m[41mE121: Undefined variable: novar[m
[1m[37m[41mE15: Invalid expression:  novar[m
[1m[37m[41mE475: Invalid argument: { novar} | Xloop 1[m
*** Test  79: OK (70288929)
[1m[37m[41mError detected while processing /sources/vim74/src/testdir/test49.vim:[m
[33mline 8828:[m
[1m[37m[41mE584: :elseif after :else: elseif 1 ||| 2[m
[33mline 8838:[m
[1m[37m[41mE584: :elseif after :else: elseif 1 ||| 2[m
[33mline 8846:[m
[1m[37m[41mE582: :elseif without :if: elseif 1 ||| 2[m
[33mline 8854:[m
[1m[37m[41mE582: :elseif without :if:     elseif 1 ||| 2[m
*** Test  80: OK (17895765)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/217[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/217" [60;20H[K[60;20H15L, 272C appended[60;20H[K[60;20H16L, 294C[60;20H[K[60;20H16L, 293C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/218[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/218"' -S /tmp/vX4jyoq/217[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/218" [59;21H[K[60;2H[K[59;20H2L, 4C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/219[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/219" [60;20H[K[60;20H12L, 227C appended[60;20H[K[60;20H13L, 249C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/220[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/220"' -c 'breakadd file 8 /tmp/vX4jyoq/219' -S /tmp
[59;98H/[60;1HvX4jyoq/219[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/220" [58;20H[K[59;1H[K[60;1H[K[58;20H2L, 8C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  81: OK (387)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/221[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/221" [60;20H[K[60;20H20L, 417C appended[60;20H[K[60;20H21L, 439C[60;20H[K[60;20H21L, 438C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/222[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/222"' -S /tmp/vX4jyoq/221[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/222" [59;21H[K[60;2H[K[59;20H1L, 2C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/223[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/223" [60;20H[K[60;20H24L, 480C appended[60;20H[K[60;20H25L, 502C[60;20H[K[60;20H25L, 501C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/224[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/224"' -S /tmp/vX4jyoq/223[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/224" [59;21H[K[60;2H[K[59;20H1L, 4C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/225[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/225" [60;20H[K[60;20H17L, 390C appended[60;20H[K[60;20H18L, 412C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/226[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/226"' -c 'breakadd file 7 /tmp/vX4jyoq/225' -S /tmp
[59;98H/[60;1HvX4jyoq/225[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/226" [58;20H[K[59;1H[K[60;1H[K[58;20H1L, 6C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/227[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H[K[59;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/227" [59;20H[K[59;20H21L, 444C appended[59;20H[K[59;20H22L, 466C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/228[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/228"' -c 'breakadd func 6 I' -S /tmp/vX4jyoq/227[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/228" [59;20H[K[60;1H[K[59;20H1L, 8C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C
*** Test  82: OK (8454401)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/229[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/229" [60;20H[K[60;20H17L, 307C appended[60;20H[K[60;20H18L, 329C[60;20H[K[60;20H18L, 328C written"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/230[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
[59;98H=[60;2H1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/230"' -S /tmp/vX4jyoq/229[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[59;1H"/tmp/vX4jyoq/230" [59;21H[K[60;2H[K[59;20H3L, 7C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [59;13H[K[59;13H30L, 632C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/231[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/231" [60;20H[K[60;20H14L, 266C appended[60;20H[K[60;20H15L, 288C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/232[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBeg
[59;98Hi[60;1Hn = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/232"' -c 'breakadd file 8 /tmp/vX4jyoq/231' -S /tmp
[59;98H/[60;1HvX4jyoq/231[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/232" [58;20H[K[59;1H[K[60;1H[K[58;20H3L, 13C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  83: OK (2835)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/233[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/233" [60;20H[K[60;20H154L, 3580C appended[60;20H[K[60;20H155L, 3602C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/234[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVim
[59;98HB[60;1Hegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/234"' -c 'breakadd func 1 INT' -S /tmp/vX4jyoq/2
[59;98H3[60;1H3[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/234"[58;20H[K[59;1H[K[60;1H[K[58;20H18L, 118C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  84: OK (934782101)
TMP"/tmp/vX4jyoq/235" [noeol] 2L, 6C[60;1H[K[60;1H/  "test49.in" 30L, 632C"/n/o/n/e/x/i/s/t/e/n/t"
"/tmp/vX4jyoq/237" 1L, 1C"test49.in" [60;13H[K[60;13H30L, 632C
:!echo XYZ >/tmp/vX4jyoq/238[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H"/tmp/vX4jyoq/239" [New File]"test49.in" [60;13H[K[60;13H30L, 632C
*** Test  85: OK (198689)
[1m[37m[41mError detected while processing /sources/vim74/src/testdir/test49.vim:[m
[33mline 9612:[m
[1m[37m[41mE123: Undefined function: F[m
Make_amiga.mak(1 of 1): tango down
[33mline 9616:[m
[1m[37m[41mE193: :endfunction not inside a function[m
[1m[37m[41mError detected while processing function ExecAsScript..MakeScript:[m
[33mline    3:[m
[1m[37m[41mE123: Undefined function: F[m"/tmp/vX4jyoq/240" [1m[37m[41mc[m[60;20H[K[60;20H[noeol] 4L, 106C
[31msearch hit BOTTOM, continuing at TOP[m[33mline   10:[m[60;11H[K[60;1H
[1m[37m[41mE486: Pattern not found: .*F(.*)[m
[31msearch hit BOTTOM, continuing at TOP[m[33mline   11:[m[60;11H[K[60;1H
[1m[37m[41mE486: Pattern not found: ^\d*\s*endfunction\>[m
4 substitutions on 4 lines"/tmp/vX4jyoq/240"[60;20H[K[60;20H3L, 106C written"test49.in" [60;13H[K[60;13H30L, 632C
[1m[37m[41mError detected while processing /tmp/vX4jyoq/240:[m
[33mline    1:[m
[1m[37m[41mE492: Not an editor command: Error detected while processing function ExecAsScript..MakeScript:[m
[33mline    2:[m
[1m[37m[41mE492: Not an editor command: line    3:[m
[33mline    3:[m
[1m[37m[41mE492: Not an editor command: E123: Undefined function: F[m
[1m[37m[41mError detected while processing /sources/vim74/src/testdir/test49.vim:[m
[33mline 9622:[m
[1m[37m[41mE130: Unknown function: F[m
*** Test  86: OK (0)
5
*** Test  87: OK (0)"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!echo 'source /tmp/vX4jyoq/3' >/tmp/vX4jyoq/241[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[60;1H[K[60;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vX4jyoq/241" [60;20H[K[60;20H151L, 3929C appended[60;20H[K[60;20H152L, 3951C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C
:!>/tmp/vX4jyoq/242[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let Extra
[59;98HV[60;1HimBegin = 1' -c 'let ExtraVimResult = "/tmp/vX4jyoq/242"' -c 'breakadd func 5 ThrowOnInterrupt' -
[59;98HS[60;2H/tmp/vX4jyoq/241[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[58;1H"/tmp/vX4jyoq/242" [58;21H[K[59;1H[K[60;2H[K[58;20H16L, 281C"/sources/vim74/src/testdir/test49.vim" [readonly] 9852L, 225409C"test49.in" [58;13H[K[58;13H30L, 632C
*** Test  88: OK (50443995)
[32mPress ENTER or type command to continue[27m[23m[m[H[2J[1;1HThis is a test of the script language.

If after adding a new test, the test output doesn't appear properly in
test49.failed, try to add one ore more "G"s at the line ending in "test.out"

STARTTEST
:so small.vim
:se nocp nomore viminfo+=nviminfo
:lang mess C
:so test49.vim
GGGGGGGGGGGGGG"rp:.-,$w! test.out
:"
:" make valgrind happy
:redir => funclist
:silent func
:redir END
:for line in split(funclist, "\n")
:  let name = matchstr(line, 'function \zs[A-Z]\w*\ze(')
:  if name != ''
:    exe "delfunc " . name
:  endif
:endfor
:for v in keys(g:)
:  silent! exe "unlet " . v
:endfor
:unlet v
:qa!
ENDTEST

Results of test49.vim:
[1m[34m~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[30;1H[?25l[m[60;1H98 more lines[31;1H*** Test   1: OK (34695)[31;25H[K[32;1H*** Test   2: OK (34695)[32;25H[K[33;1H*** Test   3: OK (1384648195)[33;30H[K[34;1H*** Test   4: OK (32883)[34;25H[K[35;1H*** Test   5: OK (32883)[35;25H[K[36;1H*** Test   6: OK (603978947)[36;29H[K[37;1H*** Test   7: OK (90563)[37;25H[K[38;1H*** Test   8: OK (562493431)[38;29H[K[39;1H*** Test   9: OK (363)[39;23H[K[40;1H*** Test  10: OK (559615)[40;26H[K[41;1H*** Test  11: OK (2049)[41;24H[K[42;1H*** Test  12: OK (352256)[42;26H[K[43;1H*** Test  13: OK (145)[43;23H[K[44;1H*** Test  14: OK (42413)[44;25H[K[45;1H*** Test  15: OK (42413)[45;25H[K[46;1H*** Test  16: OK (8722)[46;24H[K[47;1H*** Test  17: OK (285127993)[47;29H[K[48;1H*** Test  18: OK (67224583)[48;28H[K[49;1H*** Test  19: OK (69275973)[49;28H[K[50;1H*** Test  20: OK (1874575085)[50;30H[K[51;1H*** Test  21: OK (147932225)[51;29H[K[52;1H*** Test  22: OK (4161)[52;24H[K[53;1H*** Test  23: OK (49)[53;22H[K[54;1H*** Test  24: OK (41)[54;22H[K[55;1H*** Test  25: OK (260177811)[55;29H[K[56;1H*** Test  26: OK (1681500476)[56;30H[K[57;1H*** Test  27: OK (1996459)[57;27H[K[58;1H*** Test  28: OK (1996459)[58;27H[K[59;1H*** Test  29: OK (170428555)[59;29H[K[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.-,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New] 99L, 2869C written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" make valgrind happy[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir => funclist[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsilent func[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir END[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor line in split(funclist, "\n")[?25l
:  [?12l[?25h:  let name = matchstr(line, 'function \zs[A-Z]\w*\ze(')
[?25l:  [?12l[?25h:  if name != ''
[?25l:    [?12l[?25h:    exe "delfunc " . name
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endfor[1;1H[5L[?25l[1;1HThis is a test of the script language.

If after adding a new test, the test output doesn't appear properly in
test49.failed, try to add one ore more "G"s at the line ending in "test.out"[60;1H[K[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25hfor v in keys(g:)[?25l
:  [?12l[?25h:  silent! exe "unlet " . v
[?25l:  [?12l[?25h:endfor[1;1H[2L[?25l[1;1HThis is a test of the script language.[60;1H[K[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25hunlet v[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test51.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test51.in" 36 lines, 808 characters[1;1HTests 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

[1m[34m~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for ":highlight". vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 31 lines, 746 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[35;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" basic test if ":highlight" doesn't crash[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhighlight[?25l
SpecialKey     [34mxxx[m [34mterm=[mbold [34mctermfg=[m4 [34mguifg=[mBlue
NonText[8C[1m[34mxxx[m [34mterm=[mbold [34mcterm=[mbold [34mctermfg=[m4 [34mgui=[mbold [34mguifg=[mBlue
Directory      [34mxxx[m [34mterm=[mbold [34mctermfg=[m4 [34mguifg=[mBlue
ErrorMsg[7C[1m[37m[41mxxx[m [34mterm=[mstandout [34mcterm=[mbold [34mctermfg=[m7 [34mctermbg=[m1 [34mguifg=[mWhite [34mguibg=[mRed
IncSearch      [7mxxx[m [34mterm=[mreverse [34mcterm=[mreverse [34mgui=[mreverse
Search[9C[30m[43mxxx[m [34mterm=[mreverse [34mctermfg=[m0 [34mctermbg=[m3 [34mguibg=[mYellow
MoreMsg[8C[32mxxx[m [34mterm=[mbold [34mctermfg=[m2 [34mgui=[mbold [34mguifg=[mSeaGreen
ModeMsg[8C[1mxxx[m [34mterm=[mbold [34mcterm=[mbold [34mgui=[mbold
LineNr[9C[33mxxx[m [34mterm=[munderline [34mctermfg=[m3 [34mguifg=[mBrown
CursorLineNr   [33mxxx[m [34mterm=[mbold [34mctermfg=[m3 [34mgui=[mbold [34mguifg=[mBrown
Question[7C[32mxxx[m [34mterm=[mstandout [34mctermfg=[m2 [34mgui=[mbold [34mguifg=[mSeaGreen
StatusLine     [1m[7mxxx[m [34mterm=[mbold,reverse [34mcterm=[mbold,reverse [34mgui=[mbold,reverse
StatusLineNC   [7mxxx[m [34mterm=[mreverse [34mcterm=[mreverse [34mgui=[mreverse
VertSplit      [7mxxx[m [34mterm=[mreverse [34mcterm=[mreverse [34mgui=[mreverse
Title[10C[35mxxx[m [34mterm=[mbold [34mctermfg=[m5 [34mgui=[mbold [34mguifg=[mMagenta
Visual[9C[7mxxx[m [34mterm=[mreverse [34mcterm=[mreverse [34mguibg=[mLightGrey
VisualNOS      xxx cleared
WarningMsg     [31mxxx[m [34mterm=[mstandout [34mctermfg=[m1 [34mguifg=[mRed
WildMenu[7C[30m[43mxxx[m [34mterm=[mstandout [34mctermfg=[m0 [34mctermbg=[m3 [34mguifg=[mBlack [34mguibg=[mYellow
Folded[9C[34m[47mxxx[m [34mterm=[mstandout [34mctermfg=[m4 [34mctermbg=[m7 [34mguifg=[mDarkBlue [34mguibg=[mLightGrey
FoldColumn     [34m[47mxxx[m [34mterm=[mstandout [34mctermfg=[m4 [34mctermbg=[m7 [34mguifg=[mDarkBlue [34mguibg=[mGrey
DiffAdd[8C[44mxxx[m [34mterm=[mbold [34mctermbg=[m4 [34mguibg=[mLightBlue
DiffChange     [45mxxx[m [34mterm=[mbold [34mctermbg=[m5 [34mguibg=[mLightMagenta
DiffDelete     [1m[34m[46mxxx[m [34mterm=[mbold [34mcterm=[mbold [34mctermfg=[m4 [34mctermbg=[m6 [34mgui=[mbold [34mguifg=[mBlue [34mguibg=[mLightCyan
DiffText[7C[1m[41mxxx[m [34mterm=[mreverse [34mcterm=[mbold [34mctermbg=[m1 [34mgui=[mbold [34mguibg=[mRed
SignColumn     [34m[47mxxx[m [34mterm=[mstandout [34mctermfg=[m4 [34mctermbg=[m7 [34mguifg=[mDarkBlue [34mguibg=[mGrey
Conceal[8Cxxx cleared
SpellBad[7C[41mxxx[m [34mterm=[mreverse [34mctermbg=[m1 [34mgui=[mundercurl [34mguisp=[mRed
SpellCap[7C[44mxxx[m [34mterm=[mreverse [34mctermbg=[m4 [34mgui=[mundercurl [34mguisp=[mBlue
SpellRare      [45mxxx[m [34mterm=[mreverse [34mctermbg=[m5 [34mgui=[mundercurl [34mguisp=[mMagenta
SpellLocal     [46mxxx[m [34mterm=[munderline [34mctermbg=[m6 [34mgui=[mundercurl [34mguisp=[mDarkCyan
Pmenu[10C[30m[45mxxx[m [34mctermfg=[m0 [34mctermbg=[m5 [34mguibg=[mLightMagenta
PmenuSel[7C[30m[47mxxx[m [34mctermfg=[m0 [34mctermbg=[m7 [34mguibg=[mGrey
PmenuSbar      [47mxxx[m [34mctermbg=[m7 [34mguibg=[mGrey
PmenuThumb     [40mxxx[m [34mctermbg=[m0 [34mguibg=[mBlack
TabLine[8C[4m[30m[47mxxx[m [34mterm=[munderline [34mcterm=[munderline [34mctermfg=[m0 [34mctermbg=[m7 [34mgui=[munderline
[19C[34mguibg=[mLightGrey
TabLineSel     [1mxxx[m [34mterm=[mbold [34mcterm=[mbold [34mgui=[mbold
TabLineFill    [7mxxx[m [34mterm=[mreverse [34mcterm=[mreverse [34mgui=[mreverse
CursorColumn   [47mxxx[m [34mterm=[mreverse [34mctermbg=[m7 [34mguibg=[mGrey90
CursorLine     [4mxxx[m [34mterm=[munderline [34mcterm=[munderline [34mguibg=[mGrey90
ColorColumn    [41mxxx[m [34mterm=[mreverse [34mctermbg=[m1 [34mguibg=[mLightRed
MatchParen     [46mxxx[m [34mterm=[mreverse [34mctermbg=[m6 [34mguibg=[mCyan
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi Search[?25l
Search[9C[30m[43mxxx[m [34mterm=[mreverse [34mctermfg=[m0 [34mctermbg=[m3 [34mguibg=[mYellow
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h" test setting colors.[?25l[1;1H[46L[1;1HTests 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

[1m[34m~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [m[60;1H[K[36;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" test clearing one color and all doesn't generate error or warning[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibg=Cyan[?25l[1m[37m[41mE418: Illegal value: guifg=#00ff00[m[60;35H[K[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhi Group2 term= cterm=[?25l[1m[37m[41mE418: Illegal value: cterm=[36;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi Group3 term=underline cterm=bold[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir! >test.out[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhi NewGroup[?25l
NewGroup[7C[3m[34m[47mxxx[23m[m [34mterm=[mbold [34mcterm=[mitalic [34mctermfg=[m4 [34mctermbg=[m7
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi Group2[?25l
Group2[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi Group3[?25l
Group3[9C[1mxxx[m [34mterm=[munderline [34mcterm=[mbold
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi clear NewGroup[?25l[1;1H[6L[1;1HTests for ":highlight". vim: set ft=vim :

STARTTEST
:so small.vim
:" basic test if ":highlight" doesn't crash
:highlight[60;1H[K[36;1H[?12l[?25h[?25l[60;1H:[?12l[?25hhi NewGroup[?25l
NewGroup[7Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi Group2[?25l
Group2[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi Group2 NONE[?25l[1;1H[4L[1;1HTests for ":highlight". vim: set ft=vim :

STARTTEST
:so small.vim[60;1H[K[36;1H[?12l[?25h[?25l[60;1H:[?12l[?25hhi Group2[?25l
Group2[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi clear[?25l[27m[23m[m[H[2J[1;1HTests 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

[1m[34m~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [36;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hhi Group3[?25l
Group3[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hhi Crash term='asdf[?25l[1m[37m[41mE475: Invalid argument: term='asdf[m
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[3L[1;1HTests for ":highlight". vim: set ft=vim :

STARTTEST[60;1H[K[36;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" filter ctermfg and ctermbg, the numbers depend on the terminal[?25l[36;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he test.out[?25l"test.out" 20 lines, 289 characters[1;1H[K[3;1HNewGroup       xxx term=bold cterm=italic ctermfg=4 ctermbg=7[4;1H[K[5;1HGroup2         xxx cleared[5;27H[K[6;1H[K[7;1HGroup3         xxx term=underline cterm=bold[8;1H[K[9;1H[K[10;1HNewGroup       xxx cleared[10;27H[K[11;1H[K[12;1HGroup2         xxx cleared[12;27H[K[13;1H[K[14;1H[K[15;1HGroup2         xxx cleared[16;1H[K[17;1H[K[18;1HGroup3         xxx cleared[19;1H[K[20;1HE475: Invalid argument: term='asdf
[1m[34m~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h%s/ctermfg=\d*/ctermfg=2/[?25l[3;51H2[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%s/ctermbg=\d*/ctermbg=3/[?25l[3;61H3[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" filter out possibly translated error message[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%s/E475: [^:]*:/E475:/[?25l[20;7Hterm='asdf[20;17H[K[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" fix the fileformat[?25l[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ff&[?25l[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwq![?25l"test.out" 20 lines, 271 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test52.failed test.ok test.out X* viminfo
cp test52.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test52.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test52.in" 65 lines, 1645 characters[1;1HTests for reading and writing files with conversion for Win32.

STARTTEST
:so mbyte.vim
:" make this a dummy test for non-Win32 systems
:if !has("win32") | e! test.ok | wq! test.out | endif
:"
:" write tests:
:" combine three values for 'encoding' with three values for 'fileencoding'
:" also write files for read tests
/^1
:set encoding=utf-8
:.w! ++enc=utf-8 test.out
:.w ++enc=cp1251 >>test.out
:.w ++enc=cp866 >>test.out
:.w! ++enc=utf-8 Xutf8
/^2
:set encoding=cp1251
:.w ++enc=utf-8 >>test.out
:.w ++enc=cp1251 >>test.out
:.w ++enc=cp866 >>test.out
:.w! ++enc=cp1251 Xcp1251
/^3
:set encoding=cp866
:.w ++enc=utf-8 >>test.out
:.w ++enc=cp1251 >>test.out
:.w ++enc=cp866 >>test.out
:.w! ++enc=cp866 Xcp866
:"
:" read three 'fileencoding's with utf-8 'encoding'
:set encoding=utf-8 fencs=utf-8,cp1251
:e Xutf8
:.w ++enc=utf-8 >>test.out
:e Xcp1251
:.w ++enc=utf-8 >>test.out
:set fencs=utf-8,cp866
:e Xcp866
:.w ++enc=utf-8 >>test.out
:"
:" read three 'fileencoding's with cp1251 'encoding'
:set encoding=utf-8 fencs=utf-8,cp1251
:e Xutf8
:.w ++enc=cp1251 >>test.out
:e Xcp1251
:.w ++enc=cp1251 >>test.out
:set fencs=utf-8,cp866
:e Xcp866
:.w ++enc=cp1251 >>test.out
:"
:" read three 'fileencoding's with cp866 'encoding'
:set encoding=cp866 fencs=utf-8,cp1251
:e Xutf8
:.w ++enc=cp866 >>test.out
:e Xcp1251
:.w ++enc=cp866 >>test.out
:set fencs=utf-8,cp866
:e Xcp866
:.w ++enc=cp866 >>test.out
:"[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for reading and writing files with conversion for Win32.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 57 lines, 1333 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" make this a dummy test for non-Win32 systems[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has("win32") | e! test.ok | wq! test.out | endif[?25l"test.ok" [60;11H[K[60;11H18 lines, 1374 characters
"test.out" [New File] 18 lines, 1374 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test53.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test53.in" 78 lines, 1336 characters[1;1HTests 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
:"
/^<begin
jfXdit
0fXdit
fXdat
0fXdat
:"
:put =matchstr(\"abcd\", \".\", 0, 2) " b
:put =matchstr(\"abcd\", \"..\", 0, 2) " bc
:put =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)
:put =matchstr(\"abcd\", \".\", 0, -1) " a
:put =match(\"abcd\", \".\", 0, 5) " -1
:put =match(\"abcd\", \".\", 0, -1) " 0
/^foobar
gncsearchmatch[34m^[[m/one\_s*two\_s
:1
gnd
/[a]bcdx
:1
2gnd/join
/$
0gnd
/\>\zs
0gnd/^
gnd$h/\zs
gnd/[u]niquepattern/s
vlgnd
/mother
:set selection=exclusive
$cgNmongoose[34m^[[m/i
cgnj[34m^[[m
:/^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[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for string and html text objects. vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[7;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 42 lines, 644 characters written[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[8;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[50;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[51;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[51;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start:/[?25l[60;9H[K[60;1H[52;1H[?12l[?25h[?25l[7Cfo[52;11H[K[52;8H[?12l[?25h[53;8H[?25l[?12l[?25h[?25l[7m'foo'[?12l[?25h[?25l 'bar'[?12l[?25h[?25l[mxxxxxxxxxxxx[?12l[?25h
[14C[?25lblah[54;13H[K[54;9H[?12l[?25h[55;9H[12C[?25l"[55;12H[K[55;11H[?12l[?25h[56;11H[9C[?25l[?12l[?25h[?25l'[7m rep[?12l[?25h[?25l[myyyyy[?12l[?25h[57;11H[?25l[60;1H[K[60;1H:[?12l[?25hset quoteescape=+*-[?25l[57;11H[?12l[?25h[?25l` b`la[57;12H[K[57;6H[?12l[?25h[58;6H[29C[?25l[?12l[?25h[?25l[7m" sdf"[?12l[?25h[?25l[m"[5C[7m [58;27H[?12l[?25h[?25l"[?12l[?25h[?25l[58;16H asdf" sdf [58;15H[?12l[?25h[?25l[58;7Hah" sdf "[mvoo "[?12l[?25h[?25lzzzzzzzzzzzzzzzzzzzzzzzzzzzzvoo "[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^<begin[?25l[1;59r[59;1H
[1;60r[59;1H<begin>[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H-<b>asdf<i>Xasdf</i>asdf</b>-[?12l[?25h[11C[?25l</i>asdf</b>-[59;25H[K[59;12H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H-<b>asdX<i>a<i />sdf</i>asdf</b>-[59;12H[?12l[?25h[7C[?25l</b>-[59;10H[K[59;5H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H-<b>asdf<i>Xasdf</i>asdf</b>--<b>[?12l[?25h[7C[?25lasdf</b>-[59;18H[K[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H-<b>asdX<i>as<b />df</i>asdf</b>-[59;9H[?12l[?25h[7C[?25l--[59;3H[K[59;2H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H</begin><[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;2H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hput =matchstr(\"abcd\", \".\", 0, 2) " b[?25l[1;59r[59;1H
[1;60r[59;1Hb[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hput =matchstr(\"abcd\", \"..\", 0, 2) " bc[?25l[1;59r[59;1H
[1;60r[59;1Hbc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hput =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)[?25l[1;59r[59;1H
[1;60r[59;1Hc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hput =matchstr(\"abcd\", \".\", 0, -1) " a[?25l[1;59r[59;1H
[1;60r[59;1Ha[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hput =match(\"abcd\", \".\", 0, 5) " -1[?25l[1;59r[59;1H
[1;60r[59;1H-1[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hput =match(\"abcd\", \".\", 0, -1) " 0[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^foobar[?25l[1;59r[1;1H[2M[1;60r[58;1HSEARCH:
foobar[60;1H[K[59;1H[?12l[?25h[?25l[7mfooba[?12l[?25h[?25l[msearchmatch[?12l[?25h[?25l
/[?12l[?25hone\_s*two\_s[?25l[1;59r[59;1H
[1;60r[59;1Hone[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h1[?25l[1;59r[1;1H[15L[1;60r[1;1HTests 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=+*-[60;1H[K[1;1H[?12l[?25h[?25l[1;59r[1;1H[16M[1;60r[44;1H<begin>
-<b>asdf<i></i>asdf</b>-
-<b></b>-
-<b>asdfasdf</b>-
--
</begin>
b
bc
c
a
-1
0
SEARCH:
searchmatch
[7mone 
two[?12l[?25h[?25l[m[58;1Habcdx | abcdx | abcdx
join[58;1H[?12l[?25h
[?25l
/[?12l[?25h[a]bcdx[?25l[31msearch hit BOTTOM, continuing at TOP[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1[?25l[1;59r[1;1H[16L[1;60r[1;1HTests 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`[60;1H[K[1;1H[?12l[?25h[?25l[1;59r[1;1H[15M[1;60r[45;1H<begin>
-<b>asdf<i></i>asdf</b>-
-<b></b>-
-<b>asdfasdf</b>-
--
</begin>
b
bc
c
a
-1
0
SEARCH:
searchmatch
abcdx | [7mabcd[mx | abcdx[59;13H[?12l[?25h[?25l | abcdx[59;17H[K[59;9H[?12l[?25h[?25l
/[?12l[?25hjoin[?25l[1;59r[59;1H
[1;60r[59;1Hjoin[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h$[?25l[59;5H[?12l[?25h[?25ljoin [?12l[?25h[?25llines[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hzero width pattern[60;1H[K[59;6H[?12l[?25h[?25l
/[?12l[?25h\>\zs[?25l[59;11H[?12l[?25h[?25lzero[?12l[?25h[?25lwidth pattern[59;18H[K[59;5H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^[?25l[1;59r[59;1H
[1;60r[59;1Hdelete first and last chars[60;1H[K[59;1H[?12l[?25h[?25l[?12l[?25h[?25lelete first and last chars[59;27H[K[59;1H[?12l[?25h[25C[?25l
/[?12l[?25h\zs[?25l[59;26H[?12l[?25h[?25l[?12l[?25h[?25l[59;26H[K[59;25H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h[u]niquepattern/s[?25l[60;17H[K[60;1H[1;59r[59;1H
[1;60r[59;1Huniquepattern uniquepattern[60;1H[K[59;1H[?12l[?25h[?25l[?12l[?25h[?25l[7mu[?12l[?25h[?25lniquepatter[?12l[?25h[?25l[m uniquepattern[59;15H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hmy very excellent mother just served us nachos[?12l[?25h[?25l
/[?12l[?25hmother[?25l[59;19H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset selection=exclusive[?25l[59;19H[?12l[?25h[27C[?25l[59;21Hngoose just served us nachos[59;26H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hi[?25l[1;59r[59;1H
[1;60r[59;1Hfor (i=0; i<=10; i++)[60;1H[K[59;6H[?12l[?25h[?25lj[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hend:[?12l[?25h[?25l
:[?12l[?25h/^start:/,/^end:/wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 30 lines, 395 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test54.failed test.ok test.out X* viminfo
cp test54.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test54.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test54.in" 22 lines, 658 characters[1;1HSome tests for buffer-local autocommands

STARTTEST
:so small.vim
:e xx
:if has("vms")
: !del test.out.*
: au BufLeave <buffer> :!write sys$output "buffer-local autommand in %" > test.out
:else
: !rm -f test.out
: au BufLeave <buffer> :!echo buffer-local autommand in %>> test.out
:endif
:e somefile[11C" here, autocommand for xx shall write test.out
:[21C" but autocommand shall not apply to buffer named <buffer>
:bwipe xx[13C" here, autocommand shall be auto-deleted
:e xx[17C" nothing shall be written
:e somefile[11C" nothing shall be written
:qa!
ENDTEST

start of test file xx
end of test file xx
[1m[34m~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HSome tests for buffer-local autocommands[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 15 lines, 555 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[19;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[20;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he xx[?25l"xx" [New File][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif has("vms")[?25l
:  [?12l[?25h: !del test.out.*
[?25l:  [?12l[?25h: au BufLeave <buffer> :!write sys$output "buffer-local autommand in %" > test.out
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: !rm -f test.out
[?25l:!rm -f test.out[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[60;1H
[?25l:  :[?12l[?25h au BufLeave <buffer> :!echo buffer-local autommand in %>> test.out
[?25l:  [?12l[?25h:endif[?25l[60;1H[K[60;1H:[?12l[?25he somefile           " here, autocommand for xx shall write test.out [?25l:!echo buffer-local autommand in xx>> test.out[60;47H[K[60;47H
[?12l[?25h[?25l[m"somefile" [New File]
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h                     " but autocommand shall not apply to buffer named <buffer>[?25l[27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hbwipe xx             " here, autocommand shall be auto-deleted[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he xx                 " nothing shall be written[?25l"xx" [New File][60;23H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he somefile           " nothing shall be written[?25l"somefile" [New File][60;23H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test55.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test55.in" 395 lines, 8118 characters[1;1HTests 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[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for List and Dictionary types.     vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 389 lines, 8032 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:"
:" 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)
: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[34m^R[m=a[34m^M^[[m:"
:lang C
:redir => a
:try|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
:redir END
o[34m^R[m=a[34m^M^[[m:"
:"
:/^start:/,$wq! test.out
ENDTEST

start:[57;1H[?12l[?25h
[?25l

:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfun Test(...)[?25l
:  [?12l[?25h:lang C
[?25l:  [?12l[?25h:" Creating List directly with different types
[?25l:  [?12l[?25h:let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25h:$put =string(l[-1])
[?25l:  [?12l[?25h:$put =string(l[-4])
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  $put =string(l[-5])
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception[:14]
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:" List slices
[?25l:  [?12l[?25h:$put =string(l[:])
[?25l:  [?12l[?25h:$put =string(l[1:])
[?25l:  [?12l[?25h:$put =string(l[:-2])
[?25l:  [?12l[?25h:$put =string(l[0:8])
[?25l:  [?12l[?25h:$put =string(l[8:-1])
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" List identity
[?25l:  [?12l[?25h:let ll = l
[?25l:  [?12l[?25h:let lx = copy(l)
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  $put =(l == ll) . (l isnot ll) . (l is ll) . (l == lx) . (l is lx) . (l isnot lx)
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" Creating Dictionary directly with different types
[?25l:  [?12l[?25h:let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},}
[?25l:  [?12l[?25h:$put =string(d) . d.1
[?25l:  [?12l[?25h:$put =string(sort(keys(d)))
[?25l:  [?12l[?25h:$put =string (values(d))
[?25l:  [?12l[?25h:for [key, val] in items(d)
[?25l:    [?12l[?25h:  $put =key . ':' . string(val)
[?25l:    [?12l[?25h:  unlet key val
[?25l:    [?12l[?25h:endfor
[?25l:  [?12l[?25h:call extend  (d, {3:33, 1:99})
[?25l:  [?12l[?25h:call extend(d, {'b':'bbb', 'c':'ccc'}, "keep")
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  call extend(d, {3:333,4:444}, "error")
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception[:15] . v:exception[-1:-1]
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:$put =string(d)
[?25l:  [?12l[?25h:call filter(d, 'v:key =~ ''[ac391]''')
[?25l:  [?12l[?25h:$put =string(d)
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" Dictionary identity
[?25l:  [?12l[?25h:let dd = d
[?25l:  [?12l[?25h:let dx = copy(d)
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  $put =(d == dd) . (d isnot dd) . (d is dd) . (d == dx) . (d is dx) . (d isnot dx)
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" Changing var type should fail
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  let d = []
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception[:14] . v:exception[-1:-1]
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  let l = {}
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception[:14] . v:exception[-1:-1]
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" removing items with :unlet
[?25l:  [?12l[?25h:unlet l[2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25h:let l = range(8)
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:unlet l[:3]
[?25l:    [?12l[?25h:unlet l[1:]
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:$put =v:exception
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:unlet d.c
[?25l:  [?12l[?25h:unlet d[-1]
[?25l:  [?12l[?25h:$put =string(d)
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" removing items out of range: silently skip items that don't exist
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[2:1]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[2:2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[2:3]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[2:4]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[2:5]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[-1:2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[-2:2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[-3:2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[-4:2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[-5:2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25hlet l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:unlet l[-6:2]
[?25l:  [?12l[?25h:$put =string(l)
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" assignment to a list
[?25l:  [?12l[?25h:let l = [0, 1, 2, 3]
[?25l:  [?12l[?25h:let [va, vb] = l[2:3]
[?25l:  [?12l[?25h:$put =va
[?25l:  [?12l[?25h:$put =vb
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  let [va, vb] = l
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception[:14]
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  let [va, vb] = l[1:1]
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =v:exception[:14]
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" manipulating a big Dictionary (hashtable.c has a border of 1000 entries)
[?25l:  [?12l[?25h:let d = {}
[?25l:  [?12l[?25h:for i in range(1500)
[?25l:    [?12l[?25h: let d[i] = 3000 - i
[?25l:    [?12l[?25h:endfor
[?25l:  [?12l[?25h:$put =d[0] . ' ' . d[100] . ' ' . d[999] . ' ' . d[1400] . ' ' . d[1499]
[?25l:  [?12l[?25h:try
[?25l:    [?12l[?25h:  let n = d[1500]
[?25l:    [?12l[?25h:catch
[?25l:    [?12l[?25h:  $put =substitute(v:exception, '\v(.{14}).*( \d{4}).*', '\1\2', '')
[?25l:    [?12l[?25h:endtry
[?25l:  [?12l[?25h:" lookup each items
[?25l:  [?12l[?25h:for i in range(1500)
[?25l:    [?12l[?25h: if d[i] != 3000 - i
[?25l:      [?12l[?25h:  $put =d[i]
[?25l:      [?12l[?25h: endif
[?25l:    [?12l[?25h:endfor
[?25l:  [?12l[?25h: let i += 1
[?25l:  [?12l[?25h:" delete even items
[?25l:  [?12l[?25h:while i >= 2
[?25l:    [?12l[?25h: let i -= 2
[?25l:    [?12l[?25h: unlet d[i]
[?25l:    [?12l[?25h:endwhile
[?25l:  [?12l[?25h:$put =get(d, 1500 - 100, 'NONE') . ' ' . d[1]
[?25l:  [?12l[?25h:" delete odd items, checking value, one intentionally wrong
[?25l:  [?12l[?25h:let d[33] = 999
[?25l:  [?12l[?25h:let i = 1
[?25l:  [?12l[?25h:while i < 1500
[?25l:    [?12l[?25h: if d[i] != 3000 - i
[?25l:      [?12l[?25h:  $put =i . '=' . d[i]
[?25l:      [?12l[?25h: else
[?25l:      [?12l[?25h:  unlet d[i]
[?25l:      [?12l[?25h: endif
[?25l:    [?12l[?25h: let i += 2
[?25l:    [?12l[?25h:endwhile
[?25l:  [?12l[?25h:$put =string(d)  " must be almost empty now
[?25l:  [?12l[?25h:unlet d
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" Dictionary function
[?25l:  [?12l[?25h:let dict = {}
[?25l:  [?12l[?25h:func dict.func(a) dict
[?25l:    [?12l[?25h:  $put =a:a . len(self.data)
[?25l:    [?12l[?25h:endfunc
[?25l:    [?12l[?25h:let dict.data = [1,2,3]
[?25l:    [?12l[?25h:call dict.func("len: ")
[?25l:    [?12l[?25h:let x = dict.func("again: ")
[?25l:    [?12l[?25h:try
[?25l:      [?12l[?25h:  let Fn = dict.func
[?25l:      [?12l[?25h:  call Fn('xxx')
[?25l:      [?12l[?25h:catch
[?25l:      [?12l[?25h:  $put =v:exception[:15]
[?25l:      [?12l[?25h:endtry
[?25l:    [?12l[?25h:" 
[?25l:    [?12l[?25h:" Function in script-local List or Dict
[?25l:    [?12l[?25h:let g:dict = {}
[?25l:    [?12l[?25h:function g:dict.func() dict
[?25l:      [?12l[?25h:  $put ='g:dict.func'.self.foo[1].self.foo[0]('asdf')
[?25l:      [?12l[?25h:endfunc
[?25l:      [?12l[?25h:let g:dict.foo = ['-', 2, 3]
[?25l:      [?12l[?25h:call insert(g:dict.foo, function('strlen'))
[?25l:      [?12l[?25h:call g:dict.func()
[?25l:      [?12l[?25h:" 
[?25l:      [?12l[?25h:" Nasty: remove func from Dict that's being called (works)
[?25l:      [?12l[?25h:let d = {1:1}
[?25l:      [?12l[?25h:func d.func(a)
[?25l:[8C[?12l[?25h:  return "a:". a:a
[?25l:[8C[?12l[?25h:endfunc
[?25l:[8C[?12l[?25h:$put =d.func(string(remove(d, 'func')))
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" Nasty: deepcopy() dict that refers to itself (fails when noref used)
[?25l:[8C[?12l[?25h:let d = {1:1, 2:2}
[?25l:[8C[?12l[?25h:let l = [4, d, 6]
[?25l:[8C[?12l[?25h:let d[3] = l
[?25l:[8C[?12l[?25h:let dc = deepcopy(d)
[?25l:[8C[?12l[?25h:try
[?25l:[10C[?12l[?25h:  let dc = deepcopy(d, 1)
[?25l:[10C[?12l[?25h:catch
[?25l:[10C[?12l[?25h:  $put =v:exception[:14]
[?25l:[10C[?12l[?25h:endtry
[?25l:[8C[?12l[?25h:let l2 = [0, l, l, 3]
[?25l:[8C[?12l[?25h:let l[1] = l2
[?25l:[8C[?12l[?25h:let l3 = deepcopy(l2)
[?25l:[8C[?12l[?25h:$put ='same list: ' . (l3[1] is l3[2])
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" Locked variables
[?25l:[8C[?12l[?25h:for depth in range(5)
[?25l:[10C[?12l[?25h:  $put ='depth is ' . depth
[?25l:[10C[?12l[?25h:  for u in range(3)
[?25l:[12C[?12l[?25h:    unlet l
[?25l:[12C[?12l[?25h:    let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}]
[?25l:[12C[?12l[?25h:    exe "lockvar " . depth . " l"
[?25l:[12C[?12l[?25h:    if u == 1
[?25l:[14C[?12l[?25h:      exe "unlockvar l"
[?25l:[14C[?12l[?25h:    elseif u == 2
[?25l:[14C[?12l[?25h:      exe "unlockvar " . depth . " l"
[?25l:[14C[?12l[?25h:    endif
[?25l:[12C[?12l[?25h:    let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l[1][1][0
[59;98H][60;1H").'-'.islocked("l[2]").islocked("l[2]['6']").islocked("l[2]['6'][7]")
[?25l:[12C[?12l[?25h:    $put =ps
[?25l:[12C[?12l[?25h:    let ps = ''
[?25l:[12C[?12l[?25h:    try
[?25l:[14C[?12l[?25h:      let l[1][1][0] = 99
[?25l:[14C[?12l[?25h:      let ps .= 'p'
[?25l:[14C[?12l[?25h:    catch
[?25l:[14C[?12l[?25h:      let ps .= 'F'
[?25l:[14C[?12l[?25h:    endtry
[?25l:[12C[?12l[?25h:    try
[?25l:[14C[?12l[?25h:      let l[1][1] = [99]
[?25l:[14C[?12l[?25h:      let ps .= 'p'
[?25l:[14C[?12l[?25h:    catch
[?25l:[14C[?12l[?25h:      let ps .= 'F'
[?25l:[14C[?12l[?25h:    endtry
[?25l:[12C[?12l[?25h:    try
[?25l:[14C[?12l[?25h:      let l[1] = [99]
[?25l:[14C[?12l[?25h:      let ps .= 'p'
[?25l:[14C[?12l[?25h:    catch
[?25l:[14C[?12l[?25h:      let ps .= 'F'
[?25l:[14C[?12l[?25h:    endtry
[?25l:[12C[?12l[?25h:    try
[?25l:[14C[?12l[?25h:      let l[2]['6'][7] = 99
[?25l:[14C[?12l[?25h:      let ps .= 'p'
[?25l:[14C[?12l[?25h:    catch
[?25l:[14C[?12l[?25h:      let ps .= 'F'
[?25l:[14C[?12l[?25h:    endtry
[?25l:[12C[?12l[?25h:    try
[?25l:[14C[?12l[?25h:      let l[2][6] = {99: 99}
[?25l:[14C[?12l[?25h:      let ps .= 'p'
[?25l:[14C[?12l[?25h:    catch
[?25l:[14C[?12l[?25h:      let ps .= 'F'
[?25l:[14C[?12l[?25h:    endtry
[?25l:[12C[?12l[?25h:    try
[?25l:[14C[?12l[?25h:      let l[2] = {99: 99}
[?25l:[14C[?12l[?25h:      let ps .= 'p'
[?25l:[14C[?12l[?25h:    catch
[?25l:[14C[?12l[?25h:      let ps .= 'F'
[?25l:[14C[?12l[?25h:    endtry
[?25l:[12C[?12l[?25h:    try
[?25l:[14C[?12l[?25h:      let l = [99]
[?25l:[14C[?12l[?25h:      let ps .= 'p'
[?25l:[14C[?12l[?25h:    catch
[?25l:[14C[?12l[?25h:      let ps .= 'F'
[?25l:[14C[?12l[?25h:    endtry
[?25l:[12C[?12l[?25h:    $put =ps
[?25l:[12C[?12l[?25h:  endfor
[?25l:[10C[?12l[?25h:endfor
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" a:000 function argument
[?25l:[8C[?12l[?25h:" first the tests that should fail
[?25l:[8C[?12l[?25h:try
[?25l:[10C[?12l[?25h:  let a:000 = [1, 2]
[?25l:[10C[?12l[?25h:catch
[?25l:[10C[?12l[?25h:  $put ='caught a:000'
[?25l:[10C[?12l[?25h:endtry
[?25l:[8C[?12l[?25h:try
[?25l:[10C[?12l[?25h:  let a:000[0] = 9
[?25l:[10C[?12l[?25h:catch
[?25l:[10C[?12l[?25h:  $put ='caught a:000[0]'
[?25l:[10C[?12l[?25h:endtry
[?25l:[8C[?12l[?25h:try
[?25l:[10C[?12l[?25h:  let a:000[2] = [9, 10]
[?25l:[10C[?12l[?25h:catch
[?25l:[10C[?12l[?25h:  $put ='caught a:000[2]'
[?25l:[10C[?12l[?25h:endtry
[?25l:[8C[?12l[?25h:try
[?25l:[10C[?12l[?25h:  let a:000[3] = {9: 10}
[?25l:[10C[?12l[?25h:catch
[?25l:[10C[?12l[?25h:  $put ='caught a:000[3]'
[?25l:[10C[?12l[?25h:endtry
[?25l:[8C[?12l[?25h:" now the tests that should pass
[?25l:[8C[?12l[?25h:try
[?25l:[10C[?12l[?25h:  let a:000[2][1] = 9
[?25l:[10C[?12l[?25h:  call extend(a:000[2], [5, 6])
[?25l:[10C[?12l[?25h:  let a:000[3][5] = 8
[?25l:[10C[?12l[?25h:  let a:000[3]['a'] = 12
[?25l:[10C[?12l[?25h:  $put =string(a:000)
[?25l:[10C[?12l[?25h:catch
[?25l:[10C[?12l[?25h:  $put ='caught ' . v:exception
[?25l:[10C[?12l[?25h:endtry
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" reverse() and sort()
[?25l:[8C[?12l[?25h:let l = ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', [0, 1, 2], 'x8']
[?25l:[8C[?12l[?25h:$put =string(reverse(l))
[?25l:[8C[?12l[?25h:$put =string(reverse(reverse(l)))
[?25l:[8C[?12l[?25h:$put =string(sort(l))
[?25l:[8C[?12l[?25h:$put =string(reverse(sort(l)))
[?25l:[8C[?12l[?25h:$put =string(sort(reverse(sort(l))))
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" splitting a string to a List
[?25l:[8C[?12l[?25h:$put =string(split('  aa  bb '))
[?25l:[8C[?12l[?25h:$put =string(split('  aa  bb  ', '\W\+', 0))
[?25l:[8C[?12l[?25h:$put =string(split('  aa  bb  ', '\W\+', 1))
[?25l:[8C[?12l[?25h:$put =string(split('  aa  bb  ', '\W', 1))
[?25l:[8C[?12l[?25h:$put =string(split(':aa::bb:', ':', 0))
[?25l:[8C[?12l[?25h:$put =string(split(':aa::bb:', ':', 1))
[?25l:[8C[?12l[?25h:$put =string(split('aa,,bb, cc,', ',\s*', 1))
[?25l:[8C[?12l[?25h:$put =string(split('abc', '\zs'))
[?25l:[8C[?12l[?25h:$put =string(split('abc', '\zs', 1))
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" compare recursively linked list and dict
[?25l:[8C[?12l[?25h:let l = [1, 2, 3, 4]
[?25l:[8C[?12l[?25h:let d = {'1': 1, '2': l, '3': 3}
[?25l:[8C[?12l[?25h:let l[1] = d
[?25l:[8C[?12l[?25h:$put =(l == l)
[?25l:[8C[?12l[?25h:$put =(d == d)
[?25l:[8C[?12l[?25h:$put =(l != deepcopy(l))
[?25l:[8C[?12l[?25h:$put =(d != deepcopy(d))
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" compare complex recursively linked list and dict
[?25l:[8C[?12l[?25h:let l = []
[?25l:[8C[?12l[?25h:call add(l, l)
[?25l:[8C[?12l[?25h:let dict4 = {"l": l}
[?25l:[8C[?12l[?25h:call add(dict4.l, dict4)
[?25l:[8C[?12l[?25h:let lcopy = deepcopy(l)
[?25l:[8C[?12l[?25h:let dict4copy = deepcopy(dict4)
[?25l:[8C[?12l[?25h:$put =(l == lcopy)
[?25l:[8C[?12l[?25h:$put =(dict4 == dict4copy)
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" Pass the same List to extend()
[?25l:[8C[?12l[?25h:let l = [1, 2, 3, 4, 5]
[?25l:[8C[?12l[?25h:call extend(l, l)
[?25l:[8C[?12l[?25h:$put =string(l)
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" Pass the same Dict to extend()
[?25l:[8C[?12l[?25h:let d = { 'a': {'b': 'B'}}
[?25l:[8C[?12l[?25h:call extend(d, d)
[?25l:[8C[?12l[?25h:$put =string(d)
[?25l:[8C[?12l[?25h:"
[?25l:[8C[?12l[?25h:" Pass the same Dict to extend() with "error"
[?25l:[8C[?12l[?25h:try
[?25l:[10C[?12l[?25h:  call extend(d, d, "error")
[?25l:[10C[?12l[?25h:catch
[?25l:[10C[?12l[?25h:  $put =v:exception[:15] . v:exception[-1:-1]
[?25l:[10C[?12l[?25h:endtry
[?25l:[8C[?12l[?25h:$put =string(d)
[?25l:[8C[?12l[?25h:endfun[27m[23m[m[H[2J[?25l[1;1H:"
:" 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)
: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[34m^R[m=a[34m^M^[[m:"
:lang C
:redir => a
:try|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry
:redir END
o[34m^R[m=a[34m^M^[[m:"
:"
:/^start:/,$wq! test.out
ENDTEST

start:[58;1H[?12l[?25h[?25l

:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall Test(1, 2, [3, 4], {5: 6})  " This may take a while[?25l[1m[37m[41mError detected while processing function Test:[m[60;47H[K[60;1H
[33mline   87:[m
[1m[37m[41mE684: list index out of range: 1[m
[33mline  102:[m
[1m[37m[41mE684: list index out of range: 2[m
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[5L[1;1H0000-000
ppppppp
depth is 1
1000-000
ppppppF
0000-000[6;9H[K[7;1Hppppppp[7;8H[K[8;1H0000-000[8;9H[K[9;1Hppppppp[9;8H[K[10;1Hdepth is 2
1100-100[11;9H[K[12;1HppFppFF[12;8H[K[13;1H0000-000[13;9H[K[14;1Hppppppp[14;8H[K[15;1H0000-000[15;9H[K[16;1Hppppppp[16;8H[K[17;1Hdepth is 3[17;11H[K[18;1H1110-110[18;9H[K[19;1HpFFpFFF[19;8H[K[20;1H0010-010
pFppFpp[21;9H[K[22;1H0000-000[22;10H[K[23;1Hppppppp[23;8H[K[24;1Hdepth is 4[24;11H[K[25;1H1111-111
FFFFFFF[26;9H[K[27;1H0011-011[27;10H[K[28;1HFFpFFpp[28;8H[K[29;1H0000-000[29;9H[K[30;1Hppppppp
caught a:000[31;13H[K[32;1Hcaught a:000[0]
caught a:000[2][33;16H[K[34;1Hcaught a:000[3]
[1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}][35;40H[K[36;1H['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0']
['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0']
['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]]
[[0, 1, 2], 4, 2, 'xaaa', 'x8', 'foo6', 'foo', 'A11', '-0']
['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]]
['aa', 'bb']
['aa', 'bb'][42;13H[K[43;1H['', 'aa', 'bb', '']
['', '', 'aa', '', 'bb', '', '']
['aa', '', 'bb']
['', 'aa', '', 'bb', ''][46;25H[K[47;1H['aa', '', 'bb', 'cc', '']
['a', 'b', 'c'][48;16H[K[49;1H['', 'a', '', 'b', '', 'c', '']
1[50;2H[K[51;1H1[51;2H[K[52;1H0[52;2H[K[53;1H0[53;2H[K[54;1H1[54;2H[K[55;1H1[55;2H[K[56;1H[1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
{'a': {'b': 'B'}}
Vim(call):E737: a
{'a': {'b': 'B'}}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hdelfunc Test[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet dict[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall garbagecollect(1)[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for patch 7.3.637[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet a = 'No error caught'[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htry|foldopen|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H=[?12l[?25ha[?25l[1;59r[59;1H
[1;60r[59;1HVim(foldopen):E490:[60;1H[K[59;19H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;19H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlang C[?25l[59;19H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir => a[?25l[59;19H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htry|foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry[?25l[1m[37m[41mError detected while processing :[m[60;34H[K[60;1H
[1m[37m[41mE492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry[m
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hppppppp
depth is 1[60;1H[K[59;19H[?12l[?25h[?25l
=[?12l[?25ha[?25l[1;59r[1;1H[5M[1;60r[57;1HError detected while processing :
E492: Not an editor command: foobar|catch|let a = matchstr(v:exception,'^[^ ]*')|endtry[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start:/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 123 lines, 2133 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test56.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test56.in" 21 lines, 457 characters[1;1HTest 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 <SID>DoLast()
  call append(line('$'), "last line")
endfun
fun s:DoNothing()
  call append(line('$'), "nothing line")
endfun
nnoremap <buffer> _x    :call <SID>DoNothing()<bar>call <SID>DoLast()<bar>delfunc <SID>DoNothing<bb[21;1Har>delfunc <SID>DoLast<cr>
end:
[1m[34m~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for script-local function.     vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 7 lines, 120 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[11;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocp viminfo+=nviminfo[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start:/+1,/^end:/-1w! Xtest.vim[?25l"Xtest.vim" [60;13H[K[60;13H[New] 7L, 251C written[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsource Xtest.vim[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:call <SNR>3_DoNothing()|call <SNR>3_DoLast()|delfunc <SNR>3_DoNothing|delfunc <SNR>3_DoLast[23;1Hnothing line[23;13H[K[24;1Hlast line[24;10H[K[12;1H[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25h$-1,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New] 2L, 23C written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test57.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test57.in" 500 lines, 3666 characters[1;1HTests 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
:/^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[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for :sort command.     vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 30 lines, 842 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[34;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^t01:/+1,/^t02/-1sort[?25l[37;1H[K[38;1H[K[39;1H 123b[40;2H[K[41;4H2
a123
a
ab[44;3H[K[45;1Habc[45;4H[K[46;1Hb[46;5H[K[47;1Hb[47;5H[K[48;4H1[48;5H[K[49;5Hb
b322
c123d
c321d[37;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^t02:/+1,/^t03/-1sort n[?25l[56;2H[K[57;1H[K[58;1H[K[59;1H[K[54;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^t03:/+1,/^t04/-1sort x[?25l[1;59r[1;1H[16M[1;60r[44;1H-24
x-22
0
a122
a123
b123
c123d
 123b
a321
b321
c321d
b321
b321b
b322b
t03: hexadecimal[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t04:/+1,/^t05/-1sort u[?25l[1;59r[1;1H[17M[1;60r[44;1Ha
ab
abc
 123b
a122
a123
a321
b123
b321
b321
b321b
b322b
c123d
c321d
t04: alpha, unique[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t05:/+1,/^t06/-1sort![?25l[1;59r[1;1H[15M[1;60r[45;2H123b
a
a122
a123
a321
ab
abc
b123
b321
b321b
b322b
c123d
c321d
t05: alpha, reverse
c321d[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t06:/+1,/^t07/-1sort! n        [?25l[1;59r[1;1H[17M[1;60r[43;1Hc123d
b322b
b321b
b321
b321
b123
abc
ab
a321
a123
a122
a
 123b


t06: numeric, reverse
b322b[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t07:/+1,/^t08/-1sort! u[?25l[1;59r[1;1H[17M[1;60r[43;1Hb321b
b321
c321d
b321
a321
 123b
c123d
b123
a123
a122


a
ab
abc
t07: unique, reverse
c321d[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t08:/+1,/^t09/-1sort o         [?25l[1;59r[1;1H[15M[1;60r[45;1Hc123d
b322b
b321b
b321
b123
abc
ab
a321
a123
a122
a
 123b

t08: octal
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t09:/+1,/^t10/-1sort! x        [?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a122
a123
b123
c123d
 123b
a321
b321
c321d
b321
b321b
b322b
t09: reverse, hexadecimal
c321d[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t10:/+1,/^t11/-1sort/./        [?25l[1;59r[1;1H[17M[1;60r[43;1Hc123d
b322b
b321b
b321
b321
b123
a321
a123
a122
 123b
abc
ab
a


t10: alpha, skip first character
a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t11:/+1,/^t12/-1sort/../       [?25l[1;59r[1;1H[17M[1;60r[45;1Ha122
a123
b123
 123b
c123d
a321
b321
b321
b321b
c321d
b322b
ab
abc
t11: alpha, skip first 2 characters
ab[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t12:/+1,/^t13/-1sort/../u[?25l[1;59r[1;1H[17M[1;60r[43;1Ha


a321
b321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
abc
t12: alpha, unique, skip first 2 characters
ab[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t13:/+1,/^t14/-1sort/./n[?25l[1;59r[1;1H[15M[1;60r[45;1Ha

a321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
abc
t13: numeric, skip first character
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t14:/+1,/^t15/-1sort/./r[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a122
a123
b123
c123d
 123b
a321
b321
c321d
b321
b321b
b322b
t14: alpha, sort on first character[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t15:/+1,/^t16/-1sort/../r[?25l[1;59r[1;1H[17M[1;60r[44;2H123b
abc
ab
a
a321
a123
a122
b321
b123
b322b
b321
b321b
c123d
c321d
t15: alpha, sort on first 2 characters
a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t16:/+1,/^t17/-1sort/./rn[?25l[1;59r[1;1H[17M[1;60r[45;2H123b
a123
a122
a321
abc
ab
b123
b321
b322b
b321
b321b
c123d
c321d
t16: numeric, sort on first character
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t17:/+1,/^t18/-1sort/\d/[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a
a321
a123
a122
b321
b123
c123d
 123b
c321d
b322b
b321
b321b


t17: alpha, skip past first digit
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t18:/+1,/^t19/-1sort/\d/r[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a321
b321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
t18: alpha, sort on first digit
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t19:/+1,/^t20/-1sort/\d/n[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t19: numeric, skip past first digit
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t20:/+1,/^t21/-1sort/\d/rn[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a321
b321
c321d
b321
b321b
a122
b322b
a123
b123
c123d
 123b
t20: numeric, sort on first digit
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t21:/+1,/^t22/-1sort/\d\d/[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t21: alpha, skip past first 2 digits
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t22:/+1,/^t23/-1sort/\d\d/n[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a321
b321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
t22: numeric, skip past first 2 digits
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t23:/+1,/^t24/-1sort/\d\d/x[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a321
b321
c321d
b321
b321b
a122
b322b
a123
b123
c123d
 123b
t23: hexadecimal, skip past first 2 digits
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t24:/+1,/^t25/-1sort/\d\d/r[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a321
b321
b321
a122
a123
b123
b321b
c321d
b322b
 123b
c123d
t24: alpha, sort on first 2 digits
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t25:/+1,/^t26/-1sort/\d\d/rn[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t25: numeric, sort on first 2 digits
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t26:/+1,/^t27/-1sort/\d\d/rx[?25l[1;59r[1;1H[17M[1;60r[43;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t26: hexadecimal, sort on first 2 digits
abc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^t27:/+1,/^t28/-1sort no[?25l[1m[37m[41mE474: Invalid argument[m[60;23H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^t01:/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 459 lines, 2739 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test58.failed test.ok test.out X* viminfo
cp test58.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test58.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test58.in" 639 lines, 10884 characters[1;1HTests for spell checking.     vim: set ft=vim :

STARTTEST
:so small.vim
:"
:" Don't want to depend on the locale from the environment
:set enc=latin1
:e!
:"
:" Check using z= in new buffer (crash fixed by patch 7.4a.028).
:set maxmem=512 spell
iasd[34m^[[mz=:"
:"
:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=
  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.latin1.spl spell
  " list all valid words
  spelldump
  %yank
  quit
  $put
  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s
  let prevbad = ''
  while 1
    let [bad, a] = spellbadword()
    if bad == '' || bad == prevbad || bad == 'badend'[38;7Hbreak
    endif
    let prevbad = bad
    let lst = spellsuggest(bad, 3)
    normal mm
    $put =bad
    $put =string(lst)
    normal `m]s
  endwhile
endfunc
:"
:call TestOne('1', '1')
:$put =soundfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')
:$put =soundfold('oeverloos gezwets edale')
:"
:"
:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest
:$put =soundfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for spell checking.     vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 109 lines, 2556 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_ca.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:unlet str a
:"
:" Postponed prefixes
:call TestOne('2', '1')
:"
:" Compound words
:call TestOne('3', '3')
:call TestOne('4', '4')
:call TestOne('5', '5')
:call TestOne('6', '6')
:call TestOne('7', '7')
:"
:" NOSLITSUGS
:call TestOne('8', '8')
:"
:" clean up for valgrind
:delfunc TestOne
:set spl= enc=latin1
:"
gg:/^test output:/,$wq! test.out
ENDTEST

1affstart
SET ISO8859-1
TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ

FOL  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP  ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÄ[41;1HÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
SOFOTO   ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeee[43;1Heeceeeeeeeedneeeeeeeeeeep?

MIDWORD '-

KEP =
RAR ?
BAD !

PFX I N 1
PFX I 0 in .

PFX O Y 1
PFX O 0 out .

SFX S Y 2
SFX S 0 s [^s]
SFX S 0 es s[30;1H[?12l[?25h
[?25l[60;1H:so! Xdotest[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Don't want to depend on the locale from the environment[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset enc=latin1[?25l[27m[23m[m[H[2J[1;1H:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_ca.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:unlet str a
:"
:" Postponed prefixes
:call TestOne('2', '1')
:"
:" Compound words
:call TestOne('3', '3')
:call TestOne('4', '4')
:call TestOne('5', '5')
:call TestOne('6', '6')
:call TestOne('7', '7')
:"
:" NOSLITSUGS
:call TestOne('8', '8')
:"
:" clean up for valgrind
:delfunc TestOne
:set spl= enc=latin1
:"
gg:/^test output:/,$wq! test.out
ENDTEST

1affstart
SET ISO8859-1
TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ

FOL  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP  ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÄ[41;1HÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
SOFOTO   ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeee[43;1Heeceeeeeeeedneeeeeeeeeeep?

MIDWORD '-

KEP =
RAR ?
BAD !

PFX I N 1
PFX I 0 in .

PFX O Y 1
PFX O 0 out .

SFX S Y 2
SFX S 0 s [^s]
SFX S 0 es s[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25he![?25l"test58.in" 639 lines, 10884 characters[1;1HTests for spell checking.     vim: set ft=vim :[2;1H[K[3;1HSTARTTEST[3;10H[K[4;3Ho small.vim[4;14H[K[5;1H:"[5;3H[K[6;1H:" Don't want to depend on the locale from the environment
:set enc=latin1
:e![8;4H[K[9;2H"[9;3H[K[10;2H" Check using z= in new buffer (crash fixed by patch 7.4a.028).
:set maxmem=512 spell
iasd[34m^[[mz=:"[12;11H[K[13;2H"[13;3H[K[14;4HFunction to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=[16;17H[K[17;1H  $put =''[17;11H[K[18;1H  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.latin1.spl spell
  " list all valid words
  spelldump[26;12H[K[27;1H  %yank[27;8H[K[28;1H  quit
  $pu[29;7H[K[30;1H  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s
  let prevbad = ''[34;19H[K[35;3Hwhile 1
    let [bad, a] = spellbadword()[36;34H[K[37;1H    if bad == '' || bad == prevbad || bad == 'badend'
      break[38;12H[K[39;5Hendif
    let prevbad = bad[40;22H[K[41;1H    let lst = spellsuggest(bad, 3)
    normal mm[42;14H[K[43;1H    $put =bad[43;14H[K[44;5H$put =string(lst)
    normal `m]s
  endwhile
endfunc
:"[48;3H[K[49;1H:call TestOne('1', '1')
:$put =soundfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')
:$put =soundfold('oeverloos gezwets edale')
:"
:"[54;3H[K[55;1H:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest
:$put =soundfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check using z= in new buffer (crash fixed by patch 7.4a.028).[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset maxmem=512 spell[?25lWarning: Cannot find word list "en.latin1.spl" or "en.ascii.spl"[1;1H[?12l[?25h[?25lasdTests for spell checking.     vim: set ft=vim :as[?12l[?25h[?25l[60;1H[1m[37m[41mE756: Spell checking is not enabled[m[60;36H[K[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Function to test .aff/.dic with list of good and bad words.[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunc TestOne(aff, dic)[?25l
:  [?12l[?25h  set spellfile=
[?25l:  [?12l[?25h  $put =''
[?25l:  [?12l[?25h  $put ='test '. a:aff . '-' . a:dic
[?25l:  [?12l[?25h  " Generate a .spl file from a .dic and .aff file.
[?25l:  [?12l[?25h  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
[?25l:  [?12l[?25h  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
[?25l:  [?12l[?25h  mkspell! Xtest Xtest
[?25l:  [?12l[?25h  " use that spell file
[?25l:  [?12l[?25h  set spl=Xtest.latin1.spl spell
[?25l:  [?12l[?25h  " list all valid words
[?25l:  [?12l[?25h  spelldump
[?25l:  [?12l[?25h  %yank
[?25l:  [?12l[?25h  quit
[?25l:  [?12l[?25h  $put
[?25l:  [?12l[?25h  $put ='-------'
[?25l:  [?12l[?25h  " find all bad words and suggestions for them
[?25l:  [?12l[?25h  exe '1;/^' . a:aff . 'good:'
[?25l:  [?12l[?25h  normal 0f:]s
[?25l:  [?12l[?25h  let prevbad = ''
[?25l:  [?12l[?25h  while 1
[?25l:    [?12l[?25h    let [bad, a] = spellbadword()
[?25l:    [?12l[?25h    if bad == '' || bad == prevbad || bad == 'badend'
[?25l:      [?12l[?25h      break
[?25l:      [?12l[?25h    endif
[?25l:    [?12l[?25h    let prevbad = bad
[?25l:    [?12l[?25h    let lst = spellsuggest(bad, 3)
[?25l:    [?12l[?25h    normal mm
[?25l:    [?12l[?25h    $put =bad
[?25l:    [?12l[?25h    $put =string(lst)
[?25l:    [?12l[?25h    normal `m]s
[?25l:    [?12l[?25h  endwhile
[?25l:  [?12l[?25hendfunc[1;1H[32L[?25l[1;1HasdTests for spell checking.     vim: set ft=vim :

STARTTEST
:so small.vim
:"
:" Don't want to depend on the locale from the environment
:set enc=latin1
:e!
:"
:" Check using z= in new buffer (crash fixed by patch 7.4a.028).
:set maxmem=512 spell
iasd[34m^[[mz=:"
:"
:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=
  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.latin1.spl spell
  " list all valid words
  spelldump
  %yank
  quit
  $put
  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'[60;1H[K[1;3H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall TestOne('1', '1')[?25lWarning: Cannot find word list "en.latin1.spl" or "en.ascii.spl"
"Xtest.aff" [New File] 46 lines, 754 characters written
"Xtest.dic" [New File] 11 lines, 71 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[60;26H[K[60;1H
Compressed 29 of 127 nodes; 98 (77%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 490 bytes
Reading back spell file...
Performing soundfolding...
Total number of words: 16
Number of words after soundfolding: 16
Compressing word tree...
Compressed 39 of 104 nodes; 65 (62%) remaining
Writing suggestion file Xtest.latin1.sug ...
Estimated runtime memory use: 357 bytes
17 lines yanked
17 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[20L[2;1H8[41maffstart
SET[m [41mISO8859-1

NOSPLITSUGS[m
8[41maffend[m

8[41mdicstart[m
1234
[41mfoo
bar
faabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:[21;3H[K[22;1H[44mtest[m 1-1[22;9H[K[23;1H# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment[24;8H[K[25;1Hdeol[25;5H[K[26;1Hdéôr[26;5H[K[27;1Hinput[27;6H[K[28;1HOK[28;3H[K[29;1Hout
outputs[30;8H[K[31;1Houttest[31;8H[K[32;1Hput[32;4H[K[33;1Hputs[33;5H[K[34;1Htest[34;5H[K[35;1Htesten[35;7H[K[36;1Htestn[36;6H[K[37;1Hthe end[37;8H[K[38;1Huk[38;7H[K[39;1Hwrong[39;6H[K[40;1H-------[40;9H[K[41;1H[41mbad[m[41;5H[K[42;1H['put', 'uk', 'OK']
[41minputs[m[43;7H[K[44;1H['input', 'puts', 'outputs']
[41mcomment[m[45;8H[K[46;1H['Comment', 'outtest', 'the end']
[41mok[m[47;3H[K[48;1H['OK', 'uk', 'put']
[41mOk[m[49;3H[K[50;1H['OK', 'Uk', 'Put'][50;20H[K[51;1Htest[51;5H[K[52;1H['Test', 'testn', 'testen'][52;29H[K[53;1H[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m[55;4H[K[56;1H['put', 'uk', 'test'][56;22H[K[57;1H[41mthe[m[57;4H[K[58;1H['put', 'uk', 'test'][58;22H[K[59;1H[41mgebletegek[m[59;11H[K[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kóopërÿnôven')[?25l[1;59r[59;1H
[1;60r[59;1H[41mkepereneven[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;59r[59;1H
[1;60r[59;1H[41meverles[m [41mgesvets[m [41metele[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" and now with SAL instead of SOFO items; test automatic reloading[?25l[59;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41masdTests[m [41mfor[m [41mspell[m [41mchecking[m.     [41mvim[m: [41mset[m [41mft[m=[41mvim[m :

[41mSTARTTEST[m
:[41mso[m [41msmall[m.[41mvim[m
:"
:" [41mDon't[m [41mwant[m [41mto[m [41mdepend[m [41mon[m [41mthe[m [41mlocale[m [41mfrom[m [41mthe[m [41menvironment[m
:[41mset[m [41menc[m=[41mlatin1[m
:[41me[m!
:"
:" [41mCheck[m [41musing[m [41mz[m= [41min[m [41mnew[m [41mbuffer[m ([41mcrash[m [41mfixed[m [41mby[m [41mpatch[m 7.4[41ma[m.028).
:[41mset[m [41mmaxmem[m=512 [41mspell
iasd[m[34m^[[m[41mz[m=:"
:"
:" [41mFunction[m [41mto[m test .[41maff[m/.[41mdic[m [41mwith[m [41mlist[m [41mof[m [41mgood[m [41mand[m [41mbad[m [41mwords[m.
:[41mfunc[m [41mTestOne[m([41maff[m, [41mdic[m)
  [41mset[m [41mspellfile[m=
  $put =''
  $put ='test '. [41ma[m:[41maff[m . '-' . [41ma[m:[41mdic[m
  " [41mGenerate[m [41ma[m .[41mspl[m [41mfile[m [41mfrom[m [41ma[m .[41mdic[m [41mand[m .[41maff[m [41mfile[m.
  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41maffstart[m/+1,/^' . [41ma[m:[41maff[m . '[41maffend[m/-1[41mw[m! [41mXtest[m.[41maff[m'
  [41mexe[m '1;/^' . [41ma[m:[41mdic[m . '[41mdicstart[m/+1,/^' . [41ma[m:[41mdic[m . '[41mdicend[m/-1[41mw[m! [41mXtest[m.[41mdic[m'
  [41mmkspell[m! [41mXtest[m [41mXtest[m
  " [41muse[m [41mthat[m [41mspell[m [41mfile
[m  [41mset[m [41mspl[m=[41mXtest[m.[41mlatin1[m.[41mspl[m [41mspell[m
  " [41mlist[m [41mall[m [41mvalid[m [41mwords
[m  [41mspelldump[m
  %[41myank
[m  [41mquit[m
  $put
  $put ='-------'
  " [41mfind[m [41mall[m [41mbad[m [41mwords[m [41mand[m [41msuggestions[m [41mfor[m [41mthem
[m  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41mgood[m:'
  [41mnormal[m 0[41mf[m:][41ms
[m  [41mlet[m [41mprevbad[m = ''
  [41mwhile[m 1
    [41mlet[m [[41mbad[m, [41ma[m] = [41mspellbadword[m()
    [41mif[m [41mbad[m == '' || [41mbad[m == [41mprevbad[m || [41mbad[m == '[41mbadend[m'[38;7H[41mbreak
[m    [41mendif
[m    [41mlet[m [41mprevbad[m = [41mbad
[m    [41mlet[m [41mlst[m = [41mspellsuggest[m([41mbad[m, 3)
    [41mnormal[m [41mmm[m
    $put =[41mbad[m
    $put =[41mstring[m([41mlst[m)
    [41mnormal[m `[41mm[m][41ms
[m  [41mendwhile
endfunc[m
:"
:[41mcall[m [41mTestOne[m('1', '1')
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkóopërÿnôven[m')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:"
:" [41mand[m [41mnow[m [41mwith[m [41mSAL[m [41minstead[m [41mof[m [41mSOFO[m [41mitems[m; test [41mautomatic[m [41mreloading
gg[m:/^[41maffstart[m_[41msal[m/+1,/^[41maffend[m_[41msal[m/-1[41mw[m! [41mXtest[m.[41maff[m
:[41mmkspell[m! [41mXtest[m [41mXtest[m
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkóopërÿnôven[m')[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff[?25l"Xtest.aff" [60;13H[K[60;13H151 lines, 3412 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmkspell! Xtest Xtest[?25lReading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[60;26H[K[60;1H
Compressed 29 of 127 nodes; 98 (77%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 490 bytes
Performing soundfolding...
Total number of words: 16
Number of words after soundfolding: 15
Compressing word tree...
Compressed 33 of 75 nodes; 42 (56%) remaining
Writing suggestion file Xtest.latin1.sug ...
Estimated runtime memory use: 241 bytes
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[14L[2;1H[41mNOSPLITSUGS[m
8[41maffend[m

8[41mdicstart[m
1234
[41mfoo
bar
faabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m[15;1H[K[16;3H[K[17;1H[44mtest[m output:[18;3H[K[19;1H[44mtest[m 1-1[19;9H[K[20;1H# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m[20;25H[K[21;1HComment[21;8H[K[22;1Hdeol[22;5H[K[23;1Hdéôr[23;5H[K[24;1Hinput[24;7H[K[25;1HOK[25;3H[K[26;1Houtput[26;7H[K[27;1Houtputs
outtest
put[29;4H[K[30;1Hputs[30;5H[K[31;1Htest[31;5H[K[32;1Htesten[32;7H[K[33;1Htestn[33;6H[K[34;1Hthe end[34;8H[K[35;1Huk[35;3H[K[36;1Hwrong[36;6H[K[37;1H-------[37;8H[K[38;1H[41mbad[m[38;7H[K[39;1H['put', 'uk', 'OK']
[41minputs[m[40;7H[K[41;1H['input', 'puts', 'outputs'][41;29H[K[42;1H[41mcomment[m[42;8H[K[43;1H['Comment', 'outtest', 'the end']
[41mok[m[44;5H[K[45;1H['OK', 'uk', 'put']
[41mOk[m[46;3H[K[47;1H['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m[50;5H[K[51;1H['deol', 'déôr', 'test'][51;25H[K[52;1H[41mend[m[52;4H[K[53;1H['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test'][55;22H[K[56;2H[41mebletegek[m[56;11H[K[57;1H[41mkepereneven[m[57;12H[K[58;1H[41meverles[m [41mgesvets[m [41metele[m[58;22H[K[59;1H[41mkbltykk[m[59;8H[K[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kóopërÿnôven')[?25l[1;59r[59;1H
[1;60r[59;1H[41mkprnfn[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;59r[59;1H
[1;60r[59;1H*[41mfls[m [41mkswts[m [41mtl[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" also use an addition file[?25l[59;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41masdTests[m [41mfor[m [41mspell[m [41mchecking[m.     [41mvim[m: [41mset[m [41mft[m=[41mvim[m :

[41mSTARTTEST[m
:[41mso[m [41msmall[m.[41mvim[m
:"
:" [41mDon't[m [41mwant[m [41mto[m [41mdepend[m [41mon[m [41mthe[m [41mlocale[m [41mfrom[m [41mthe[m [41menvironment[m
:[41mset[m [41menc[m=[41mlatin1[m
:[41me[m!
:"
:" [41mCheck[m [41musing[m [41mz[m= [41min[m [41mnew[m [41mbuffer[m ([41mcrash[m [41mfixed[m [41mby[m [41mpatch[m 7.4[41ma[m.028).
:[41mset[m [41mmaxmem[m=512 [41mspell
iasd[m[34m^[[m[41mz[m=:"
:"
:" [41mFunction[m [41mto[m test .[41maff[m/.[41mdic[m [41mwith[m [41mlist[m [41mof[m [41mgood[m [41mand[m [41mbad[m [41mwords[m.
:[41mfunc[m [41mTestOne[m([41maff[m, [41mdic[m)
  [41mset[m [41mspellfile[m=
  $put =''
  $put ='test '. [41ma[m:[41maff[m . '-' . [41ma[m:[41mdic[m
  " [41mGenerate[m [41ma[m .[41mspl[m [41mfile[m [41mfrom[m [41ma[m .[41mdic[m [41mand[m .[41maff[m [41mfile[m.
  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41maffstart[m/+1,/^' . [41ma[m:[41maff[m . '[41maffend[m/-1[41mw[m! [41mXtest[m.[41maff[m'
  [41mexe[m '1;/^' . [41ma[m:[41mdic[m . '[41mdicstart[m/+1,/^' . [41ma[m:[41mdic[m . '[41mdicend[m/-1[41mw[m! [41mXtest[m.[41mdic[m'
  [41mmkspell[m! [41mXtest[m [41mXtest[m
  " [41muse[m [41mthat[m [41mspell[m [41mfile
[m  [41mset[m [41mspl[m=[41mXtest[m.[41mlatin1[m.[41mspl[m [41mspell[m
  " [41mlist[m [41mall[m [41mvalid[m [41mwords
[m  [41mspelldump[m
  %[41myank
[m  [41mquit[m
  $put
  $put ='-------'
  " [41mfind[m [41mall[m [41mbad[m [41mwords[m [41mand[m [41msuggestions[m [41mfor[m [41mthem
[m  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41mgood[m:'
  [41mnormal[m 0[41mf[m:][41ms
[m  [41mlet[m [41mprevbad[m = ''
  [41mwhile[m 1
    [41mlet[m [[41mbad[m, [41ma[m] = [41mspellbadword[m()
    [41mif[m [41mbad[m == '' || [41mbad[m == [41mprevbad[m || [41mbad[m == '[41mbadend[m'[38;7H[41mbreak
[m    [41mendif
[m    [41mlet[m [41mprevbad[m = [41mbad
[m    [41mlet[m [41mlst[m = [41mspellsuggest[m([41mbad[m, 3)
    [41mnormal[m [41mmm[m
    $put =[41mbad[m
    $put =[41mstring[m([41mlst[m)
    [41mnormal[m `[41mm[m][41ms
[m  [41mendwhile
endfunc[m
:"
:[41mcall[m [41mTestOne[m('1', '1')
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkóopërÿnôven[m')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:"
:" [41mand[m [41mnow[m [41mwith[m [41mSAL[m [41minstead[m [41mof[m [41mSOFO[m [41mitems[m; test [41mautomatic[m [41mreloading
gg[m:/^[41maffstart[m_[41msal[m/+1,/^[41maffend[m_[41msal[m/-1[41mw[m! [41mXtest[m.[41maff[m
:[41mmkspell[m! [41mXtest[m [41mXtest[m
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkóopërÿnôven[m')[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h/^addstart/+1,/^addend/-1w! Xtest.latin1.add[?25l"Xtest.latin1.add" [60;20H[K[60;20H[New File] 3 lines, 38 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmkspell! Xtest.latin1.add.spl Xtest.latin1.add[?25lReading word file Xtest.latin1.add ...[60;39H[K[60;1H
Compressing word tree...
Compressed 0 of 29 nodes; 29 (100%) remaining
Writing spell file Xtest.latin1.add.spl ...
Done!
Estimated runtime memory use: 145 bytes
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset spellfile=Xtest.latin1.add[?25l[1;1H[6L[1;1H[41masdTests[m [41mfor[m [41mspell[m [41mchecking[m.     [41mvim[m: [41mset[m [41mft[m=[41mvim[m :

[41mSTARTTEST[m
:[41mso[m [41msmall[m.[41mvim[m
:"
:" [41mDon't[m [41mwant[m [41mto[m [41mdepend[m [41mon[m [41mthe[m [41mlocale[m [41mfrom[m [41mthe[m [41menvironment[m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/[?12l[?25h^test2:[?25l[27m[23m[m[H[2J[1;1H[41mSFX[m [41mN[m 0 [41mn[m .

[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz[m
elequint/2
elekwint/3
[41maddend

test2[m:
elequint test elekwint test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[30;1H[?12l[?25h[31;29H[?25l[60;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;29H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[2;1H8[41mdicstart[m
1234
[41mfoo
bar
faabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_us.latin1.spl[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H[41mSFX[m [41mN[m 0 [41mn[m .

[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz[m
[46melequint[m/2
[46melekwint[m/3
[41maddend

test2[m:
[46melequint[m test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[m
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H8[41mdicstart[m
1234
[41mfoo
bar
faabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint[?12l[?25h[?25l[27m[23m[m[H[2J[2;1H[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz[m
[46melequint[m/2
[46melekwint[m/3
[41maddend

test2[m:
[46melequint[m test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[30;1H[?12l[?25h[14C[?25l[60;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H1234
[41mfoo
bar
faabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint
elekwint[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_gb.latin1.spl[?25l[58;1Helequint
[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H[41mSFX[m [41mN[m 0 [41mn[m .

[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz[m
elequint/2
[46melekwint[m/3
[41maddend

test2[m:
elequint test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[m
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[31;15H[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mfoo
bar
faabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
elequint
[46melekwint
elekwint[?12l[?25h[?25l[27m[23m[m[H[2J[2;1H[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz[m
elequint/2
[46melekwint[m/3
[41maddend

test2[m:
elequint test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[30;15H[?12l[?25h[14C[?25l[60;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;29H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mbar
faabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
elequint
[46melekwint
elekwint[m
[41melekwent[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_nz.latin1.spl[?25l[56;1H[46melequint[m
elekwint
elekwint
[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H[41mSFX[m [41mN[m 0 [41mn[m .

[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz[m
[46melequint[m/2
elekwint/3
[41maddend

test2[m:
[46melequint[m test elekwint test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[m
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mfaabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint[m
elekwint
elekwint
[41melekwent[m
[46melequint[?12l[?25h[?25l[27m[23m[m[H[2J[2;1H[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz[m
[46melequint[m/2
elekwint/3
[41maddend

test2[m:
[46melequint[m test elekwint test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[30;1H[?12l[?25h[28C[?25l[60;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;29H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H8[41mdicend[m

8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint[m
elekwint
elekwint
[41melekwent[m
[46melequint[m
[41melekwent[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_ca.latin1.spl[?25l[54;1H[41melequint
elekwint
elekwint

elequint
[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H[41mSFX[m [41mN[m 0 [41mn[m .

[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz
elequint[m/2
[41melekwint[m/3
[41maddend

test2[m:
[41melequint[m test [41melekwint[m test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[m
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[2;1H8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent
elequint
elekwint
elekwint
elekwent
elequint
elekwent
elequint[?12l[?25h[?25l[27m[23m[m[H[2J[2;1H[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9
[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m
2[41maffend[m

2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend

addstart[m
/[41mregions[m=[41musgbnz
elequint[m/2
[41melekwint[m/3
[41maddend

test2[m:
[41melequint[m test [41melekwint[m test [41melekwent[m [41masdf[m

Test [41mrules[m [41mfor[m [41mcompounding[m.

3[41maffstart
SET[m [41mISO8859-1

COMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m

3[41mdicstart[m
1234
[41mfoo[m/[41mm
bar[m/[41mmx
mï[m/[41mm
la[m/[41mmx[m
3[41mdicend[m

3[41mgood[m: [41mfoo[m [41mmï[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomï[m [41mbarmï[m [41mmïfoo[m [41mmïbar[m [41mmïmï[m [41mlala[m [41mmïla[m [41mlamï[m [41mfoola[m [41mlabar
badend


Tests[m [41mfor[m [41mcompounding[m.

4[41maffstart
SET[m [41mISO8859-1[30;1H[?12l[?25h[14C[?25l[60;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m


[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdéôl[m
['deol', 'déôr', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent
elequint
elekwint
elekwint
elekwent
elequint
elekwent
elequint
elekwint[?12l[?25h[?25l
[m:[?12l[?25hunlet str a[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Postponed prefixes[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall TestOne('2', '1')[?25l"Xtest.aff" [60;13H[K[60;13H44 lines, 447 characters written
"Xtest.dic" 11 lines, 71 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[60;26H[K[60;1H
Compressed 10 of 98 nodes; 88 (89%) remaining
Compressed 0 of 13 nodes; 13 (100%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 505 bytes
17 lines yanked
17 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[12L[1;1H[41mPFX[m [41mO[m 0 [41mout[m [[41ma-z[m]

[41mSFX[m [41mS[m [41mY[m 2
[41mSFX[m [41mS[m 0 [41ms[m [^[41ms[m]
[41mSFX[m [41mS[m 0 [41mes[m [41ms

SFX[m [41mN[m [41mN[m 3
[41mSFX[m [41mN[m 0 [41men[m [^[41mn[m]
[41mSFX[m [41mN[m 0 [41mnen[m [41mn
SFX[m [41mN[m 0 [41mn[m .

[41mREP[m 3
[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.[16;1H[K[17;1H[41mMAP[m 9[17;6H[K[18;1H[41mMAP[m [41maàáâãäå
MAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ[m[23;7H[K[24;1H[41mMAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m[26;7H[K[27;1H2[1C[41mffend[m[28;1H[K[29;1H2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend[m[31;7H[K[32;1H[K[33;1H[41maddstart[m
/[41mregions[m=[41musgbnz[m[34;16H[K[35;1H[41melequint[m/2
[41melekwint[m/3[36;11H[K[37;1H[41maddend[m[38;1H[K[39;1H[41mtest2[m:
[41melequint[m test [41melekwint[m test [41melekwent[m [41masdf[m[41;1H[K[42;1HTest [41mrules[m [41mfor[m [41mcompounding[m.[43;1H[K[44;1H3[41maffstart[m[44;10H[K[45;1H[41mSET[m [41mISO8859-1[m[46;1H[K[47;1H[41mCOMPOUNDMIN[m 3[47;14H[K[48;1H[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m[50;8H[K[51;1H[K[52;1H3[41mdicstart[m
1234[53;5H[K[54;1H[41mfoo[m/[41mm[m[54;6H[K[55;1H[41mbar[m/[41mmx[m[55;7H[K[56;1H[41mmï[m/[41mm[m[56;5H[K[57;1H[41mla[m/[41mmx[m[57;6H[K[58;1H3[41mdicend[m[58;8H[K[59;1H[K[60;1H[K[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" Compound words[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall TestOne('3', '3')[?25l"Xtest.aff" [60;13H[K[60;13H5 lines, 60 characters written
"Xtest.dic" 5 lines, 29 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - fooCompressing word tree...[60;26H[K[60;1H
Compressed 6 of 29 nodes; 23 (79%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 115 bytes
3 lines yanked
3 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('4', '4')[?25l"Xtest.aff" [60;13H[K[60;13H45 lines, 559 characters written
"Xtest.dic" 8 lines, 59 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - wordCompressing word tree...[60;26H[K[60;1H
Compressed 2 of 91 nodes; 89 (97%) remaining
Compressed 0 of 15 nodes; 15 (100%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 520 bytes
12 lines yanked
12 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('5', '5')[?25l"Xtest.aff" [60;13H[K[60;13H25 lines, 237 characters written
"Xtest.dic" 6 lines, 57 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - fooCompressing word tree...[60;26H[K[60;1H
Compressed 19 of 105 nodes; 86 (81%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 440 bytes
10 lines yanked
10 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('6', '6')[?25l"Xtest.aff" [60;13H[K[60;13H23 lines, 211 characters written
"Xtest.dic" 6 lines, 53 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - meeCompressing word tree...[60;26H[K[60;1H
Compressed 19 of 87 nodes; 68 (78%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 350 bytes
9 lines yanked
9 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('7', '7')[?25l"Xtest.aff" [60;13H[K[60;13H22 lines, 223 characters written
"Xtest.dic" 6 lines, 67 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - meeCompressing word tree...[60;26H[K[60;1H
Compressed 19 of 89 nodes; 70 (78%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 360 bytes
9 lines yanked
9 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[27m[23m[m[H[2J[2;1H[41mNEEDCOMPOUND[m 1
[41mCOMPOUNDPERMITFLAG[m 432

[41mSFX[m 61003 [41mY[m 1
[41mSFX[m 61003 0 [41mmeat[m .

[41mSFX[m 391 [41mY[m 1
[41mSFX[m 391 0 [41ma1[m .

[41mSFX[m 111 [41mY[m 1
[41mSFX[m 111 0 [41maé[m .

[41mPFX[m 17 [41mY[m 1
[41mPFX[m 17 0 [41mpre[m/432 .
7[41maffend[m

7[41mdicstart[m
1234
[41mmee[m/391,111,9999
bar/17,61003,123
lead/2
tail/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: meea1 meeaé bar prebar barmeat prebarmeat  leadprebar[28;7Hlead tail leadtail  leadmiddletail
[41mbad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[30;9Hleadprobar
badend

Test[m [41mNOSLITSUGS[m

8[41maffstart
SET[m [41mISO8859[m-1

[41mNOSPLITSUGS[m
8[41maffend[m

8[41mdicstart[m
1234
[41mfoo[m
bar
[41mfaabar[m
8[41mdicend[m

8[41mgood[m: [41mfoo[m bar [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend


test[m [41moutput[m:

[41mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl
Comment
deol
déôr[31;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h" NOSLITSUGS[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall TestOne('8', '8')[?25l"Xtest.aff" [60;13H[K[60;13H3 lines, 27 characters written
"Xtest.dic" 4 lines, 20 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - fooCompressing word tree...[60;26H[K[60;1H
Compressed 8 of 26 nodes; 18 (69%) remaining
Writing spell file Xtest.latin1.spl ...
Done!
Estimated runtime memory use: 90 bytes
4 lines yanked
4 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[11L[1;1H[41mmee[m/391,111,9999
bar/17,61003,123
[41mlead[m/2
[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaé[m bar [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[9;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[11;9Hleadprobar
badend[m[12;7H[K[14;1H[41mTest[m [41mNOSLITSUGS[m[15;1H[K[16;1H8[3C[41mstart
SET[m [41mISO8859[m-1[18;1H[K[19;1H[41mNOSPLITSUGS[m
8[41maffend[m[20;8H[K[21;1H[K[22;1H8[41mdicstart[m
1234[23;5H[K[24;1Hfoo[24;4H[K[25;1Hbar[25;4H[K[26;1Hfaabar
8[41mdicend[m[27;8H[K[28;7H[K[29;1H8[41mgood[m: foo bar faabar[29;23H[K[30;1H[41mbad[m: [41mfoobar[m [41mbarfoo[m[33;1H[K[34;1H[41mtest[m [41moutput[m:[35;1H[K[36;1H[41mtest[m 1-1[36;9H[K[37;1H# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl
Comment[m[38;8H[K[39;1H[41mdeol[m[39;5H[K[40;1H[41mdéôr
input[m[41;6H[K[42;1H[41mOK[m[42;3H[K[43;1H[41moutput
outputs
outtest
put[m[46;4H[K[47;1H[41mputs
test[m[48;5H[K[49;1H[41mtesten[m[49;7H[K[50;1H[41mtest[m[50;6H[K[51;1H[41mthe[m [41mend
uk
wrong[m[53;6H[K[54;1H-------
[41mbad[m[55;4H[K[56;1H['[41mput[m', '[41muk[m', '[41mOK[m'][56;20H[K[57;1H[41minputs[m[57;7H[K[58;1H['[41minput[m', '[41mputs[m', '[41moutputs[m']
[41mcomment[m[60;1H[K[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" clean up for valgrind[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc TestOne[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset spl= enc=latin1[?25l[27m[23m[m[H[2J[1;1Hmee/391,111,9999
bar/17,61003,123
lead/2
tail/123
middle/77,1
7dicend

7good: meea1 meeaé bar prebar barmeat prebarmeat  leadprebar[9;7Hlead tail leadtail  leadmiddletail
bad: mee meea2 prabar probarmaat middle leadmiddle middletail taillead[11;9Hleadprobar
badend

Test NOSLITSUGS

8affstart
SET ISO8859-1

NOSPLITSUGS
8affend

8dicstart
1234
foo
bar
faabar
8dicend

8good: foo bar faabar
bad: foobar barfoo
badend


test output:

test 1-1
# file: Xtest.latin1.spl
Comment
deol
déôr
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
bad
['put', 'uk', 'OK']
inputs
['input', 'puts', 'outputs']
comment[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[31;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HasdTests for spell checking.     vim: set ft=vim :

STARTTEST
:so small.vim
:"
:" Don't want to depend on the locale from the environment
:set enc=latin1
:e!
:"
:" Check using z= in new buffer (crash fixed by patch 7.4a.028).
:set maxmem=512 spell
iasd[34m^[[mz=:"
:"
:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=
  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.latin1.spl spell
  " list all valid words
  spelldump
  %yank
  quit
  $put
  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s
  let prevbad = ''
  while 1
    let [bad, a] = spellbadword()
    if bad == '' || bad == prevbad || bad == 'badend'[38;7Hbreak
    endif
    let prevbad = bad
    let lst = spellsuggest(bad, 3)
    normal mm
    $put =bad
    $put =string(lst)
    normal `m]s
  endwhile
endfunc
:"
:call TestOne('1', '1')
:$put =soundfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')
:$put =soundfold('oeverloos gezwets edale')
:"
:"
:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest
:$put =soundfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h/^test output:/,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 283 lines, 3793 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test59.failed test.ok test.out X* viminfo
cp test59.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test59.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test59.in" 626 lines, 10897 characters[1;1HTests for spell checking with 'encoding' set to "utf-8".  vim: set ft=vim :

STARTTEST
:so small.vim
:so mbyte.vim
:"
:" Don't want to depend on the locale from the environment.  The .aff and .dic
:" text is in latin1, the test text is utf-8.
:set enc=latin1
:e!
:set enc=utf-8
:set fenc=
:"
:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=
  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.utf-8.spl spell
  " list all valid words
  spelldump
  %yank
  quit
  $put
  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s
  let prevbad = ''
  while 1
    let [bad, a] = spellbadword()
    if bad == '' || bad == prevbad || bad == 'badend'[38;7Hbreak
    endif
    let prevbad = bad
    let lst = spellsuggest(bad, 3)
    normal mm
    $put =bad
    $put =string(lst)
    normal `m]s
  endwhile
endfunc
:"
:call TestOne('1', '1')
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')
:$put =soundfold('oeverloos gezwets edale')
:"
:"
:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for spell checking with 'encoding' set to "utf-8".  vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 106 lines, 2520 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:set spl=Xtest_nz.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_ca.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:unlet str a
:"
:" Postponed prefixes
:call TestOne('2', '1')
:"
:" Compound words
:call TestOne('3', '3')
:call TestOne('4', '4')
:call TestOne('5', '5')
:call TestOne('6', '6')
:call TestOne('7', '7')
:"
:" clean up for valgrind
:delfunc TestOne
:set spl= enc=latin1
:"
gg:/^test output:/,$wq! test.out
ENDTEST

1affstart
SET ISO8859-1
TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ

FOL  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP  ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÄ[41;1HÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
SOFOTO   ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeee[43;1Heeceeeeeeeedneeeeeeeeeeep?

MIDWORD '-

KEP =
RAR ?
BAD !

#NOSPLITSUGS

PFX I N 1
PFX I 0 in .

PFX O Y 1
PFX O 0 out .

SFX S Y 2[30;1H[?12l[?25h
[?25l[60;1H:so! Xdotest[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Don't want to depend on the locale from the environment.  The .aff and .dic[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" text is in latin1, the test text is utf-8.[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset enc=latin1[?25l[27m[23m[m[H[2J[1;1H:set spl=Xtest_nz.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_ca.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:unlet str a
:"
:" Postponed prefixes
:call TestOne('2', '1')
:"
:" Compound words
:call TestOne('3', '3')
:call TestOne('4', '4')
:call TestOne('5', '5')
:call TestOne('6', '6')
:call TestOne('7', '7')
:"
:" clean up for valgrind
:delfunc TestOne
:set spl= enc=latin1
:"
gg:/^test output:/,$wq! test.out
ENDTEST

1affstart
SET ISO8859-1
TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ

FOL  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW  àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP  ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÄ[41;1HÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
SOFOTO   ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeee[43;1Heeceeeeeeeedneeeeeeeeeeep?

MIDWORD '-

KEP =
RAR ?
BAD !

#NOSPLITSUGS

PFX I N 1
PFX I 0 in .

PFX O Y 1
PFX O 0 out .

SFX S Y 2[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25he![?25l"test59.in" 626 lines, 10897 characters[1;1HTests for spell checking with 'encoding' set to "utf-8".  vim: set ft=vim :[2;1H[K[3;1HSTARTTEST[3;10H[K[4;2Hso small.vim
:so mbyte.vim[5;14H[K[6;2H"[6;3H[K[7;2H" Don't want to depend on the locale from the environment.  The .aff and .dic
:" text is in latin1, the test text is utf-8.
:set enc=latin1[9;16H[K[10;2He![10;4H[K[11;1H:set enc=utf-8[11;16H[K[12;2Hset fenc=
:"[13;3H[K[14;4HFunction to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=[16;17H[K[17;1H  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest[22;23H[K[23;1H  " use that spell file
  set spl=Xtest.utf-8.spl spell
  " list all valid words
  spelldump[26;12H[K[27;1H  %yank[27;8H[K[28;1H  quit
  $pu[29;7H[K[30;1H  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s
  let prevbad = ''[34;19H[K[35;3Hwhile 1
    let [bad, a] = spellbadword()[36;34H[K[37;1H    if bad == '' || bad == prevbad || bad == 'badend'
      break[38;12H[K[39;5Hendif
    let prevbad = bad[40;22H[K[41;1H    let lst = spellsuggest(bad, 3)
    normal mm[42;14H[K[43;1H    $put =bad[43;14H[K[44;5H$put =string(lst)
    normal `m]s
  endwhile
endfunc
:"[48;3H[K[49;1H:call TestOne('1', '1')
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')
:$put =soundfold('oeverloos gezwets edale')
:"[53;3H[K[54;1H:"[54;3H[K[55;1H:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset enc=utf-8[?25l[27m[23m[m[H[2J[1;1HTests for spell checking with 'encoding' set to "utf-8".  vim: set ft=vim :

STARTTEST
:so small.vim
:so mbyte.vim
:"
:" Don't want to depend on the locale from the environment.  The .aff and .dic
:" text is in latin1, the test text is utf-8.
:set enc=latin1
:e!
:set enc=utf-8
:set fenc=
:"
:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=
  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.utf-8.spl spell
  " list all valid words
  spelldump
  %yank
  quit
  $put
  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s
  let prevbad = ''
  while 1
    let [bad, a] = spellbadword()
    if bad == '' || bad == prevbad || bad == 'badend'[38;7Hbreak
    endif
    let prevbad = bad
    let lst = spellsuggest(bad, 3)
    normal mm
    $put =bad
    $put =string(lst)
    normal `m]s
  endwhile
endfunc
:"
:call TestOne('1', '1')
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')
:$put =soundfold('oeverloos gezwets edale')
:"
:"
:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fenc=[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Function to test .aff/.dic with list of good and bad words.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunc TestOne(aff, dic)[?25l
:  [?12l[?25h  set spellfile=
[?25l:  [?12l[?25h  $put =''
[?25l:  [?12l[?25h  $put ='test '. a:aff . '-' . a:dic
[?25l:  [?12l[?25h  " Generate a .spl file from a .dic and .aff file.
[?25l:  [?12l[?25h  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
[?25l:  [?12l[?25h  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
[?25l:  [?12l[?25h  mkspell! Xtest Xtest
[?25l:  [?12l[?25h  " use that spell file
[?25l:  [?12l[?25h  set spl=Xtest.utf-8.spl spell
[?25l:  [?12l[?25h  " list all valid words
[?25l:  [?12l[?25h  spelldump
[?25l:  [?12l[?25h  %yank
[?25l:  [?12l[?25h  quit
[?25l:  [?12l[?25h  $put
[?25l:  [?12l[?25h  $put ='-------'
[?25l:  [?12l[?25h  " find all bad words and suggestions for them
[?25l:  [?12l[?25h  exe '1;/^' . a:aff . 'good:'
[?25l:  [?12l[?25h  normal 0f:]s
[?25l:  [?12l[?25h  let prevbad = ''
[?25l:  [?12l[?25h  while 1
[?25l:    [?12l[?25h    let [bad, a] = spellbadword()
[?25l:    [?12l[?25h    if bad == '' || bad == prevbad || bad == 'badend'
[?25l:      [?12l[?25h      break
[?25l:      [?12l[?25h    endif
[?25l:    [?12l[?25h    let prevbad = bad
[?25l:    [?12l[?25h    let lst = spellsuggest(bad, 3)
[?25l:    [?12l[?25h    normal mm
[?25l:    [?12l[?25h    $put =bad
[?25l:    [?12l[?25h    $put =string(lst)
[?25l:    [?12l[?25h    normal `m]s
[?25l:    [?12l[?25h  endwhile
[?25l:  [?12l[?25hendfunc[1;1H[32L[?25l[1;1HTests for spell checking with 'encoding' set to "utf-8".  vim: set ft=vim :

STARTTEST
:so small.vim
:so mbyte.vim
:"
:" Don't want to depend on the locale from the environment.  The .aff and .dic
:" text is in latin1, the test text is utf-8.
:set enc=latin1
:e!
:set enc=utf-8
:set fenc=
:"
:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=
  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.utf-8.spl spell
  " list all valid words
  spelldump
  %yank
  quit
  $put
  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall TestOne('1', '1')[?25l"Xtest.aff" [60;13H[K[60;13H[New File] 48 lines, 768 characters written
"Xtest.dic" [New File] 11 lines, 71 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[60;26H[K[60;1H
Compressed 29 of 131 nodes; 102 (77%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 510 bytes
Reading back spell file...
Performing soundfolding...
Total number of words: 16
Number of words after soundfolding: 16
Compressing word tree...
Compressed 39 of 104 nodes; 65 (62%) remaining
Writing suggestion file Xtest.utf-8.sug ...
Estimated runtime memory use: 357 bytes
17 lines yanked
17 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[19L[1;1H[41mPFX[m 17 [41mY[m 1
[41mPFX[m 17 0 [41mpre[m/432 .
7[41maffend[m

7[41mdicstart[m
1234
[41mmee[m/391,111,9999
[41mbar[m/17,61003,123
[41mlead[m/2
[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[15;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[17;9Hleadprobar
badend[m

[44mtest[m output:[20;14H[K[21;3H[K[22;1H[44mtest[m 1-1[22;9H[K[23;1H# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment[24;8H[K[25;1Hdeol[25;5H[K[26;1HdÃ©Ã´r[26;5H[K[27;1Hinput[27;6H[K[28;1HOK[28;3H[K[29;1Hout
outputs[30;8H[K[31;1Houttest[31;8H[K[32;1Hput[32;4H[K[33;1Hputs[33;5H[K[34;1Htest[34;5H[K[35;1Htesten[35;7H[K[36;1Htestn[36;6H[K[37;1Hthe end[37;8H[K[38;1Huk[38;7H[K[39;1Hwrong[39;6H[K[40;1H-------[40;9H[K[41;1H[41mbad[m[41;5H[K[42;1H['put', 'uk', 'OK']
[41minputs[m[43;7H[K[44;1H['input', 'puts', 'outputs']
[41mcomment[m[45;8H[K[46;1H['Comment', 'outtest', 'the end']
[41mok[m[47;3H[K[48;1H['OK', 'uk', 'put']
[41mOk[m[49;3H[K[50;1H['OK', 'Uk', 'Put'][50;20H[K[51;1Htest[51;5H[K[52;1H['Test', 'testn', 'testen'][52;29H[K[53;1H[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m[55;4H[K[56;1H['put', 'uk', 'test'][56;22H[K[57;1H[41mthe[m[57;4H[K[58;1H['put', 'uk', 'test'][58;22H[K[59;1H[41mgebletegek[m[59;11H[K[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[?25l[1;59r[59;1H
[1;60r[59;1H[41mkepereneven[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;59r[59;1H
[1;60r[59;1H[41meverles[m [41mgesvets[m [41metele[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" and now with SAL instead of SOFO items; test automatic reloading[?25l[59;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41mTests[m [41mfor[m [41mspell[m [41mchecking[m [41mwith[m '[41mencoding[m' [41mset[m [41mto[m "[41mutf-8[m".  [41mvim[m: [41mset[m [41mft[m=[41mvim[m :

[41mSTARTTEST[m
:[41mso[m [41msmall[m.[41mvim[m
:[41mso[m [41mmbyte[m.[41mvim[m
:"
:" [41mDon't[m [41mwant[m [41mto[m [41mdepend[m [41mon[m [41mthe[m [41mlocale[m [41mfrom[m [41mthe[m [41menvironment[m.  [41mThe[m .[41maff[m [41mand[m .[41mdic[m
:" [41mtext[m [41mis[m [41min[m [41mlatin1[m, [41mthe[m test [41mtext[m [41mis[m [41mutf-8[m.
:[41mset[m [41menc[m=[41mlatin1[m
:[41me[m!
:[41mset[m [41menc[m=[41mutf-8[m
:[41mset[m [41mfenc[m=
:"
:" [41mFunction[m [41mto[m test .[41maff[m/.[41mdic[m [41mwith[m [41mlist[m [41mof[m [41mgood[m [41mand[m [41mbad[m [41mwords[m.
:[41mfunc[m [41mTestOne[m([41maff[m, [41mdic[m)
  [41mset[m [41mspellfile[m=
  $put =''
  $put ='test '. [41ma[m:[41maff[m . '-' . [41ma[m:[41mdic[m
  " [41mGenerate[m [41ma[m .[41mspl[m [41mfile[m [41mfrom[m [41ma[m .[41mdic[m [41mand[m .[41maff[m [41mfile[m.
  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41maffstart[m/+1,/^' . [41ma[m:[41maff[m . '[41maffend[m/-1[41mw[m! [41mXtest[m.[41maff[m'
  [41mexe[m '1;/^' . [41ma[m:[41mdic[m . '[41mdicstart[m/+1,/^' . [41ma[m:[41mdic[m . '[41mdicend[m/-1[41mw[m! [41mXtest[m.[41mdic[m'
  [41mmkspell[m! [41mXtest[m [41mXtest[m
  " [41muse[m [41mthat[m [41mspell[m [41mfile
[m  [41mset[m [41mspl[m=[41mXtest[m.[41mutf-8[m.[41mspl[m [41mspell[m
  " [41mlist[m [41mall[m [41mvalid[m [41mwords
[m  [41mspelldump[m
  %[41myank
[m  [41mquit[m
  $put
  $put ='-------'
  " [41mfind[m [41mall[m [41mbad[m [41mwords[m [41mand[m [41msuggestions[m [41mfor[m [41mthem
[m  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41mgood[m:'
  [41mnormal[m 0[41mf[m:][41ms
[m  [41mlet[m [41mprevbad[m = ''
  [41mwhile[m 1
    [41mlet[m [[41mbad[m, [41ma[m] = [41mspellbadword[m()
    [41mif[m [41mbad[m == '' || [41mbad[m == [41mprevbad[m || [41mbad[m == '[41mbadend[m'[38;7H[41mbreak
[m    [41mendif
[m    [41mlet[m [41mprevbad[m = [41mbad
[m    [41mlet[m [41mlst[m = [41mspellsuggest[m([41mbad[m, 3)
    [41mnormal[m [41mmm[m
    $put =[41mbad[m
    $put =[41mstring[m([41mlst[m)
    [41mnormal[m `[41mm[m][41ms
[m  [41mendwhile
endfunc[m
:"
:[41mcall[m [41mTestOne[m('1', '1')
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkÃ³opÃ«rÃ¿nÃ´ven[m')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:"
:" [41mand[m [41mnow[m [41mwith[m [41mSAL[m [41minstead[m [41mof[m [41mSOFO[m [41mitems[m; test [41mautomatic[m [41mreloading
gg[m:/^[41maffstart[m_[41msal[m/+1,/^[41maffend[m_[41msal[m/-1[41mw[m! [41mXtest[m.[41maff[m
:[41mmkspell[m! [41mXtest[m [41mXtest[m
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkÃ³opÃ«rÃ¿nÃ´ven[m')[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff[?25l"Xtest.aff" [60;13H[K[60;13H153 lines, 3426 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmkspell! Xtest Xtest[?25lReading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[60;26H[K[60;1H
Compressed 29 of 131 nodes; 102 (77%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 510 bytes
Performing soundfolding...
Total number of words: 16
Number of words after soundfolding: 15
Compressing word tree...
Compressed 33 of 75 nodes; 42 (56%) remaining
Writing suggestion file Xtest.utf-8.sug ...
Estimated runtime memory use: 241 bytes
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[14L[2;1H7[41mdicstart[m
1234
[41mmee[m/391,111,9999
[41mbar[m/17,61003,123
[41mlead[m/2
[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[12;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[14;9Hleadprobar
badend[m[15;7H[K[16;3H[K[17;1H[44mtest[m output:[18;3H[K[19;1H[44mtest[m 1-1[19;9H[K[20;1H# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m[20;24H[K[21;1HComment[21;8H[K[22;1Hdeol[22;5H[K[23;1HdÃ©Ã´r[23;5H[K[24;1Hinput[24;7H[K[25;1HOK[25;3H[K[26;1Houtput[26;7H[K[27;1Houtputs
outtest
put[29;4H[K[30;1Hputs[30;5H[K[31;1Htest[31;5H[K[32;1Htesten[32;7H[K[33;1Htestn[33;6H[K[34;1Hthe end[34;8H[K[35;1Huk[35;3H[K[36;1Hwrong[36;6H[K[37;1H-------[37;8H[K[38;1H[41mbad[m[38;7H[K[39;1H['put', 'uk', 'OK']
[41minputs[m[40;7H[K[41;1H['input', 'puts', 'outputs'][41;29H[K[42;1H[41mcomment[m[42;8H[K[43;1H['Comment', 'outtest', 'the end']
[41mok[m[44;5H[K[45;1H['OK', 'uk', 'put']
[41mOk[m[46;3H[K[47;1H['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m[50;5H[K[51;1H['deol', 'dÃ©Ã´r', 'test'][51;25H[K[52;1H[41mend[m[52;4H[K[53;1H['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test'][55;22H[K[56;2H[41mebletegek[m[56;11H[K[57;1H[41mkepereneven[m[57;12H[K[58;1H[41meverles[m [41mgesvets[m [41metele[m[58;22H[K[59;1H[41mkbltykk[m[59;8H[K[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[?25l[1;59r[59;1H
[1;60r[59;1H[41mkprnfn[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;59r[59;1H
[1;60r[59;1H*[41mfls[m [41mkswts[m [41mtl[m[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" also use an addition file[?25l[59;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41mTests[m [41mfor[m [41mspell[m [41mchecking[m [41mwith[m '[41mencoding[m' [41mset[m [41mto[m "[41mutf-8[m".  [41mvim[m: [41mset[m [41mft[m=[41mvim[m :

[41mSTARTTEST[m
:[41mso[m [41msmall[m.[41mvim[m
:[41mso[m [41mmbyte[m.[41mvim[m
:"
:" [41mDon't[m [41mwant[m [41mto[m [41mdepend[m [41mon[m [41mthe[m [41mlocale[m [41mfrom[m [41mthe[m [41menvironment[m.  [41mThe[m .[41maff[m [41mand[m .[41mdic[m
:" [41mtext[m [41mis[m [41min[m [41mlatin1[m, [41mthe[m test [41mtext[m [41mis[m [41mutf-8[m.
:[41mset[m [41menc[m=[41mlatin1[m
:[41me[m!
:[41mset[m [41menc[m=[41mutf-8[m
:[41mset[m [41mfenc[m=
:"
:" [41mFunction[m [41mto[m test .[41maff[m/.[41mdic[m [41mwith[m [41mlist[m [41mof[m [41mgood[m [41mand[m [41mbad[m [41mwords[m.
:[41mfunc[m [41mTestOne[m([41maff[m, [41mdic[m)
  [41mset[m [41mspellfile[m=
  $put =''
  $put ='test '. [41ma[m:[41maff[m . '-' . [41ma[m:[41mdic[m
  " [41mGenerate[m [41ma[m .[41mspl[m [41mfile[m [41mfrom[m [41ma[m .[41mdic[m [41mand[m .[41maff[m [41mfile[m.
  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41maffstart[m/+1,/^' . [41ma[m:[41maff[m . '[41maffend[m/-1[41mw[m! [41mXtest[m.[41maff[m'
  [41mexe[m '1;/^' . [41ma[m:[41mdic[m . '[41mdicstart[m/+1,/^' . [41ma[m:[41mdic[m . '[41mdicend[m/-1[41mw[m! [41mXtest[m.[41mdic[m'
  [41mmkspell[m! [41mXtest[m [41mXtest[m
  " [41muse[m [41mthat[m [41mspell[m [41mfile
[m  [41mset[m [41mspl[m=[41mXtest[m.[41mutf-8[m.[41mspl[m [41mspell[m
  " [41mlist[m [41mall[m [41mvalid[m [41mwords
[m  [41mspelldump[m
  %[41myank
[m  [41mquit[m
  $put
  $put ='-------'
  " [41mfind[m [41mall[m [41mbad[m [41mwords[m [41mand[m [41msuggestions[m [41mfor[m [41mthem
[m  [41mexe[m '1;/^' . [41ma[m:[41maff[m . '[41mgood[m:'
  [41mnormal[m 0[41mf[m:][41ms
[m  [41mlet[m [41mprevbad[m = ''
  [41mwhile[m 1
    [41mlet[m [[41mbad[m, [41ma[m] = [41mspellbadword[m()
    [41mif[m [41mbad[m == '' || [41mbad[m == [41mprevbad[m || [41mbad[m == '[41mbadend[m'[38;7H[41mbreak
[m    [41mendif
[m    [41mlet[m [41mprevbad[m = [41mbad
[m    [41mlet[m [41mlst[m = [41mspellsuggest[m([41mbad[m, 3)
    [41mnormal[m [41mmm[m
    $put =[41mbad[m
    $put =[41mstring[m([41mlst[m)
    [41mnormal[m `[41mm[m][41ms
[m  [41mendwhile
endfunc[m
:"
:[41mcall[m [41mTestOne[m('1', '1')
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkÃ³opÃ«rÃ¿nÃ´ven[m')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:"
:" [41mand[m [41mnow[m [41mwith[m [41mSAL[m [41minstead[m [41mof[m [41mSOFO[m [41mitems[m; test [41mautomatic[m [41mreloading
gg[m:/^[41maffstart[m_[41msal[m/+1,/^[41maffend[m_[41msal[m/-1[41mw[m! [41mXtest[m.[41maff[m
:[41mmkspell[m! [41mXtest[m [41mXtest[m
:$put =[41msoundfold[m('[41mgoobledygoook[m')
:$put =[41msoundfold[m('[41mkÃ³opÃ«rÃ¿nÃ´ven[m')[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h/^addstart/+1,/^addend/-1w! Xtest.utf-8.add[?25l"Xtest.utf-8.add" [60;19H[K[60;19H[New File] 3 lines, 38 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmkspell! Xtest.utf-8.add.spl Xtest.utf-8.add[?25lReading word file Xtest.utf-8.add ...[60;38H[K[60;1H
Compressing word tree...
Compressed 0 of 29 nodes; 29 (100%) remaining
Writing spell file Xtest.utf-8.add.spl ...
Done!
Estimated runtime memory use: 145 bytes
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset spellfile=Xtest.utf-8.add[?25l[1;1H[6L[1;1H[41mTests[m [41mfor[m [41mspell[m [41mchecking[m [41mwith[m '[41mencoding[m' [41mset[m [41mto[m "[41mutf-8[m".  [41mvim[m: [41mset[m [41mft[m=[41mvim[m :

[41mSTARTTEST[m
:[41mso[m [41msmall[m.[41mvim[m
:[41mso[m [41mmbyte[m.[41mvim[m
:"[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/[?12l[?25h^test2:[?25l[27m[23m[m[H[2J[2;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[18;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[19;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[20;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[21;9Hpreborkborkbork[22;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[24;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[25;9Hpreborkprebork[m  [41mpreborkpreborkbork[26;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[27;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
elequint test elekwint test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1[30;1H[?12l[?25h[31;29H[?25l[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;29H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mmee[m/391,111,9999
[41mbar[m/17,61003,123
[41mlead[m/2
[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[9;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[11;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_us.utf-8.spl[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[2;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[18;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[19;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[20;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[21;9Hpreborkborkbork[22;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[24;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[25;9Hpreborkprebork[m  [41mpreborkpreborkbork[26;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[27;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
[46melequint[m test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mbar[m/17,61003,123
[41mlead[m/2
[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[8;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[10;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[17;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[18;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[19;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[20;9Hpreborkborkbork[21;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[23;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[24;9Hpreborkprebork[m  [41mpreborkpreborkbork[25;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[26;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
[46melequint[m test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[41mPFX[m [41myy[m 0 [41mnou[m .[30;1H[?12l[?25h[14C[?25l[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mlead[m/2
[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[7;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[9;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint
elekwint[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_gb.utf-8.spl[?25l[58;1Helequint
[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[2;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[18;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[19;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[20;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[21;9Hpreborkborkbork[22;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[24;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[25;9Hpreborkprebork[m  [41mpreborkpreborkbork[26;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[27;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
elequint test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[31;15H[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[6;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[8;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
elequint
[46melekwint
elekwint[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[17;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[18;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[19;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[20;9Hpreborkborkbork[21;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[23;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[24;9Hpreborkprebork[m  [41mpreborkpreborkbork[25;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[26;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
elequint test [46melekwint[m test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[41mPFX[m [41myy[m 0 [41mnou[m .[30;15H[?12l[?25h[14C[?25l[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;29H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[5;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[7;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
elequint
[46melekwint
elekwint[m
[41melekwent[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_nz.utf-8.spl[?25l[56;1H[46melequint[m
elekwint
elekwint
[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[2;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[18;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[19;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[20;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[21;9Hpreborkborkbork[22;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[24;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[25;9Hpreborkprebork[m  [41mpreborkpreborkbork[26;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[27;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
[46melequint[m test elekwint test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H7[41mdicend[m

7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[4;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[6;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint[m
elekwint
elekwint
[41melekwent[m
[46melequint[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[17;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[18;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[19;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[20;9Hpreborkborkbork[21;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[23;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[24;9Hpreborkprebork[m  [41mpreborkpreborkbork[25;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[26;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
[46melequint[m test elekwint test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[41mPFX[m [41myy[m 0 [41mnou[m .[30;1H[?12l[?25h[28C[?25l[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;29H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[2;1H7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[3;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[5;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent[m
[46melequint[m
elekwint
elekwint
[41melekwent[m
[46melequint[m
[41melekwent[?12l[?25h[?25l
[m:[?12l[?25hset spl=Xtest_ca.utf-8.spl[?25l[54;1H[41melequint
elekwint
elekwint

elequint
[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[2;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[18;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[19;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[20;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[21;9Hpreborkborkbork[22;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[24;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[25;9Hpreborkprebork[m  [41mpreborkpreborkbork[26;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[27;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
[41melequint[m test [41melekwint[m test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[?25l[m[60;1H[K[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;1H7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[2;7Hlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[4;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent
elequint
elekwint
elekwint
elekwent
elequint
elekwent
elequint[?12l[?25h[?25l[27m[23m[m[H[2J[1;1H[41mPFX[m [41mP[m [41mN[m 1
[41mPFX[m [41mP[m 0 [41mnou[m .
4[41maffend[m

4[41mdicstart[m
1234
[41mword[m/[41mmP
util[m/[41mam
pro[m/[41mxq
tomato[m/[41mm
bork[m/[41mmp
start[m/[41ms
end[m/[41me[m
4[41mdicend[m

4[41mgood[m: [41mword[m [41mutil[m [41mbork[m [41mprebork[m [41mstart[m [41mend[m [41mwordutil[m [41mwordutils[m [41mpro-ok[17;9Hbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[18;9Htomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[19;9Hstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[20;9Hpreborkborkbork[21;9Hnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[23;9Hendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[24;9Hpreborkprebork[m  [41mpreborkpreborkbork[25;9Hstartwordwordwordwordend[m [41mborkpreborkpreborkbork[26;9Hutilsbork[m  [41mstartnouword
badend

test2[m:
[41melequint[m test [41melekwint[m test [41melekwent[m [41masdf[m

Test [41maffix[m [41mflags[m [41mwith[m [41mtwo[m [41mcharacters[m

5[41maffstart
SET[m [41mISO8859-1

FLAG[m [41mlong

NEEDAFFIX[m !!

[41mCOMPOUNDRULE[m [41mssmm[m*[41mee

NEEDCOMPOUND[m [41mxx
COMPOUNDPERMITFLAG[m [41mpp

SFX[m 13 [41mY[m 1
[41mSFX[m 13 0 [41mbork[m .

[41mSFX[m [41ma1[m [41mY[m 1
[41mSFX[m [41ma1[m 0 [41ma1[m .

[41mSFX[m [41ma[m[34m<e9>[m [41mY[m 1
[41mSFX[m [41ma[m[34m<e9>[m 0 [41ma[m[34m<e9>[m .

[41mPFX[m [41mzz[m [41mY[m 1
[41mPFX[m [41mzz[m 0 [41mpre[m/[41mpp[m .

[41mPFX[m [41myy[m [41mY[m 1
[41mPFX[m [41myy[m 0 [41mnou[m .[30;1H[?12l[?25h[14C[?25l[60;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[30;15H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =str[?25l[27m[23m[m[H[2J[1;7H[41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[3;9Hleadprobar
badend[m

[44mtest[m output:

[44mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
[41mbad[m
['put', 'uk', 'OK']
[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m
['Comment', 'outtest', 'the end']
[41mok[m
['OK', 'uk', 'put']
[41mOk[m
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m
['deol', 'dÃ©Ã´r', 'test']
[41mend[m
['put', 'uk', 'test']
[41mthe[m
['put', 'uk', 'test']
[41mgebletegek
kepereneven
everles[m [41mgesvets[m [41metele
kbltykk
kprnfn[m
*[41mfls[m [41mkswts[m [41mtl
elekwent
elequint
elekwint
elekwint
elekwent
elequint
elekwent
elequint
elekwint[?12l[?25h[?25l
[m:[?12l[?25hunlet str a[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Postponed prefixes[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall TestOne('2', '1')[?25l"Xtest.aff" [60;13H[K[60;13H46 lines, 461 characters written
"Xtest.dic" 11 lines, 71 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[60;26H[K[60;1H
Compressed 10 of 102 nodes; 92 (90%) remaining
Compressed 0 of 13 nodes; 13 (100%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 525 bytes
17 lines yanked
17 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[12L[1;1H[41mMAP[m [41my[m[34m<ff><fd>[m
[41mMAP[m [41ms[m[34m<df>[m
2[41maffend[m

1[41mdicstart[m
123456
test/[41mNO[m
# [41mcomment[m
wrong
Comment
OK
uk
put/[41mISO[m
the end
deol[15;5H[K[16;1Hd[34m<e9><f4>[mr
1[41mdicend[m[18;1H[K[19;1H[41maddstart[m
/[41mregions[m=[41musgbnz
elequint[m/2
[41melekwint[m/3
[41maddend[m[23;7H[K[24;1H[K[25;1H1[41mgood[m: wrong OK puts. Test the end
[41mbad[m:  [41minputs[m [41mcomment[m [41mok[m [41mOk[m. [44mtest[m [41mdÃ©Ã´l[m [41mend[m [41mthe
badend[m[28;1H[K[29;1H2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdÃ©Ã´l
badend[m[31;7H[K[32;1H[K[33;1HTest [41mrules[m [41mfor[m [41mcompounding[m.[34;1H[K[35;1H3[41maffstart
SET[m [41mISO8859-1[m[36;14H[K[37;1H[K[38;1H[41mCOMPOUNDMIN[m 3[38;14H[K[39;1H[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m[40;15H[K[41;1H3[41maffend[m[42;1H[K[43;1H3[41mdicstart[m
1234[44;5H[K[45;1H[41mfoo[m/[41mm[m[45;6H[K[46;1H[41mbar[m/[41mmx[m[46;7H[K[47;1H[41mm[m[34m<ef>[m/[41mm[m[47;9H[K[48;1H[41mla[m/[41mmx[m[48;6H[K[49;1H3[41mdicend[m[50;1H[K[51;1H3[41mgood[m: [41mfoo[m [41mmÃ¯[m [41mfoobar[m [41mfoofoobar[m [41mbarfoo[m [41mbarbarfoo
bad[m: [41mbar[m [41mla[m [41mfoomÃ¯[m [41mbarmÃ¯[m [41mmÃ¯foo[m [41mmÃ¯bar[m [41mmÃ¯mÃ¯[m [41mlala[m [41mmÃ¯la[m [41mlamÃ¯[m [41mfoola[m [41mlabar
badend[m[53;7H[K[54;1H[K[55;1H[K[56;1H[41mTests[m [41mfor[m [41mcompounding[m.[57;1H[K[58;1H4[41maffstart
SET[m [41mISO8859-1[m[60;1H[K[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" Compound words[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall TestOne('3', '3')[?25l"Xtest.aff" [60;13H[K[60;13H5 lines, 60 characters written
"Xtest.dic" 5 lines, 29 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - fooCompressing word tree...[60;26H[K[60;1H
Compressed 6 of 31 nodes; 25 (80%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 125 bytes
3 lines yanked
3 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('4', '4')[?25l"Xtest.aff" [60;13H[K[60;13H45 lines, 559 characters written
"Xtest.dic" 8 lines, 59 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - wordCompressing word tree...[60;26H[K[60;1H
Compressed 2 of 91 nodes; 89 (97%) remaining
Compressed 0 of 15 nodes; 15 (100%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 520 bytes
12 lines yanked
12 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('5', '5')[?25l"Xtest.aff" [60;13H[K[60;13H25 lines, 237 characters written
"Xtest.dic" 6 lines, 57 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - fooCompressing word tree...[60;26H[K[60;1H
Compressed 19 of 107 nodes; 88 (82%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 440 bytes
10 lines yanked
10 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('6', '6')[?25l"Xtest.aff" [60;13H[K[60;13H23 lines, 211 characters written
"Xtest.dic" 6 lines, 53 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - meeCompressing word tree...[60;26H[K[60;1H
Compressed 19 of 89 nodes; 70 (78%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 350 bytes
9 lines yanked
9 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall TestOne('7', '7')[?25l"Xtest.aff" [60;13H[K[60;13H26 lines, 338 characters written
"Xtest.dic" 6 lines, 67 characters written
Reading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - meeCompressing word tree...[60;26H[K[60;1H
Compressed 19 of 91 nodes; 72 (79%) remaining
Writing spell file Xtest.utf-8.spl ...
Done!
Estimated runtime memory use: 360 bytes
9 lines yanked
9 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[27m[23m[m[H[2J[2;1H[41mNEEDCOMPOUND[m 1
[41mCOMPOUNDPERMITFLAG[m 432

[41mSFX[m 61003 [41mY[m 1
[41mSFX[m 61003 0 [41mmeat[m .

[41mSFX[m 391 [41mY[m 1
[41mSFX[m 391 0 [41ma1[m .

[41mSFX[m 111 [41mY[m 1
[41mSFX[m 111 0 [41ma[m[34m<e9>[m .

[41mPFX[m 17 [41mY[m 1
[41mPFX[m 17 0 [41mpre[m/432 .
7[41maffend[m

7[41mdicstart[m
1234
[41mmee[m/391,111,9999
bar/17,61003,123
lead/2
tail/123
[41mmiddle[m/77,1
7[41mdicend[m

7[41mgood[m: meea1 meeaÃ© bar prebar barmeat prebarmeat  leadprebar[28;7Hlead tail leadtail  leadmiddletail
[41mbad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[30;9Hleadprobar
badend

test[m [41moutput[m:

[41mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mutf[m-8.[41mspl
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the[m [41mend
uk
wrong[m
-------
[41mbad[m
['[41mput[m', '[41muk[m', '[41mOK[m']
[41minputs[m
['[41minput[m', '[41mputs[m', '[41moutputs[m']
[41mcomment[m
['[41mComment[m', '[41mouttest[m', '[41mthe[m [41mend[m'][31;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" clean up for valgrind[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc TestOne[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset spl= enc=latin1[?25l[27m[23m[m[H[2J[2;1HNEEDCOMPOUND 1
COMPOUNDPERMITFLAG 432

SFX 61003 Y 1
SFX 61003 0 meat .

SFX 391 Y 1
SFX 391 0 a1 .

SFX 111 Y 1
SFX 111 0 aé .

PFX 17 Y 1
PFX 17 0 pre/432 .
7affend

7dicstart
1234
mee/391,111,9999
bar/17,61003,123
lead/2
tail/123
middle/77,1
7dicend

7good: meea1 meeaÃ© bar prebar barmeat prebarmeat  leadprebar[28;7Hlead tail leadtail  leadmiddletail
bad: mee meea2 prabar probarmaat middle leadmiddle middletail taillead[30;9Hleadprobar
badend

test output:

test 1-1
# file: Xtest.utf-8.spl
Comment
deol
dÃ©Ã´r
input
OK
output
outputs
outtest
put
puts
test
testen
testn
the end
uk
wrong
-------
bad
['put', 'uk', 'OK']
inputs
['input', 'puts', 'outputs']
comment
['Comment', 'outtest', 'the end'][31;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[31;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HTests for spell checking with 'encoding' set to "utf-8".  vim: set ft=vim :

STARTTEST
:so small.vim
:so mbyte.vim
:"
:" Don't want to depend on the locale from the environment.  The .aff and .dic
:" text is in latin1, the test text is utf-8.
:set enc=latin1
:e!
:set enc=utf-8
:set fenc=
:"
:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)
  set spellfile=
  $put =''
  $put ='test '. a:aff . '-' . a:dic
  " Generate a .spl file from a .dic and .aff file.
  exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
  exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
  mkspell! Xtest Xtest
  " use that spell file
  set spl=Xtest.utf-8.spl spell
  " list all valid words
  spelldump
  %yank
  quit
  $put
  $put ='-------'
  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s
  let prevbad = ''
  while 1
    let [bad, a] = spellbadword()
    if bad == '' || bad == prevbad || bad == 'badend'[38;7Hbreak
    endif
    let prevbad = bad
    let lst = spellsuggest(bad, 3)
    normal mm
    $put =bad
    $put =string(lst)
    normal `m]s
  endwhile
endfunc
:"
:call TestOne('1', '1')
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')
:$put =soundfold('oeverloos gezwets edale')
:"
:"
:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest
:$put =soundfold('goobledygoook')
:$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h/^test output:/,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 270 lines, 3685 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test60.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test60.in" 580 lines, 12483 characters[1;1HTests for the exists() function.  vim: set ft=vim :

STARTTEST
:so small.vim
:function! RunTest(str, result)
    if exists(a:str) == a:result[7;9Hecho "OK"
    else[9;9Hecho "FAILED: Checking for " . a:str
    endif
endfunction
:function! TestExists()
    augroup myagroup[14;9Hautocmd! BufEnter *.my echo 'myfile edited'
    augroup END[17;5Hlet test_cases = [][19;5H" 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]][52;5H" 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]][1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for the exists() function.  vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 575 lines, 12411 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;5Hif exists('v:version')[2;9Hecho "OK"
    else[4;9Hecho "FAILED"
    endif[7;5H" Non-existing Vim internal variable
    echo 'v:non_exists_var: 0'
    if !exists('v:non_exists_var')[10;9Hecho "OK"
    else[12;9Hecho "FAILED"
    endif[15;5H" Function arguments
    function TestFuncArg(func_arg, ...)[17;9Hecho 'a:func_arg: 1'[18;9Hif exists('a:func_arg')[19;13Hecho "OK"[20;9Helse[21;13Hecho "FAILED"[22;9Hendif[24;9Hecho 'a:non_exists_arg: 0'[25;9Hif !exists('a:non_exists_arg')[26;13Hecho "OK"[27;9Helse[28;13Hecho "FAILED"[29;9Hendif[31;9Hecho 'a:1: 1'[32;9Hif exists('a:1')[33;13Hecho "OK"[34;9Helse[35;13Hecho "FAILED"[36;9Hendif[38;9Hecho 'a:2: 0'[39;9Hif !exists('a:2')[40;13Hecho "OK"[41;9Helse[42;13Hecho "FAILED"[43;9Hendif
    endfunction[46;5Hcall TestFuncArg("arg1", "arg2")[48;5Hredir END
endfunction
:call TestExists()
:delfunc TestExists
:delfunc RunTest
:delfunc TestFuncArg
:edit! test.out
:set ff=unix
:w
:qa!
ENDTEST[?12l[?25h
[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! RunTest(str, result)[?25l
:  [?12l[?25h    if exists(a:str) == a:result
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED: Checking for " . a:str
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25hendfunction[1;1H[6L[?25l[1;5Hif exists('v:version')[2;9Hecho "OK"
    else[4;9Hecho "FAILED"
    endif[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunction! TestExists()[?25l
:  [?12l[?25h    augroup myagroup
[?25l:  [?12l[?25h[34m^I[mautocmd! BufEnter *.my echo 'myfile edited'
[?25l:  [?12l[?25h    augroup END
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    let test_cases = []
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " valid autocmd group
[?25l:  [?12l[?25h    let test_cases += [['#myagroup', 1]]
[?25l:  [?12l[?25h    " valid autocmd group with garbage
[?25l:  [?12l[?25h    let test_cases += [['#myagroup+b', 0]]
[?25l:  [?12l[?25h    " Valid autocmd group and event
[?25l:  [?12l[?25h    let test_cases += [['#myagroup#BufEnter', 1]]
[?25l:  [?12l[?25h    " Valid autocmd group, event and pattern
[?25l:  [?12l[?25h    let test_cases += [['#myagroup#BufEnter#*.my', 1]]
[?25l:  [?12l[?25h    " Valid autocmd event
[?25l:  [?12l[?25h    let test_cases += [['#BufEnter', 1]]
[?25l:  [?12l[?25h    " Valid autocmd event and pattern
[?25l:  [?12l[?25h    let test_cases += [['#BufEnter#*.my', 1]]
[?25l:  [?12l[?25h    " Non-existing autocmd group or event
[?25l:  [?12l[?25h    let test_cases += [['#xyzagroup', 0]]
[?25l:  [?12l[?25h    " Non-existing autocmd group and valid autocmd event
[?25l:  [?12l[?25h    let test_cases += [['#xyzagroup#BufEnter', 0]]
[?25l:  [?12l[?25h    " Valid autocmd group and event with no matching pattern
[?25l:  [?12l[?25h    let test_cases += [['#myagroup#CmdwinEnter', 0]]
[?25l:  [?12l[?25h    " Valid autocmd group and non-existing autocmd event
[?25l:  [?12l[?25h    let test_cases += [['#myagroup#xyzacmd', 0]]
[?25l:  [?12l[?25h    " Valid autocmd group and event and non-matching pattern
[?25l:  [?12l[?25h    let test_cases += [['#myagroup#BufEnter#xyzpat', 0]]
[?25l:  [?12l[?25h    " Valid autocmd event and non-matching pattern
[?25l:  [?12l[?25h    let test_cases += [['#BufEnter#xyzpat', 0]]
[?25l:  [?12l[?25h    " Empty autocmd group, event and pattern
[?25l:  [?12l[?25h    let test_cases += [['###', 0]]
[?25l:  [?12l[?25h    " Empty autocmd group and event or empty event and pattern
[?25l:  [?12l[?25h    let test_cases += [['##', 0]]
[?25l:  [?12l[?25h    " Valid autocmd event
[?25l:  [?12l[?25h    let test_cases += [['##FileReadCmd', 1]]
[?25l:  [?12l[?25h    " Non-existing autocmd event
[?25l:  [?12l[?25h    let test_cases += [['##MySpecialCmd', 0]]
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing and working option (long form)
[?25l:  [?12l[?25h    let test_cases += [['&textwidth', 1]]
[?25l:  [?12l[?25h    " Existing and working option (short form)
[?25l:  [?12l[?25h    let test_cases += [['&tw', 1]]
[?25l:  [?12l[?25h    " Existing and working option with garbage
[?25l:  [?12l[?25h    let test_cases += [['&tw-', 0]]
[?25l:  [?12l[?25h    " Global option
[?25l:  [?12l[?25h    let test_cases += [['&g:errorformat', 1]]
[?25l:  [?12l[?25h    " Local option
[?25l:  [?12l[?25h    let test_cases += [['&l:errorformat', 1]]
[?25l:  [?12l[?25h    " Negative form of existing and working option (long form)
[?25l:  [?12l[?25h    let test_cases += [['&nojoinspaces', 0]]
[?25l:  [?12l[?25h    " Negative form of existing and working option (short form)
[?25l:  [?12l[?25h    let test_cases += [['&nojs', 0]]
[?25l:  [?12l[?25h    " Non-existing option
[?25l:  [?12l[?25h    let test_cases += [['&myxyzoption', 0]]
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing and working option (long form)
[?25l:  [?12l[?25h    let test_cases += [['+incsearch', 1]]
[?25l:  [?12l[?25h    " Existing and working option with garbage
[?25l:  [?12l[?25h    let test_cases += [['+incsearch!1', 0]]
[?25l:  [?12l[?25h    " Existing and working option (short form)
[?25l:  [?12l[?25h    let test_cases += [['+is', 1]]
[?25l:  [?12l[?25h    " Existing option that is hidden.
[?25l:  [?12l[?25h    let test_cases += [['+autoprint', 0]]
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing environment variable
[?25l:  [?12l[?25h    let $EDITOR_NAME = 'Vim Editor'
[?25l:  [?12l[?25h    let test_cases += [['$EDITOR_NAME', 1]]
[?25l:  [?12l[?25h    " Non-existing environment variable
[?25l:  [?12l[?25h    let test_cases += [['$NON_ENV_VAR', 0]]
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid internal function
[?25l:  [?12l[?25h    let test_cases += [['*bufnr', 1]]
[?25l:  [?12l[?25h    " Valid internal function with ()
[?25l:  [?12l[?25h    let test_cases += [['*bufnr()', 1]]
[?25l:  [?12l[?25h    " Non-existing internal function
[?25l:  [?12l[?25h    let test_cases += [['*myxyzfunc', 0]]
[?25l:  [?12l[?25h    " Valid internal function with garbage
[?25l:  [?12l[?25h    let test_cases += [['*bufnr&6', 0]]
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid user defined function
[?25l:  [?12l[?25h    let test_cases += [['*TestExists', 1]]
[?25l:  [?12l[?25h    " Non-existing user defined function
[?25l:  [?12l[?25h    let test_cases += [['*MyxyzFunc', 0]]
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    redir! > test.out
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    for [test_case, result] in test_cases
[?25l:    [?12l[?25h      [34m^I[mecho test_case . ": " . result
[?25l:    [?12l[?25h        call RunTest(test_case, result)
[?25l:    [?12l[?25h    endfor
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid internal command (full match)
[?25l:  [?12l[?25h    echo ':edit: 2'
[?25l:  [?12l[?25h    if exists(':edit') == 2
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid internal command (full match) with garbage
[?25l:  [?12l[?25h    echo ':edit/a: 0'
[?25l:  [?12l[?25h    if exists(':edit/a') == 0
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid internal command (partial match)
[?25l:  [?12l[?25h    echo ':q: 1'
[?25l:  [?12l[?25h    if exists(':q') == 1
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing internal command
[?25l:  [?12l[?25h    echo ':invalidcmd: 0'
[?25l:  [?12l[?25h    if !exists(':invalidcmd')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " User defined command (full match)
[?25l:  [?12l[?25h    command! MyCmd :echo 'My command'
[?25l:  [?12l[?25h    echo ':MyCmd: 2'
[?25l:  [?12l[?25h    if exists(':MyCmd') == 2
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " User defined command (partial match)
[?25l:  [?12l[?25h    command! MyOtherCmd :echo 'Another command'
[?25l:  [?12l[?25h    echo ':My: 3'
[?25l:  [?12l[?25h    if exists(':My') == 3
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Command modifier
[?25l:  [?12l[?25h    echo ':rightbelow: 2'
[?25l:  [?12l[?25h    if exists(':rightbelow') == 2
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing user defined command (full match)
[?25l:  [?12l[?25h    delcommand MyCmd
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    echo ':MyCmd: 0'
[?25l:  [?12l[?25h    if !exists(':MyCmd')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing user defined command (partial match)
[?25l:  [?12l[?25h    delcommand MyOtherCmd
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    echo ':My: 0'
[?25l:  [?12l[?25h    if !exists(':My')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid local variable
[?25l:  [?12l[?25h    let local_var = 1
[?25l:  [?12l[?25h    echo 'local_var: 1'
[?25l:  [?12l[?25h    if exists('local_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid local variable with garbage
[?25l:  [?12l[?25h    let local_var = 1
[?25l:  [?12l[?25h    echo 'local_var%n: 0'
[?25l:  [?12l[?25h    if !exists('local_var%n')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing local variable
[?25l:  [?12l[?25h    unlet local_var
[?25l:  [?12l[?25h    echo 'local_var: 0'
[?25l:  [?12l[?25h    if !exists('local_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid local list
[?25l:  [?12l[?25h    let local_list = ["blue", "orange"]
[?25l:  [?12l[?25h    echo 'local_list: 1'
[?25l:  [?12l[?25h    if exists('local_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid local list item
[?25l:  [?12l[?25h    echo 'local_list[1]: 1'
[?25l:  [?12l[?25h    if exists('local_list[1]')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid local list item with garbage
[?25l:  [?12l[?25h    echo 'local_list[1]+5: 0'
[?25l:  [?12l[?25h    if !exists('local_list[1]+5')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Invalid local list item
[?25l:  [?12l[?25h    echo 'local_list[2]: 0'
[?25l:  [?12l[?25h    if !exists('local_list[2]')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing local list
[?25l:  [?12l[?25h    unlet local_list
[?25l:  [?12l[?25h    echo 'local_list: 0'
[?25l:  [?12l[?25h    if !exists('local_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Valid local dictionary
[?25l:  [?12l[?25h    let local_dict = {"xcord":100, "ycord":2}
[?25l:  [?12l[?25h    echo 'local_dict: 1'
[?25l:  [?12l[?25h    if exists('local_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing local dictionary
[?25l:  [?12l[?25h    unlet local_dict
[?25l:  [?12l[?25h    echo 'local_dict: 0'
[?25l:  [?12l[?25h    if !exists('local_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing local curly-brace variable
[?25l:  [?12l[?25h    let str = "local"
[?25l:  [?12l[?25h    let curly_{str}_var = 1
[?25l:  [?12l[?25h    echo 'curly_' . str . '_var: 1'
[?25l:  [?12l[?25h    if exists('curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing local curly-brace variable
[?25l:  [?12l[?25h    unlet curly_{str}_var
[?25l:  [?12l[?25h    echo 'curly_' . str . '_var: 0'
[?25l:  [?12l[?25h    if !exists('curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing global variable
[?25l:  [?12l[?25h    let g:global_var = 1
[?25l:  [?12l[?25h    echo 'g:global_var: 1'
[?25l:  [?12l[?25h    if exists('g:global_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing global variable with garbage
[?25l:  [?12l[?25h    echo 'g:global_var-n: 1'
[?25l:  [?12l[?25h    if !exists('g:global_var-n')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing global variable
[?25l:  [?12l[?25h    unlet g:global_var
[?25l:  [?12l[?25h    echo 'g:global_var: 0'
[?25l:  [?12l[?25h    if !exists('g:global_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing global list
[?25l:  [?12l[?25h    let g:global_list = ["blue", "orange"]
[?25l:  [?12l[?25h    echo 'g:global_list: 1'
[?25l:  [?12l[?25h    if exists('g:global_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing global list
[?25l:  [?12l[?25h    unlet g:global_list
[?25l:  [?12l[?25h    echo 'g:global_list: 0'
[?25l:  [?12l[?25h    if !exists('g:global_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing global dictionary
[?25l:  [?12l[?25h    let g:global_dict = {"xcord":100, "ycord":2}
[?25l:  [?12l[?25h    echo 'g:global_dict: 1'
[?25l:  [?12l[?25h    if exists('g:global_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing global dictionary
[?25l:  [?12l[?25h    unlet g:global_dict
[?25l:  [?12l[?25h    echo 'g:global_dict: 0'
[?25l:  [?12l[?25h    if !exists('g:global_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing global curly-brace variable
[?25l:  [?12l[?25h    let str = "global"
[?25l:  [?12l[?25h    let g:curly_{str}_var = 1
[?25l:  [?12l[?25h    echo 'g:curly_' . str . '_var: 1'
[?25l:  [?12l[?25h    if exists('g:curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing global curly-brace variable
[?25l:  [?12l[?25h    unlet g:curly_{str}_var
[?25l:  [?12l[?25h    echo 'g:curly_' . str . '_var: 0'
[?25l:  [?12l[?25h    if !exists('g:curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing window variable
[?25l:  [?12l[?25h    echo 'w:window_var: 1'
[?25l:  [?12l[?25h    let w:window_var = 1
[?25l:  [?12l[?25h    if exists('w:window_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing window variable
[?25l:  [?12l[?25h    unlet w:window_var
[?25l:  [?12l[?25h    echo 'w:window_var: 0'
[?25l:  [?12l[?25h    if !exists('w:window_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing window list
[?25l:  [?12l[?25h    let w:window_list = ["blue", "orange"]
[?25l:  [?12l[?25h    echo 'w:window_list: 1'
[?25l:  [?12l[?25h    if exists('w:window_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing window list
[?25l:  [?12l[?25h    unlet w:window_list
[?25l:  [?12l[?25h    echo 'w:window_list: 0'
[?25l:  [?12l[?25h    if !exists('w:window_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing window dictionary
[?25l:  [?12l[?25h    let w:window_dict = {"xcord":100, "ycord":2}
[?25l:  [?12l[?25h    echo 'w:window_dict: 1'
[?25l:  [?12l[?25h    if exists('w:window_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing window dictionary
[?25l:  [?12l[?25h    unlet w:window_dict
[?25l:  [?12l[?25h    echo 'w:window_dict: 0'
[?25l:  [?12l[?25h    if !exists('w:window_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing window curly-brace variable
[?25l:  [?12l[?25h    let str = "window"
[?25l:  [?12l[?25h    let w:curly_{str}_var = 1
[?25l:  [?12l[?25h    echo 'w:curly_' . str . '_var: 1'
[?25l:  [?12l[?25h    if exists('w:curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing window curly-brace variable
[?25l:  [?12l[?25h    unlet w:curly_{str}_var
[?25l:  [?12l[?25h    echo 'w:curly_' . str . '_var: 0'
[?25l:  [?12l[?25h    if !exists('w:curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing buffer variable
[?25l:  [?12l[?25h    echo 'b:buffer_var: 1'
[?25l:  [?12l[?25h    let b:buffer_var = 1
[?25l:  [?12l[?25h    if exists('b:buffer_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing buffer variable
[?25l:  [?12l[?25h    unlet b:buffer_var
[?25l:  [?12l[?25h    echo 'b:buffer_var: 0'
[?25l:  [?12l[?25h    if !exists('b:buffer_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing buffer list
[?25l:  [?12l[?25h    let b:buffer_list = ["blue", "orange"]
[?25l:  [?12l[?25h    echo 'b:buffer_list: 1'
[?25l:  [?12l[?25h    if exists('b:buffer_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing buffer list
[?25l:  [?12l[?25h    unlet b:buffer_list
[?25l:  [?12l[?25h    echo 'b:buffer_list: 0'
[?25l:  [?12l[?25h    if !exists('b:buffer_list')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing buffer dictionary
[?25l:  [?12l[?25h    let b:buffer_dict = {"xcord":100, "ycord":2}
[?25l:  [?12l[?25h    echo 'b:buffer_dict: 1'
[?25l:  [?12l[?25h    if exists('b:buffer_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing buffer dictionary
[?25l:  [?12l[?25h    unlet b:buffer_dict
[?25l:  [?12l[?25h    echo 'b:buffer_dict: 0'
[?25l:  [?12l[?25h    if !exists('b:buffer_dict')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing buffer curly-brace variable
[?25l:  [?12l[?25h    let str = "buffer"
[?25l:  [?12l[?25h    let b:curly_{str}_var = 1
[?25l:  [?12l[?25h    echo 'b:curly_' . str . '_var: 1'
[?25l:  [?12l[?25h    if exists('b:curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing buffer curly-brace variable
[?25l:  [?12l[?25h    unlet b:curly_{str}_var
[?25l:  [?12l[?25h    echo 'b:curly_' . str . '_var: 0'
[?25l:  [?12l[?25h    if !exists('b:curly_{str}_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Script-local tests
[?25l:  [?12l[?25h    source test60.vim
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Existing Vim internal variable
[?25l:  [?12l[?25h    echo 'v:version: 1'
[?25l:  [?12l[?25h    if exists('v:version')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Non-existing Vim internal variable
[?25l:  [?12l[?25h    echo 'v:non_exists_var: 0'
[?25l:  [?12l[?25h    if !exists('v:non_exists_var')
[?25l:    [?12l[?25h[34m^I[mecho "OK"
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h[34m^I[mecho "FAILED"
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h
[?25l:  [?12l[?25h    " Function arguments
[?25l:  [?12l[?25h    function TestFuncArg(func_arg, ...)
[?25l:    [?12l[?25h        echo 'a:func_arg: 1'
[?25l:    [?12l[?25h        if exists('a:func_arg')
[?25l:      [?12l[?25h            echo "OK"
[?25l:      [?12l[?25h        else
[?25l:      [?12l[?25h            echo "FAILED"
[?25l:      [?12l[?25h        endif
[?25l:    [?12l[?25h
[?25l:    [?12l[?25h        echo 'a:non_exists_arg: 0'
[?25l:    [?12l[?25h        if !exists('a:non_exists_arg')
[?25l:      [?12l[?25h            echo "OK"
[?25l:      [?12l[?25h        else
[?25l:      [?12l[?25h            echo "FAILED"
[?25l:      [?12l[?25h        endif
[?25l:    [?12l[?25h
[?25l:    [?12l[?25h        echo 'a:1: 1'
[?25l:    [?12l[?25h        if exists('a:1')
[?25l:      [?12l[?25h            echo "OK"
[?25l:      [?12l[?25h        else
[?25l:      [?12l[?25h            echo "FAILED"
[?25l:      [?12l[?25h        endif
[?25l:    [?12l[?25h
[?25l:    [?12l[?25h        echo 'a:2: 0'
[?25l:    [?12l[?25h        if !exists('a:2')
[?25l:      [?12l[?25h            echo "OK"
[?25l:      [?12l[?25h        else
[?25l:      [?12l[?25h            echo "FAILED"
[?25l:      [?12l[?25h        endif
[?25l:    [?12l[?25h    endfunction
[?25l:    [?12l[?25h
[?25l:    [?12l[?25h    call TestFuncArg("arg1", "arg2")
[?25l:    [?12l[?25h
[?25l:    [?12l[?25h    redir END
[?25l:    [?12l[?25hendfunction[27m[23m[m[H[2J[?25l[1;5Hif exists('v:version')[2;9Hecho "OK"
    else[4;9Hecho "FAILED"
    endif[7;5H" Non-existing Vim internal variable
    echo 'v:non_exists_var: 0'
    if !exists('v:non_exists_var')[10;9Hecho "OK"
    else[12;9Hecho "FAILED"
    endif[15;5H" Function arguments
    function TestFuncArg(func_arg, ...)[17;9Hecho 'a:func_arg: 1'[18;9Hif exists('a:func_arg')[19;13Hecho "OK"[20;9Helse[21;13Hecho "FAILED"[22;9Hendif[24;9Hecho 'a:non_exists_arg: 0'[25;9Hif !exists('a:non_exists_arg')[26;13Hecho "OK"[27;9Helse[28;13Hecho "FAILED"[29;9Hendif[31;9Hecho 'a:1: 1'[32;9Hif exists('a:1')[33;13Hecho "OK"[34;9Helse[35;13Hecho "FAILED"[36;9Hendif[38;9Hecho 'a:2: 0'[39;9Hif !exists('a:2')[40;13Hecho "OK"[41;9Helse[42;13Hecho "FAILED"[43;9Hendif
    endfunction[46;5Hcall TestFuncArg("arg1", "arg2")[48;5Hredir END
endfunction
:call TestExists()
:delfunc TestExists
:delfunc RunTest
:delfunc TestFuncArg
:edit! test.out
:set ff=unix
:w
:qa!
ENDTEST
[?12l[?25h[?25l
:[?12l[?25hcall TestExists()[?25l#myagroup: 1[60;13H[K[60;1H
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
: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
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
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hdelfunc TestExists[?25l[27m[23m[m[H[2J[1;5Hif exists('v:version')[2;9Hecho "OK"
    else[4;9Hecho "FAILED"
    endif[7;5H" Non-existing Vim internal variable
    echo 'v:non_exists_var: 0'
    if !exists('v:non_exists_var')[10;9Hecho "OK"
    else[12;9Hecho "FAILED"
    endif[15;5H" Function arguments
    function TestFuncArg(func_arg, ...)[17;9Hecho 'a:func_arg: 1'[18;9Hif exists('a:func_arg')[19;13Hecho "OK"[20;9Helse[21;13Hecho "FAILED"[22;9Hendif[24;9Hecho 'a:non_exists_arg: 0'[25;9Hif !exists('a:non_exists_arg')[26;13Hecho "OK"[27;9Helse[28;13Hecho "FAILED"[29;9Hendif[31;9Hecho 'a:1: 1'[32;9Hif exists('a:1')[33;13Hecho "OK"[34;9Helse[35;13Hecho "FAILED"[36;9Hendif[38;9Hecho 'a:2: 0'[39;9Hif !exists('a:2')[40;13Hecho "OK"[41;9Helse[42;13Hecho "FAILED"[43;9Hendif
    endfunction[46;5Hcall TestFuncArg("arg1", "arg2")[48;5Hredir END
endfunction
:call TestExists()
:delfunc TestExists
:delfunc RunTest
:delfunc TestFuncArg
:edit! test.out
:set ff=unix
:w
:qa!
ENDTEST
[?12l[?25h[?25l
:[?12l[?25hdelfunc RunTest[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hdelfunc TestFuncArg[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hedit! test.out[?25l"test.out" [60;12H[K[60;12H[Incomplete last line] 197 lines, 1844 characters[1;5H[K[2;1H#myagroup: 1[2;14H[K[3;1HOK[3;5H[K[4;1H#myagroup+b: 0[4;15H[K[5;1HOK[5;5H[K[6;1H#myagroup#BufEnter: 1
OK[7;5H[K[8;1H#myagroup#BufEnter#*.my: 1[8;27H[K[9;1HOK[9;5H[K[10;1H#BufEnter: 1[10;14H[K[11;1HOK[11;5H[K[12;1H#BufEnter#*.my: 1[12;18H[K[13;1HOK[13;5H[K[14;1H#xyzagroup: 0
OK[15;5H[K[16;1H#xyzagroup#BufEnter: 0[16;23H[K[17;1HOK[17;9H[K[18;1H#myagroup#CmdwinEnter: 0[18;25H[K[19;1HOK[19;13H[K[20;1H#myagroup#xyzacmd: 0
OK[21;13H[K[22;1H#myagroup#BufEnter#xyzpat: 0
OK
#BufEnter#xyzpat: 0[24;20H[K[25;1HOK[25;9H[K[26;1H###: 0[26;13H[K[27;1HOK[27;9H[K[28;1H##: 0[28;13H[K[29;1HOK[29;9H[K[30;1H##FileReadCmd: 1
OK[31;9H[K[32;1H##MySpecialCmd: 0[32;18H[K[33;1HOK[33;13H[K[34;1H&textwidth: 1
OK[35;13H[K[36;1H&tw: 1[36;9H[K[37;1HOK
&tw-: 0[38;9H[K[39;1HOK[39;9H[K[40;1H&g:errorformat: 1[40;18H[K[41;1HOK[41;9H[K[42;1H&l:errorformat: 1[42;18H[K[43;1HOK[43;9H[K[44;1H&nojoinspaces: 0
OK
&nojs: 0[46;10H[K[47;1HOK
&myxyzoption: 0
OK[49;3H[K[50;1H+incsearch: 1[50;14H[K[51;1HOK[51;3H[K[52;1H+incsearch!1: 0[52;16H[K[53;1HOK[53;3H[K[54;1H+is: 1[54;8H[K[55;1HOK[55;3H[K[56;1H+autoprint: 0
OK[57;3H[K[58;1H$EDITOR_NAME: 1
OK[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ff=unix[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 197 lines, 1845 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test61.failed test.ok test.out X* viminfo
cp test61.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test61.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test61.in" 113 lines, 1774 characters[1;1HTests for undo tree.
Since this script is sourced we need to explicitly break changes up in
undo-able pieces.  Do that by setting 'undolevels'.
Also tests :earlier and :later.

STARTTEST
:echo undotree().entries
ENDTEST

STARTTEST
:" Delete three characters and undo
Gx:set ul=100
x:set ul=100
x:.w! test.out
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
:"
:/^111/w >>test.out
:" Delete three other characters and go back in time step by step
$x:set ul=100
x:set ul=100
x:.w >>test.out
:sleep 1
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
g-:.w >>test.out
10g+:.w >>test.out
:"
:/^222/w >>test.out
:" Delay for three seconds and go some seconds forward and backward
:sleep 2
Aa[34m^[[m:set ul=100
Ab[34m^[[m:set ul=100
Ac[34m^[[m:set ul=100
:.w >>test.out
:ear 1s
:.w >>test.out
:ear 3s
:.w >>test.out
:later 1s
:.w >>test.out
:later 1h
:.w >>test.out
:"
:" test undojoin
Goaaaa[34m^[[m:set ul=100
obbbb[34m^[[mu:.w >>test.out
obbbb[34m^[[m:set ul=100
:undojoin
occcc[34m^[[mu:.w >>test.out
:e! Xtest
ione one one[34m^[[m:set ul=100[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for undo tree.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 1 line, 25 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[8;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hecho undotree().entries[?25l[][60;3H[K[9;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[10;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H97 lines, 1501 characters written[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[11;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[49M[1;60r[11;1H:w!
otwo[34m^[[m:set ul=100
otwo[34m^[[m:set ul=100
:w
othree[34m^[[m:earlier 1f
:" expect "one one one\ntwo\ntwo"
:%yank a
:earlier 1f
:" expect "one one one"
:%yank b
:earlier 1f
:" expect empty line
:%yank c
:later 1f
:" expect "one one one"
:%yank d
:later 1f
:" expect "one one one\ntwo\ntwo"
:%yank e
:later 1f
:" expect "one one one\ntwo\ntwo\nthree"
ggO---[34m^[[m:0put e
ggO---[34m^[[m:0put d
ggO---[34m^[[m:0put c
ggO---[34m^[[m:0put b
ggO---[34m^[[m:0put a
ggO---[34m^[[m:w >>test.out
:so small.vim
:set nocp viminfo+=nviminfo
:enew!
oa[34m^[[m
:set ul=100
ob[34m^[[m
:set ul=100
o1[34m^[[ma2[34m^R[m=setline('.','1234')

[34m^[[muu:"
oc[34m^[[m
:set ul=100
o1[34m^[[ma2[34m^R[m=setline('.','1234')

[34m^[[mu:"
od[34m^[[m
:set ul=100
o1[34m^[[ma2[34m^R[m=string(123)
[34m^[[mu:"
:%w >>test.out
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Delete three characters and undo[?25l[59;1H[?12l[?25h[?25l[1;59r[1;1H[4M[1;60r[56;1H1111 -----
2222 -----

123456789[60;1H[K[59;1H[?12l[?25h[?25l23456789[59;9H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset ul=100[?25l[59;1H[?12l[?25h[?25l3456789[59;8H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[59;1H[?12l[?25h[?25l456789[59;7H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 7 characters written[59;1H[?12l[?25h[?25l
1 change; before #3  0 seconds ago[60;35H[K[59;1H3456789[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 8 characters appended[59;1H[?12l[?25h[?25l
1 change; before #2  0 seconds ago[60;35H[K[59;1H23456789[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 9 characters appended[59;1H[?12l[?25h[?25l
1 change; before #1  0 seconds ago[60;35H[K[59;1H123456789[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;1H[?12l[?25h[?25l
Already at oldest change[60;25H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^111/w >>test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H1 line, 11 characters appended[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Delete three other characters and go back in time step by step[?25l[59;1H[?12l[?25h[8C[?25l[59;9H[K[59;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[59;8H[?12l[?25h[?25l[59;8H[K[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[59;7H[?12l[?25h[?25l[59;7H[K[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsleep 1[?25l[59;6H[?12l[?25h[?25l
1 change; before #6  1 seconds ago[59;7H7[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 8 characters appended[59;7H[?12l[?25h[?25l
1 change; before #5  1 seconds ago[60;35H[K[59;8H8[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 9 characters appended[59;8H[?12l[?25h[?25l
4 changes; after #3  1 seconds ago[60;35H[K[59;1H456789[59;7H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[59;1H[?12l[?25h[?25l
1 change; before #3  1 seconds ago[60;35H[K[59;1H3456789[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 8 characters appended[59;1H[?12l[?25h[?25l
1 change; before #2  1 seconds ago[60;35H[K[59;1H23456789[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 9 characters appended[59;1H[?12l[?25h[?25l
1 change; before #1  1 seconds ago[60;35H[K[59;1H123456789[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;1H[?12l[?25h[?25l
Already at oldest change[60;25H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;1H[?12l[?25h[?25l
Already at oldest change[60;25H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;1H[?12l[?25h[?25l
3 changes; after #6  1 seconds ago[60;35H[K[59;7H[K[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^222/w >>test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H1 line, 11 characters appended[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Delay for three seconds and go some seconds forward and backward[?25l[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsleep 2[?25l[59;6H[?12l[?25h[?25l6a[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[59;7H[?12l[?25h[?25lab[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[59;8H[?12l[?25h[?25lbc[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[59;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hear 1s[?25l3 changes; before #7  0 seconds ago[59;7H[K[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hear 3s[?25l3 changes; before #1  3 seconds ago[59;7H789[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlater 1s[?25l3 changes; after #6  3 seconds ago[59;7H[K[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 7 characters appended[59;6H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlater 1h[?25l3 changes; after #9  0 seconds ago[59;7Habc[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 10 characters appended[59;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test undojoin[?25l[59;9H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Haaaa[60;1H[K[59;4H[?12l[?25h[?25l
:[?12l[?25hset ul=100[?25l[59;4H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hbbbb[60;1H[K[59;4H[?12l[?25h[?25l
1 line less; before #11  0 seconds ago[59;1H[1m[34m~                                                                                                 [58;4H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 5 characters appended[58;4H[?12l[?25h[?25l
bbbb[59;5H[K[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hundojoin[?25l[59;4H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hcccc[60;1H[K[59;4H[?12l[?25h[?25l
2 fewer lines; before #12  0 seconds ago[58;1H[1m[34m~                                                                                                 [59;1H~                                                                                                 [57;4H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1 line, 5 characters appended[57;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest[?25l"Xtest" [New File][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [1;1H[?12l[?25h[?25l[mone one one[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[1;11H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw![?25l"Xtest" [New File] 1 line, 12 characters written[1;11H[?12l[?25h[?25l
two[2;4H[K[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[2;3H[?12l[?25h[?25l
two[3;4H[K[3;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[3;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xtest" 3 lines, 20 characters written[3;3H[?12l[?25h[?25l
three[4;6H[K[4;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hearlier 1f[?25l1 line less; before #4  0 seconds ago[4;1H[1m[34m~                                                                                                 [3;3H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h" expect "one one one\ntwo\ntwo"[?25l[3;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%yank a[?25l3 lines yanked[3;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hearlier 1f[?25l2 fewer lines; before #2  0 seconds ago[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [1;11H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h" expect "one one one"[?25l[1;11H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%yank b[?25l[1;11H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hearlier 1f[?25l1 line less; before #1  0 seconds ago[1;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" expect empty line[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%yank c[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlater 1f[?25l1 more line; after #1  0 seconds ago[1;1Hone one one[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" expect "one one one"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%yank d[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlater 1f[?25l2 more lines; after #3  0 seconds ago[2;1Htwo[2;4H[K[3;1Htwo[3;4H[K[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" expect "one one one\ntwo\ntwo"[?25l[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%yank e[?25l3 lines yanked[2;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlater 1f[?25l1 more line; after #4  0 seconds ago[4;1Hthree[4;6H[K[3;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" expect "one one one\ntwo\ntwo\nthree"[?25l[3;3H[?12l[?25h[1;1H[?25l[1;59r[1;1H[L[1;60r[1;1H---[60;1H[K[1;3H[?12l[?25h[?25l[60;1H:[?12l[?25h0put e[?25l3 more lines[1;59r[1;1H[3L[1;60r[1;1Hone one one
two
two[60;1H[K[60;1H3 more lines[3;1H[?12l[?25h[1;1H[?25l[1;59r[1;1H[L[1;60r[1;1H---[60;1H[K[1;3H[?12l[?25h[?25l[60;1H:[?12l[?25h0put d[?25l[1;59r[1;1H[L[1;60r[1;1Hone one one[60;1H[K[1;1H[?12l[?25h[?25l[1;59r[1;1H[L[1;60r[1;1H---[?12l[?25h[?25l[60;1H:[?12l[?25h0put c[?25l[1;59r[1;1H[L[1;60r[60;1H[K[1;1H[?12l[?25h[?25l[1;59r[1;1H[L[1;60r[1;1H---[?12l[?25h[?25l[60;1H:[?12l[?25h0put b[?25l[1;59r[1;1H[L[1;60r[1;1Hone one one[60;1H[K[1;1H[?12l[?25h[?25l[1;59r[1;1H[L[1;60r[1;1H---[?12l[?25h[?25l[60;1H:[?12l[?25h0put a[?25l3 more lines[1;59r[1;1H[3L[1;60r[1;1Hone one one
two
two[60;1H[K[60;1H3 more lines[3;1H[?12l[?25h[1;1H[?25l[1;59r[1;1H[L[1;60r[1;1H---[60;1H[K[1;3H[?12l[?25h[?25l[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H19 lines, 115 characters appended[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocp viminfo+=nviminfo[?25l[1;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25henew![?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;1H[K[2;1Ha[2;2H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[2;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[3;1Hb[3;2H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[4;1H1[4;2H[K[4;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[60;1H=[?12l[?25hsetline('.','1234')[?25l[4;2H20
34[5;3H[K[60;1H[1m-- INSERT --[m[60;13H[K[5;1Hu[?12l[?25h3[60;1H[K[?25l[5;1H[?12l[?25h[?25l[60;1H1 line less; before #4  0 seconds ago[4;3H[K[5;1H[1m[34m~                                                                                                 [4;2H[?12l[?25h[?25l[m[60;22H3[4;1H[1m[34m~                                                                                                 [3;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[3;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[4;1Hc[4;2H[K[4;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[4;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[5;1H1[5;2H[K[5;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[60;1H=[?12l[?25hsetline('.','1234')[?25l[5;2H20
34[6;3H[K[60;1H[1m-- INSERT --[m[60;13H[K[6;1Hu[?12l[?25h3[60;1H[K[?25l[6;1H[?12l[?25h[?25l[60;1H1 line less; before #7  0 seconds ago[5;3H[K[6;1H[1m[34m~                                                                                                 [5;2H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[5;2H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[6;1Hd[6;2H[K[6;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[6;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[7;1H1[7;2H[K[7;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[60;1H=[?12l[?25hstring(123)[?25l[60;1H[K[7;2H2123[?12l[?25h[?25l[60;1H1 line less; before #9  0 seconds ago[7;1H[1m[34m~                                                                                                 [6;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%w >>test.out[?25l"test.out" [60;12H[K[60;12H6L, 12C appended[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
flaky test ok first time
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test62.failed test.ok test.out X* viminfo
cp test62.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test62.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test62.in" 190 lines, 5506 characters[1;1HTests for tab pages

STARTTEST
:so small.vim
:" Simple test for opening and closing a tab page
:tabnew
:let nr = tabpagenr()
:q
:call append(line('$'), 'tab page ' . nr)
:unlet nr
:"
:" Open three tab pages and use ":tabdo"
:0tabnew
:1tabnew
:888tabnew
:tabdo call append(line('$'), 'this is tab page ' . tabpagenr())
:tabclose! 2
:tabrewind
:let line1 = getline('$')
:undo
:q
:tablast
:let line2 = getline('$')
:q!
:call append(line('$'), line1)
:call append(line('$'), line2)
:unlet line1 line2
:"
:" Test for settabvar() and gettabvar() functions. Open a new tab page and
:" set 3 variables to a number, string and a list. Verify that the variables
:" are correctly set.
:tabnew
:tabfirst
:call settabvar(2, 'val_num', 100)
:call settabvar(2, 'val_str', 'SetTabVar test')
:call settabvar(2, 'val_list', ['red', 'blue', 'green'])
:"
:let test_status = 'gettabvar: fail'
:if gettabvar(2, 'val_num') == 100 && gettabvar(2, 'val_str') == 'SetTabVar test' && gettabvar(2,  [40;1H'val_list') == ['red', 'blue', 'green']
:    let test_status = 'gettabvar: pass'
:endif
:call append(line('$'), test_status)
:"
:tabnext 2
:let test_status = 'settabvar: fail'
:if t:val_num == 100 && t:val_str == 'SetTabVar test'  && t:val_list == ['red', 'blue', 'green']
:   let test_status = 'settabvar: pass'
:endif
:tabclose
:call append(line('$'), test_status)
:"
:if has('gui') || has('clientserver')
:" Test for ":tab drop exist-file" to keep current window.
:sp test1
:tab drop test1
:let test_status = 'tab drop 1: fail'
:if tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1
:    let test_status = 'tab drop 1: pass'[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for tab pages[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 184 lines, 5457 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;5Hlet t:a='a'
    C tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[57;1H[?12l[?25h
[?25l

:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Simple test for opening and closing a tab page[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m test62.in [m[1m [No Name] [m[7m                                                                            [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hlet nr = tabpagenr()[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq[?25l[27m[23m[m[H[2J[1;5Hlet t:a='a'
    C tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25hcall append(line('$'), 'tab page ' . nr)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet nr[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Open three tab pages and use ":tabdo"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h0tabnew[?25l[27m[23m[m[H[2J[1;1H[1m [No Name] [m[4m[30m[47m + test62.in [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h1tabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m [No Name] [m[1m [No Name] [m[4m[30m[47m + test62.in [m[7m                                                               [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h888tabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m [No Name]  [No Name]  + test62.in [m[1m [No Name] [m[7m                                                    [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25htabdo call append(line('$'), 'this is tab page ' . tabpagenr())[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + [No Name]  + [No Name]  + test62.in [m[1m + [No Name] [m[7m                                              [m[1;98H[4m[30m[47mX[m[3;1Hthis is tab page 4
[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25htabclose! 2[?25l[1;17H[4m[30m[47mtest62.in[m[1C[1m + [No Name] [m[7m             [45C [m[1;98H[4m[30m[47mX[2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25htabrewind[?25l[27m[23m[m[H[2J[1;1H[1m + [No Name] [m[4m[30m[47m + test62.in  + [No Name] [m[7m                                                           [m[1;98H[4m[30m[47mX[m[3;1Hthis is tab page 1
[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hlet line1 = getline('$')[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hundo[?25l2 fewer lines; before #1  0 seconds ago[1;2H[1m[No Name]e ][m[4m[30m[47m [m[1m [m[4m[30m[47m+ test62.in  + [No Name] [m[7m  [58C [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hq[?25l[27m[23m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m + [No Name] [m[7m                                                                        [m[1;98H[4m[30m[47mX[m[2;5HC tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25htablast[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test62.in [m[1m + [No Name] [m[7m                                                                        [m[1;98H[4m[30m[47mX[m[3;1Hthis is tab page 4
[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hlet line2 = getline('$')[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[27m[23m[m[H[2J[1;5Hlet t:a='a'
    C tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25hcall append(line('$'), line1)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), line2)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet line1 line2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test for settabvar() and gettabvar() functions. Open a new tab page and [?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" set 3 variables to a number, string and a list. Verify that the variables[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" are correctly set.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test62.in [m[1m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25htabfirst[?25l[27m[23m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[2;5HC tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25hcall settabvar(2, 'val_num', 100)[?25l[27m[23m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[2;5HC tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25hcall settabvar(2, 'val_str', 'SetTabVar test')[?25l[27m[23m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[2;5HC tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25hcall settabvar(2, 'val_list', ['red', 'blue', 'green'])[?25l[27m[23m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[2;5HC tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet test_status = 'gettabvar: fail'[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif gettabvar(2, 'val_num') == 100 && gettabvar(2, 'val_str') == 'SetTabVar test' && gettabvar(2,
'val_list') == ['red', 'blue', 'green'][?25l[60;1H[K[60;1H:  [?12l[?25h:    let test_status = 'gettabvar: pass'
[?25l:  [?12l[?25h:endif[1;1H[2L[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[?25l[m[2;5HC tab split[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25hcall append(line('$'), test_status)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabnext 2[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test62.in [m[1m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hlet test_status = 'settabvar: fail'[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif t:val_num == 100 && t:val_str == 'SetTabVar test'  && t:val_list == ['red', 'blue', 'green'][?25l
:  [?12l[?25h:   let test_status = 'settabvar: pass'
[?25l:  [?12l[?25h:endif[1;1H[2L[1;1H[4m[30m[47m + test62.in [m[1m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[?25l[m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25htabclose[?25l[27m[23m[m[H[2J[1;5Hlet t:a='a'
    C tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h[?25l

:[?12l[?25hcall append(line('$'), test_status)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif has('gui') || has('clientserver')[?25l
:  [?12l[?25h:" Test for ":tab drop exist-file" to keep current window.
[?25l:  [?12l[?25h:sp test1
[?25l:  [?12l[?25h:tab drop test1
[?25l:  [?12l[?25h:let test_status = 'tab drop 1: fail'
[?25l:  [?12l[?25h:if tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1
[?25l:    [?12l[?25h:    let test_status = 'tab drop 1: pass'
[?25l:    [?12l[?25h:endif
[?25l:  [?12l[?25h:close
[?25l:  [?12l[?25h:call append(line('$'), test_status)
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" Test for ":tab drop new-file" to keep current window of tabpage 1.
[?25l:  [?12l[?25h:split
[?25l:  [?12l[?25h:tab drop newfile
[?25l:  [?12l[?25h:let test_status = 'tab drop 2: fail'
[?25l:  [?12l[?25h:if tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1
[?25l:    [?12l[?25h:    let test_status = 'tab drop 2: pass'
[?25l:    [?12l[?25h:endif
[?25l:  [?12l[?25h:tabclose
[?25l:  [?12l[?25h:q
[?25l:  [?12l[?25h:call append(line('$'), test_status)
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:"
[?25l:  [?12l[?25h:" Test for ":tab drop multi-opend-file" to keep current tabpage and window.
[?25l:  [?12l[?25h:new test1
[?25l:  [?12l[?25h:tabnew
[?25l:  [?12l[?25h:new test1
[?25l:  [?12l[?25h:tab drop test1
[?25l:  [?12l[?25h:let test_status = 'tab drop 3: fail'
[?25l:  [?12l[?25h:if tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1
[?25l:    [?12l[?25h:    let test_status = 'tab drop 3: pass'
[?25l:    [?12l[?25h:endif
[?25l:  [?12l[?25h:tabclose
[?25l:  [?12l[?25h:q
[?25l:  [?12l[?25h:call append(line('$'), test_status)
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:" :drop not supported
[?25l:  [?12l[?25h:call append(line('$'), 'tab drop 1: pass')
[?25l:  [?12l[?25h:call append(line('$'), 'tab drop 2: pass')
[?25l:  [?12l[?25h:call append(line('$'), 'tab drop 3: pass')
[?25l:  [?12l[?25h:endif[1;1H[41L[?25l[1;5Hlet t:a='a'
    C tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor i in range(9) | tabnew | endfor[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + t62.in  No Name]  No Name]  No Name]  No Name]  No Name]  No Name]  No Name]  No Name] [m[1m No Name[1;98H [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[27m[23m[m[H[2J[1;1H[1m + t62.in [m[4m[30m[47m No Name]  No Name]  No Name]  No Name]  No Name]  No Name]  No Name]  No Name]  No Name[1;98H [1;98HX[?25l[m[2;5HC tab split
    if !hasau[4;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
    endif
    let t:a='b'
    C tabnew
    if !hasau[9;9Hlet g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
    endif
    let t:a='c'
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
    let w:a='a'
    C vsplit
    if !hasau[18;9Hlet g:r+=['WinLeave', 'WinEnter']
    endif
    let w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[25;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[31;9Haugroup TabDestructive[32;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[33;9Haugroup END[34;9HC tabnext 3[35;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][36;9Hautocmd! TabDestructive TabEnter[37;9HC tabnew[38;9HC tabnext 1[39;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[40;9HC tabnext 3[41;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[43;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [44;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[45;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[46;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[47;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[48;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:[58;1H[?12l[?25h
[?25l[2;59r[2;1H[9M[1;60r[51;1Htab page 2
this is tab page 3
this is tab page 1
this is tab page 4
gettabvar: pass
settabvar: pass
tab drop 1: pass
tab drop 2: pass
tab drop 3: pass[?12l[?25h[?25l
=[?12l[?25htabpagenr()[?25l[2;59r[2;1H[2M[1;60r[58;1H1[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabmove 5[?25l[1;1H[4m[30m[47m No Name][m[1m [m[4m[30m[47m [m[40C[1m + t62.in [m[37C[4m[30m[47me[1;98H [1;98HX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H6[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabmove -2[?25l[1;31H[1m + t62.in [m[10C[4m[30m[47m No Name][m[1m [m[4m[30m[47m [37Ce[1;98H [1;98HX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H4[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabmove +4[?25l[1;31H[4m[30m[47m No Name][m[1m [m[4m[30m[47m [m[30C[1m + t62.in [m[17C[4m[30m[47me[1;98H [1;98HX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H8[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabmove[?25l[1;71H[4m[30m[47m No Name][m[1m [m[4m[30m[47m [m[10C[1m + t62.i[1;98H [m[1;98H[4m[30m[47mX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H10[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabmove -20[?25l[1;1H[1m + t62.in [m[80C[4m[30m[47m No Name[1;98H [1;98HX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H1[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabmove +20[?25l[1;1H[4m[30m[47m No Name][m[1m [m[4m[30m[47m [m[80C[1m + t62.i[1;98H [m[1;98H[4m[30m[47mX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H10[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h3tabmove[?25l[1;31H[1m + t62.in [m[50C[4m[30m[47m No Name[1;98H [1;98HX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H4[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h7tabmove 5[?25l[1;31H[4m[30m[47m No Name][m[1m [m[4m[30m[47m [m[10C[1m + t62.in [m[37C[4m[30m[47me[1;98H [1;98HX[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H=[?12l[?25htabpagenr()[?25l[2;59r[59;1H
[1;60r[58;1H6[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet a='No error caught.'[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htry[?25l
:  [?12l[?25h:tabmove foo
[?25l:  [?12l[?25h:catch E474
[?25l:  [?12l[?25h:let a='E474 caught.'
[?25l:  [?12l[?25h:endtry[1;1H[4L[1;1H[4m[30m[47m No Name]  No Name]  No Name]  No Name]  No Name] [m[1m + t62.in [m[4m[30m[47m No Name]  No Name]  No Name]  No Name[1;98H [1;98HX[?25l[m[2;5Hlet tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1[60;1H[K[59;1H[?12l[?25h[?25l
=[?12l[?25ha[?25l[59;1HE474 caught.[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test autocommands[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabonly![?25l[1;1H    let w:a='a'[1;16H[K[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet g:r=[][?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcommand -nargs=1 -bar C :call add(g:r, '=== ' . <q-args> . ' ===')|<args>[?25l[59;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction Test()[?25l
:  [?12l[?25h    let hasau=has('autocmd')
[?25l:  [?12l[?25h    if hasau
[?25l:    [?12l[?25h        autocmd TabEnter * :call add(g:r, 'TabEnter')
[?25l:    [?12l[?25h        autocmd WinEnter * :call add(g:r, 'WinEnter')
[?25l:    [?12l[?25h        autocmd BufEnter * :call add(g:r, 'BufEnter')
[?25l:    [?12l[?25h        autocmd TabLeave * :call add(g:r, 'TabLeave')
[?25l:    [?12l[?25h        autocmd WinLeave * :call add(g:r, 'WinLeave')
[?25l:    [?12l[?25h        autocmd BufLeave * :call add(g:r, 'BufLeave')
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h    let t:a='a'
[?25l:  [?12l[?25h    C tab split
[?25l:  [?12l[?25h    if !hasau
[?25l:    [?12l[?25h        let g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter']
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h    let t:a='b'
[?25l:  [?12l[?25h    C tabnew
[?25l:  [?12l[?25h    if !hasau
[?25l:    [?12l[?25h        let g:r+=['WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufLeave', 'BufEnter']
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h    let t:a='c'
[?25l:  [?12l[?25h    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
[?25l:  [?12l[?25h    C call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)')
[?25l:  [?12l[?25h    call add(g:r, join(map(range(1, tabpagenr('$')), 'gettabvar(v:val, "a")')))
[?25l:  [?12l[?25h    let w:a='a'
[?25l:  [?12l[?25h    C vsplit
[?25l:  [?12l[?25h    if !hasau
[?25l:    [?12l[?25h        let g:r+=['WinLeave', 'WinEnter']
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h    let w:a='a'
[?25l:  [?12l[?25h    let tabn=tabpagenr()
[?25l:  [?12l[?25h    let winr=range(1, winnr('$'))
[?25l:  [?12l[?25h    C tabnext 1
[?25l:  [?12l[?25h    if !hasau
[?25l:    [?12l[?25h        let g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25h    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
[?25l:  [?12l[?25h    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
[?25l:  [?12l[?25h    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
[?25l:  [?12l[?25h    if hasau
[?25l:    [?12l[?25h        augroup TabDestructive
[?25l:    [?12l[?25h            autocmd TabEnter * :C tabnext 2 | C tabclose 3
[?25l:    [?12l[?25h        augroup END
[?25l:    [?12l[?25h        C tabnext 3
[?25l:    [?12l[?25h        let g:r+=[tabpagenr().'/'.tabpagenr('$')]
[?25l:    [?12l[?25h        autocmd! TabDestructive TabEnter
[?25l:    [?12l[?25h        C tabnew
[?25l:    [?12l[?25h        C tabnext 1
[?25l:    [?12l[?25h        autocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3
[?25l:    [?12l[?25h        C tabnext 3
[?25l:    [?12l[?25h        let g:r+=[tabpagenr().'/'.tabpagenr('$')]
[?25l:    [?12l[?25h    else
[?25l:    [?12l[?25h        let g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter"
[59;98H,[60;1H"=== tabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter",
[59;98H"[60;1HTabEnter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","
[59;98HT[60;1HabEnter","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=
[59;98H=[60;1H= tabnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== 
[59;98Ht[60;1Habclose 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
[?25l:    [?12l[?25h    endif
[?25l:  [?12l[?25hendfunction[27m[23m[m[H[2J[?25l[1;5Hlet w:a='a'
    let tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[6;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[12;9Haugroup TabDestructive[13;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[14;9Haugroup END[15;9HC tabnext 3[16;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][17;9Hautocmd! TabDestructive TabEnter[18;9HC tabnew[19;9HC tabnext 1[20;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[21;9HC tabnext 3[22;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[24;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [25;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[26;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[27;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[28;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[29;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:
tab page 2
this is tab page 3
this is tab page 1
this is tab page 4
gettabvar: pass
settabvar: pass
tab drop 1: pass
tab drop 2: pass
tab drop 3: pass
1
6
4
8
10
1
10
4
6
E474 caught.[?12l[?25h[?25l
:[?12l[?25hcall Test()[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test62.in [m[1m + test62.in [m[7m                                                                        [m[1;98H[4m[30m[47mX[m[2;5Hlet tabn=tabpagenr()
    let winr=range(1, winnr('$'))
    C tabnext 1
    if !hasau[6;9Hlet g:r+=['BufLeave', 'WinLeave', 'TabLeave', 'WinEnter', 'TabEnter', 'BufEnter']
    endif
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    C call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)')
    call add(g:r, join(map(copy(winr), 'gettabwinvar('.tabn.', v:val, "a")')))
    if hasau[12;9Haugroup TabDestructive[13;13Hautocmd TabEnter * :C tabnext 2 | C tabclose 3[14;9Haugroup END[15;9HC tabnext 3[16;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')][17;9Hautocmd! TabDestructive TabEnter[18;9HC tabnew[19;9HC tabnext 1[20;9Hautocmd TabDestructive TabEnter * nested :C tabnext 2 | C tabclose 3[21;9HC tabnext 3[22;9Hlet g:r+=[tabpagenr().'/'.tabpagenr('$')]
    else[24;9Hlet g:r+=["=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","===  [25;1Htabnext 2 ===","=== tabclose 3 ===","2/2","=== tabnew ===","WinLeave","TabLeave","WinEnter","TabEnn[26;1Hter","BufLeave","BufEnter","=== tabnext 1 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEntt[27;1Her","BufEnter","=== tabnext 3 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabb[28;1Hnext 2 ===","BufLeave","WinLeave","TabLeave","WinEnter","TabEnter","=== tabnext 2 ===","=== tabcloo[29;1Hse 3 ===","BufEnter","=== tabclose 3 ===","2/2",]
    endif
endfunction
:call Test()
:$ put =g:r
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:
tab page 2
this is tab page 3
this is tab page 1
this is tab page 4
gettabvar: pass
settabvar: pass
tab drop 1: pass
tab drop 2: pass
tab drop 3: pass
1
6
4
8
10
1
10
4
6
E474 caught.[?12l[?25h[?25l
:[?12l[?25h$ put =g:r[?25l68 more lines[2;1HBufLeave[2;9H[K[3;1HBufEnter[3;9H[K[4;1Ha b c[4;7H[K[5;1H=== call map(range(1, tabpagenr('$')), 'settabvar(v:val, ''a'', v:val*2)') ===
2 4 6[6;9H[K[7;1H=== vsplit ===
WinLeave[8;10H[K[9;1HWinEnter[9;9H[K[10;1H=== tabnext 1 ===[10;19H[K[11;1HBufLeave[11;9H[K[12;1HWinLeave[12;9H[K[13;1HTabLeave[13;13H[K[14;1HWinEnter[14;9H[K[15;1HTabEnter[15;9H[K[16;1HBufEnter[16;9H[K[17;1Ha a[17;9H[K[18;1H=== call map(copy(winr), 'settabwinvar('.tabn.', v:val, ''a'', v:val*2)') ===
2 4[19;9H[K[20;1H=== tabnext 3 ===[20;18H[K[21;1HBufLeave[21;9H[K[22;1HWinLeave[22;9H[K[23;1HTabLeav
WinEnter[24;9H[K[25;1HTabEnter[25;9H[K[26;1H=== tabnext 2 ===[26;18H[K[27;1H=== tabclose 3 =[27;19H[K[28;1H2/2[28;4H[K[29;1H=== tabnew ===[29;15H[K[30;1HWinLeave[30;9H[K[31;1HTabLeave[31;9H[K[32;1HWinEnter[32;9H[K[33;1HTabEnter[33;9H[K[34;1HBufLeave
BufEnter
=== tabnext 1 ===[36;18H[K[37;1HBufLeave
WinLeave
TabLeave
WinEnter
TabEnter[41;10H[K[42;1HBufEnter[42;9H[K[43;1H=== tabnext 3 ===[43;18H[K[44;1HBufLeave[44;9H[K[45;1HWinLeave[45;9H[K[46;1HTabLeave[46;9H[K[47;1HWinEnter[47;10H[K[48;1HTabEnter[48;10H[K[49;1H=== tabnext 2 ===
BufLeave
WinLeave
TabLeave
WinEnter
TabEnter
=== tabnext 2 ===
=== tabclose 3 ===
BufEnter
=== tabclose 3 ===
2/2[59;4H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^Results/,$w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 88 lines, 1038 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test63.failed test.ok test.out X* viminfo
cp test63.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test63.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test63.in" 157 lines, 4784 characters[1;1HTest for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",
"matchadd()", "matcharg()", "matchdelete()", and "setmatches()".

STARTTEST
:so small.vim
:" --- Check that "matcharg()" returns the correct group and pattern if a match
:" --- is defined.
:let @r = "*** Test 1: "
:highlight MyGroup1 ctermbg=red
:highlight MyGroup2 ctermbg=green
:highlight MyGroup3 ctermbg=blue
:match MyGroup1 /TODO/
:2match MyGroup2 /FIXME/
:3match MyGroup3 /XXX/
:if matcharg(1) == ['MyGroup1', 'TODO'] && matcharg(2) == ['MyGroup2', 'FIXME'] && matcharg(3) ==  [16;1H['MyGroup3', 'XXX']
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:" --- Check that "matcharg()" returns an empty list if the argument is not 1,
:" --- 2 or 3 (only 0 and 4 are tested).
:let @r .= "*** Test 2: "
:if matcharg(0) == [] && matcharg(4) == []
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:" --- Check that "matcharg()" returns ['', ''] if a match is not defined.
:let @r .= "*** Test 3: "
:match
:2match
:3match
:if matcharg(1) == ['', ''] && matcharg(2) == ['', ''] && matcharg(3) == ['', '']
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:" --- Check that "matchadd()" and "getmatches()" agree on added matches and
:" --- that default values apply.
:let @r .= "*** Test 4: "
:let m1 = matchadd("MyGroup1", "TODO")
:let m2 = matchadd("MyGroup2", "FIXME", 42)
:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:if getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 4}, {'group':  [46;1H'MyGroup2', 'pattern': 'FIXME', 'priority': 42, 'id': 5}, {'group': 'MyGroup3', 'pattern': 'XXX',  [47;1H'priority': 60, 'id': 17}]
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:" --- Check that "matchdelete()" deletes the matches defined in the previous
:" --- test correctly.
:let @r .= "*** Test 5: "
:call matchdelete(m1)
:call matchdelete(m2)
:call matchdelete(m3)
:unlet m1
:unlet m2[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 150 lines, 4605 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:let ml = getmatches()
:call clearmatches()
:call setmatches(ml)
:if getmatches() == ml
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:call clearmatches()
:unlet m1
:unlet m2
:unlet m3
:unlet ml
:" --- Check that "setmatches()" will not add two matches with the same ID. The
:" --- expected behaviour (for now) is to add the first match but not the
:" --- second and to return 0 (even though it is a matter of debate whether
:" --- this can be considered successful behaviour).
:let @r .= "*** Test 9: "
:let r1 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group'::[24;1H 'MyGroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 1}])
:if getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}] && r1 == 0[26;1H:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:call clearmatches()
:unlet r1
:" --- Check that "setmatches()" returns 0 if successful and otherwise -1.
:" --- (A range of valid and invalid input values are tried out to generate the
:" --- return values.)
:let @r .= "*** Test 10: "
:let rs1 = setmatches([])
:let rs2 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}])
:call clearmatches()
:let rf1 = setmatches(0)
:let rf2 = setmatches([0])
:let rf3 = setmatches([{'wrong key': 'wrong value'}])
:if rs1 == 0 && rs2 == 0 && rf1 == -1 && rf2 == -1 && rf3 == -1
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:unlet rs1
:unlet rs2
:unlet rf1
:unlet rf2
:unlet rf3
:highlight clear MyGroup1
:highlight clear MyGroup2
:highlight clear MyGroup3
G"rp
:/^Results/,$wq! test.out
ENDTEST

Results of test63:[57;1H[?12l[?25h
[?25l

:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check that "matcharg()" returns the correct group and pattern if a match[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- is defined.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r = "*** Test 1: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhighlight MyGroup1 ctermbg=red[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhighlight MyGroup2 ctermbg=green[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhighlight MyGroup3 ctermbg=blue[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmatch MyGroup1 /TODO/[?25l[23;57H[41mTODO[m[37C::[24;1H [25;56H[41mTODO[37;58HTODO[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h2match MyGroup2 /FIXME/[?25l[24;26H[42mFIXME[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h3match MyGroup3 /XXX/[?25l[1;33H[44mXXX[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif matcharg(1) == ['MyGroup1', 'TODO'] && matcharg(2) == ['MyGroup2', 'FIXME'] && matcharg(3) ==
['MyGroup3', 'XXX'][?25l[60;1H[K[60;1H:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "[44mXXX[m", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matcharg()" returns an empty list if the argument is not 1,[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- 2 or 3 (only 0 and 4 are tested).[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 2: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif matcharg(0) == [] && matcharg(4) == [][?25l
:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "[44mXXX[m", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matcharg()" returns ['', ''] if a match is not defined.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 3: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmatch[?25l[23;57HTODO[37C::[24;1H [25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h2match[?25l[24;26HFIXME[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h3match[?25l[1;33HXXX[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif matcharg(1) == ['', ''] && matcharg(2) == ['', ''] && matcharg(3) == ['', ''][?25l
:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matchadd()" and "getmatches()" agree on added matches and[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- that default values apply.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 4: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet m1 = matchadd("MyGroup1", "TODO")[?25l[23;57H[41mTODO[m[37C::[24;1H [25;56H[41mTODO[37;58HTODO[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet m2 = matchadd("MyGroup2", "FIXME", 42)[?25l[24;26H[42mFIXME[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet m3 = matchadd("MyGroup3", "XXX", 60, 17)[?25l[1;33H[44mXXX[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 4}, {'group':
'MyGroup2', 'pattern': 'FIXME', 'priority': 42, 'id': 5}, {'group': 'MyGroup3', 'pattern': 'XXX',
'priority': 60, 'id': 17}][?25l[59;1H[K[60;1H[K[59;1H:  [?12l[?25h:  let @r .= "OK\n"[?25l
:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "[44mXXX[m", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matchdelete()" deletes the matches defined in the previous[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- test correctly.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 5: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall matchdelete(m1)[?25l[23;57HTODO[37C::[24;1H [25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall matchdelete(m2)[?25l[24;26HFIXME[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall matchdelete(m3)[?25l[1;33HXXX[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m3[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif getmatches() == [][?25l
:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matchdelete()" returns 0 if successful and otherwise -1.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 6: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet m = matchadd("MyGroup1", "TODO")[?25l[23;57H[41mTODO[m[37C::[24;1H [25;56H[41mTODO[37;58HTODO[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet r1 = matchdelete(m)[?25l[23;57HTODO[37C::[24;1H [25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet r2 = matchdelete(42)[?25l[1m[37m[41mE803: ID not found: 42[m[60;23H[K[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif r1 == 0 && r2 == -1[?25l
:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25hunlet m[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet r1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet r2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check that "clearmatches()" clears all matches defined by ":match" and[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- "matchadd()".[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 7: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet m1 = matchadd("MyGroup1", "TODO")[?25l[23;57H[41mTODO[m[37C::[24;1H [25;56H[41mTODO[37;58HTODO[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet m2 = matchadd("MyGroup2", "FIXME", 42)[?25l[24;26H[42mFIXME[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet m3 = matchadd("MyGroup3", "XXX", 60, 17)[?25l[1;33H[44mXXX[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hmatch MyGroup1 /COFFEE/[?25l[2;18H[41mCOFFEE[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h2match MyGroup2 /HUMPPA/[?25l[3;19H[42mHUMPPA[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h3match MyGroup3 /VIM/[?25l[4;19H[44mVIM[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall clearmatches()[?25l[1;33HXXX[2;18HCOFFEE[3;19HHUMPPA[4;19HVIM[23;57HTODO[37C::[24;1H [24CFIXME[25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif getmatches() == [][?25l
:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25hunlet m1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m3[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check that "setmatches()" restores a list of matches saved by[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- "getmatches()" without changes. (Matches with equal priority must also[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- remain in the same order.)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 8: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet m1 = matchadd("MyGroup1", "TODO")[?25l[23;57H[41mTODO[m[37C::[24;1H [25;56H[41mTODO[37;58HTODO[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet m2 = matchadd("MyGroup2", "FIXME", 42)[?25l[24;26H[42mFIXME[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet m3 = matchadd("MyGroup3", "XXX", 60, 17)[?25l[1;33H[44mXXX[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hmatch MyGroup1 /COFFEE/[?25l[2;18H[41mCOFFEE[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h2match MyGroup2 /HUMPPA/[?25l[3;19H[42mHUMPPA[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h3match MyGroup3 /VIM/[?25l[4;19H[44mVIM[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet ml = getmatches()[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall clearmatches()[?25l[1;33HXXX[2;18HCOFFEE[3;19HHUMPPA[4;19HVIM[23;57HTODO[37C::[24;1H [24CFIXME[25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall setmatches(ml)[?25l[1;33H[44mXXX[m[2;18H[41mCOFFEE[m[3;19H[42mHUMPPA[m[4;19H[44mVIM[m[23;57H[41mTODO[m[37C::[24;1H [24C[42mFIXME[m[25;56H[41mTODO[37;58HTODO[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif getmatches() == ml[?25l
:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "[44mXXX[m", 60, 17)
:match MyGroup1 /[41mCOFFEE[m/
:2match MyGroup2 /[42mHUMPPA[m/
:3match MyGroup3 /[44mVIM[m/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25hcall clearmatches()[?25l[1;33HXXX[2;18HCOFFEE[3;19HHUMPPA[4;19HVIM[23;57HTODO[37C::[24;1H [24CFIXME[25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet m3[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet ml[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check that "setmatches()" will not add two matches with the same ID. The[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- expected behaviour (for now) is to add the first match but not the[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- second and to return 0 (even though it is a matter of debate whether[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- this can be considered successful behaviour).[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 9: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet r1 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group'
[59;98H:[60;1H 'MyGroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 1}])[?25l[59;1H[1m[37m[41mE801: ID already taken: 1[m[59;26H[K[60;2H[K[60;1H[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}] && r1 == 
[59;98H0[60;1H[?25l:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[5L[?25l[1;1H:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:let ml = getmatches()[23;57H[41mTODO[m[37C::[24;1H [25;56H[41mTODO[37;58HTODO[m[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25hcall clearmatches()[?25l[23;57HTODO[37C::[24;1H [25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet r1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- Check that "setmatches()" returns 0 if successful and otherwise -1.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- (A range of valid and invalid input values are tried out to generate the[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" --- return values.)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet @r .= "*** Test 10: "[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet rs1 = setmatches([])[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet rs2 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}])[?25l[23;57H[41mTODO[m[37C::[24;1H [25;56H[41mTODO[37;58HTODO[58;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall clearmatches()[?25l[23;57HTODO[37C::[24;1H [25;56HTODO[37;58HTODO[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet rf1 = setmatches(0)[?25l[1m[37m[41mE714: List required[m[60;20H[K[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet rf2 = setmatches([0])[?25l[1m[37m[41mE474: Invalid argument[m[60;23H[K[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet rf3 = setmatches([{'wrong key': 'wrong value'}])[?25l[1m[37m[41mE474: Invalid argument[m[60;23H[K[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif rs1 == 0 && rs2 == 0 && rf1 == -1 && rf2 == -1 && rf3 == -1[?25l
:  [?12l[?25h:  let @r .= "OK\n"
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h:  let @r .= "FAILED\n"
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:let m3 = matchadd("MyGroup3", "XXX", 60, 17)
:match MyGroup1 /COFFEE/
:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25hunlet rs1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet rs2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet rf1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet rf2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet rf3[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhighlight clear MyGroup1[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhighlight clear MyGroup2[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hhighlight clear MyGroup3[?25l[58;1H[?12l[?25h
[?25l
10 more lines[60;14H[K[1;59r[59;1H
[1;60r[59;1H*** Test 1: OK[60;1H[K[60;1H10 more lines[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H*** Test 2: OK[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^Results/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 11 lines, 170 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test64.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test64.in" 608 lines, 24586 characters[1;1HTest 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 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', "", ""])[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for regexp patterns without multi-byte support.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[7;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 575 lines, 24111 characters written[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[8;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;2Hcall setpos('.', [0, 2, 4, 0])
 s/\%#.*$//g
 call setpos('.', [0, 3, 0, 0])
 s/\%<3c./_/g
 %s/\%4l\%>5c./_/g
 %s/\%6l\%>25v./_/g
 %s/\%>6l\%3c./!/g
 %s/\%>7l\%12c./?/g
 %s/\%>7l\%<9l\%>5v\%<8v./#/g
 1,$yank
 quit!
endfunc
Go-0-[34m^[[m:set re=0
:call Postest()
:put
o-1-[34m^[[m:set re=1
:call Postest()
:put
o-2-[34m^[[m:set re=2
:call Postest()
:put
:"
:" start and end of buffer
/\%^
yeGo[34m^[[mp:"
50%/\%^..
yeGo[34m^[[mpA END[34m^[[m:"
50%/\%$
"ayb20gg/..\%$
"bybGo[34m^[[m"apo[34m^[[m"bp:"
:"
:""""" Write the results """""""""""""
:/\%#=1^Results/,$wq! test.out
ENDTEST

Substitute here:
<T="">Ta 5</Title>
<T="">Ac 7</Title>

Behind:
asdfasd<yyy
xxstart1
asdfasd<yy
xxxstart2
asdfasd<yy
xxstart3

Visual:
thexe the thexethe
andaxand andaxand
oooxofor foroxooo
oooxofor foroxooo

Marks:
asdfSasdfsadfEasdf
asdfSas
dfsadfEasdf

Results of test64:[34;1H[?12l[?25h
[?25l[60;1H:so! Xdotest[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" tl is a List of Lists with:[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    regexp pattern[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    text to test the pattern on[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    expected match (optional)[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    expected submatch 1 (optional)[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    expected submatch 2 (optional)[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    etc.[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"  When there is no match use only the first two items.[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet tl = [][?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Previously written tests """"""""""""""""""""""""""""""""[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'ab', 'aab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'b', 'abcdef', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc*', 'abccccdef', 'bcccc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc\{-}', 'abccccdef', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc*', 'abbdef', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'c*', 'ccc', 'ccc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc*', 'abdef', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'c*', 'abdef', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc\+', 'abccccdef', 'bcccc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc\+', 'abdef']) "no match[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"operator \|[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\|ab', 'cabd', 'a']) "alternation is ordered[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'c\?', 'ccb', 'c'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc\?', 'abd', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'bc\?', 'abccd', 'bc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{1}', 'ab', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2}', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2}', 'caad', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2}', 'aba'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2}', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2}', 'abaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2}', 'aaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vb{1}', 'abca', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vba{2}', 'abaa', 'baa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vba{3}', 'aabaac'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){1}', 'ab', 'ab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){1}', 'dabc', 'ab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){1}', 'acb'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){0,2}', 'acb', "", ""])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){0,2}', 'ab', 'ab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){1,2}', 'ab', 'ab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){1,2}', 'ababc', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){2,4}', 'ababcab', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){2,4}', 'abcababa', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){2}', 'abab', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){2}', 'cdababe', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){2}', 'abac'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab){2}', 'abacabab', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((ab){2}){2}', 'abababab', 'abababab', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((ab){2}){2}', 'abacabababab', 'abababab', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1}){1}', 'a', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2}){1}', 'aa', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2}){1}', 'aaac', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2}){1}', 'daaac', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1}){2}', 'daaac', 'aa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1}){2}', 'aaa', 'aa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2})+', 'adaac', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2})+', 'aa', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2}){1}', 'aa', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1}){2}', 'aa', 'aa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1}){1}', 'a', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2}){2}', 'aaaa', 'aaaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2}){2}', 'aaabaaaa', 'aaaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a+){2}', 'dadaac', 'aa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{3}){2}', 'aaaaaaa', 'aaaaaa', 'aaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1,2}){2}', 'daaac', 'aaa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1,3}){2}', 'daaaac', 'aaaa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1,3}){2}', 'daaaaac', 'aaaaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1,3}){3}', 'daac'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1,2}){2}', 'dac'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a+)+', 'daac', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a+)+', 'aaa', 'aaa', 'aaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a+){1,2}', 'aaa', 'aaa', 'aaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a+)(a+)', 'aaa', 'aaa', 'aa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{3})+', 'daaaac', 'aaa', 'aaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a|b|c)+', 'aacb', 'aacb', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a|b|c){2}', 'abcb', 'ab', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(abc){2}', 'abcabd', ])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(abc){2}', 'abdabcabc','abcabc', 'abc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a*', 'cc', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a*)+', 'cc', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((ab)+)+', 'ab', 'ab', 'ab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(((ab)+)+)+', 'ab', 'ab', 'ab', 'ab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(((ab)+)+)+', 'dababc', 'abab', 'abab', 'abab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{0,2})+', 'cc', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a*)+', '', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((a*)+)+', '', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((ab)*)+', '', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{1,3}', 'aab', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2,3}', 'abaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((ab)+|c*)+', 'abcccaba', 'abcccab', '', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{2})|(b{3})', 'bbabbbb', 'bbb', '', 'bbb'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{2}|b{2}', 'abab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a)+|(c)+', 'bbacbaacbbb', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vab{2,3}c', 'aabbccccccccccccc', 'abbc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vab{2,3}c', 'aabbbccccccccccccc', 'abbbc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vab{2,3}cd{2,3}e', 'aabbbcddee', 'abbbcdde'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va(bc){2}d', 'aabcbfbc' ])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va*a{2}', 'a', ])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va*a{2}', 'aa', 'aa' ])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va*a{2}', 'aaa', 'aaa' ])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va*a{2}', 'bbbabcc', ])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va*b*|a*c*', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\va{1}b{1}|a{1}b{1}', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"submatches[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a)', 'ab', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a)(b)', 'ab', 'ab', 'a', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(ab)(b)(c)', 'abbc', 'abbc', 'ab', 'b', 'c'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((a)(b))', 'ab', 'ab', 'ab', 'a', 'b'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a)|(b)', 'ab', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a*)+', 'aaaa', 'aaaa', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x', 'abcdef'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""" Simple tests """""""""""""""""""""""""""""""""""""""""""[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Search single groups[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'ab', 'aab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'ab', 'baced'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'ab', '                    ab           ', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Search multi-modifiers[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x*', 'xcd', 'x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x*', 'xxxxxxxxxxxxxxxxsofijiojgf', 'xxxxxxxxxxxxxxxx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" empty match is good[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x*', 'abcdoij', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" no match here[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\+', 'abcdoin'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\+', 'abcdeoijdfxxiuhfij', 'xx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\+', 'xxxxx', 'xxxxx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\+', 'abc x siufhiush xxxxxxxxx', 'x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\=', 'x sdfoij', 'x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\=', 'abc sfoij', '']) " empty match is good[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\=', 'xxxxxxxxx c', 'x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\?', 'x sdfoij', 'x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" empty match is good[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\?', 'abc sfoij', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'x\?', 'xxxxxxxxxx c', 'x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{0,0}', 'abcdfdoij', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" same thing as 'a?'[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{0,1}', 'asiubid axxxaaa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" same thing as 'a\{0,1}'[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{1,0}', 'asiubid axxxaaa', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{3,6}', 'aa siofuh'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{3,6}', 'aaaaa asfoij afaa', 'aaaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{3,6}', 'aaaaaaaa', 'aaaaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{0}', 'asoiuj', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{2}', 'aaaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{2}', 'iuash fiusahfliusah fiushfilushfi uhsaifuh askfj nasfvius afg aaaa sf
[59;98Hi[60;1Huhuhiushf', 'aa'])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall add(tl, [2, 'a\{2}', 'abcdefghijklmnopqrestuvwxyz1234567890'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" same thing as 'a*'[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{0,}', 'oij sdigfusnf', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{0,}', 'aaaaa aa', 'aaaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{2,}', 'sdfiougjdsafg'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{2,}', 'aaaaasfoij ', 'aaaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{5,}', 'xxaaaaxxx '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{5,}', 'xxaaaaaxxx ', 'aaaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{,0}', 'oidfguih iuhi hiu aaaa', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{,5}', 'abcd', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{,5}', 'aaaaaaaaaa', 'aaaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" leading star as normal char when \{} follows[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^*\{4,}$', '***'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^*\{4,}$', '****', '****'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^*\{4,}$', '*****', '*****'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" same thing as 'a*'[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{}', 'bbbcddiuhfcd', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{}', 'aaaaioudfh coisf jda', 'aaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-0,0}', 'abcdfdoij', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" anti-greedy version of 'a?'[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-0,1}', 'asiubid axxxaaa', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-3,6}', 'aa siofuh'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-3,6}', 'aaaaa asfoij afaa', 'aaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-3,6}', 'aaaaaaaa', 'aaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-0}', 'asoiuj', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-2}', 'aaaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-2}', 'abcdefghijklmnopqrestuvwxyz1234567890'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-0,}', 'oij sdigfusnf', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-0,}', 'aaaaa aa', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-2,}', 'sdfiougjdsafg'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-2,}', 'aaaaasfoij ', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-,0}', 'oidfguih iuhi hiu aaaa', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-,5}', 'abcd', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-,5}', 'aaaaaaaaaa', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" anti-greedy version of 'a*'[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-}', 'bbbcddiuhfcd', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-}', 'aaaaioudfh coisf jda', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test groups of characters and submatches[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(abc\)*', 'abcabcabc', 'abcabcabc', 'abc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(ab\)\+', 'abababaaaaa', 'ababab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(abaaaaa\)*cd', 'cd', 'cd', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(test1\)\? \(test2\)\?', 'test1 test3', 'test1 ', 'test1', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(test1\)\= \(test2\) \(test4443\)\=', ' test2 test4443 yupiiiiiiiiiii', ' tes
[59;98Ht[60;1H2 test4443', '', 'test2', 'test4443'])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall add(tl, [2, '\(\(sub1\) hello \(sub 2\)\)', 'asterix sub1 hello sub 2 obelix', 'sub1 hello 
[59;98Hs[60;1Hub 2', 'sub1 hello sub 2', 'sub1', 'sub 2'])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall add(tl, [2, '\(\(\(yyxxzz\)\)\)', 'abcdddsfiusfyyzzxxyyxxzz', 'yyxxzz', 'yyxxzz', 'yyxxzz',
'yyxxzz'])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall add(tl, [2, '\v((ab)+|c+)+', 'abcccaba', 'abcccab', 'ab', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v((ab)|c*)+', 'abcccaba', 'abcccab', '', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a(c*)+b)+', 'acbababaaa', 'acbabab', 'ab', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a|b*)+', 'aaaa', 'aaaa', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\p*', 'aÃ¡ [34m^I[m', 'aÃ¡ '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test greedy-ness and lazy-ness[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-2,7}','aaaaaaaaaaaaa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{-2,7}x','aaaaaaaaax', 'aaaaaaax'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{2,7}','aaaaaaaaaaaaaaaaaaaa', 'aaaaaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\{2,7}x','aaaaaaaaax', 'aaaaaaax'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vx(.{-,8})yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz','ayxa','xayzxayz'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\vx(.*)yz(.*)','xayxayzxayzxayz','xayxayzxayzxayz', 'ayxayzxayzxa',''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{1,2}){-2,3}','aaaaaaa','aaaa','aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a{-1,3})+','aa','aa','a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test Character classes[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\d\+e\d\d','test 10e23 fd','10e23'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test collections and character range [][?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v[a]', 'abcd', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a[bcd]', 'abcd', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a[b-d]', 'acbd', 'ac'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-d][e-f][x-x]d', 'cexdxx', 'cexd'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v[[:alpha:]]+', 'abcdefghijklmnopqrstuvwxyz6','abcdefghijklmnopqrstuvwxyz'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[[:alpha:]\+]', '6x8','x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^abc]\+','abcabcabc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^abc]','defghiasijvoinasoiunbvb','d'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^abc]\+','ddddddda','ddddddd'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^a-d]\+','aaaAAAZIHFNCddd','AAAZIHFNC'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-f]*','iiiiiiii',''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-f]*','abcdefgh','abcdef'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^a-f]\+','abcdefgh','gh'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-c]\{-3,6}','abcabc','abc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^[:alpha:]]\+','abcccadfoij7787ysf287yrnccdu','7787'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[-a]', '-', '-'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-]', '-', '-'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-f]*\c','ABCDEFGH','ABCDEF'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[abc][xyz]\c','-af-AF-BY--','BY'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" filename regexp[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[-./[:alnum:]_~]\+', 'log13.file', 'log13.file'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" special chars[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[\]\^\-\\]\+', '\^\\\-\---^', '\^\\\-\---^'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" collation elem[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[[.a.]]\+', 'aa', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" middle of regexp[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc[0-9]*ddd', 'siuhabc ii'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc[0-9]*ddd', 'adf abc44482ddd oijs', 'abc44482ddd'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\_[0-9]\+', 'asfi9888u', '9888'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[0-9\n]\+', 'asfi9888u', '9888'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\_[0-9]\+', "asfi\n9888u", "\n9888"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\_f', "  \na ", "\n"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\_f\+', "  \na ", "\na"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[0-9A-Za-z-_.]\+', " @0_a.A-{ ", "0_a.A-"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Test start/end of line, start/end of file[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^a.', "a_\nb ", "a_"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^a.', "b a \na_"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.a$', " a\n "])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.a$', " a b\n_a", "_a"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%^a.', "a a\na", "a "])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%^a', " a \na "])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.a\%$', " a\n "])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.a\%$', " a\n_a", "_a"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Test recognition of some character classes[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[0-9]', '8', '8'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^0-9]', '8'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[0-9a-fA-F]*', '0a7', '0a7'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^0-9A-Fa-f]\+', '0a7'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-z_A-Z0-9]\+', 'aso_sfoij', 'aso_sfoij'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-z]', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[a-zA-Z]', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[A-Z]', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\C[^A-Z]\+', 'ABCOIJDEOIFNSD jsfoij sa', ' jsfoij sa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Tests for \z features[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" match ends at \ze[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'xx \ze test', 'xx '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc\zeend', 'oij abcend', 'abc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'aa\zebb\|aaxx', ' aabb ', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'aa\zebb\|aaxx', ' aaxx ', 'aaxx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'aabb\|aa\zebb', ' aabb ', 'aabb'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'aa\zebb\|aaebb', ' aabb ', 'aa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" match starts at \zs[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc\zsdd', 'ddabcddxyzt', 'dd'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'aa \zsax', ' ax'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc \zsmatch\ze abc', 'abc abc abc match abc abc', 'match'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a \zsif .*){2}', 'a if then a if last', 'if last', 'a if last'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\>\zs.', 'aword. ', '.'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Tests for \@= and \& features[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc\@=', 'abc', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc\@=cd', 'abcd', 'abcd'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abc\@=', 'ababc', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" will never match, no matter the input text[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abcd\@=e', 'abcd'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" will never match[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'abcd\@=e', 'any text in here ... '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(abc)@=..', 'xabcd', 'ab', 'abc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(.*John\)\@=.*Bob', 'here is John, and here is B'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(John.*\)\@=.*Bob', 'John is Bobs friend', 'John is Bob', 'John is Bobs frien
[59;98Hd[60;1H'])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall add(tl, [2, '\<\S\+\())\)\@=', '$((i=i+1))', 'i=i+1', '))'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.*John\&.*Bob', 'here is John, and here is B'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.*John\&.*Bob', 'John is Bobs friend', 'John is Bob'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(test1)@=.*yep', 'this is a test1, yep it is', 'test1, yep', 'test1'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\(bar\)\@!', 'foobar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\(bar\)\@!', 'foo bar', 'foo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'if \(\(then\)\@!.\)*$', ' if then else'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'if \(\(then\)\@!.\)*$', ' if else ', 'if else ', ' '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(foo\)\@!bar', 'foobar', 'bar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(foo\)\@!...bar', 'foobar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' bar foo '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo bar '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^\%(.*bar\)\@!.*\zsfoo', ' foo xxx ', 'foo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[ ]\@!\p\%([ ]\@!\p\)*:', 'implicit mappings:', 'mappings:'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[ ]\@!\p\([ ]\@!\p\)*:', 'implicit mappings:', 'mappings:', 's'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'm\k\+_\@=\%(_\@!\k\)\@<=\k\+e', 'mx__xe', 'mx__xe'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%(\U\@<=S\k*\|S\l\)R', 'SuR', 'SuR'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Combining different tests and features[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[[:alpha:]]\{-2,6}', '787abcdiuhsasiuhb4', 'ab'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '', 'abcd', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(())', 'any possible text', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v%(ab(xyz)c)', '   abxyzc ', 'abxyzc', 'xyz'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(test|)empty', 'tesempty', 'empty', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v(a|aa)(a|aa)', 'aaa', 'aa', 'a', 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" \%u and friends[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%d32', 'yes no', ' '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%o40', 'yes no', ' '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%x20', 'yes no', ' '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%u0020', 'yes no', ' '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%U00000020', 'yes no', ' '])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""" \%[abc][?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'fobar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobar', 'foobar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'fooxx', 'foo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobxx', 'foob'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobaxx', 'fooba'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]', 'foobarxx', 'foobar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]x', 'foobxx', 'foobx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'foo\%[bar]x', 'foobarxx', 'foobarx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%[bar]x', 'barxx', 'barx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%[bar]x', 'bxx', 'bx'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\%[bar]x', 'xxx', 'x'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'b\%[[ao]r]', 'bar bor', 'bar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'b\%[[]]r]', 'b]r bor', 'b]r'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '@\%[\w\-]*', '<http://john.net/pandoc/>[@pandoc]', '@pandoc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Alternatives, must use first longest match[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'goo\|go', 'google', 'goo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\<goo\|\<go', 'google', 'goo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\<goo\|go', 'google', 'goo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Back references[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(\i\+\) \1', ' abc abc', 'abc abc', 'abc'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(\i\+\) \1', 'xgoo goox', 'goo goo', 'goo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(a\)\(b\)\(c\)\(dd\)\(e\)\(f\)\(g\)\(h\)\(i\)\1\2\3\4\5\6\7\8\9', 'xabcddefgh
[59;98Hi[60;1Habcddefghix', 'abcddefghiabcddefghi', 'a', 'b', 'c', 'dd', 'e', 'f', 'g', 'h', 'i'])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall add(tl, [2, '\(\d*\)a \1b', ' a b ', 'a b', ''])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^.\(.\).\_..\1.', "aaa\naaa\nb", "aaa\naaa", 'a'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<!$', 'foo.bat/foo.com', 'foo.bat/foo.com', 'bat'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<!$', 'foo.bat/foo.bat'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat
[59;98H'[60;1H])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Look-behind with limit[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '<\@1<=span.', 'xxspanxx<spanyyy', 'spany'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '<\@2<=span.', 'xxspanxx<spanyyy', 'spany'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(<<\)\@<=span.', 'xxspanxxxx<spanxx<<spanyyy', 'spany', '<<'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(<<\)\@1<=span.', 'xxspanxxxx<spanxx<<spanyyy'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(<<\)\@2<=span.', 'xxspanxxxx<spanxx<<spanyyy', 'spany', '<<'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(foo\)\@<!bar.', 'xx foobar1 xbar2 xx', 'bar2'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" look-behind match in front of a zero-width item[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v\C%(<Last Changed:\s+)@<=.*$', '" test header'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\v\C%(<Last Changed:\s+)@<=.*$', '" Last Changed: 1970', '1970'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(foo\)\@<=\>', 'foobar'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(foo\)\@<=\>', 'barfoo', '', 'foo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(foo\)\@<=.*', 'foobar', 'bar', 'foo'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""" \@>[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(a*\)\@>a', 'aaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\(a*\)\@>b', 'aaab', 'aaab', 'aaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" TODO: BT engine does not restore submatch after failure[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [1, '\(a*\)\@>a\|a\+', 'aaaa', 'aaaa'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" "\_" prepended negated collection matches EOL[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\_[^8-9]\+', "asfi\n9888", "asfi\n"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\_[^a]\+', "asfi\n9888", "sfi\n9888"])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Requiring lots of states.[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}', " 12345678-1234-123
[59;98H4[60;1H-1234-123456789012 ", "12345678-1234-1234-1234-123456789012", "1234-"])[?25l[1;1H[L[1;2Hcall setpos('.', [0, 2, 4, 0])[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Skip adding state twice[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=', "#if FOO", "#if", ' FOO'])[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Run the tests[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor t in tl[?25l
:  [?12l[?25h:  let re = t[0]
[?25l:  [?12l[?25h:  let pat = t[1]
[?25l:  [?12l[?25h:  let text = t[2]
[?25l:  [?12l[?25h:  let matchidx = 3
[?25l:  [?12l[?25h:  for engine in [0, 1, 2]
[?25l:    [?12l[?25h:    if engine == 2 && re == 0 || engine == 1 && re ==1
[?25l:      [?12l[?25h:      continue
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:    let &regexpengine = engine
[?25l:    [?12l[?25h:    try
[?25l:      [?12l[?25h:      let l = matchlist(text, pat)
[?25l:      [?12l[?25h:    catch
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"
[59;98H'[60;1H . v:exception . '\"'
[?25l:      [?12l[?25h:    endtry
[?25l:    [?12l[?25h:" check the match itself
[?25l:    [?12l[?25h:    if len(l) == 0 && len(t) > matchidx
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected
[59;98H:[60;1H \"' . t[matchidx] . '\"'
[?25l:      [?12l[?25h:    elseif len(l) > 0 && len(t) == matchidx
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\"
[59;98H,[60;1H expected no match'
[?25l:      [?12l[?25h:    elseif len(t) > matchidx && l[0] != t[matchidx]
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\"
[59;98H,[60;1H expected: \"' . t[matchidx] . '\"'
[?25l:      [?12l[?25h:    else
[?25l:      [?12l[?25h:      $put ='OK ' . engine . ' - ' . pat
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:    if len(l) > 0
[?25l:      [?12l[?25h:"   check all the nine submatches
[?25l:      [?12l[?25h:      for i in range(1, 9)
[?25l:[8C[?12l[?25h:        if len(t) <= matchidx + i
[?25l:[10C[?12l[?25h:          let e = ''
[?25l:[10C[?12l[?25h:        else
[?25l:[10C[?12l[?25h:          let e = t[matchidx + i]
[?25l:[10C[?12l[?25h:        endif
[?25l:[8C[?12l[?25h:        if l[i] != e
[?25l:[10C[?12l[?25h:          $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i 
[59;98H.[60;1H ': \"' . l[i] . '\", expected: \"' . e . '\"'
[?25l:[10C[?12l[?25h:        endif
[?25l:[8C[?12l[?25h:      endfor
[?25l:      [?12l[?25h:      unlet i
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:  endfor
[?25l:  [?12l[?25h:endfor[1;1H[45L[?25l[1;1HOK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
OK 2 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
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 - \(<<\)\@<=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\)\@<!bar.
OK 1 - \(foo\)\@<!bar.
OK 2 - \(foo\)\@<!bar.
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
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 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
OK 0 - \(a*\)\@>b
OK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
OK 0 - \(a*\)\@>a\|a\+
OK 2 - \(a*\)\@>a\|a\+
OK 0 - \_[^8-9]\+
OK 1 - \_[^8-9]\+[49;18H[K[50;1HOK 2 - \_[^8-9]\+
OK 0 - \_[^a]\+[51;16H[K[52;1HOK 1 - \_[^a]\+[52;16H[K[53;1HOK 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.*$\)\@=[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet t tl e l[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""""" multi-line tests """"""""""""""""""""[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet tl = [][?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" back references[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '^.\(.\).\_..\1.', ['aaa', 'aaa', 'b'], ['XX', 'b']])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall 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', './
[59;98HD[60;1Hir1/Dir2/abcdefgh.bat', '', 'XX']])[?25l[1;1H[2L[1;1HOK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" line breaks[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\S.*\nx', ['abc', 'def', 'ghi', 'xjk', 'lmn'], ['abc', 'def', 'XXjk', 'lmn']])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check that \_[0-9] matching EOL does not break a following \>[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-
[59;98H5[60;1H]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>', ['', 'localnet/192.168.0.1', ''], ['', 'localn
[59;98He[60;1Ht/XX', '']])[?25l[1;1H[2L[1;1HOK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check a pattern with a line break and ^ and $[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Run the multi-line tests[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put ='multi-line tests'[?25l[1;59r[59;1H
[1;60r[59;1Hmulti-line tests[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfor t in tl[?25l
:  [?12l[?25h:  let re = t[0]
[?25l:  [?12l[?25h:  let pat = t[1]
[?25l:  [?12l[?25h:  let before = t[2]
[?25l:  [?12l[?25h:  let after = t[3]
[?25l:  [?12l[?25h:  for engine in [0, 1, 2]
[?25l:    [?12l[?25h:    if engine == 2 && re == 0 || engine == 1 && re ==1
[?25l:      [?12l[?25h:      continue
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:    let &regexpengine = engine
[?25l:    [?12l[?25h:    new
[?25l:    [?12l[?25h:    call setline(1, before)
[?25l:    [?12l[?25h:    exe '%s/' . pat . '/XX/'
[?25l:    [?12l[?25h:    let result = getline(1, '$')
[?25l:    [?12l[?25h:    q!
[?25l:    [?12l[?25h:    if result != after
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . string(before) . '\", expected: \"'
. string(after) . '\", got: \"' . string(result) . '\"'
[?25l:      [?12l[?25h:    else
[?25l:      [?12l[?25h:      $put ='OK ' . engine . ' - ' . pat
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:  endfor
[?25l:  [?12l[?25h:endfor[1;1H[22L[?25l[1;1HOK 1 - \(<<\)\@2<=span.
OK 2 - \(<<\)\@2<=span.
OK 0 - \(foo\)\@<!bar.
OK 1 - \(foo\)\@<!bar.
OK 2 - \(foo\)\@<!bar.
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
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 - \(a*\)\@>a
OK 1 - \(a*\)\@>a[23;10Ha*\)\@>a[23;18H[K[24;9H(a*\)\@>b[24;18H[K[25;9H(a*\)\@>b[25;18H[K[26;9H(a*\)\@>b[26;18H[K[27;9H(a*\)\@>a\|a\+[27;23H[K[28;4H2 - \(a*\)\@>a\|a\+[28;23H[K[29;4H0 - \_[^8-9]\+[29;18H[K[30;4H1 - \_[^8-9]\+[30;18H[K[31;4H2 - \_[^8-9]\+[31;18H[K[32;4H0 - \_[^a]\+[32;16H[K[33;4H1 - \_[^a]\+[33;16H[K[34;4H2 - \_[^a]\+[34;16H[K[35;4H0 - [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.*$\)\@=
multi-line tests[41;17H[K[42;8H^.\(.\).\_..\1.[43;8H^.\(.\).\_..\1.[44;8H^.\(.\).\_..\1.[45;9Hv.*\/(.*)\n.*\/\1$
OK 1 - \v.*\/(.*)\n.*\/\1$
OK 2 - \v.*\/(.*)\n.*\/\1$
OK 0 - \S.*\nx[48;15H[K[49;4H1 - \S.*\nx[49;15H[K[50;4H2 - \S.*\nx[50;15H[K[51;4H0 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\\[52;1H_[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]\\[54;1H_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>[54;37H[K[55;8H\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\\[56;1H_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>[56;37H[K[57;4H0 - a\n^b$\n^c[57;18H[K[58;4H1 - a\n^b$\n^c[58;18H[K[59;1HOK 2 - a\n^b$\n^c[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet t tl[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check that using a pattern on two lines doesn't get messed up by using[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" matchstr() with \ze in between.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset re=0[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Substitute here[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;2H%s/\%>6l\%3c./!/g
 %s/\%>7l\%12c./?/g
 %s/\%>7l\%<9l\%>5v\%<8v./#/g
 1,$yank
 quit!
endfunc
Go-0-[34m^[[m:set re=0
:call Postest()
:put
o-1-[34m^[[m:set re=1
:call Postest()
:put
o-2-[34m^[[m:set re=2
:call Postest()
:put
:"
:" start and end of buffer
/\%^
yeGo[34m^[[mp:"
50%/\%^..
yeGo[34m^[[mpA END[34m^[[m:"
50%/\%$
"ayb20gg/..\%$
"bybGo[34m^[[m"apo[34m^[[m"bp:"
:"
:""""" Write the results """""""""""""
:/\%#=1^Results/,$wq! test.out
ENDTEST

Substitute here:
<T="">Ta 5</Title>
<T="">Ac 7</Title>

Behind:
asdfasd<yyy
xxstart1
asdfasd<yy
xxxstart2
asdfasd<yy
xxstart3

Visual:
thexe the thexethe
andaxand andaxand
oooxofor foroxooo
oooxofor foroxooo

Marks:
asdfSasdfsadfEasdf
asdfSas
dfsadfEasdf

Results of test64:
OK 0 - ab
OK 1 - ab
OK 2 - ab
OK 0 - b
OK 1 - b
OK 2 - b
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h.+1,.+2s/""/\='"'.matchstr(getline("."), '\d\+\ze<').'"'[?25l[31;5H5">Ta 5</Title>
<T="7">Ac 7</Title>[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Substitute here[?25l[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h.+1,.+2yank[?25l[30;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 1 - \(<<\)\@2<=span.
OK 2 - \(<<\)\@2<=span.
OK 0 - \(foo\)\@<!bar.
OK 1 - \(foo\)\@<!bar.
OK 2 - \(foo\)\@<!bar.
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
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 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
OK 0 - \(a*\)\@>b
OK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
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.*$\)\@=
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]\\[52;1H_[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]\\[54;1H_[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]\\[56;1H_[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[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H<T="5">Ta 5</Title>[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check a pattern with a look beind crossing a line boundary[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Behind:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;2Hquit!
endfunc
Go-0-[34m^[[m:set re=0
:call Postest()
:put
o-1-[34m^[[m:set re=1
:call Postest()
:put
o-2-[34m^[[m:set re=2
:call Postest()
:put
:"
:" start and end of buffer
/\%^
yeGo[34m^[[mp:"
50%/\%^..
yeGo[34m^[[mpA END[34m^[[m:"
50%/\%$
"ayb20gg/..\%$
"bybGo[34m^[[m"apo[34m^[[m"bp:"
:"
:""""" Write the results """""""""""""
:/\%#=1^Results/,$wq! test.out
ENDTEST

Substitute here:
<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

Behind:
asdfasd<yyy
xxstart1
asdfasd<yy
xxxstart2
asdfasd<yy
xxstart3

Visual:
thexe the thexethe
andaxand andaxand
oooxofor foroxooo
oooxofor foroxooo

Marks:
asdfSasdfsadfEasdf
asdfSas
dfsadfEasdf

Results of test64:
OK 0 - ab
OK 1 - ab
OK 2 - ab
OK 0 - b
OK 1 - b
OK 2 - b
OK 0 - bc*
OK 1 - bc*
OK 2 - bc*
OK 0 - bc\{-}
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25h\(<\_[xy]\+\)\@3<=start[?25l[36;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.yank[?25l[36;3H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 1 - \(foo\)\@<!bar.
OK 2 - \(foo\)\@<!bar.
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
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 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
OK 0 - \(a*\)\@>b
OK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
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.*$\)\@=
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]\\[49;1H_[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]\\[51;1H_[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]\\[53;1H_[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

<T="5">Ta 5</Title>
<T="7">Ac 7</Title>[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hxxstart3[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check matching Visual area[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Visual:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1Ho-2-[34m^[[m:set re=2
:call Postest()
:put
:"
:" start and end of buffer
/\%^
yeGo[34m^[[mp:"
50%/\%^..
yeGo[34m^[[mpA END[34m^[[m:"
50%/\%$
"ayb20gg/..\%$
"bybGo[34m^[[m"apo[34m^[[m"bp:"
:"
:""""" Write the results """""""""""""
:/\%#=1^Results/,$wq! test.out
ENDTEST

Substitute here:
<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

Behind:
asdfasd<yyy
xxstart1
asdfasd<yy
xxxstart2
asdfasd<yy
xxstart3

Visual:
thexe the thexethe
andaxand andaxand
oooxofor foroxooo
oooxofor foroxooo

Marks:
asdfSasdfsadfEasdf
asdfSas
dfsadfEasdf

Results of test64:
OK 0 - ab
OK 1 - ab
OK 2 - ab
OK 0 - b
OK 1 - b
OK 2 - b
OK 0 - bc*
OK 1 - bc*
OK 2 - bc*
OK 0 - bc\{-}
OK 1 - bc\{-}
OK 2 - bc\{-}
OK 0 - bc\{-}\(d\)
OK 1 - bc\{-}\(d\)
OK 2 - bc\{-}\(d\)
OK 0 - bc*
OK 1 - bc*
OK 2 - bc*
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[mthe[?25l[?12l[?25h[?25l[7mxe the the[?12l[?25h[?25l[m[60;1H[K[60;1H:'<,'>[?12l[?25hs/\%Ve/E/g[?25l3 substitutions on 1 line[31;4HxE thE thE[?12l[?25h
[?25la[7mndaxand andaxand [?12l[?25h[?25l[m[60;1H[K[60;1H:'<,'>[?12l[?25hs/\%Va/A/g[?25l6 substitutions on 1 line[32;1HAndAxAnd AndAxAnd[32;18H[K[32;1H[?12l[?25h
ooo[?25l[?12l[?25h[?25l[7mxofor foro[?12l[?25h[?25lx
[mooo[7mxofor foro[?12l[?25h[?25l[m[60;1H[K[60;1H:'<,'>[?12l[?25hs/\%Vo/O/g[?25l8 substitutions on 2 lines[33;4HxOfOr fOrOx
oooxOfOr fOrO[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^Visual/+1,/^Visual/+4yank[?25l[31msearch hit BOTTOM, continuing at TOP[m4 lines yanked[60;15H[K[34;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
OK 0 - \v\C%(<Last Changed:\s+)@<=.*$
OK 1 - \v\C%(<Last Changed:\s+)@<=.*$
OK 2 - \v\C%(<Last Changed:\s+)@<=.*$
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 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
OK 0 - \(a*\)\@>b
OK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
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.*$\)\@=
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]\\[47;1H_[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]\\[49;1H_[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]\\[51;1H_[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

<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

xxstart3[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
4 more lines[1;59r[59;1H
[1;60r[59;1HthexE thE thExethe[60;1H[K[60;1H4 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check matching marks[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Marks:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1HyeGo[34m^[[mp:"
50%/\%^..
yeGo[34m^[[mpA END[34m^[[m:"
50%/\%$
"ayb20gg/..\%$
"bybGo[34m^[[m"apo[34m^[[m"bp:"
:"
:""""" Write the results """""""""""""
:/\%#=1^Results/,$wq! test.out
ENDTEST

Substitute here:
<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

Behind:
asdfasd<yyy
xxstart1
asdfasd<yy
xxxstart2
asdfasd<yy
xxstart3

Visual:
thexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo

Marks:
asdfSasdfsadfEasdf
asdfSas
dfsadfEasdf

Results of test64:
OK 0 - ab
OK 1 - ab
OK 2 - ab
OK 0 - b
OK 1 - b
OK 2 - b
OK 0 - bc*
OK 1 - bc*
OK 2 - bc*
OK 0 - bc\{-}
OK 1 - bc\{-}
OK 2 - bc\{-}
OK 0 - bc\{-}\(d\)
OK 1 - bc\{-}\(d\)
OK 2 - bc\{-}\(d\)
OK 0 - bc*
OK 1 - bc*
OK 2 - bc*
OK 0 - c*
OK 1 - c*
OK 2 - c*
OK 0 - bc*
OK 1 - bc*
OK 2 - bc*
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h
[masdf[9C[?25l[60;1H[K[60;1H:[?12l[?25h.-4,.+6s/.\%>'s.*\%<'e../here/[?25l[31;5Hhereasdf[31;13H[K[31;1H[?12l[?25h
asdf
dfsadfsadf[?25l[60;1H[K[60;1H:[?12l[?25h.-4,.+6s/.\%>'s\_.*\%<'e../again/[?25l[32;59r[59;1H
[1;60r[32;1Hasdfagainasdf[59;1HOK 0 - c*[60;1H[K[32;1H[?12l[?25h[?25l[60;1H:[?12l[?25h/^Marks:/+1,/^Marks:/+3yank[?25l[31msearch hit BOTTOM, continuing at TOP[m3 lines yanked[60;15H[K[32;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 2 - \v\C%(<Last Changed:\s+)@<=.*$
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 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
OK 0 - \(a*\)\@>b
OK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
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.*$\)\@=
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]\\[42;1H_[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]\\[44;1H_[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]\\[46;1H_[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

<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

xxstart3

thexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
3 more lines[1;59r[59;1H
[1;60r[59;1Hasdfhereasdf[60;1H[K[60;1H3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check patterns matching cursor position.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunc! Postest()[?25l
:  [?12l[?25h new
[?25l:  [?12l[?25h call setline(1, ['ffooooo', 'boboooo', 'zoooooo', 'koooooo', 'moooooo', "\t\t\tfoo", 'abababa
[59;98Hb[60;1Habababfoo', 'bababababababafoo', '********_'])
[?25l:  [?12l[?25h call setpos('.', [0, 1, 0, 0])
[?25l:  [?12l[?25h s/\%>3c.//g
[?25l:  [?12l[?25h call setpos('.', [0, 2, 4, 0])
[?25l:  [?12l[?25h s/\%#.*$//g
[?25l:  [?12l[?25h call setpos('.', [0, 3, 0, 0])
[?25l:  [?12l[?25h s/\%<3c./_/g
[?25l:  [?12l[?25h %s/\%4l\%>5c./_/g
[?25l:  [?12l[?25h %s/\%6l\%>25v./_/g
[?25l:  [?12l[?25h %s/\%>6l\%3c./!/g
[?25l:  [?12l[?25h %s/\%>7l\%12c./?/g
[?25l:  [?12l[?25h %s/\%>7l\%<9l\%>5v\%<8v./#/g
[?25l:  [?12l[?25h 1,$yank
[?25l:  [?12l[?25h quit!
[?25l:  [?12l[?25hendfunc[1;1H[17L[?25l[1;1HOK 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 - \(a*\)\@>a
OK 1 - \(a*\)\@>a
OK 2 - \(a*\)\@>a
OK 0 - \(a*\)\@>b
OK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
OK 0 - \(a*\)\@>a\|a\+
OK 2 - \(a*\)\@>a\|a\+
OK 0 - \_[^8-9]\+[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hasdfagainasdf
[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H-0-[?12l[?25h[?25l
:[?12l[?25hset re=0[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall Postest()[?25l3 substitutions on 3 lines
9 lines yanked
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput[?25l9 more lines
[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[3L[?25l[1;1HOK 1 - \(a*\)\@>b
OK 2 - \(a*\)\@>b
OK 0 - \(a*\)\@>a\|a\+
OK 2 - \(a*\)\@>a\|a\+
OK 0 - \_[^8-9]\+[5;18H[K[6;4H1 - \_[^8-9]\+
OK 2 - \_[^8-9]\+
OK 0 - \_[^a]\+[8;16H[K[9;4H1 - \_[^a]\+[9;16H[K[10;4H2 - \_[^a]\+[10;16H[K[11;4H0 - [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}[13;8H[0-9a-zA-Z]\{8}-\([0-9a-zA-Z]\{4}-\)\{3}[0-9a-zA-Z]\{12}[14;8H^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=[15;8H^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=[16;8H^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
multi-line tests
OK 0 - ^.\(.\).\_..\1.
OK 1 - ^.\(.\).\_..\1.
OK 2 - ^.\(.\).\_..\1.[20;23H[K[21;4H0 - \v.*\/(.*)\n.*\/\1$[21;27H[K[22;4H1 - \v.*\/(.*)\n.*\/\1$[22;27H[K[23;4H2 - \v.*\/(.*)\n.*\/\1$[23;27H[K[24;4H0 - \S.*\nx[24;15H[K[25;4H1 - \S.*\nx[25;15H[K[26;1HOK 2 - \S.*\nx[26;15H[K[27;8H\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\\[28;1H_[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]\\[30;1H_[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]\\[32;1H_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>[33;8Ha\n^b$\n^c[34;8Ha\n^b$\n^c[35;8Ha\n^b$\n^c[36;1H[K[37;1H<T="5">Ta 5</Title>[37;20H[K[38;1H<T="7">Ac 7</Title>[38;20H[K[39;1H[K[40;1Hxxstart3[40;9H[K[41;1H[K[42;1HthexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo[46;1H[K[47;1Hasdfhereasdf[47;13H[K[48;1Hasdfagainasdf[49;1H[K[50;1H-0-
ffo[51;4H[K[52;1Hbob[52;4H[K[53;1H__ooooo[53;8H[K[54;1Hkoooo__[54;8H[K[55;1Hmoooooo
            [12Cf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H-1-[?12l[?25h[?25l
:[?12l[?25hset re=1[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall Postest()[?25l3 substitutions on 3 lines
9 lines yanked
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput[?25l9 more lines
[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[3L[?25l[1;1HOK 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}[4;8H^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=[5;8H^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=[6;8H^\%(\%(^\s*#\s*if\>\|#\s*if\)\)\(\%>1c.*$\)\@=
multi-line tests
OK 0 - ^.\(.\).\_..\1.
OK 1 - ^.\(.\).\_..\1.
OK 2 - ^.\(.\).\_..\1.[10;23H[K[11;4H0 - \v.*\/(.*)\n.*\/\1$[11;27H[K[12;4H1 - \v.*\/(.*)\n.*\/\1$[12;27H[K[13;4H2 - \v.*\/(.*)\n.*\/\1$[13;27H[K[14;4H0 - \S.*\nx[14;15H[K[15;4H1 - \S.*\nx[15;15H[K[16;1HOK 2 - \S.*\nx[16;15H[K[17;8H\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\\[18;1H_[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]\\[20;1H_[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]\\[22;1H_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>[23;8Ha\n^b$\n^c[24;8Ha\n^b$\n^c[25;8Ha\n^b$\n^c[26;1H[K[27;1H<T="5">Ta 5</Title>[27;20H[K[28;1H<T="7">Ac 7</Title>[28;20H[K[29;1H[K[30;1Hxxstart3[30;9H[K[31;1H[K[32;1HthexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo[36;1H[K[37;1Hasdfhereasdf[37;13H[K[38;1Hasdfagainasdf[39;1H[K[40;1H-0-
ffo[41;4H[K[42;1Hbob[42;4H[K[43;1H__ooooo[43;8H[K[44;1Hkoooo__[44;8H[K[45;1Hmoooooo
            [12Cf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-1-
ffo
bob[52;4H[K[53;1H__ooooo
koooo__
moooooo[55;25H[K[56;1H                 [7Cf__
ab!bababababab
ba!ab##abab?bafoo
**!*****_[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H-2-[?12l[?25h[?25l
:[?12l[?25hset re=2[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall Postest()[?25l3 substitutions on 3 lines
9 lines yanked
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput[?25l9 more lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[3L[1;1HOK 0 - \v.*\/(.*)\n.*\/\1$
OK 1 - \v.*\/(.*)\n.*\/\1$
OK 2 - \v.*\/(.*)\n.*\/\1$
OK 0 - \S.*\nx[4;15H[K[5;4H1 - \S.*\nx[5;15H[K[6;1HOK 2 - \S.*\nx[6;15H[K[7;8H\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\\[8;1H_[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]\\[10;1H_[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]\\[12;1H_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>[13;8Ha\n^b$\n^c[14;8Ha\n^b$\n^c[15;8Ha\n^b$\n^c[16;1H[K[17;1H<T="5">Ta 5</Title>[17;20H[K[18;1H<T="7">Ac 7</Title>[18;20H[K[19;1H[K[20;1Hxxstart3[20;9H[K[21;1H[K[22;1HthexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo[26;1H[K[27;1Hasdfhereasdf[27;13H[K[28;1Hasdfagainasdf[29;1H[K[30;1H-0-
ffo[31;4H[K[32;1Hbob[32;4H[K[33;1H__ooooo[33;8H[K[34;1Hkoooo__[34;8H[K[35;1Hmoooooo
            [12Cf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-1-
ffo
bob[42;4H[K[43;1H__ooooo
koooo__
moooooo[45;25H[K[46;1H                 [7Cf__
ab!bababababab
ba!ab##abab?bafoo
**!*****_
-2-
ffo
bob[52;4H[K[53;1H__ooooo
koooo__
moooooo[55;25H[K[56;1H                 [7Cf__
ab!bababababab
ba!ab##abab?bafoo
**!*****_[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h" start and end of buffer[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h\%^[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1HTest 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 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', "", ""])
[31msearch hit BOTTOM, continuing at TOP[1;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 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]\\[8;1H_[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]\\[10;1H_[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]\\[12;1H_[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

<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

xxstart3

thexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo

asdfhereasdf
asdfagainasdf

-0-
ffo
bob
__ooooo
koooo__
moooooo[36;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-1-
ffo
bob
__ooooo
koooo__
moooooo[46;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-2-
ffo
bob
__ooooo
koooo__
moooooo[56;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25lTest[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;4H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 0 - \v(a{1,3}){3}
OK 1 - \v(a{1,3}){3}
OK 2 - \v(a{1,3}){3}
OK 0 - \v(a{1,2}){2}
OK 1 - \v(a{1,2}){2}
OK 2 - \v(a{1,2}){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(a+){1,2}
OK 1 - \v(a+){1,2}
OK 2 - \v(a+){1,2}
OK 0 - \v(a+)(a+)
OK 1 - \v(a+)(a+)
OK 2 - \v(a+)(a+)
OK 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)*)+[30;1H[?12l[?25h[?25l[60;1H/[?12l[?25h\%^..[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1HTest 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 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', "", ""])
[31msearch hit BOTTOM, continuing at TOP[1;1H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 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]\\[7;1H_[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]\\[9;1H_[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]\\[11;1H_[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

<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

xxstart3

thexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo

asdfhereasdf
asdfagainasdf

-0-
ffo
bob
__ooooo
koooo__
moooooo[35;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-1-
ffo
bob
__ooooo
koooo__
moooooo[45;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-2-
ffo
bob
__ooooo
koooo__
moooooo[55;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
Test[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25lTest[?12l[?25h[?25lt END[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;8H[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HOK 0 - \v(a{1,3}){3}
OK 1 - \v(a{1,3}){3}
OK 2 - \v(a{1,3}){3}
OK 0 - \v(a{1,2}){2}
OK 1 - \v(a{1,2}){2}
OK 2 - \v(a{1,2}){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(a+){1,2}
OK 1 - \v(a+){1,2}
OK 2 - \v(a+){1,2}
OK 0 - \v(a+)(a+)
OK 1 - \v(a+)(a+)
OK 2 - \v(a+)(a+)
OK 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)*)+[30;1H[?12l[?25h[?25l[60;1H/[?12l[?25h\%$[?25l[27m[23m[m[H[2J[1;1HOK 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]\\[6;1H_[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]\\[8;1H_[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]\\[10;1H_[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

<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

xxstart3

thexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo

asdfhereasdf
asdfagainasdf

-0-
ffo
bob
__ooooo
koooo__
moooooo[34;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-1-
ffo
bob
__ooooo
koooo__
moooooo[44;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-2-
ffo
bob
__ooooo
koooo__
moooooo[54;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
Test
Test END[?12l[?25h[?25l[27m[23m[m[H[2J[1;1HTest 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 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', "", ""])[20;1H[?12l[?25h[?25l[60;1H/[?12l[?25h..\%$[?25l[27m[23m[m[H[2J[1;1HOK 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]\\[6;1H_[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]\\[8;1H_[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]\\[10;1H_[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

<T="5">Ta 5</Title>
<T="7">Ac 7</Title>

xxstart3

thexE thE thExethe
AndAxAnd AndAxAnd
oooxOfOr fOrOxooo
oooxOfOr fOrOxooo

asdfhereasdf
asdfagainasdf

-0-
ffo
bob
__ooooo
koooo__
moooooo[34;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-1-
ffo
bob
__ooooo
koooo__
moooooo[44;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
-2-
ffo
bob
__ooooo
koooo__
moooooo[54;25Hf__
ab!babababababfoo
ba!ab##abab?bafoo
**!*****_
Test
Test END[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25lEN[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25lE[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h""""" Write the results """""""""""""[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/\%#=1^Results/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 1018 lines, 18459 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test65.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test65.in" 95 lines, 2153 characters[1;1HTest 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'[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for floating point and logical operators.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 89 lines, 2067 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[34M[1;60r[26;1H:$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))
: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[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has("float")[?25l
:  [?12l[?25h:  e! test.ok
[?25l:  [?12l[?25h:  wq! test.out
[?25l:  [?12l[?25h:endif[1;1H[3L[?25l[1;1H:$put =string({'x': 1.234, 'y': -2.0e20})
:$put ='list'
:$put =string([-123.4, 2.0e-20])[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =printf('%f', 123.456)[?25l[1;59r[1;1H[2M[1;60r[58;1HResults of test65:
123.456000[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%e', 123.456)[?25l[1;59r[59;1H
[1;60r[59;1H1.234560e+02[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 123.456)[?25l[1;59r[59;1H
[1;60r[59;1H123.456[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h" check we don't crash on division by zero[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hecho 1.0 / 0.0[?25linf[60;4H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put ='+='[?25l[1;59r[59;1H
[1;60r[59;1H+=[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet v = 1.234[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet v += 6.543[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =printf('%g', v)[?25l[1;59r[59;1H
[1;60r[59;1H7.777[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet v = 1.234[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet v += 5[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =printf('%g', v)[?25l[1;59r[59;1H
[1;60r[59;1H6.234[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet a = 5[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet a += 3.333[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =string(a)[?25l[1;59r[59;1H
[1;60r[59;1H8.333[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='=='[?25l[1;59r[59;1H
[1;60r[59;1H==[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet v = 1.234[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =v == 1.234[?25l[1;59r[59;1H
[1;60r[59;1H1[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =v == 1.2341[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='add-subtract'[?25l[1;59r[59;1H
[1;60r[59;1Hadd-subtract[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 4 + 1.234)[?25l[1;59r[59;1H
[1;60r[59;1H5.234[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 1.234 - 8)[?25l[1;59r[59;1H
[1;60r[59;1H-6.766[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='mult-div'[?25l[1;59r[59;1H
[1;60r[59;1Hmult-div[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 4 * 1.234)[?25l[1;59r[59;1H
[1;60r[59;1H4.936[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 4.0 / 1234)[?25l[1;59r[59;1H
[1;60r[59;1H0.003241[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='dict'[?25l[1;59r[59;1H
[1;60r[59;1Hdict[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string({'x': 1.234, 'y': -2.0e20})[?25l[1;59r[59;1H
[1;60r[59;1H{'x': 1.234, 'y': -2.0e20}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='list'[?25l[1;59r[59;1H
[1;60r[59;1Hlist[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string([-123.4, 2.0e-20])[?25l[1;59r[59;1H
[1;60r[59;1H[-123.4, 2.0e-20][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='abs'[?25l[1;59r[59;1H
[1;60r[59;1Habs[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%d', abs(1456))[?25l[1;59r[59;1H
[1;60r[59;1H1456[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%d', abs(-4))[?25l[1;59r[59;1H
[1;60r[59;1H4[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%d', abs([1, 2, 3]))[?25l[1m[37m[41mE745: Using a List as a Number[m[60;32H[K[1;59r[59;1H
[1;60r[59;1H-1[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', abs(14.56))[?25l[1;59r[59;1H
[1;60r[59;1H14.56[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', abs(-54.32))[?25l[1;59r[59;1H
[1;60r[59;1H54.32[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='ceil'[?25l[1;59r[59;1H
[1;60r[59;1Hceil[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', ceil(1.456))[?25l[1;59r[59;1H
[1;60r[59;1H2.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', ceil(-5.456))[?25l[1;59r[59;1H
[1;60r[59;1H-5.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', ceil(-4.000))[?25l[1;59r[59;1H
[1;60r[59;1H-4.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='floor'[?25l[1;59r[59;1H
[1;60r[59;1Hfloor[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', floor(1.856))[?25l[1;59r[59;1H
[1;60r[59;1H1.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', floor(-5.456))[?25l[1;59r[59;1H
[1;60r[59;1H-6.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', floor(4.0))[?25l[1;59r[59;1H
[1;60r[59;1H4.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='log10'[?25l[1;59r[59;1H
[1;60r[59;1Hlog10[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', log10(1000))[?25l[1;59r[59;1H
[1;60r[59;1H3.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', log10(0.01000))[?25l[1;59r[59;1H
[1;60r[59;1H-2.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='pow'[?25l[1;59r[59;1H
[1;60r[59;1Hpow[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', pow(3, 3.0))[?25l[1;59r[59;1H
[1;60r[59;1H27.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', pow(2, 16))[?25l[1;59r[59;1H
[1;60r[59;1H65536.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='round'[?25l[1;59r[59;1H
[1;60r[59;1Hround[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', round(0.456))[?25l[1;59r[59;1H
[1;60r[59;1H0.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', round(4.5))[?25l[1;59r[59;1H
[1;60r[59;1H5.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', round(-4.50))[?25l[1;59r[59;1H
[1;60r[59;1H-5.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='sqrt'[?25l[1;59r[59;1H
[1;60r[59;1Hsqrt[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', sqrt(100))[?25l[1;59r[59;1H
[1;60r[59;1H10.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hecho sqrt(-4.01)[?25l-nan[60;5H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put ='str2float'[?25l[1;59r[59;1H
[1;60r[59;1Hstr2float[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', str2float('1e40'))[?25l[1;59r[59;1H
[1;60r[59;1H1.0e40[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='trunc'[?25l[1;59r[59;1H
[1;60r[59;1Htrunc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', trunc(1.456))[?25l[1;59r[59;1H
[1;60r[59;1H1.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', trunc(-5.456))[?25l[1;59r[59;1H
[1;60r[59;1H-5.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', trunc(4.000))[?25l[1;59r[59;1H
[1;60r[59;1H4.0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='float2nr'[?25l[1;59r[59;1H
[1;60r[59;1Hfloat2nr[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =float2nr(123.456)[?25l[1;59r[59;1H
[1;60r[59;1H123[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =float2nr(-123.456)[?25l[1;59r[59;1H
[1;60r[59;1H-123[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='AND'[?25l[1;59r[59;1H
[1;60r[59;1HAND[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =and(127, 127)[?25l[1;59r[59;1H
[1;60r[59;1H127[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =and(127, 16)[?25l[1;59r[59;1H
[1;60r[59;1H16[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =and(127, 128)[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='OR'[?25l[1;59r[59;1H
[1;60r[59;1HOR[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =or(16, 7)[?25l[1;59r[59;1H
[1;60r[59;1H23[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =or(8, 7)[?25l[1;59r[59;1H
[1;60r[59;1H15[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =or(0, 123)[?25l[1;59r[59;1H
[1;60r[59;1H123[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='XOR'[?25l[1;59r[59;1H
[1;60r[59;1HXOR[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =xor(127, 127)[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =xor(127, 16)[?25l[1;59r[59;1H
[1;60r[59;1H111[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =xor(127, 128)[?25l[1;59r[59;1H
[1;60r[59;1H255[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put ='invert'[?25l[1;59r[59;1H
[1;60r[59;1Hinvert[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =and(invert(127), 65535)[?25l[1;59r[59;1H
[1;60r[59;1H65408[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =and(invert(16), 65535)[?25l[1;59r[59;1H
[1;60r[59;1H65519[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =and(invert(128), 65535)[?25l[1;59r[59;1H
[1;60r[59;1H65407[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =invert(1.0)[?25l[1m[37m[41mE805: Using a Float as a Number[1;59r[m[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^Results/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 73 lines, 430 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test66.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test66.in" 33 lines, 509 characters[2;1HTest for visual block shift and tab characters.

STARTTEST
:so small.vim
/^one
fe[34m^V[m4jR[34m^[[mugvr1:'<,'>w! test.out
/^abcdefgh
[34m^V[m4jI    [34m^[[mj<<11|D
7|a[13C[34m^[[m
7|a[16C[34m^[[m
7|a[13C[34m^[[m4k13|[34m^V[m4j<
:$-5,$w >> test.out
:$-4,$s/\s\+//g
[34m^V[m4kI    [34m^[[mj<<
7|a[13C[34m^[[m
7|a[37C[34m^[[m
7|a[21C[34m^[[m4k13|[34m^V[m4j3<
:$-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
[1m[34m~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 16 lines, 234 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[21;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[22;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[22;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^one[?25l[23;1H[?12l[?25hon[?25l[?12l[?25h[?25l[7me
[mon[7me
[mon[7me
[mon[7me
[mon[?12l[?25h[?25l[60;1H4 fewer lines[23;59r[23;1H[4M[1;60r[23;1H[K[56;1H[1m[34m~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[60;1H4 fewer lines[23;1H[?12l[?25h[?25l[60;3Hmore lines; before #1  0 seconds ago[24;59r[24;1H[4L[1;60r[23;1Hone two three
one two three
one two three
one two three
one two three[60;1H[K[24;1H[?12l[?25h[?25l[23;3H[7me
[mon[7me
[mon[7me
[mon[7me
[mon[?12l[?25h[?25l[23;3H1
on1
on1
on1
on1[23;3H[?12l[?25h[?25l[60;1H:[?12l[?25h'<,'>w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 5 lines, 70 characters written[23;3H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^abcdefgh[?25l[29;1H[?12l[?25h[?25l[?12l[?25h[?25l[7ma
a
a
a
[?12l[?25h[?25l[m[29;1Ha
a
a
a[29;1H    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz[29;1H[?12l[?25h
[?25labcdefghijklmnopqrstuvwxyz[30;27H[K[30;1H[?12l[?25h[10C[?25l[30;11H[K[30;10H[?12l[?25h[31;10H[?25lc         defghijklmnopqrstuvwxyz[31;16H[?12l[?25h[32;16H[32;7H[?25lc            defghijklmnopqrstuvwxyz[32;19H[?12l[?25h[33;19H[33;7H[?25lc         defghijklmnopqrstuvwxyz[33;16H[?12l[?25h[29;16H[?25l[?12l[?25h[?25l[7mi[31;13H [32;13H [33;13H[?12l[?25h[?25l[m[60;1H5 lines <ed 1 time[29;13Hi[31;13Hdefghijklmnopqrstuvwxyz[31;36H[K[32;13Hdefghijklmnopqrstuvwxyz[32;36H[K[33;13Hdefghijklmnopqrstuvwxyz[33;36H[K[29;13H[?12l[?25h[30;10H[?25l[60;1H[K[60;1H:[?12l[?25h$-5,$w >> test.out[?25l"test.out"[60;12H[K[60;12H6 lines, 151 characters appended[30;10H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$-4,$s/\s\+//g[?25l7 substitutions on 4 lines[29;1Habcdefghijklmnopqrstuvwxyz[29;27H[K[31;1Habcdefghijklmnopqrstuvwxyz[31;27H[K[32;1Habcdefghijklmnopqrstuvwxyz[32;27H[K[33;1Habcdefghijklmnopqrstuvwxyz[33;27H[K[33;1H[?12l[?25h[?25l[?12l[?25h[?25l[30;1H[7ma
a
a
a[29;1H[?12l[?25h[?25l[m
a
a
a
a[29;1H    abcdefghijklmnopqrstuvwxyz
    abcdefghij
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz[29;1H[?12l[?25h
[?25labcdefghij[30;11H[K[30;1H[?12l[?25h
    ab[?25lc         defghijklmnopqrstuvwxyz[31;16H[?12l[?25h[32;16H[32;7H[?25lc                       [10Cdefghijklmnopqrstuvwxyz[32;40H[?12l[?25h[33;30H[33;7H[?25lc                 defghijklmnopqrstuvwxyz[33;24H[?12l[?25h[29;24H[29;13H[?25l[?12l[?25h[?25l[7mi[31;13H [32;13H [33;13H[?12l[?25h[?25l[m[60;1H5 lines <ed 3 times[60;20H[K[29;13Hi[31;13Hdefghijklmnopqrstuvwxyz[31;36H[K[32;13H    defghijklmnopqrstuvwxyz[32;41H[K[33;13Hdefghijklmnopqrstuvwxyz[33;36H[K[29;13H[?12l[?25h[30;10H[?25l[60;1H[K[60;1H:[?12l[?25h$-4,$w >> test.out[?25l"test.out"[60;12H[K[60;12H5 lines, 147 characters appended[30;10H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test67.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test67.in" 33 lines, 1109 characters[1;1HTest 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#<buffer>: " . exists("#BufEnter#<buffer>"))
:au BufEnter <buffer> let g:entered=1
:call add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))
:edit testfile2.test
:call add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))
:e test.out
:call append(0, results)
:$d
:w
:qa!
ENDTEST

[1m[34m~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest that groups and patterns are tested correctly when calling exists() for[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 27 lines, 998 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet results=[][?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25haugroup auexists[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25haugroup END[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "##BufEnter: " . exists("##BufEnter"))[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#BufEnter: " . exists("#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufEnter * let g:entered=1[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#BufEnter: " . exists("#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25haugroup auexists[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufEnter * let g:entered=1[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25haugroup END[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test"))[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufEnter *.test let g:entered=1[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test"))[?25l[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hedit testfile.test[?25l"testfile.test" [New File][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hau BufEnter <buffer> let g:entered=1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hedit testfile2.test[?25l"testfile2.test" [New File][1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he test.out[?25l"test.out" [New File][1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(0, results)[?25l[1;59r[1;1H[10L[1;60r[1;1H##BufEnter: 1
#BufEnter: 0
#BufEnter: 1
#auexists#BufEnter: 0
#auexists#BufEnter: 1
#BufEnter#*.test: 0
#BufEnter#*.test: 1
#BufEnter#<buffer>: 0
#BufEnter#<buffer>: 1
#BufEnter#<buffer>: 0[60;1H[K[11;1H[?12l[?25h[?25l[60;1H:[?12l[?25h$d[?25l[11;1H[1m[34m~                                                                                                 [10;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" [New File] 10 lines, 190 characters written[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test68.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test68.in" 117 lines, 930 characters[1;1HTest for text formatting.

Results of test68:

STARTTEST
:so small.vim
/^{/+1
:set noai tw=2 fo=t
gRa b[34m^[[m
ENDTEST

{


}

STARTTEST
/^{/+1
:set ai tw=2 fo=tw
gqgqjjllab[34m^[[m
ENDTEST

{
a  b

a
}

STARTTEST
/^{/+1
:set tw=3 fo=t
gqgqo
a [34m^V^A^[[m
ENDTEST

{
a [34m^A[m
}

STARTTEST
/^{/+1
:set tw=2 fo=tcq1 comments=:#
gqgqjgqgqo
a b
#a b[34m^[[m
ENDTEST

{
a b
#a b
}

STARTTEST
/^{/+1
:set tw=5 fo=tcn comments=:#
A b[34m^[[mjA b[34m^[[m
ENDTEST

{[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for text formatting.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 4 lines, 48 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[10;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[11;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noai tw=2 fo=t[?25l[13;1H[?12l[?25h[?25la
b[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[17;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[18;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 38 characters written[18;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[18;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[21;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[22;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[24;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ai tw=2 fo=tw[?25l[24;1H[?12l[?25h[?25l[25;59r[25;1H[L[1;60r[24;4H[K[25;1Hb[60;1H[K[25;1H[?12l[?25h

a [?25l[28;59r[28;1H[L[1;60r[28;1Hb[?12l[?25h
[?25l[60;1H/^STARTTEST[31;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H4 lines, 34 characters written[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[32;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[36;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[37;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset tw=3 fo=t[?25l[39;1H[?12l[?25h[?25l[40;59r[40;1H[L[1;60r[39;3H[K[40;1H[34m^A[m[60;1H[K[40;1H[?12l[?25h

  [?25l[41;59r[41;1H[3L[1;60r[42;1Ha
[34m^A[?12l[?25h
[?25l[60;1H[m/^STARTTEST[46;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H5 lines, 58 characters written[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[47;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[52;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[53;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset tw=2 fo=tcq1 comments=:#[?25l[55;1H[?12l[?25h
[?25l[57;1H[K[58;1Ha b
#a b[59;5H[K[59;4H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 46 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set tw=5 fo=tcn comments=:#
A b[34m^[[mjA b[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
  1 a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset tw=5 fo=tcn comments=:#[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;5Hb[60;1H[K[59;5H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H# 1 a[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H#   b[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 40 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set tw=5 fo=qn comments=:#
gwap
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
# 1 a b[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset tw=5 fo=qn comments=:#[?25l[59;1H[?12l[?25h[?25l[59;7H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H#   b[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[3M[1;60r[57;1H}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 40 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set tw=5 fo=q2 comments=:#
gwap
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
# x[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset tw=5 fo=q2 comments=:#[?25l[59;1H[?12l[?25h[?25l# x a[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H#   b[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[3M[1;60r[57;1H}

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+2[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 26 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set tw& fo=a
I^^[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+2[?25l[1;59r[1;1H[3M[1;60r[57;1H{
   1aa
   2bb[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset tw& fo=a[?25l[59;1H[?12l[?25h[?25l[57;3H1aa ^^2bb }[58;4H[K[59;1HSTARTTEST[57;8H[?12l[?25h
[?25l[60;1H[K[60;1H/^STARTTEST[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/mno pqr/[60;1H[K[59;1H[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 69 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:setl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/
A vwx yz[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hmno pqr/[?25l[60;9H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H/* abc def ghi jkl
 *    mno pqr stu[60;1H[K[59;7H[?12l[?25h[?25l
:[?12l[?25hsetl tw=20 fo=an12wcq comments=s1:/*,mb:*,ex:*/[?25l[59;7H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2H*    vwx yz[60;1H[K[59;12H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;2H*/[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^#/[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 47 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:setl tw=12 fo=tqnc comments=:#
A foobar[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^#/[?25l[60;4H[K[60;1H[1;59r[59;1H
[1;60r[59;1H# 1 xxxxx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hsetl tw=12 fo=tqnc comments=:#[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H#   foobar[60;1H[K[59;10H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[59;1H
[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:g/^STARTTEST/.,/^ENDTEST/d[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2 lines, 56 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[59;19H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:1;/^Results/,$wq! test.out[60;1H[K[59;19H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l58 fewer lines[60;15H[K[1;1H#   foobar[2;5H[K[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1;/^Results/,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 68 lines, 254 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test69.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test69.in" 159 lines, 1385 characters[1;1HTest for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
And test "ra" on multi-byte characters.

STARTTEST
:so mbyte.vim
:set encoding=utf-8
ENDTEST

Results of test69:

STARTTEST
/^{/+1
:set tw=2 fo=t
gqgqjgqgqo
ï¼¸ï¼¹ï¼º
abc ï¼¸ï¼¹ï¼º[34m^[[m
ENDTEST

{
ï¼¸ï¼¹ï¼º
abc ï¼¸ï¼¹ï¼º
}

STARTTEST
/^{/+1
:set tw=1 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqo
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹[34m^[[m
ENDTEST

{
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹
}

STARTTEST
/^{/+1
:set tw=2 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹
aï¼¸
abï¼¸
abcï¼¸
abï¼¸ c
abï¼¸ï¼¹[34m^[[m
ENDTEST[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for multi-byte text formatting.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 2 lines, 34 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[8;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset encoding=utf-8[?25l[27m[23m[m[H[2J[1;1HTest for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
And test "ra" on multi-byte characters.

STARTTEST
:so mbyte.vim
:set encoding=utf-8
ENDTEST

Results of test69:

STARTTEST
/^{/+1
:set tw=2 fo=t
gqgqjgqgqo
ï¼¸ï¼¹ï¼º
abc ï¼¸ï¼¹ï¼º[34m^[[m
ENDTEST

{
ï¼¸ï¼¹ï¼º
abc ï¼¸ï¼¹ï¼º
}

STARTTEST
/^{/+1
:set tw=1 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqo
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹[34m^[[m
ENDTEST

{
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹
}

STARTTEST
/^{/+1
:set tw=2 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹
aï¼¸
abï¼¸
abcï¼¸
abï¼¸ c
abï¼¸ï¼¹[34m^[[m
ENDTEST[9;1H[?12l[?25h[?25l[60;1H/^STARTTEST[12;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H5 lines, 58 characters written[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[13;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[18;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[19;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[21;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset tw=2 fo=t[?25l[21;1H[?12l[?25h
[?25l[23;59r[23;1H[L[1;60r[22;5H[K[23;1Hï¼¸ï¼¹ï¼º[60;1H[K[23;1H[?12l[?25h[?25l[24;59r[24;1H[2L[1;60r[25;1H[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25l[26;59r[26;1H[L[1;60r[25;5Hï¼º
abc [?12l[?25h[?25l[27;59r[27;1H[L[1;60r[27;1Hï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25lï¼º[?12l[?25h
[?25l[60;1H/^STARTTEST[30;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H8 lines, 80 characters written[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[31;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[39;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[40;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset tw=1 fo=tm[?25l[42;1H[?12l[?25h
[?25l[44;59r[44;1H[L[1;60r[43;3H[K[44;1Ha[60;1H[K[44;1H[?12l[?25h
[?25l[46;59r[46;1H[L[1;60r[45;4H[K[46;1Ha[?12l[?25h
[?25l[48;59r[48;1H[L[1;60r[47;3H[K[48;1Hï¼¹[?12l[?25h
[?25l[50;59r[50;1H[L[1;60r[49;4H[K[50;1Hï¼¹[?12l[?25h[?25l[51;59r[51;1H[2L[1;60r[52;1H[?12l[?25h[?25l[53;59r[53;1H[L[1;60r[52;1Hï¼¸
[?12l[?25h[?25l[54;59r[54;1H[2L[1;60r[53;1Hï¼¸
a
[?12l[?25h[?25l[56;59r[56;1H[2L[1;60r[55;1Hï¼¸
a
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l
ï¼¹
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H13 lines, 140 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[13M[1;60r[47;1H:set tw=2 fo=tm
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹
aï¼¸
abï¼¸
abcï¼¸
abï¼¸ c
abï¼¸ï¼¹[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
ï¼¸[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset tw=2 fo=tm[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸a[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3H[K[59;1Ha[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ a[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;4H[K[59;1Ha[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3H[K[59;1Hï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ ï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;4H[K[59;1Hï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Haï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Habï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3H[K[59;1Hï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Habcï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;4H[K[59;1Hï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Habï¼¸ c[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[57;3H[K[58;1Hï¼¸
c[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Habï¼¸ï¼¹[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[57;3H[K[58;1Hï¼¸
ï¼¹[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;1Hï¼¸
[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[57;1Hï¼¸
a
[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[57;1Hï¼¸
a
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¹
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¹
a[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¸
ab[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¸
abc[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¸
ab[?12l[?25h[?25l[1;59r[1;1H[3M[1;60r[57;1Hï¼¸
c
ab[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H5 lines, 47 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[5M[1;60r[55;1H:set ai tw=2 fo=tm
gqgqjgqgqo
ï¼¸
ï¼¸a[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
  ï¼¸[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset ai tw=2 fo=tm[?25l[59;1H[?12l[?25h  [?25l[1;59r[59;1H
[1;60r[59;3Hï¼¸a[60;1H[K[59;3H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;5H[K[59;3Ha[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[59;3H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3Hï¼¸
  [?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3Hï¼¸
  a[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H5 lines, 53 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[5M[1;60r[55;1H:set noai tw=2 fo=tm
gqgqjgqgqo
  ï¼¸
  ï¼¸a[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
  ï¼¸[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset noai tw=2 fo=tm[?25l[59;1H[?12l[?25h  [?25l[1;59r[59;1H
[1;60r[59;3Hï¼¸a[60;1H[K[59;3H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;5H[K[59;1Ha[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[59;3H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3Hï¼¸
  [?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3Hï¼¸
a[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H13 lines, 169 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[13M[1;60r[47;1H:set tw=2 fo=cqm comments=n:ï¼¸
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
ï¼¸
ï¼¸a
ï¼¸aï¼¹
ï¼¸ï¼¹
ï¼¸ï¼¹ï¼º
ï¼¸ ï¼¹
ï¼¸ ï¼¹ï¼º
ï¼¸ï¼¸
ï¼¸ï¼¸a
ï¼¸ï¼¸ï¼¹[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
ï¼¸[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset tw=2 fo=cqm comments=n:ï¼¸[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸a[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸aï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;4H[K[59;1Hï¼¸ï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ï¼¹ï¼º[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;5H[K[59;1Hï¼¸ï¼º[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ ï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ ï¼¹ï¼º[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;6H[K[59;1Hï¼¸ ï¼º[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ï¼¸a[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï¼¸ï¼¸ï¼¹[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;1Hï¼¸
[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;1Hï¼¸a
[?12l[?25h[?25lï¼¸a[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¸ï¼¹
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3Hï¼¹
[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¸ï¼º
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;4Hï¼¹
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25lï¼¹[?12l[?25h[?25l[1;59r[1;1H[2M[1;60r[58;1Hï¼¸ ï¼º
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3Hï¼¸
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;3Hï¼¸a
[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 30 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set tw=2 fo=tm
Rï¼¸a[34m^[[m
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset tw=2 fo=tm[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;1Hï¼¸
a[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H3 lines, 34 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[57;1H:set mps+=[34m^V[mu2018:[34m^V[mu2019
d%
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^{/+1[?25l[1;59r[1;1H[2M[1;60r[58;1H{
â€˜ two three â€™ four[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset mps+=^â€˜:^â€™[?25l[59;1H[?12l[?25h[?25l four[59;7H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H}[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[59;1H
[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H/^ra test[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2 lines, 16 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1HjVjra
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^ra test[?25l[1;59r[59;1H
[1;60r[59;1Hra test[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hï½bbï½[?12l[?25h[?25l[2C[7mbbï½ [?12l[?25h[?25l[1;59r[m[59;1H
[1;60r[58;1H[7mï½[m
ï½[7mï½b [?12l[?25h[?25l[m[58;1Haaaa[58;5H[K[59;1Haaa[7m [m[59;4H[K[58;1H[?12l[?25h
[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:g/^STARTTEST/.,/^ENDTEST/d[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2 lines, 56 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[59;19H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:1;/^Results/,$wq! test.out[60;1H[K[59;19H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l83 fewer lines[60;15H[K[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1;/^Results/,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 151 lines, 604 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test70.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test70.in" 63 lines, 1501 characters[1;1HSmoke 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;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HSmoke test for MzScheme interface and mzeval() function[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 55 lines, 1398 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[60;1H[K[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mzscheme.vim[?25l"test.ok" [60;11H[K[60;11H6 lines, 94 characters
"test.out" [New File] 6 lines, 94 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test71.failed test.ok test.out X* viminfo
cp test71.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test71.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test71.in" 67 lines, 1209 characters[1;1HTest for encryption.
The test data is in another file to avoid problems with 'encoding', especially
cp932.

STARTTEST
:so small.vim
:set enc=latin1
:bwipe!
:r test71a.in
:/^start of text/+1
:let text_lines = getline('.', line('.') + 2)
:/^start of cm=zip bytes/+1
:let cm0_bytes = getline('.', '.')
:/^start of cm=blowfish bytes/+1
:let cm1_bytes = getline('.', '.')
:bwipe!
:call append(0, text_lines)
:$d
:X
foobar
foobar
:w! Xtestfile
:bwipe!
:e Xtestfile
foobar
:let cm0_read_back = getline('.', '$')
:set key=
:set cryptmethod=blowfish
:" If the blowfish test fails 'cryptmethod' will be 'zip' now.
:%s/^/\=&cryptmethod == 'blowfish' ? "OK " : "blowfish test failed "/
:X
barfoo
barfoo
:w! Xtestfile
:bwipe!
:e Xtestfile
barfoo
:let cm1_read_back = getline('.', '$')
:bwipe!
:set bin noeol key=
:call append(0, cm0_bytes)
:$d
:set fenc=latin1
:w! Xtestfile
:bwipe!
:set nobin
:e Xtestfile
foofoo
:let cm0_read_bin = getline('.', '$')
:bwipe!
:set bin noeol key=
:call append(0, cm1_bytes)
:$d
:set fenc=latin1
:w! Xtestfile
:bwipe!
:set nobin
:e Xtestfile
barbar[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for encryption.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 60 lines, 1082 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[7M[1;60r[53;1H:call append(0, cm0_read_bin)
:call append(0, cm1_read_back)
:call append(0, cm0_read_back)
:set key= fenc=latin1
:w! test.out
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset enc=latin1[?25l[27m[23m[m[H[2J[1;1H:r test71a.in
:/^start of text/+1
:let text_lines = getline('.', line('.') + 2)
:/^start of cm=zip bytes/+1
:let cm0_bytes = getline('.', '.')
:/^start of cm=blowfish bytes/+1
:let cm1_bytes = getline('.', '.')
:bwipe!
:call append(0, text_lines)
:$d
:X
foobar
foobar
:w! Xtestfile
:bwipe!
:e Xtestfile
foobar
:let cm0_read_back = getline('.', '$')
:set key=
:set cryptmethod=blowfish
:" If the blowfish test fails 'cryptmethod' will be 'zip' now.
:%s/^/\=&cryptmethod == 'blowfish' ? "OK " : "blowfish test failed "/
:X
barfoo
barfoo
:w! Xtestfile
:bwipe!
:e Xtestfile
barfoo
:let cm1_read_back = getline('.', '$')
:bwipe!
:set bin noeol key=
:call append(0, cm0_bytes)
:$d
:set fenc=latin1
:w! Xtestfile
:bwipe!
:set nobin
:e Xtestfile
foofoo
:let cm0_read_bin = getline('.', '$')
:bwipe!
:set bin noeol key=
:call append(0, cm1_bytes)
:$d
:set fenc=latin1
:w! Xtestfile
:bwipe!
:set nobin
:e Xtestfile
barbar
:call append(0, cm0_read_bin)
:call append(0, cm1_read_back)
:call append(0, cm0_read_back)
:set key= fenc=latin1
:w! test.out
:qa!
ENDTEST
[?12l[?25h[?25l
:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hr test71a.in[?25l"test71a.in" 14 lines, 314 characters[2;1H[K[3;1Hstart of text[3;14H[K[4;1H01234567890123456789012345678901234567[4;39H[K[5;1Hline 2  foo bar blah[5;21H[K[6;1Hline 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[6;38H[K[7;1Hend of text[7;12H[K[8;1H[K[9;1Hstart of cm=zip bytes[9;22H[K[10;1HVimCrypt~01![34m^F^\[mlV'Þ}Mg[34m| [mê£V©ç[34m^G[mE#3[34m~N[m2Ué[34m~W[m[10;43H[K[11;1Hend of cm=zip bytes[11;20H[K[12;1H[K[13;1Hstart of cm=blowfish bytes[13;27H[K[14;1HVimCrypt~02!k)¾[34m^W~W[m#[34m^V[mÝS[34m~\[mõ=ºàÈ#¥M´[34m~F[mJÃAÍ¥M´[34m~F[m![34m~@^U~[[mõ[34m^O[máÒ[34m^Y~B^V~X[m÷[34m^M[mÚ[14;71H[K[15;1Hend of cm=blowfish bytes[15;25H[K[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of text/+1[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet text_lines = getline('.', line('.') + 2)[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of cm=zip bytes/+1[?25l[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet cm0_bytes = getline('.', '.')[?25l[10;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start of cm=blowfish bytes/+1[?25l[14;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet cm1_bytes = getline('.', '.')[?25l[14;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(0, text_lines)[?25l[1;59r[1;1H[3L[1;60r[1;1H01234567890123456789012345678901234567
line 2  foo bar blah
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[60;1H[K[4;1H[?12l[?25h[?25l[60;1H:[?12l[?25h$d[?25l[4;1H[1m[34m~                                                                                                 [3;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hX[?25l[60;1H[K[60;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1H01234567890123456789012345678901234567
line 2  foo bar blah[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H[New File][crypted] 3 lines, 98 characters written[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [crypted] 3 lines, 98 characters[1;1H[2L[1;1H01234567890123456789012345678901234567
line 2  foo bar blah
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[3;38H[K[60;1H[K[60;1H"Xtestfile" [crypted] 3 lines, 98 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet cm0_read_back = getline('.', '$')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset key=[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cryptmethod=blowfish[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" If the blowfish test fails 'cryptmethod' will be 'zip' now.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%s/^/\=&cryptmethod == 'blowfish' ? "OK " : "blowfish test failed "/[?25l3 substitutions on 3 lines[60;27H[K[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah
OK line 3 [27Cxxx[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hX[?25l[60;1H[K[60;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H[blowfish] 3 lines, 107 characters written[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [blowfish] 3 lines, 107 characters[1;1H[2L[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah
OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[3;41H[K[60;1H[K[60;1H"Xtestfile" [blowfish] 3 lines, 107 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet cm1_read_back = getline('.', '$')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset bin noeol key=[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(0, cm0_bytes)[?25l[1;59r[1;1H[L[1;60r[1;1HVimCrypt~01![34m^F^\[mlV'Þ}Mg[34m| [mê£V©ç[34m^G[mE#3[34m~N[m2Ué[34m~W[m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25h$d[?25l[2;1H[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset fenc=latin1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H[Incomplete last line] 1 line, 36 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l[1;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nobin[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [crypted] 2 lines, 24 characters[1;1H[2L[1;1H1234567890
aábbccddeëff[60;1H[K[60;1H"Xtestfile" [crypted] 2 lines, 24 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet cm0_read_bin = getline('.', '$')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset bin noeol key=[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(0, cm1_bytes)[?25l[1;59r[1;1H[L[1;60r[1;1HVimCrypt~02!k)¾[34m^W~W[m#[34m^V[mÝS[34m~\[mõ=ºàÈ#¥M´[34m~F[mJÃAÍ¥M´[34m~F[m![34m~@^U~[[mõ[34m^O[máÒ[34m^Y~B^V~X[m÷[34m^M[mÚ[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25h$d[?25l[2;1H[1m[34m~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset fenc=latin1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H[Incomplete last line] 1 line, 55 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l[1;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nobin[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [blowfish] 2 lines, 27 characters[1;1H[2L[1;1Hasdfasdfasdf
0001112223333[60;1H[K[60;1H"Xtestfile" [blowfish] 2 lines, 27 characters[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(0, cm0_read_bin)[?25l[1;59r[1;1H[2L[1;60r[1;1H1234567890
aábbccddeëff[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall append(0, cm1_read_back)[?25l[1;59r[1;1H[3L[1;60r[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah
OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[60;1H[K[6;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall append(0, cm0_read_back)[?25l[1;59r[1;1H[3L[1;60r[1;1H01234567890123456789012345678901234567
line 2  foo bar blah
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[60;1H[K[9;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset key= fenc=latin1[?25l[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 10 lines, 256 characters written[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test72.failed test.ok test.out X* viminfo
cp test72.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test72.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test72.in" 115 lines, 1707 characters[1;1HTests for undo file.
Since this script is sourced we need to explicitly break changes up in
undo-able pieces.  Do that by setting 'undolevels'.

STARTTEST
:so small.vim
:"
:" Test 'undofile': first a simple one-line change.
:set nocompatible viminfo+=nviminfo visualbell
:set ul=100 undofile nomore
:e! Xtestfile
ggdGithis is one line[34m^[[m:set ul=100
:s/one/ONE/
:set ul=100
:w
:bwipe!
:e Xtestfile
u:.w! test.out
:"
:" Test 'undofile', change in original file fails check
:set noundofile
:e! Xtestfile
:s/line/Line/
:w
:set undofile
:bwipe!
:e Xtestfile
:" TODO: this beeps
u:.w >>test.out
:"
:" Test 'undofile', add 10 lines, delete 6 lines, undo 3
:set undofile
ggdGione
two
three
four
five
six
seven
eight
nine
ten[34m^[[m:set ul=100
3Gdd:set ul=100
dd:set ul=100
dd:set ul=100
dd:set ul=100
dd:set ul=100
dd:set ul=100
:w
:bwipe!
:e Xtestfile
uuu:w >>test.out
:"
:" Test that reading the undofiles when setting undofile works
:set noundofile ul=0
i
[34m^[[mu:e! Xtestfile
:set undofile ul=100
uuuuuu:w >>test.out[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for undo file.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 104 lines, 1510 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[51M[1;60r[9;1H:" And now with encryption, cryptmethod=zip
:e! Xtestfile
:set undofile cm=zip
ggdGimonday
tuesday
wednesday
thursday
friday[34m^[[m:set ul=100
kkkdd:set ul=100
dd:set ul=100
dd:set ul=100
:X
foobar
foobar
:w!
:bwipe!
:e Xtestfile
foobar
:set key=
uu:w >>test.out
:"
:"
:" With encryption, cryptmethod=blowfish
:e! Xtestfile
:set undofile cm=blowfish
ggdGijan
feb
mar
apr
jun[34m^[[m:set ul=100
kk0ifoo [34m^[[m:set ul=100
dd:set ul=100
ibar [34m^[[m:set ul=100
:X
foobar
foobar
:w!
:bwipe!
:e Xtestfile
foobar
:set key=
/bar
:.w >>test.out
u:.w >>test.out
u:.w >>test.out
u:.w >>test.out
:"
:" Rename the undo file so that it gets cleaned up.
:call rename(".Xtestfile.un~", "Xtestundo")
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test 'undofile': first a simple one-line change.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo visualbell[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100 undofile nomore[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [New File][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1Hthis is one line[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[1;16H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hs/one/ONE/[?25l[1;9HONE[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset ul=100[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xtestfile" [New] 1L, 17C written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l"test72.in" 115L, 1707C[1;1H[34m^[[mu:e! Xtestfil
:set undofile ul=100[2;21H[K[3;1Huuuuuu:w >>test.out[3;20H[K[4;1H:" And now with encryption, cryptmethod=zip[4;44H[K[5;1H:e! Xtestfile[5;14H[K[6;1H:set undofile cm=zip[6;21H[K[7;1HggdGimonday[7;12H[K[8;1Htuesday[8;8H[K[9;1Hwednesday[9;10H[K[10;1Hthursday[10;9H[K[11;1Hfriday[34m^[[m:set ul=100[11;20H[K[12;1Hkkkdd:set ul=100[12;17H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1H:X[15;3H[K[16;1Hfoobar[16;7H[K[17;1Hfoobar[17;7H[K[18;1H:w![18;4H[K[19;1H:bwipe![19;8H[K[20;1H:e Xtestfile[20;13H[K[21;1Hfoobar[21;7H[K[22;1H:set key=[22;10H[K[23;1Huu:w >>test.out[23;16H[K[24;1H:"[24;3H[K[25;1H:"[25;3H[K[26;1H:" With encryption, cryptmethod=blowfish[26;41H[K[27;1H:e! Xtestfile[27;14H[K[28;1H:set undofile cm=blowfish[28;26H[K[29;1HggdGijan[29;9H[K[30;1Hfeb[30;4H[K[31;1Hmar[31;4H[K[32;1Hapr[32;4H[K[33;1Hjun[34m^[[m:set ul=100[33;17H[K[34;1Hkk0ifoo [34m^[[m:set ul=100[34;22H[K[35;1Hdd:set ul=100[35;14H[K[36;1Hibar [34m^[[m:set ul=100[36;19H[K[37;1H:X[37;3H[K[38;1Hfoobar[38;7H[K[39;1Hfoobar[39;7H[K[40;1H:w![40;4H[K[41;1H:bwipe![41;8H[K[42;1H:e Xtestfile[42;13H[K[43;1Hfoobar[43;7H[K[44;1H:set key=[44;10H[K[45;1H/bar[45;5H[K[46;1H:.w >>test.out[46;15H[K[47;1Hu:.w >>test.out[47;16H[K[48;1Hu:.w >>test.out[48;16H[K[49;1Hu:.w >>test.out[49;16H[K[50;1H:"[50;3H[K[51;1H:" Rename the undo file so that it gets cleaned up.[51;52H[K[52;1H:call rename(".Xtestfile.un~", "Xtestundo")[52;44H[K[53;1H:qa![53;5H[K[54;1HENDTEST[54;8H[K[55;1H[K[56;1H1111 -----[56;11H[K[57;1H2222 -----[57;11H[K[58;1H[K[59;1H123456789[59;10H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" 1L, 17C[1;1Hthis is ONE lin
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H1 change; before #2  0 seconds ago[1;9Hone[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w! test.out[?25l"test.out" [60;12H[K[60;12H[New] 1L, 17C written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test 'undofile', change in original file fails check[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noundofile[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H1L, 17C[1;9HONE[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hs/line/Line/[?25l[1;13HL[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xtestfile" 1L, 17C written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset undofile[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l"test72.in" 115L, 1707C[1;1H[34m^[[mu:e! Xtestfil
:set undofile ul=100[2;21H[K[3;1Huuuuuu:w >>test.out[3;20H[K[4;1H:" And now with encryption, cryptmethod=zip[4;44H[K[5;1H:e! Xtestfile[5;14H[K[6;1H:set undofile cm=zip[6;21H[K[7;1HggdGimonday[7;12H[K[8;1Htuesday[8;8H[K[9;1Hwednesday[9;10H[K[10;1Hthursday[10;9H[K[11;1Hfriday[34m^[[m:set ul=100[11;20H[K[12;1Hkkkdd:set ul=100[12;17H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1H:X[15;3H[K[16;1Hfoobar[16;7H[K[17;1Hfoobar[17;7H[K[18;1H:w![18;4H[K[19;1H:bwipe![19;8H[K[20;1H:e Xtestfile[20;13H[K[21;1Hfoobar[21;7H[K[22;1H:set key=[22;10H[K[23;1Huu:w >>test.out[23;16H[K[24;1H:"[24;3H[K[25;1H:"[25;3H[K[26;1H:" With encryption, cryptmethod=blowfish[26;41H[K[27;1H:e! Xtestfile[27;14H[K[28;1H:set undofile cm=blowfish[28;26H[K[29;1HggdGijan[29;9H[K[30;1Hfeb[30;4H[K[31;1Hmar[31;4H[K[32;1Hapr[32;4H[K[33;1Hjun[34m^[[m:set ul=100[33;17H[K[34;1Hkk0ifoo [34m^[[m:set ul=100[34;22H[K[35;1Hdd:set ul=100[35;14H[K[36;1Hibar [34m^[[m:set ul=100[36;19H[K[37;1H:X[37;3H[K[38;1Hfoobar[38;7H[K[39;1Hfoobar[39;7H[K[40;1H:w![40;4H[K[41;1H:bwipe![41;8H[K[42;1H:e Xtestfile[42;13H[K[43;1Hfoobar[43;7H[K[44;1H:set key=[44;10H[K[45;1H/bar[45;5H[K[46;1H:.w >>test.out[46;15H[K[47;1Hu:.w >>test.out[47;16H[K[48;1Hu:.w >>test.out[48;16H[K[49;1Hu:.w >>test.out[49;16H[K[50;1H:"[50;3H[K[51;1H:" Rename the undo file so that it gets cleaned up.[51;52H[K[52;1H:call rename(".Xtestfile.un~", "Xtestundo")[52;44H[K[53;1H:qa![53;5H[K[54;1HENDTEST[54;8H[K[55;1H[K[56;1H1111 -----[56;11H[K[57;1H2222 -----[57;11H[K[58;1H[K[59;1H123456789[59;10H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" 1L, 17C[1;1Hthis is ONE Lin
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h" TODO: this beeps[?25l[1;1H[?12l[?25h[?5h[?5l[?25l[60;1HAlready at oldest change[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1L, 17C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test 'undofile', add 10 lines, delete 6 lines, undo 3[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset undofile[?25l[1;1H[?12l[?25h[?25l[1;1H[K[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1Hone
two[2;4H[K[3;1Hthree[3;6H[K[4;1Hfour[4;5H[K[5;1Hfive[5;5H[K[6;1Hsix[6;4H[K[7;1Hseven[7;6H[K[8;1Height[8;6H[K[9;1Hnine[9;5H[K[10;1Hten[10;4H[K[10;3H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[10;3H[?12l[?25h[3;1H[?25l[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"Xtestfile" 4L, 17C written[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l"test72.in" 115L, 1707C[1;1H[34m^[[mu:e! Xtestfile
:set undofile ul=100
uuuuuu:w >>test.out
:" And now with encryption, cryptmethod=zip
:e! Xtestfile[5;14H[K[6;1H:set undofile cm=zip[6;21H[K[7;1HggdGimonday[7;12H[K[8;1Htuesday[8;8H[K[9;1Hwednesday[9;10H[K[10;1Hthursday[10;9H[K[11;1Hfriday[34m^[[m:set ul=100[11;20H[K[12;1Hkkkdd:set ul=100[12;17H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1H:X[15;3H[K[16;1Hfoobar[16;7H[K[17;1Hfoobar[17;7H[K[18;1H:w![18;4H[K[19;1H:bwipe![19;8H[K[20;1H:e Xtestfile[20;13H[K[21;1Hfoobar[21;7H[K[22;1H:set key=[22;10H[K[23;1Huu:w >>test.out[23;16H[K[24;1H:"[24;3H[K[25;1H:"[25;3H[K[26;1H:" With encryption, cryptmethod=blowfish[26;41H[K[27;1H:e! Xtestfile[27;14H[K[28;1H:set undofile cm=blowfish[28;26H[K[29;1HggdGijan[29;9H[K[30;1Hfeb[30;4H[K[31;1Hmar[31;4H[K[32;1Hapr[32;4H[K[33;1Hjun[34m^[[m:set ul=100[33;17H[K[34;1Hkk0ifoo [34m^[[m:set ul=100[34;22H[K[35;1Hdd:set ul=100[35;14H[K[36;1Hibar [34m^[[m:set ul=100[36;19H[K[37;1H:X[37;3H[K[38;1Hfoobar[38;7H[K[39;1Hfoobar[39;7H[K[40;1H:w![40;4H[K[41;1H:bwipe![41;8H[K[42;1H:e Xtestfile[42;13H[K[43;1Hfoobar[43;7H[K[44;1H:set key=[44;10H[K[45;1H/bar[45;5H[K[46;1H:.w >>test.out[46;15H[K[47;1Hu:.w >>test.out[47;16H[K[48;1Hu:.w >>test.out[48;16H[K[49;1Hu:.w >>test.out[49;16H[K[50;1H:"[50;3H[K[51;1H:" Rename the undo file so that it gets cleaned up.[51;52H[K[52;1H:call rename(".Xtestfile.un~", "Xtestundo")[52;44H[K[53;1H:qa![53;5H[K[54;1HENDTEST[54;8H[K[55;1H[K[56;1H1111 -----[56;11H[K[57;1H2222 -----[57;11H[K[58;1H[K[59;1H123456789[59;10H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" 4L, 17C[1;1Hone[1;4H[K[2;1Htwo[2;4H[K[3;1Hnine[3;5H[K[4;1Hten[4;4H[K[5;1H[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H1 more line; before #7  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Height[60;1H[K[3;1H[?12l[?25h[?25l[60;1H1 more line; before #6  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hseven[60;1H[K[3;1H[?12l[?25h[?25l[60;1H1 more line; before #5  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hsix[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H7L, 33C appended[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test that reading the undofiles when setting undofile works[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noundofile ul=0[?25l[3;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;13H[K[4;59r[4;1H[L[1;60r[3;1H[K[4;1Hsixu[?12l[?25hs[60;1H[K[?25l[4;1H[?12l[?25h[?25l[60;1H1 line less; before #8  0 seconds ago[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H4L, 17C[3;1Hnine
ten[4;4H[K[5;1H[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [3;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset undofile ul=100[?25l[3;1H[?12l[?25h[?25l[60;1H1 more line; before #7  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Height[60;1H[K[3;1H[?12l[?25h[?25l[60;1H1 more line; before #6  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hseven[60;1H[K[3;1H[?12l[?25h[?25l[60;1H1 more line; before #5  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hsix[60;1H[K[3;1H[?12l[?25h[?25l[60;1H1 more line; before #4  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hfive[60;1H[K[3;1H[?12l[?25h[?25l[60;1H1 more line; before #3  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hfour[60;1H[K[3;1H[?12l[?25h[?25l[60;1H1 more line; before #2  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hthree[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H10L, 49C appended[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" And now with encryption, cryptmethod=zip[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [60;13H[K[60;13H4L, 17C[3;1Hnin[3;5H[K[4;1Hten[4;4H[K[5;1H[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [3;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset undofile cm=zip[?25l[3;1H[?12l[?25h[1;1H[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1Hmonday
tuesday[2;8H[K[3;1Hwednesday[3;10H[K[4;1Hthursday[4;9H[K[5;1Hfriday[5;7H[K[5;6H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[5;6H[?12l[?25h[4;6H[3;6H[2;6H[?25l[2;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[2;1H[?12l[?25h[?25l[2;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[2;1H[?12l[?25h[?25l[2;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hX[?25l[60;1H[K[60;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1Hmonday
friday[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw![?25l"Xtestfile" [crypted] 2L, 14C written[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l"test72.in" 115L, 1707C[1;1H[34m^[[mu:e! Xtestfile
:set undofile ul=100
uuuuuu:w >>test.out[3;20H[K[4;1H:" And now with encryption, cryptmethod=zip[4;44H[K[5;1H:e! Xtestfile[5;14H[K[6;1H:set undofile cm=zip[6;21H[K[7;1HggdGimonday[7;12H[K[8;1Htuesday[8;8H[K[9;1Hwednesday[9;10H[K[10;1Hthursday[10;9H[K[11;1Hfriday[34m^[[m:set ul=100[11;20H[K[12;1Hkkkdd:set ul=100[12;17H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1H:X[15;3H[K[16;1Hfoobar[16;7H[K[17;1Hfoobar[17;7H[K[18;1H:w![18;4H[K[19;1H:bwipe![19;8H[K[20;1H:e Xtestfile[20;13H[K[21;1Hfoobar[21;7H[K[22;1H:set key=[22;10H[K[23;1Huu:w >>test.out[23;16H[K[24;1H:"[24;3H[K[25;1H:"[25;3H[K[26;1H:" With encryption, cryptmethod=blowfish[26;41H[K[27;1H:e! Xtestfile[27;14H[K[28;1H:set undofile cm=blowfish[28;26H[K[29;1HggdGijan[29;9H[K[30;1Hfeb[30;4H[K[31;1Hmar[31;4H[K[32;1Hapr[32;4H[K[33;1Hjun[34m^[[m:set ul=100[33;17H[K[34;1Hkk0ifoo [34m^[[m:set ul=100[34;22H[K[35;1Hdd:set ul=100[35;14H[K[36;1Hibar [34m^[[m:set ul=100[36;19H[K[37;1H:X[37;3H[K[38;1Hfoobar[38;7H[K[39;1Hfoobar[39;7H[K[40;1H:w![40;4H[K[41;1H:bwipe![41;8H[K[42;1H:e Xtestfile[42;13H[K[43;1Hfoobar[43;7H[K[44;1H:set key=[44;10H[K[45;1H/bar[45;5H[K[46;1H:.w >>test.out[46;15H[K[47;1Hu:.w >>test.out[47;16H[K[48;1Hu:.w >>test.out[48;16H[K[49;1Hu:.w >>test.out[49;16H[K[50;1H:"[50;3H[K[51;1H:" Rename the undo file so that it gets cleaned up.[51;52H[K[52;1H:call rename(".Xtestfile.un~", "Xtestundo")[52;44H[K[53;1H:qa![53;5H[K[54;1HENDTEST[54;8H[K[55;1H[K[56;1H1111 -----[56;11H[K[57;1H2222 -----[57;11H[K[58;1H[K[59;1H123456789[59;10H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [crypted] 2L, 14C[1;1H[2L[1;1Hmonday
friday
[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[60;1H"Xtestfile" [crypted] 2L, 14C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset key=[?25l[1;1H[?12l[?25h[?25l[60;1H1 more line; before #11  0 seconds ago[2;59r[2;1H[L[1;60r[2;1Hthursday[60;1H[K[2;1H[?12l[?25h[?25l[60;1H1 more line; before #10  0 seconds ago[2;59r[2;1H[L[1;60r[2;1Hwednesday[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw >>test.out[?25l"test.out" [60;12H[K[60;12H4L, 33C appended[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" With encryption, cryptmethod=blowfish[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [60;13H[K[60;1HNeed encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h*************************
[?25l"Xtestfile" [noeol][crypted] 1L, 14C[1;1H[2L[1;1H;[34m~H[mÙ6à[34m^][mQÖ[34m^C[m4[34m~][m¤[34m~E[mû
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [m[60;1H[K[60;1H"Xtestfile" [noeol][crypted] 1L, 14C[1;1H[?12l[?25h[?25l[1;1H[K[60;1H--No lines in buffer--[60;23H[K[1;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1Hjan
feb[2;4H[K[3;1Hmar[3;4H[K[4;1Hapr[4;4H[K[5;1Hjun[5;4H[K[5;3H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[5;3H[?12l[?25h[4;3H[3;3H[?25l[60;1H[1m-- INSERT --[m[60;1H[K[3;1Hfoo mar[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;4H[?12l[?25h[?25l[3;59r[59;1H
[1;60r[59;1H[1m[34m~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[60;1H[1m-- INSERT --[m[60;1H[K[3;1Hbar apr[?12l[?25h[?25l[60;1H:[?12l[?25hset ul=100[?25l[3;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hX[?25l[60;1H[K[60;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1Hjan
feb[60;1H[K[3;4H[?12l[?25h[?25l[60;1H:[?12l[?25hw![?25l"Xtestfile" [crypted] 4L, 20C written[3;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbwipe![?25l"test72.in" 115L, 1707C[1;1H[34m^[[mu:e! Xtestfile
:set undofile ul=100
uuuuuu:w >>test.out
:" And now with encryption, cryptmethod=zip
:e! Xtestfile[5;14H[K[6;1H:set undofile cm=zip[6;21H[K[7;1HggdGimonday[7;12H[K[8;1Htuesday[8;8H[K[9;1Hwednesday[9;10H[K[10;1Hthursday[10;9H[K[11;1Hfriday[34m^[[m:set ul=100[11;20H[K[12;1Hkkkdd:set ul=100[12;17H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1H:X[15;3H[K[16;1Hfoobar[16;7H[K[17;1Hfoobar[17;7H[K[18;1H:w![18;4H[K[19;1H:bwipe![19;8H[K[20;1H:e Xtestfile[20;13H[K[21;1Hfoobar[21;7H[K[22;1H:set key=[22;10H[K[23;1Huu:w >>test.out[23;16H[K[24;1H:"[24;3H[K[25;1H:"[25;3H[K[26;1H:" With encryption, cryptmethod=blowfish[26;41H[K[27;1H:e! Xtestfile[27;14H[K[28;1H:set undofile cm=blowfish[28;26H[K[29;1HggdGijan[29;9H[K[30;1Hfeb[30;4H[K[31;1Hmar[31;4H[K[32;1Hapr[32;4H[K[33;1Hjun[34m^[[m:set ul=100[33;17H[K[34;1Hkk0ifoo [34m^[[m:set ul=100[34;22H[K[35;1Hdd:set ul=100[35;14H[K[36;1Hibar [34m^[[m:set ul=100[36;19H[K[37;1H:X[37;3H[K[38;1Hfoobar[38;7H[K[39;1Hfoobar[39;7H[K[40;1H:w![40;4H[K[41;1H:bwipe![41;8H[K[42;1H:e Xtestfile[42;13H[K[43;1Hfoobar[43;7H[K[44;1H:set key=[44;10H[K[45;1H/bar[45;5H[K[46;1H:.w >>test.out[46;15H[K[47;1Hu:.w >>test.out[47;16H[K[48;1Hu:.w >>test.out[48;16H[K[49;1Hu:.w >>test.out[49;16H[K[50;1H:"[50;3H[K[51;1H:" Rename the undo file so that it gets cleaned up.[51;52H[K[52;1H:call rename(".Xtestfile.un~", "Xtestundo")[52;44H[K[53;1H:qa![53;5H[K[54;1HENDTEST[54;8H[K[55;1H[K[56;1H1111 -----[56;11H[K[57;1H2222 -----[57;11H[K[58;1H[K[59;1H123456789[59;10H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [crypted] 4L, 20C[1;1H[2L[1;1Hjan
feb
bar apr[3;8H[K[4;1Hjun[4;4H[K[5;1H[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[60;1H"Xtestfile" [crypted] 4L, 20C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset key=[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hbar[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1L, 8C appended[3;1H[?12l[?25h[?25l[60;1H1 change; before #15  0 seconds ago[3;1Hap[3;5H[K[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1L, 4C appended[3;1H[?12l[?25h[?25l[60;1H1 more line; before #14  0 seconds ago[3;59r[3;1H[L[1;60r[3;1Hfoo mar[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1L, 8C appended[3;1H[?12l[?25h[?25l[60;1H1 change; before #13  0 seconds ago[3;1Hmar[3;5H[K[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w >>test.out[?25l"test.out" [60;12H[K[60;12H1L, 4C appended[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Rename the undo file so that it gets cleaned up.[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall rename(".Xtestfile.un~", "Xtestundo")[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test73.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test73.in" 176 lines, 3863 characters[1;1HTests for find completion.

STARTTEST
:so small.vim
:" 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
:"
:function! DeleteDirectory(dir)
: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
:  exec "silent !rmdir /Q /S " . a:dir
: else
:  exec "silent !rm -rf " . a:dir
: endif
:endfun
:" On windows a stale "Xfind" directory may exist, remove it so that
:" we start from a clean state.
:call DeleteDirectory("Xfind")
: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[34m^[[m:w
:e Xfind/in/file.txt
SJimmy Hoffa[34m^[[m:w
:e Xfind/in/stuff.txt
SAnother Holy Grail[34m^[[m:w
:e Xfind/in/path/file.txt
SE.T.[34m^[[m:w[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for find completion.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 171 lines, 3816 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:e foo/x/bar/voyager.txt
SVoyager 1[34m^[[m:w
:e foo/y/bar/voyager.txt
SVoyager 2[34m^[[m: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 DeleteDirectory("Xfind")
:qa!
ENDTEST[?12l[?25h
[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Do all test in a separate window to avoid E211 when we recursively[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" delete the Xfind directory during cleanup[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" This will cause a few errors, do it silently.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset visualbell[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocp viminfo+=nviminfo[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! DeleteDirectory(dir)[?25l
:  [?12l[?25h: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")
[?25l:    [?12l[?25h:  exec "silent !rmdir /Q /S " . a:dir
[?25l:    [?12l[?25h: else
[?25l:    [?12l[?25h:  exec "silent !rm -rf " . a:dir
[?25l:    [?12l[?25h: endif
[?25l:  [?12l[?25h:endfun[1;1H[6L[?25l[1;1H:e foo/x/bar/voyager.txt
SVoyager 1[34m^[[m:w
:e foo/y/bar/voyager.txt
SVoyager 2[34m^[[m:w
:exec "set path=" . cwd . "/Xfind/**"
:find voyager[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h" On windows a stale "Xfind" directory may exist, remove it so that[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" we start from a clean state.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall DeleteDirectory("Xfind")[?25l[?1l>[?12l[?25h[?1049l[?1049h[?1h=[59;1H[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"[32;32H[K[33;2Hfind file      [33;17H[K[34;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[36;30H[K[37;2Hset path=./path[37;17H[K[38;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[39;15H[K[40;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [41;18H[K[42;2Hexec "w >>" . test_out
:"[43;3H[K[44;4HTest that completion works when path=.,,[45;4H[K[46;2Hset path=.,,
:" Open Jimmy Hoffa file
:e in/file.txt[48;15H[K[49;3Hxec "w >>" . test_out
:" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [51;17H[K[52;2Hexec "w >>" . test_out
:q[53;3H[K[54;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![56;5H[K[57;1HENDTEST[58;1H[K[59;1H[7mtest73.in                                                                                         [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet cwd=getcwd()[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet test_out = cwd . '/test.out'[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall mkdir('Xfind')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd Xfind[?25l/sources/vim74/src/testdir/Xfind[59;1H[7m/sources/vim74/src/testdir/test73.in[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset path=[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind ...[?25l[60;7H[K[60;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE345: Can't find file "" in path[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w! " . test_out[?25l"/sources/vim74/src/testdir/test.out" [New] 0L, 0C written[30;1H[1m[7m/sources/vim74/src/testdir/test.out[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1H:e foo/x/bar/voyager.txt
SVoyager 1[34m^[[m:w[2;15H[K[3;1H:e foo/y/bar/voyager.txt[3;25H[K[4;1HSVoyager 2[34m^[[m:w[4;15H[K[5;1H:exec "set path=" . cwd . "/Xfind/**"[5;38H[K[6;1H:find voyager   [6;17H[K[7;1H:exec "w >>" . test_out[7;24H[K[8;1H:find voyager           [8;25H[K[9;1H:exec "w >>" . test_out[9;24H[K[10;1H:"[10;3H[K[11;1H:" When current directory is .../foo/y/bar they should be shortened to (in[11;75H[K[12;1H:" order of appearance):[12;25H[K[13;1H:"[13;3H[K[14;1H:"    ./voyager.txt[14;20H[K[15;1H:"    x/bar/voyager.txt[15;24H[K[16;1H:cd foo[16;8H[K[17;1H:cd y[17;6H[K[18;1H:cd bar[18;8H[K[19;1H:find voyager   [19;17H[K[20;1H:exec "w >> " . test_out[20;25H[K[21;1H:find voyager           [21;25H[K[22;1H:exec "w >> " . test_out[22;25H[K[23;1H:" Check the opposite too:[23;27H[K[24;1H:cd ..[24;7H[K[25;1H:cd ..[25;7H[K[26;1H:cd x[26;6H[K[27;1H:cd bar[27;8H[K[28;1H:find voyager   [28;17H[K[29;1H:exec "w >> " . test_out[29;25H[K[30;1H:find voyager           [30;25H[K[31;2Hexec "w >> " . test_out[31;25H[K[32;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [34;17H[K[35;2Hexec "w >>" . test_out[35;25H[K[36;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[38;18H[K[39;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[40;15H[K[41;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [42;17H[K[43;2Hexec "w >>" . test_out[44;4H[K[45;4HTest that completion works when path=.,,
:"[46;3H[K[47;2Hset path=.,,[47;15H[K[48;2H" Open Jimmy Hoffa file
:e in/file.txt[49;16H[K[50;2Hexec "w >>" . test_out[50;24H[K[51;2H" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [52;17H[K[53;2Hexec "w >>" . test_out
:q[54;3H[K[55;2Hexec "cd " . cwd[55;18H[K[56;2Hcall DeleteDirectory("Xfind")
:qa![57;5H[K[58;1HENDTEST[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"[32;32H[K[33;2Hfind file      [33;17H[K[34;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[36;30H[K[37;2Hset path=./path[37;17H[K[38;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[39;15H[K[40;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [41;18H[K[42;2Hexec "w >>" . test_out
:"[43;3H[K[44;4HTest that completion works when path=.,,[45;4H[K[46;2Hset path=.,,
:" Open Jimmy Hoffa file
:e in/file.txt[48;15H[K[49;3Hxec "w >>" . test_out
:" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [51;17H[K[52;2Hexec "w >>" . test_out
:q[53;3H[K[54;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![56;5H[K[57;1HENDTEST[58;1H[K[59;1H[7m/sources/vim74/src/testdir/test73.in                                                              [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset path=.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind ...[?25l[60;7H[K[60;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE32: No file name[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 0L, 0C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1H:e foo/x/bar/voyager.txt
SVoyager 1[34m^[[m:w[2;15H[K[3;1H:e foo/y/bar/voyager.txt[3;25H[K[4;1HSVoyager 2[34m^[[m:w[4;15H[K[5;1H:exec "set path=" . cwd . "/Xfind/**"[5;38H[K[6;1H:find voyager   [6;17H[K[7;1H:exec "w >>" . test_out[7;24H[K[8;1H:find voyager           [8;25H[K[9;1H:exec "w >>" . test_out[9;24H[K[10;1H:"[10;3H[K[11;1H:" When current directory is .../foo/y/bar they should be shortened to (in[11;75H[K[12;1H:" order of appearance):[12;25H[K[13;1H:"[13;3H[K[14;1H:"    ./voyager.txt[14;20H[K[15;1H:"    x/bar/voyager.txt[15;24H[K[16;1H:cd foo[16;8H[K[17;1H:cd y[17;6H[K[18;1H:cd bar[18;8H[K[19;1H:find voyager   [19;17H[K[20;1H:exec "w >> " . test_out[20;25H[K[21;1H:find voyager           [21;25H[K[22;1H:exec "w >> " . test_out[22;25H[K[23;1H:" Check the opposite too:[23;27H[K[24;1H:cd ..[24;7H[K[25;1H:cd ..[25;7H[K[26;1H:cd x[26;6H[K[27;1H:cd bar[27;8H[K[28;1H:find voyager   [28;17H[K[29;1H:exec "w >> " . test_out[29;25H[K[30;1H:find voyager           [30;25H[K[31;2Hexec "w >> " . test_out[31;25H[K[32;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [34;17H[K[35;2Hexec "w >>" . test_out[35;25H[K[36;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[38;18H[K[39;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[40;15H[K[41;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [42;17H[K[43;2Hexec "w >>" . test_out[44;4H[K[45;4HTest that completion works when path=.,,
:"[46;3H[K[47;2Hset path=.,,[47;15H[K[48;2H" Open Jimmy Hoffa file
:e in/file.txt[49;16H[K[50;2Hexec "w >>" . test_out[50;24H[K[51;2H" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [52;17H[K[53;2Hexec "w >>" . test_out
:q[54;3H[K[55;2Hexec "cd " . cwd[55;18H[K[56;2Hcall DeleteDirectory("Xfind")
:qa![57;5H[K[58;1HENDTEST[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"[32;32H[K[33;2Hfind file      [33;17H[K[34;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[36;30H[K[37;2Hset path=./path[37;17H[K[38;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[39;15H[K[40;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [41;18H[K[42;2Hexec "w >>" . test_out
:"[43;3H[K[44;4HTest that completion works when path=.,,[45;4H[K[46;2Hset path=.,,
:" Open Jimmy Hoffa file
:e in/file.txt[48;15H[K[49;3Hxec "w >>" . test_out
:" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [51;17H[K[52;2Hexec "w >>" . test_out
:q[53;3H[K[54;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![56;5H[K[57;1HENDTEST[58;1H[K[59;1H[7m/sources/vim74/src/testdir/test73.in                                                              [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset path=.,,[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind ...[?25l[60;7H[K[60;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE32: No file name[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 0L, 0C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1H:e foo/x/bar/voyager.txt
SVoyager 1[34m^[[m:w[2;15H[K[3;1H:e foo/y/bar/voyager.txt[3;25H[K[4;1HSVoyager 2[34m^[[m:w[4;15H[K[5;1H:exec "set path=" . cwd . "/Xfind/**"[5;38H[K[6;1H:find voyager   [6;17H[K[7;1H:exec "w >>" . test_out[7;24H[K[8;1H:find voyager           [8;25H[K[9;1H:exec "w >>" . test_out[9;24H[K[10;1H:"[10;3H[K[11;1H:" When current directory is .../foo/y/bar they should be shortened to (in[11;75H[K[12;1H:" order of appearance):[12;25H[K[13;1H:"[13;3H[K[14;1H:"    ./voyager.txt[14;20H[K[15;1H:"    x/bar/voyager.txt[15;24H[K[16;1H:cd foo[16;8H[K[17;1H:cd y[17;6H[K[18;1H:cd bar[18;8H[K[19;1H:find voyager   [19;17H[K[20;1H:exec "w >> " . test_out[20;25H[K[21;1H:find voyager           [21;25H[K[22;1H:exec "w >> " . test_out[22;25H[K[23;1H:" Check the opposite too:[23;27H[K[24;1H:cd ..[24;7H[K[25;1H:cd ..[25;7H[K[26;1H:cd x[26;6H[K[27;1H:cd bar[27;8H[K[28;1H:find voyager   [28;17H[K[29;1H:exec "w >> " . test_out[29;25H[K[30;1H:find voyager           [30;25H[K[31;2Hexec "w >> " . test_out[31;25H[K[32;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [34;17H[K[35;2Hexec "w >>" . test_out[35;25H[K[36;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[38;18H[K[39;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[40;15H[K[41;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [42;17H[K[43;2Hexec "w >>" . test_out[44;4H[K[45;4HTest that completion works when path=.,,
:"[46;3H[K[47;2Hset path=.,,[47;15H[K[48;2H" Open Jimmy Hoffa file
:e in/file.txt[49;16H[K[50;2Hexec "w >>" . test_out[50;24H[K[51;2H" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [52;17H[K[53;2Hexec "w >>" . test_out
:q[54;3H[K[55;2Hexec "cd " . cwd[55;18H[K[56;2Hcall DeleteDirectory("Xfind")
:qa![57;5H[K[58;1HENDTEST[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"[32;32H[K[33;2Hfind file      [33;17H[K[34;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[36;30H[K[37;2Hset path=./path[37;17H[K[38;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[39;15H[K[40;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [41;18H[K[42;2Hexec "w >>" . test_out
:"[43;3H[K[44;4HTest that completion works when path=.,,[45;4H[K[46;2Hset path=.,,
:" Open Jimmy Hoffa file
:e in/file.txt[48;15H[K[49;3Hxec "w >>" . test_out
:" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [51;17H[K[52;2Hexec "w >>" . test_out
:q[53;3H[K[54;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![56;5H[K[57;1HENDTEST[58;1H[K[59;1H[7m/sources/vim74/src/testdir/test73.in                                                              [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset path=./**[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind ...[?25l[60;7H[K[60;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE32: No file name[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 0L, 0C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1H:e foo/x/bar/voyager.txt
SVoyager 1[34m^[[m:w[2;15H[K[3;1H:e foo/y/bar/voyager.txt[3;25H[K[4;1HSVoyager 2[34m^[[m:w[4;15H[K[5;1H:exec "set path=" . cwd . "/Xfind/**"[5;38H[K[6;1H:find voyager   [6;17H[K[7;1H:exec "w >>" . test_out[7;24H[K[8;1H:find voyager           [8;25H[K[9;1H:exec "w >>" . test_out[9;24H[K[10;1H:"[10;3H[K[11;1H:" When current directory is .../foo/y/bar they should be shortened to (in[11;75H[K[12;1H:" order of appearance):[12;25H[K[13;1H:"[13;3H[K[14;1H:"    ./voyager.txt[14;20H[K[15;1H:"    x/bar/voyager.txt[15;24H[K[16;1H:cd foo[16;8H[K[17;1H:cd y[17;6H[K[18;1H:cd bar[18;8H[K[19;1H:find voyager   [19;17H[K[20;1H:exec "w >> " . test_out[20;25H[K[21;1H:find voyager           [21;25H[K[22;1H:exec "w >> " . test_out[22;25H[K[23;1H:" Check the opposite too:[23;27H[K[24;1H:cd ..[24;7H[K[25;1H:cd ..[25;7H[K[26;1H:cd x[26;6H[K[27;1H:cd bar[27;8H[K[28;1H:find voyager   [28;17H[K[29;1H:exec "w >> " . test_out[29;25H[K[30;1H:find voyager           [30;25H[K[31;2Hexec "w >> " . test_out[31;25H[K[32;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [34;17H[K[35;2Hexec "w >>" . test_out[35;25H[K[36;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[38;18H[K[39;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[40;15H[K[41;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [42;17H[K[43;2Hexec "w >>" . test_out[44;4H[K[45;4HTest that completion works when path=.,,
:"[46;3H[K[47;2Hset path=.,,[47;15H[K[48;2H" Open Jimmy Hoffa file
:e in/file.txt[49;16H[K[50;2Hexec "w >>" . test_out[50;24H[K[51;2H" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [52;17H[K[53;2Hexec "w >>" . test_out
:q[54;3H[K[55;2Hexec "cd " . cwd[55;18H[K[56;2Hcall DeleteDirectory("Xfind")
:qa![57;5H[K[58;1HENDTEST[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"[32;32H[K[33;2Hfind file      [33;17H[K[34;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[36;30H[K[37;2Hset path=./path[37;17H[K[38;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[39;15H[K[40;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [41;18H[K[42;2Hexec "w >>" . test_out
:"[43;3H[K[44;4HTest that completion works when path=.,,[45;4H[K[46;2Hset path=.,,
:" Open Jimmy Hoffa file
:e in/file.txt[48;15H[K[49;3Hxec "w >>" . test_out
:" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [51;17H[K[52;2Hexec "w >>" . test_out
:q[53;3H[K[54;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![56;5H[K[57;1HENDTEST[58;1H[K[59;1H[7m/sources/vim74/src/testdir/test73.in                                                              [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h" We shouldn't find any file at this point, test.out must be empty.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall mkdir('in')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd in[?25l/sources/vim74/src/testdir/Xfind/in[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall mkdir('path')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "cd " . cwd[?25l/sources/vim74/src/testdir[59;1H[7mtest73.in                           [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xfind/file.txt[?25l"Xfind/file.txt" [New File][30;1H[1m[7mXfind/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1HHoly Grail[30;16H[1m[7m[+][1;10H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw[?25l"Xfind/file.txt" [New] 1L, 11C written[30;16H[1m[7m    [1;10H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xfind/in/file.txt[?25l"Xfind/in/file.txt" [New File][1;1H[K[30;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1HJimmy Hoffa[30;19H[1m[7m[+][1;11H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw[?25l"Xfind/in/file.txt" [New] 1L, 12C written[30;19H[1m[7m    [1;11H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xfind/in/stuff.txt[?25l"Xfind/in/stuff.txt" [New File][1;1H[K[30;10H[1m[7mstuff.txt[1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1HAnother Holy Grail[30;20H[1m[7m[+][1;18H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw[?25l"Xfind/in/stuff.txt" [New] 1L, 19C written[30;20H[1m[7m    [1;18H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he Xfind/in/path/file.txt[?25l"Xfind/in/path/file.txt" [New File][1;1H[K[30;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1HE.T.[30;24H[1m[7m[+][1;4H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw[?25l"Xfind/in/path/file.txt" [New] 1L, 5C written[30;24H[1m[7m    [1;4H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset path=Xfind/**[?25l[1;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h[?25l"Xfind/file.txt" [60;18H[K[60;18H1L, 11C[1;1HHoly Grail[30;7H[1m[7mfile.txtf         [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hin/file.txt[60;18H[K[60;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[30;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hin/file.txt[60;18H[K[60;18H[?12l[?25h...[?25l[60;7Hpath/file.txt[60;20H[K[60;20H[?12l[?25h[?25l"Xfind/in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[30;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Rerun the previous three find completions, using fullpath in 'path'[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "set path=" . cwd . "/Xfind/**"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h[?25l"Xfind/file.txt" [60;18H[K[60;18H1L, 11C[1;1HHoly Grail[30;7H[1m[7mfile.txtf         [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" .  test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hin/file.txt[60;18H[K[60;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[30;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hin/file.txt[60;18H[K[60;18H[?12l[?25h...[?25l[60;7Hpath/file.txt[60;20H[K[60;20H[?12l[?25h[?25l"Xfind/in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[30;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Same steps again, using relative and fullpath items that point to the same[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" recursive location.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" This is to test that there are no duplicates in the completion list.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "set path+=Xfind/**"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h[?25l"Xfind/file.txt" [60;18H[K[60;18H1L, 11C[1;1HHoly Grail[30;7H[1m[7mfile.txtf         [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" .  test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hin/file.txt[60;18H[K[60;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[30;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hin/file.txt[60;18H[K[60;18H[?12l[?25h...[?25l[60;7Hpath/file.txt[60;20H[K[60;20H[?12l[?25h[?25l"Xfind/in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[30;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hin/file.txt[60;18H[K[60;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[30;10H[1m[7mfile.txte      [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h" Test find completion for directory of current buffer, which at this point[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" is Xfind/in/file.txt.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset path=.[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind st...[?25luff.txt[?12l[?25h[?25l"Xfind/in/stuff.txt" 1L, 19C[1;1HAnother Holy Grail[30;10H[1m[7mstuff.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" .  test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 19C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test find completion for empty path item ",," which is the current directory[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd Xfind[?25l/sources/vim74/src/testdir/Xfind[30;1H[1m[7min/stuff.txtf       [m[59;1H[7m/sources/vim74/src/testdir/test73.in[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset path=,,[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind f...[?25lile.txt[?12l[?25h...[?25l[60;15H[K[60;15H[?12l[?25h[?25l"file.txt" [60;12H[K[60;12H1L, 11C[1;1HHoly Grail[1;11H[K[30;1H[1m[7mfile.txt.     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test shortening of[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    foo/x/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    foo/y/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" When current directory is above foo/ they should be shortened to (in order[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" of appearance):[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    x/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    y/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall mkdir('foo')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd foo[?25l/sources/vim74/src/testdir/Xfind/foo[30;1H[1m[7m/sources/vim74/src/testdir/Xfind/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall mkdir('x')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall mkdir('y')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd x[?25l/sources/vim74/src/testdir/Xfind/foo/x[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall mkdir('bar')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src/testdir/Xfind/foo[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd y[?25l/sources/vim74/src/testdir/Xfind/foo/y[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall mkdir('bar')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src/testdir/Xfind/foo[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src/testdir/Xfind[30;1H[1m[7mfile.txt/                                  [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h" We should now be in the Xfind directory[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he foo/x/bar/voyager.txt[?25l"foo/x/bar/voyager.txt" [New File][1;1H[K[30;2H[1m[7moo/x/bar/voyager.txt[1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1HVoyager 1[30;23H[1m[7m[+][1;9H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw[?25l"foo/x/bar/voyager.txt" [New] 1L, 10C written[30;23H[1m[7m    [1;9H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he foo/y/bar/voyager.txt[?25l"foo/y/bar/voyager.txt" [New File][1;1H[K[30;5H[1m[7my/[1;1H[?12l[?25h[?25l[m[60;1H[1m-- INSERT --[m[60;13H[K[60;1H[K[1;1HVoyager 2[30;23H[1m[7m[+][1;9H[?12l[?25h[?25l[60;1H[m:[?12l[?25hw[?25l"foo/y/bar/voyager.txt" [New] 1L, 10C written[30;23H[1m[7m    [1;9H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "set path=" . cwd . "/Xfind/**"[?25l[1;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind voyager...[?25l[60;7Hx/bar/voyager.txt[?5h[?5l[?12l[?25h[?25l"foo/x/bar/voyager.txt" 1L, 10C[1;9H1[30;5H[1m[7mx/[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind voyager...[?25l[60;7Hx/bar/voyager.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hy[60;24H[K[60;24H[?12l[?25h[?25l"foo/y/bar/voyager.txt" 1L, 10C[1;9H2[30;5H[1m[7my/[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" When current directory is .../foo/y/bar they should be shortened to (in[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" order of appearance):[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    ./voyager.txt[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    x/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd foo[?25l/sources/vim74/src/testdir/Xfind/foo[30;1H[1m[7my/bar/voyager.txt.     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcd y[?25l/sources/vim74/src/testdir/Xfind/foo/y[30;1H[1m[7mbar/voyager.txt   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcd bar[?25l/sources/vim74/src/testdir/Xfind/foo/y/bar[30;1H[1m[7mvoyager.txt.     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hfind voyager...[?25l[60;7H./voyager.txt[?5h[?5l[?12l[?25h[?25l"voyager.txt" [60;15H[K[60;15H1L, 10C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind voyager...[?25l[60;7H./voyager.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hx/bar/voyager.txt[?12l[?25h[?25l"/sources/vim74/src/testdir/Xfind/foo/x/bar/voyager.txt" 1L, 10C[1;9H1[30;1H[1m[7m/sources/vim74/src/testdir/Xfind/foo/x/bar/voyager.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check the opposite too:[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src/testdir/Xfind/foo/y[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src/testdir/Xfind/foo[30;1H[1m[7mx/bar/voyager.txtc                                      [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcd x[?25l/sources/vim74/src/testdir/Xfind/foo/x[30;1H[1m[7mbar/voyager.txt   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcd bar[?25l/sources/vim74/src/testdir/Xfind/foo/x/bar[30;1H[1m[7mvoyager.txt.     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hfind voyager...[?25l[60;7H./voyager.txt[?5h[?5l[?12l[?25h[?25l"voyager.txt" [60;15H[K[60;15H1L, 10C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind voyager...[?25l[60;7H./voyager.txt[?5h[?5l[?12l[?25h...[?25l[60;7Hy/bar/voyager.txt[?12l[?25h[?25l"/sources/vim74/src/testdir/Xfind/foo/y/bar/voyager.txt" 1L, 10C[1;9H2[30;1H[1m[7m/sources/vim74/src/testdir/Xfind/foo/y/bar/voyager.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Check for correct handling of shorten_fname()'s behavior on windows[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "cd " . cwd . "/Xfind/in"[?25l/sources/vim74/src/testdir/Xfind/in[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25l[60;7H./file.txt[?5h[?5l[?12l[?25h[?25l"file.txt" [60;12H[K[60;12H1L, 12C[1;1HJimmy Hoffa[30;1H[1m[7mfile.txt/                                               [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test for relative to current buffer 'path' item[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "cd " . cwd . "/Xfind/"[?25l/sources/vim74/src/testdir/Xfind[30;1H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset path=./path[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Open the file where Jimmy Hoffa is found[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he in/file.txt[?25l"in/file.txt" 1L, 12C[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Find the file containing 'E.T.' in the Xfind/in/path directory[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind file...[?25ltxt[?12l[?25h[?25l"in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[30;4H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test that completion works when path=.,,[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset path=.,,[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Open Jimmy Hoffa file[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he in/file.txt[?25l"in/file.txt" 1L, 12C[1;1HJimmy Hoffa[30;4H[1m[7mfile.txte      [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Search for the file containing Holy Grail in same directory as in/path.txt[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfind stu...[?25lff.txt[?12l[?25h[?25l"in/stuff.txt" 1L, 19C[1;1HAnother Holy Grail[30;4H[1m[7mstuff.txt[1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim74/src/testdir/test.out" 1L, 19C appended[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq[?25l[1;1H:e foo/x/bar/voyager.txt
SVoyager 1[34m^[[m:w[2;15H[K[3;1H:e foo/y/bar/voyager.txt[3;25H[K[4;1HSVoyager 2[34m^[[m:w[4;15H[K[5;1H:exec "set path=" . cwd . "/Xfind/**"[5;38H[K[6;1H:find voyager   [6;17H[K[7;1H:exec "w >>" . test_out[7;24H[K[8;1H:find voyager           [8;25H[K[9;1H:exec "w >>" . test_out[9;24H[K[10;1H:"[10;3H[K[11;1H:" When current directory is .../foo/y/bar they should be shortened to (in[11;75H[K[12;1H:" order of appearance):[12;25H[K[13;1H:"[13;3H[K[14;1H:"    ./voyager.txt[14;20H[K[15;1H:"    x/bar/voyager.txt[15;24H[K[16;1H:cd foo[16;8H[K[17;1H:cd y[17;6H[K[18;1H:cd bar[18;8H[K[19;1H:find voyager   [19;17H[K[20;1H:exec "w >> " . test_out[20;25H[K[21;1H:find voyager           [21;25H[K[22;1H:exec "w >> " . test_out[22;25H[K[23;1H:" Check the opposite too:[23;27H[K[24;1H:cd ..[24;7H[K[25;1H:cd ..[25;7H[K[26;1H:cd x[26;6H[K[27;1H:cd bar[27;8H[K[28;1H:find voyager   [28;17H[K[29;1H:exec "w >> " . test_out[29;25H[K[30;1H:find voyager           [30;25H[K[31;2Hexec "w >> " . test_out[31;25H[K[32;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [34;17H[K[35;2Hexec "w >>" . test_out[35;25H[K[36;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[38;18H[K[39;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[40;15H[K[41;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [42;17H[K[43;2Hexec "w >>" . test_out[44;4H[K[45;4HTest that completion works when path=.,,
:"[46;3H[K[47;2Hset path=.,,[47;15H[K[48;2H" Open Jimmy Hoffa file
:e in/file.txt[49;16H[K[50;2Hexec "w >>" . test_out[50;24H[K[51;2H" Search for the file containing Holy Grail in same directory as in/path.txt
:find stu       [52;17H[K[53;2Hexec "w >>" . test_out
:q[54;3H[K[55;2Hexec "cd " . cwd[55;18H[K[56;2Hcall DeleteDirectory("Xfind")
:qa![57;5H[K[58;1HENDTEST[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexec "cd " . cwd[?25l/sources/vim74/src/testdir[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall DeleteDirectory("Xfind")[?25l[?1l>[?12l[?25h[?1049l[?1049h[?1h=[59;1H[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test74.failed test.ok test.out X* viminfo
cp test74.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test74.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test74.in" 36 lines, 822 characters[1;1H" Tests for storing global variables in the .viminfo file vim: set ft=vim:

STARTTEST
:so small.vim
:" 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
:let MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}
:" store a really long list, so line wrapping will occur in viminfo file
:let MY_GLOBAL_LIST=range(1,100)
:wv! Xviminfo
:unlet MY_GLOBAL_DICT
:unlet MY_GLOBAL_LIST
:rv! Xviminfo
:call delete('Xviminfo')
:if exists("MY_GLOBAL_DICT")
:redir >> test.out
:echo MY_GLOBAL_DICT
:redir end
:endif
:if exists("MY_GLOBAL_LIST")
:redir >> test.out
:echo MY_GLOBAL_LIST
:redir end
:endif
:redir >> test.out
:echo "foobar"
:redir end
:endif
:qa!
ENDTEST

eof
[1m[34m~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1H" Tests for storing global variables in the .viminfo file vim: set ft=vim:[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 30 lines, 723 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[34;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Do all test in a separate window to avoid E211 when we recursively[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" delete the Xfind directory during cleanup[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" This will cause a few errors, do it silently.[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset visualbell[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocp viminfo+=!,nviminfo[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet MY_GLOBAL_DICT={'foo': 1, 'bar': 0, 'longvarible': 1000}[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" store a really long list, so line wrapping will occur in viminfo file[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet MY_GLOBAL_LIST=range(1,100)[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwv! Xviminfo[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet MY_GLOBAL_DICT[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hunlet MY_GLOBAL_LIST[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hrv! Xviminfo[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall delete('Xviminfo')[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif exists("MY_GLOBAL_DICT")[?25l
:  [?12l[?25h:redir >> test.out
[?25l:  [?12l[?25h:echo MY_GLOBAL_DICT
[?25l{'foo': 1, 'longvarible': 1000, 'bar': 0}
:  [?12l[?25h:redir end
[?25l:  [?12l[?25h:endif[1;1H[5L[?25l[1;1H" Tests for storing global variables in the .viminfo file vim: set ft=vim:

STARTTEST
:so small.vim
:" Do all test in a separate window to avoid E211 when we recursively[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hif exists("MY_GLOBAL_LIST")[?25l
:  [?12l[?25h:redir >> test.out
[?25l:  [?12l[?25h:echo MY_GLOBAL_LIST
[?25l[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 2
[59;98H7[60;1H, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 7
[59;98H6[60;1H, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
[59;98H][60;1H
:  [?12l[?25h:redir end
[?25l:  [?12l[?25h:endif[1;1H[9L[?25l[1;1H" Tests for storing global variables in the .viminfo file vim: set ft=vim:

STARTTEST
:so small.vim
:" 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[60;1H[K[35;1H[?12l[?25h[?25l[60;1H:[?12l[?25hredir >> test.out[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hecho "foobar"[?25lfoobar[60;7H[K[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir end[?25l[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hendif[?25l[1m[37m[41mE580: :endif without :if[35;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# 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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test75.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test75.in" 24 lines, 562 characters[1;1H" Tests for functions.

STARTTEST
:so small.vim
:set cpo-=<
:" Test maparg() with a string result
:map foo<C-V> is<F4>foo
:vnoremap <script> <buffer> <expr> <silent> bar isbar
:call append('$', maparg('foo<C-V>'))
:call append('$', string(maparg('foo<C-V>', '', 0, 1)))
:call append('$', string(maparg('bar', '', 0, 1)))
:map <buffer> <nowait> foo bar
:call append('$', string(maparg('foo', '', 0, 1)))
:"
:map abc x<char-114>x
:call append('$', maparg('abc'))
:map abc y<S-char-114>y
:call append('$', maparg('abc'))
:"
:/^eof/+1,$w! test.out
:qa!
ENDTEST

eof
[1m[34m~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1H" Tests for functions.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 18 lines, 515 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[22;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo-=<[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test maparg() with a string result[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap foo<C-V> is<F4>foo[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hvnoremap <script> <buffer> <expr> <silent> bar isbar[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append('$', maparg('foo<C-V>'))[?25l[25;1His<F4>foo[25;10H[K[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append('$', string(maparg('foo<C-V>', '', 0, 1)))[?25l[26;1H{'silent': 0, 'noremap': 0, 'lhs': 'foo<C-V>', 'mode': ' ', 'nowait': 0, 'expr': 0, 'sid': 0, 'rhss[27;1H': 'is<F4>foo', 'buffer': 0}[27;29H[K[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append('$', string(maparg('bar', '', 0, 1)))[?25l[28;1H{'silent': 1, 'noremap': 1, 'lhs': 'bar', 'mode': 'v', 'nowait': 0, 'expr': 1, 'sid': 0, 'rhs': 'ii[29;1Hsbar', 'buffer': 1}[29;20H[K[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap <buffer> <nowait> foo bar[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append('$', string(maparg('foo', '', 0, 1)))[?25l[30;1H{'silent': 0, 'noremap': 0, 'lhs': 'foo', 'mode': ' ', 'nowait': 1, 'expr': 0, 'sid': 0, 'rhs': 'bb[31;1Har', 'buffer': 1}[31;18H[K[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap abc x<char-114>x[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append('$', maparg('abc'))[?25l[32;1Hxrx[32;4H[K[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap abc y<S-char-114>y[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append('$', maparg('abc'))[?25l[33;1HyRy[33;4H[K[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^eof/+1,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 6 lines, 379 characters written[23;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test76.failed test.ok test.out X* viminfo
cp test76.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test76.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test76.in" 46 lines, 899 characters[1;1HTests for completefunc/omnifunc. vim: set ft=vim :

STARTTEST
:"Test that nothing happens if the 'completefunc' opens
:"a new window (no completion, no crash)
:so small.vim
:function! DummyCompleteOne(findstart, base)
:  if a:findstart
:    return 0
:  else
:    wincmd n
:    return ['onedef', 'oneDEF']
:  endif
:endfunction
:setlocal completefunc=DummyCompleteOne
/^one
A[34m^X^U^N^[[m:q!
:function! DummyCompleteTwo(findstart, base)
:  if a:findstart
:    wincmd n
:    return 0
:  else
:    return ['twodef', 'twoDEF']
:  endif
:endfunction
:setlocal completefunc=DummyCompleteTwo
/^two
A[34m^X^U^N^[[m:q!
:"Test that 'completefunc' works when it's OK.
:function! DummyCompleteThree(findstart, base)
:  if a:findstart
:    return 0
:  else
:    return ['threedef', 'threeDEF']
:  endif
:endfunction
:setlocal completefunc=DummyCompleteThree
/^three
A[34m^X^U^N^[[m:/^+++/,/^three/w! test.out
:qa!
ENDTEST

+++
one
two
three
[1m[34m~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for completefunc/omnifunc. vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 37 lines, 810 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[41;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"Test that nothing happens if the 'completefunc' opens[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"a new window (no completion, no crash)[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! DummyCompleteOne(findstart, base)[?25l
:  [?12l[?25h:  if a:findstart
[?25l:    [?12l[?25h:    return 0
[?25l:    [?12l[?25h:  else
[?25l:    [?12l[?25h:    wincmd n
[?25l:    [?12l[?25h:    return ['onedef', 'oneDEF']
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endfunction[1;1H[7L[?25l[1;1HTests for completefunc/omnifunc. vim: set ft=vim :

STARTTEST
:"Test that nothing happens if the 'completefunc' opens
:"a new window (no completion, no crash)
:so small.vim
:function! DummyCompleteOne(findstart, base)[60;1H[K[42;1H[?12l[?25h[?25l[60;1H:[?12l[?25hsetlocal completefunc=DummyCompleteOne[?25l[42;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^one[?25l[44;1H[?12l[?25h[?25l[60;1H[1m[37m[41mE839: Completion function changed window[m
[1m[37m[41mPattern not found[m
[32mPress ENTER or type command to continue[?12l[?25h[1;4H[?25l[m[60;1H[K[60;1H[32mPress ENTER or type command to continue[?12l[?25h[1;4H[m[59;1H[K[60;1H[K[1;1H[2L[?25l[1;1Hone
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name] [+]                                                                                     [m[31;4Hendif[31;9H[K[32;2Hendfunction[32;13H[K[33;2Hsetlocal completefunc=DummyCompleteTwo
/^two[34;6H[K[35;1HA[34m^X^U^N^[[m:q!
:"Test that 'completefunc' works when it's OK.
:function! DummyCompleteThree(findstart, base)
:  if a:findstart
:    return 0[39;14H[K[40;2H  else
:    return ['threedef', 'threeDEF']
:  endif
:endfunction
:setlocal completefunc=DummyCompleteThree
/^three
A[34m^X^U^N^[[m:/^+++/,/^three/w! test.out
:qa![47;5H[K[48;1HENDTEST[48;8H[K[49;1H[K[50;1H+++[50;4H[K[51;1H[K[52;1Htwo[52;4H[K[53;1Hthree[53;6H[K[59;1H[7mtest76.in [+]                                                                                     [m[60;1H[K[1;3H[?12l[?25h[?25l[60;1H:[?12l[?25hq![?25l[1;1HTests for completefunc/omnifunc. vim: set ft=vim :[2;1H[K[3;1HSTARTTEST[3;10H[K[4;1H:"Test that nothing happens if the 'completefunc' opens[4;56H[K[5;1H:"a new window (no completion, no crash)[5;41H[K[6;1H:so small.vim[6;14H[K[7;1H:function! DummyCompleteOne(findstart, base)[7;45H[K[8;1H:  if a:findstart[8;18H[K[9;1H:    return 0[9;14H[K[10;1H:  else[10;8H[K[11;1H:    wincmd n[11;14H[K[12;1H:    return ['onedef', 'oneDEF'][12;33H[K[13;1H:  endif[13;9H[K[14;1H:endfunction[14;13H[K[15;1H:setlocal completefunc=DummyCompleteOne[15;40H[K[16;1H/^one[16;6H[K[17;1HA[34m^X^U^N^[[m:q![17;13H[K[18;1H:function! DummyCompleteTwo(findstart, base)[18;45H[K[19;1H:  if a:findstart[19;18H[K[20;1H:    wincmd n[20;14H[K[21;1H:    return 0[21;14H[K[22;1H:  else[22;8H[K[23;1H:    return ['twodef', 'twoDEF'][23;33H[K[24;1H:  endif[24;9H[K[25;1H:endfunction[25;13H[K[26;1H:setlocal completefunc=DummyCompleteTwo[26;40H[K[27;1H/^two[27;6H[K[28;1HA[34m^X^U^N^[[m:q![28;13H[K[29;1H:"Test that 'completefunc' works when it's OK.[29;47H[K[30;1H:function! DummyCompleteThree(findstart, base)[30;47H[K[31;4Hif a:findstart
:    return 0
:  else[33;8H[K[34;1H:    return ['threedef', 'threeDEF']
:  endif[35;9H[K[36;2Hendfunction[36;13H[K[37;2Hsetlocal completefunc=DummyCompleteThree[37;42H[K[38;1H/^three[38;8H[K[39;1HA[34m^X^U^N^[[m:/^+++/,/^three/w! test.out
:qa![40;5H[K[41;1HENDTEST[41;8H[K[42;1H[K[43;1H+++[43;4H[K[44;1H[K[45;1Htwo[45;4H[K[46;1Hthree[46;6H[K[47;1H[1m[34m~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [59;1H~                                                                                                 [44;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hfunction! DummyCompleteTwo(findstart, base)[?25l
:  [?12l[?25h:  if a:findstart
[?25l:    [?12l[?25h:    wincmd n
[?25l:    [?12l[?25h:    return 0
[?25l:    [?12l[?25h:  else
[?25l:    [?12l[?25h:    return ['twodef', 'twoDEF']
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endfunction[1;1H[7L[?25l[1;1HTests for completefunc/omnifunc. vim: set ft=vim :

STARTTEST
:"Test that nothing happens if the 'completefunc' opens
:"a new window (no completion, no crash)
:so small.vim
:function! DummyCompleteOne(findstart, base)[60;1H[K[44;1H[?12l[?25h[?25l[60;1H:[?12l[?25hsetlocal completefunc=DummyCompleteTwo[?25l[44;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^two[?25l[45;1H[?12l[?25h[?25l[60;1H[1m[37m[41mE839: Completion function changed window[m
[1m[37m[41mE764: Option 'completefunc' is not set[m
[32mPress ENTER or type command to continue[?12l[?25h[m[59;1H[K[60;1H[K[1;1H[2L[?25l[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;4Hendif[31;9H[K[32;2Hendfunction[32;13H[K[33;2Hsetlocal completefunc=DummyCompleteTwo
/^two[34;6H[K[35;1HA[34m^X^U^N^[[m:q!
:"Test that 'completefunc' works when it's OK.
:function! DummyCompleteThree(findstart, base)
:  if a:findstart
:    return 0[39;14H[K[40;2H  else
:    return ['threedef', 'threeDEF']
:  endif
:endfunction
:setlocal completefunc=DummyCompleteThree
/^three
A[34m^X^U^N^[[m:/^+++/,/^three/w! test.out
:qa![47;5H[K[48;1HENDTEST[48;8H[K[49;1H[K[50;1H+++[50;4H[K[51;1H[K[52;1Htwo[52;4H[K[53;1Hthree[53;6H[K[59;1H[7mtest76.in [+]                                                                                     [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hq![?25l[1;1HTests for completefunc/omnifunc. vim: set ft=vim :[2;1H[K[3;1HSTARTTEST[3;10H[K[4;1H:"Test that nothing happens if the 'completefunc' opens[4;56H[K[5;1H:"a new window (no completion, no crash)[5;41H[K[6;1H:so small.vim[6;14H[K[7;1H:function! DummyCompleteOne(findstart, base)[7;45H[K[8;1H:  if a:findstart[8;18H[K[9;1H:    return 0[9;14H[K[10;1H:  else[10;8H[K[11;1H:    wincmd n[11;14H[K[12;1H:    return ['onedef', 'oneDEF'][12;33H[K[13;1H:  endif[13;9H[K[14;1H:endfunction[14;13H[K[15;1H:setlocal completefunc=DummyCompleteOne[15;40H[K[16;1H/^one[16;6H[K[17;1HA[34m^X^U^N^[[m:q![17;13H[K[18;1H:function! DummyCompleteTwo(findstart, base)[18;45H[K[19;1H:  if a:findstart[19;18H[K[20;1H:    wincmd n[20;14H[K[21;1H:    return 0[21;14H[K[22;1H:  else[22;8H[K[23;1H:    return ['twodef', 'twoDEF'][23;33H[K[24;1H:  endif[24;9H[K[25;1H:endfunction[25;13H[K[26;1H:setlocal completefunc=DummyCompleteTwo[26;40H[K[27;1H/^two[27;6H[K[28;1HA[34m^X^U^N^[[m:q![28;13H[K[29;1H:"Test that 'completefunc' works when it's OK.[29;47H[K[30;1H:function! DummyCompleteThree(findstart, base)[30;47H[K[31;4Hif a:findstart
:    return 0
:  else[33;8H[K[34;1H:    return ['threedef', 'threeDEF']
:  endif[35;9H[K[36;2Hendfunction[36;13H[K[37;2Hsetlocal completefunc=DummyCompleteThree[37;42H[K[38;1H/^three[38;8H[K[39;1HA[34m^X^U^N^[[m:/^+++/,/^three/w! test.out
:qa![40;5H[K[41;1HENDTEST[41;8H[K[42;1H[K[43;1H+++[43;4H[K[44;1H[K[45;1Htwo[45;4H[K[46;1Hthree[46;6H[K[47;1H[1m[34m~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [59;1H~                                                                                                 [45;3H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"Test that 'completefunc' works when it's OK.[?25l[45;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! DummyCompleteThree(findstart, base)[?25l
:  [?12l[?25h:  if a:findstart
[?25l:    [?12l[?25h:    return 0
[?25l:    [?12l[?25h:  else
[?25l:    [?12l[?25h:    return ['threedef', 'threeDEF']
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endfunction[1;1H[6L[?25l[1;1HTests for completefunc/omnifunc. vim: set ft=vim :

STARTTEST
:"Test that nothing happens if the 'completefunc' opens
:"a new window (no completion, no crash)
:so small.vim[60;1H[K[45;3H[?12l[?25h[?25l[60;1H:[?12l[?25hsetlocal completefunc=DummyCompleteThree[?25l[45;3H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^three[?25l[46;1H[?12l[?25h[?25l[60;1H[32mmatch 1 of 2[46;9H[mdef
[30m[47mthreedef       [m
[30m[45mthreeDEF       [46;9H[mDEF
[1m[34m~              
~              [m[47;1H[30m[47mthreedef       [m
[30m[45mthreeDEF       [m[60;7H[32m2[46;9H[m
[30m[45mthreedef       [m
[30m[47mthreeDEF       [46;9H[m[60;1H[K[47;1H[1m[34m~              
~              [46;8H[?12l[?25h[?25l[60;1H[m:[?12l[?25h/^+++/,/^three/w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 4 lines, 18 characters written[46;8H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test77.failed test.ok test.out X* viminfo
cp test77.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test77.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test77.in" 30 lines, 719 characters[1;1HInserts 2 million lines with consecutive integers starting from 1
(essentially, the output of GNU's seq 1 2000000), writes them to Xtest
and writes its cksum to test.out.

We need 2 million lines to trigger a call to mf_hash_grow().  If it would mess
up the lines the checksum would differ.

cksum is part of POSIX and so should be available on most Unixes.
If it isn't available then the test will be skipped.

STARTTEST
:so small.vim
:if !executable("cksum")
: e! test.ok
: w! test.out
: qa!
:endif
:set fileformat=unix undolevels=-1
ggdG
:let i = 1
:while i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile
ggdd
:w! Xtest
:r !cksum Xtest
:s/\s/ /g
:set fileformat&
:.w! test.out
:qa!
ENDTEST

[1m[34m~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HInserts 2 million lines with consecutive integers starting from 1[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[11;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 17 lines, 288 characters written[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[12;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[29;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !executable("cksum")[?25l
:  [?12l[?25h: e! test.ok
[?25l:  [?12l[?25h: w! test.out
[?25l:  [?12l[?25h: qa!
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HInserts 2 million lines with consecutive integers starting from 1
(essentially, the output of GNU's seq 1 2000000), writes them to Xtest
and writes its cksum to test.out.[60;1H[K[30;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset fileformat=unix undolevels=-1[?25l[30;1H[?12l[?25h[1;1H[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [m[60;1H--No lines in buffer--[60;23H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet i = 1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwhile i <= 2000000 | call append(i, range(i, i + 99)) | let i += 100 | endwhile[?25l[2;1H1[2;2H[K[3;1H2[3;2H[K[4;1H3[4;2H[K[5;1H4[5;2H[K[6;1H5[6;2H[K[7;1H6[7;2H[K[8;1H7[8;2H[K[9;1H8[9;2H[K[10;1H9[10;2H[K[11;1H10[11;3H[K[12;1H11[12;3H[K[13;1H12[13;3H[K[14;1H13[14;3H[K[15;1H14[15;3H[K[16;1H15[16;3H[K[17;1H16[17;3H[K[18;1H17[18;3H[K[19;1H18[19;3H[K[20;1H19[20;3H[K[21;1H20[21;3H[K[22;1H21[22;3H[K[23;1H22[23;3H[K[24;1H23[24;3H[K[25;1H24[25;3H[K[26;1H25[26;3H[K[27;1H26[27;3H[K[28;1H27[28;3H[K[29;1H28[29;3H[K[30;1H29[30;3H[K[31;1H30[31;3H[K[32;1H31[32;3H[K[33;1H32[33;3H[K[34;1H33[34;3H[K[35;1H34[35;3H[K[36;1H35[36;3H[K[37;1H36[37;3H[K[38;1H37[38;3H[K[39;1H38[39;3H[K[40;1H39[40;3H[K[41;1H40[41;3H[K[42;1H41[42;3H[K[43;1H42[43;3H[K[44;1H43[44;3H[K[45;1H44[45;3H[K[46;1H45[46;3H[K[47;1H46[47;3H[K[48;1H47[48;3H[K[49;1H48[49;3H[K[50;1H49[50;3H[K[51;1H50[51;3H[K[52;1H51[52;3H[K[53;1H52[53;3H[K[54;1H53[54;3H[K[55;1H54[55;3H[K[56;1H55[56;3H[K[57;1H56[57;3H[K[58;1H57[58;3H[K[59;1H58[59;3H[K[1;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H59[60;1H[K[1;1H[?12l[?25h
[?25l[60;1H:[?12l[?25hw! Xtest[?25l"Xtest" [60;9H[K[60;9H[New File] 2000000 lines, 14888896 characters written[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hr !cksum Xtest[?25l[?12l[?25h[27m[23m[m[H[2J[?25l[1;1H1
2
3678979763 14888896 Xtest
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25hs/\s/ /g[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformat&[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h.w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 26 characters written[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test78.failed test.ok test.out X* viminfo
cp test78.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test78.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test78.in" 46 lines, 1464 characters[1;1HInserts 10000 lines with text to fill the swap file with two levels of pointer
blocks.  Then recovers from the swap file and checks all text is restored.

We need about 10000 lines of 100 characters to get two levels of pointer
blocks.

STARTTEST
:so small.vim
:set nocp fileformat=unix undolevels=-1 viminfo+=nviminfo
:e! Xtest
ggdG
:let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijkk[13;1Hlmnoparstuvwxyz0123456789"
:let i = 1
:let linecount = 10000
:while i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile
:preserve
:" get the name of the swap file
:redir => swapname
:swapname
:redir END
:let swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1',,[23;1H '')
:" make a copy of the swap file in Xswap
:set bin
:exe 'sp ' . swapname
:w! Xswap
:echo swapname
:set nobin
:new
:only!
:bwipe! Xtest
:call rename('Xswap', swapname)
:recover Xtest
:call delete(swapname)
:new
:call append(0, 'recovery start')
:wincmd w
:let linedollar = line('$')
:if linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " ll[41;1Hines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif
:let i = 1
:while i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . '  [44;1Hdiffers') | exe 'wincmd w' | endif | let i += 1 | endwhile
:q!
:call append(line('$'), 'recovery end')
:w! test.out
:qa!
ENDTEST

[1m[34m~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HInserts 10000 lines with text to fill the swap file with two levels of pointer[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[7;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 37 lines, 1208 characters written[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[8;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[49;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocp fileformat=unix undolevels=-1 viminfo+=nviminfo[?25l[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he! Xtest[?25l"Xtest" [New File][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghij
[59;98Hk[60;1Hlmnoparstuvwxyz0123456789"[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hlet i = 1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet linecount = 10000[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwhile i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile[?25l[1;1H9972    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[2;1Hstuvwxyz0123456789[2;19H[K[3;1H9973    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[4;1Hstuvwxyz0123456789[4;19H[K[5;1H9974    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[6;1Hstuvwxyz0123456789[6;19H[K[7;1H9975    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[8;1Hstuvwxyz0123456789[8;19H[K[9;1H9976    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[10;1Hstuvwxyz0123456789[10;19H[K[11;1H9977    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[12;1Hstuvwxyz0123456789[12;19H[K[13;1H9978    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[14;1Hstuvwxyz0123456789[14;19H[K[15;1H9979    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[16;1Hstuvwxyz0123456789[16;19H[K[17;1H9980    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[18;1Hstuvwxyz0123456789[18;19H[K[19;1H9981    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[20;1Hstuvwxyz0123456789[20;19H[K[21;1H9982    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[22;1Hstuvwxyz0123456789[22;19H[K[23;1H9983    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[24;1Hstuvwxyz0123456789[24;19H[K[25;1H9984    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[26;1Hstuvwxyz0123456789[26;19H[K[27;1H9985    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[28;1Hstuvwxyz0123456789[28;19H[K[29;1H9986    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[30;1Hstuvwxyz0123456789[30;19H[K[31;1H9987    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[32;1Hstuvwxyz0123456789[32;19H[K[33;1H9988    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[34;1Hstuvwxyz0123456789[34;19H[K[35;1H9989    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[36;1Hstuvwxyz0123456789[36;19H[K[37;1H9990    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[38;1Hstuvwxyz0123456789[38;19H[K[39;1H9991    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[40;1Hstuvwxyz0123456789[40;19H[K[41;1H9992    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[42;1Hstuvwxyz0123456789[42;19H[K[43;1H9993    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[44;1Hstuvwxyz0123456789[44;19H[K[45;1H9994    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[46;1Hstuvwxyz0123456789[46;19H[K[47;1H9995    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[48;1Hstuvwxyz0123456789[48;19H[K[49;1H9996    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[50;1Hstuvwxyz0123456789[50;19H[K[51;1H9997    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[52;1Hstuvwxyz0123456789[52;19H[K[53;1H9998    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[54;1Hstuvwxyz0123456789[54;19H[K[55;1H9999    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[56;1Hstuvwxyz0123456789[56;19H[K[57;1H10000   abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[58;1Hstuvwxyz0123456789[58;19H[K[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hpreserve[?25lFile preserved[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" get the name of the swap file[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir => swapname[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hswapname[?25l.Xtest.swp[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir END[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1'
[59;98H,[60;1H '')[?25l[1;1H[L[1;1H9972    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[2;1Hs[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h" make a copy of the swap file in Xswap[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset bin[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexe 'sp ' . swapname[?25l".Xtest.swp"[60;14H[K[60;14H[noeol] 609L, 1228800C[1;1Hb0VIM 7.4[34m^@^@^@^@^P^@^@^@^@^@^@^@^@^@^@[m0[34m^O^@^@[mroot[34m^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@@[2;1H^@^@^@^@^@^@^@^@^@^@^@^@[mfrodo[34m^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[3;1H@[m/sources/vim74/src/testdir/Xtest[34m^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[4;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[5;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[6;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[7;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[8;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[9;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[10;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[11;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[12;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[13;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[14;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[15;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[16;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[17;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[18;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[19;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[20;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[21;1H@^M[mU3210[34m^@^@^@^@[m#"! [34m^S^R[mU[34m^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[22;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[23;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[24;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[25;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[26;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[27;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[28;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[29;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^[m[30;1H[1m[7m.Xtest.swp                                                                                        [m[31;4H8[93Crr[32;1Hs
9989[93Crr[34;1Hs
9990[93Crr[36;1Hs
9991[93Crr[38;1Hs
9992[93Crr[40;1Hs
9993[93Crr[42;1Hs
9994[93Crr[44;1Hs
9995[93Crr[46;1Hs
9996[93Crr[48;1Hs
9997[93Crr[50;1Hs
9998[93Crr[52;1Hs
9999[93Crr[54;1Hs
10000[92Crr[56;1Hs[57;1H[K[58;1H[1m[34m~                                                                                                 [m[59;1H[7mXtest [+]                                                                                         [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! Xswap[?25l"Xswap" [60;9H[K[60;9H[New][noeol] 609L, 1228800C written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hecho swapname[?25l.Xtest.sw[60;11H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nobin[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [m[20;1H[1m[7m[No Name]                                                                                         [m[21;1Hb0VIM 7.4[34m^@^@^@^@^P^@^@^@^@^@^@^@^@^@^@[m0[34m^O^@^@[mroot[34m^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@@[22;1H^@^@^@^@^@^@^@^@^@^@^@^@[mfrodo[34m^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[23;1H@[m/sources/vim74/src/testdir/Xtest[34m^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[24;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[25;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[26;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[27;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[28;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[29;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[30;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[31;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[32;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[33;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[34;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[35;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[36;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[37;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[38;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^^[39;1H@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^[m[40;1H[7m.Xtest.swp                                                                                        [m[41;1H9993    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[42;1Hstuvwxyz0123456789
9994    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[44;1Hstuvwxyz0123456789
9995    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[46;1Hstuvwxyz0123456789
9996    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[48;1Hstuvwxyz0123456789
9997    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[50;1Hstuvwxyz0123456789
9998    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[52;1Hstuvwxyz0123456789
9999    abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[54;1Hstuvwxyz0123456789
10000   abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[56;1Hstuvwxyz0123456789

[1m[34m~                                                                                                 [m[59;1H[7mXtest [+]                                                                                         [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25honly![?25l[27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hbwipe! Xtest[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall rename('Xswap', swapname)[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hrecover Xtest[?25lUsing swap file ".Xtest.swp"
Original file "/sources/vim74/src/testdir/Xtest"
[59;1H"/sources/vim74/src/testdir/Xtest" [New File][59;46H[K[60;1HRecovery completed. You should check if everything is OK.
(You might want to write out this file under another name
and run diff with the original file to check for changes)
You may want to delete the .swp file now.


[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall delete(swapname)[?25l[1;1H[8L[1;1H1[7Cabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[2;1Hstuvwxyz0123456789
2[7Cabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[4;1Hstuvwxyz0123456789
3[7Cabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[6;1Hstuvwxyz0123456789
4[7Cabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[8;1Hstuvwxyz0123456789
5       abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[10;1Hstuvwxyz0123456789[10;19H[K[11;1H6       abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[12;1Hstuvwxyz0123456789[12;19H[K[13;1H7       abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[14;1Hstuvwxyz0123456789[14;19H[K[15;1H8       abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[16;1Hstuvwxyz0123456789[16;19H[K[17;1H9       abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[18;1Hstuvwxyz0123456789[18;19H[K[19;1H10      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[20;1Hstuvwxyz0123456789[20;19H[K[21;1H11      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[22;1Hstuvwxyz0123456789[22;19H[K[23;1H12      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[24;1Hstuvwxyz0123456789[24;19H[K[25;1H13      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[26;1Hstuvwxyz0123456789[26;19H[K[27;1H14      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[28;1Hstuvwxyz0123456789[28;19H[K[29;1H15      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[30;1Hstuvwxyz0123456789[30;19H[K[31;1H16      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[32;1Hstuvwxyz0123456789[32;19H[K[33;1H17      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[34;1Hstuvwxyz0123456789[34;19H[K[35;1H18      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[36;1Hstuvwxyz0123456789[36;19H[K[37;1H19      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[38;1Hstuvwxyz0123456789[38;19H[K[39;1H20      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[40;1Hstuvwxyz0123456789[40;19H[K[41;1H21      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[42;1Hstuvwxyz0123456789[42;19H[K[43;1H22      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[44;1Hstuvwxyz0123456789[44;19H[K[45;1H23      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[46;1Hstuvwxyz0123456789[46;19H[K[47;1H24      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[48;1Hstuvwxyz0123456789[48;19H[K[49;1H25      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[50;1Hstuvwxyz0123456789[50;19H[K[51;1H26      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[52;1Hstuvwxyz0123456789[52;19H[K[53;1H27      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[54;1Hstuvwxyz0123456789[54;19H[K[55;1H28      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[56;1Hstuvwxyz0123456789[56;19H[K[57;1H29      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparr[58;1Hstuvwxyz0123456789[58;19H[K[59;1H30      abcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopar[59;1H[1m[34m@                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2H [95Crr[32;1Hs
2 [95Crr[34;1Hs
3 [95Crr[36;1Hs
4 [95Crr[38;1Hs
5 [95Crr[40;1Hs
6 [95Crr[42;1Hs
7 [95Crr[44;1Hs
8 [95Crr[46;1Hs
9 [95Crr[48;1Hs
10[95Crr[50;1Hs
11[95Crr[52;1Hs
12[95Crr[54;1Hs
13[95Crr[56;1Hs
14[95Crr[58;1Hs
[7mXtest [+]                                                                                         [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(0, 'recovery start')[?25l[1;29r[1;1H[L[1;60r[1;1Hrecovery start[30;11H[1m[7m[+][m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25hwincmd w[?25l[30;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                     [m[59;1H[1m[7mXtest [+]                                                                                         [31;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet linedollar = line('$')[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " 
[59;98Hl[60;1Hines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif[?25l[1;1H[L[1;1Hrecovery start[60;1H[K[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25hlet i = 1[?25l[31;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwhile i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . '
differs') | exe 'wincmd w' | endif | let i += 1 | endwhile[?25l[1;1H[L[1;1Hrecovery start[60;1H[K[31;1H[?12l[?25h[?25l[60;1H:[?12l[?25hq![?25l[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), 'recovery end')[?25l[3;1Hrecovery end[3;13H[K[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New] 3L, 29C written[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test79.failed test.ok test.out X* viminfo
cp test79.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test79.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test79.in" 226 lines, 2713 characters[1;1HTest for *sub-replace-special* and *sub-replace-expression* on :substitute.
Test for submatch() on :substitue.
Test for *:s%* on :substitute.

STARTTEST
:so small.vim
ENDTEST

Results of test71:

STARTTEST
:set magic
:set cpo&
/^TEST/
j:s/A/&&/
j:s/B/\&/
j:s/C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\0\9\8\7\6\5\4\3\2\1/
j:s/D/d/
j:s/E/~/
j:s/F/\~/
j:s/G/\ugg/
j:s/H/\Uh\Eh/
j:s/I/\lII/
j:s/J/\LJ\EJ/
j:s/K/\Uk\ek/
j:s/L/[34m^V^M[m/
j:s/M/\r/
j:s/N/\[34m^V^M[m/
j:s/O/\n/
j:s/P/\b/
j:s/Q/\t/
j:s/R/\\/
j:s/S/\c/
j:s/T/[34m^V^@[m/
j:s/U/\L\uuUu\l\EU/
j:s/V/\U\lVvV\u\Ev/
ENDTEST

TEST_1:
A
B
C123456789
D
E
F
G
H
I
J
K
lLl
mMm
nNn
oOo
pPp
qQq
rRr
sSs
tTt[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for *sub-replace-special* and *sub-replace-expression* on :substitute.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 1 line, 14 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[7;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[8;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[11;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H25 lines, 347 characters written[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[12;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[37;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[38;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic[?25l[38;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[38;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^TEST/[?25l[60;7H[K[60;1H[39;1H[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/A/&&/[?25l[40;2HA[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/B/\&/[?25l[41;1H&[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\0\9\8\7\6\5\4\3\2\1/[?25l[42;11H987654321[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/D/d/[?25l[43;1Hd[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/E/~/[?25l[44;1Hd[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/F/\~/[?25l[45;1H~[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/G/\ugg/[?25l[46;2Hg[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/H/\Uh\Eh/[?25l[47;2Hh[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/I/\lII/[?25l[48;1HiI[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/J/\LJ\EJ/[?25l[49;1HjJ[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/K/\Uk\ek/[?25l[50;2Hk[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/L/^[34m^M[m/[?25l[52;59r[52;1H[L[1;60r[51;2H[K[52;1Hl[60;1H[K[52;1H[?12l[?25h
[?25l[60;1H:[?12l[?25hs/M/\r/[?25l[54;59r[54;1H[L[1;60r[53;2H[K[54;1Hm[60;1H[K[54;1H[?12l[?25h
[?25l[60;1H:[?12l[?25hs/N/\^[34m^M[m/[?25l[55;2H[34m^M[mn[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/O/\n/[?25l[56;2H[34m^@[mo[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/P/\b/[?25l[57;2H[34m^H[mp[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/Q/\t/[?25l[58;2H       q[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25hs/R/\\/[?25l[59;2H\[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HsSs[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/S/\c/[?25l[59;2Hc[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HtTt[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/T/^[34m^@[m/[?25l[59;2H[34m^@[mt[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HU[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/U/\L\uuUu\l\EU/[?25l[59;2HuuU[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HV[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/V/\U\lVvV\u\Ev/[?25l[59;1HvVVv[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set nomagic[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H25 lines, 351 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[25M[1;60r[35;1H:set cpo&
/^TEST/
j:s/A/&&/
j:s/B/\&/
j:s/\mC\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\0\9\8\7\6\5\4\3\2\1/
j:s/D/d/
j:s/E/~/
j:s/F/\~/
j:s/G/\ugg/
j:s/H/\Uh\Eh/
j:s/I/\lII/
j:s/J/\LJ\EJ/
j:s/K/\Uk\ek/
j:s/L/[34m^V^M[m/
j:s/M/\r/
j:s/N/\[34m^V^M[m/
j:s/O/\n/
j:s/P/\b/
j:s/Q/\t/
j:s/R/\\/
j:s/S/\c/
j:s/T/[34m^V^@[m/
j:s/U/\L\uuUu\l\EU/
j:s/V/\U\lVvV\u\Ev/
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nomagic[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^TEST/[?25l[60;7H[K[60;1H[1;59r[59;1H
[1;60r[59;1HTEST_2:[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HA[?12l[?25h[?25l
:[?12l[?25hs/A/&&/[?25l[59;1H&&[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HB[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/B/\&/[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HC123456789[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\mC\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\0\9\8\7\6\5\4\3\2\1/[?25l[59;11H987654321[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HD[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/D/d/[?25l[59;1Hd[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HE[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/E/~/[?25l[59;1H~[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HF[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/F/\~/[?25l[59;1H~[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HG[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/G/\ugg/[?25l[59;2Hg[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HH[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/H/\Uh\Eh/[?25l[59;2Hh[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HI[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/I/\lII/[?25l[59;1HiI[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HJ[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/J/\LJ\EJ/[?25l[59;1HjJ[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HK[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/K/\Uk\ek/[?25l[59;2Hk[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HlLl[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/L/^[34m^M[m/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hl[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HmMm[?12l[?25h[?25l
:[?12l[?25hs/M/\r/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hm[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HnNn[?12l[?25h[?25l
:[?12l[?25hs/N/\^[34m^M[m/[?25l[59;2H[34m^M[mn[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HoOo[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/O/\n/[?25l[59;2H[34m^@[mo[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HpPp[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/P/\b/[?25l[59;2H[34m^H[mp[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HqQq[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/Q/\t/[?25l[59;2H       q[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HrRr[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/R/\\/[?25l[59;2H\[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HsSs[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/S/\c/[?25l[59;2Hc[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HtTt[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/T/^[34m^@[m/[?25l[59;2H[34m^@[mt[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HU[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/U/\L\uuUu\l\EU/[?25l[59;2HuuU[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HV[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/V/\U\lVvV\u\Ev/[?25l[59;1HvVVv[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set magic&[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H15 lines, 203 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[15M[1;60r[45;1H:set cpo&
/^TEST/
j:s/A/\='\'/
j:s/B/\='\\'/
j:s/C/\='[34m^V^M[m'/
j:s/D/\='\[34m^V^M[m'/
j:s/E/\='\\[34m^V^M[m'/
j:s/F/\='\r'/
j:s/G/\='[34m^V^@[m'/
j:s/H/\='\[34m^V^@[m'/
j:s/I/\='\\[34m^V^@[m'/
j:s/J/\='\n'/
j:s/K/\="\r"/
j:s/L/\="\n"/
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^TEST/[?25l[60;7H[K[60;1H[1;59r[59;1H
[1;60r[59;1HTEST_3:[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HaAa[?12l[?25h[?25l
:[?12l[?25hs/A/\='\'/[?25l[59;2H\[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HbBb[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/B/\='\\'/[?25l[59;2H\\b[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HcCc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/C/\='^[34m^M[m'/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hc[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HdDd[?12l[?25h[?25l
:[?12l[?25hs/D/\='\^[34m^M[m'/[?25l[1;59r[59;1H
[1;60r[58;2H\[58;3H[K[59;1Hd[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HeEe[?12l[?25h[?25l
:[?12l[?25hs/E/\='\\^[34m^M[m'/[?25l[1;59r[59;1H
[1;60r[58;2H\\
e[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HfFf[?12l[?25h[?25l
:[?12l[?25hs/F/\='\r'/[?25l[59;2H\rf[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HgGg[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/G/\='^[34m^@[m'/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hg[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HhHh[?12l[?25h[?25l
:[?12l[?25hs/H/\='\^[34m^@[m'/[?25l[1;59r[59;1H
[1;60r[58;2H\[58;3H[K[59;1Hh[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HiIi[?12l[?25h[?25l
:[?12l[?25hs/I/\='\\^[34m^@[m'/[?25l[1;59r[59;1H
[1;60r[58;2H\\
i[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HjJj[?12l[?25h[?25l
:[?12l[?25hs/J/\='\n'/[?25l[59;2H\nj[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HkKk[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/K/\="\r"/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hk[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HlLl[?12l[?25h[?25l
:[?12l[?25hs/L/\="\n"/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hl[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set magic&[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H15 lines, 611 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[15M[1;60r[45;1H:set cpo&
/^TEST/
j:s/A/\=substitute(submatch(0), '.', '\', '')/
j:s/B/\=substitute(submatch(0), '.', '\\', '')/
j:s/C/\=substitute(submatch(0), '.', '[34m^V^M[m', '')/
j:s/D/\=substitute(submatch(0), '.', '\[34m^V^M[m', '')/
j:s/E/\=substitute(submatch(0), '.', '\\[34m^V^M[m', '')/
j:s/F/\=substitute(submatch(0), '.', '\r', '')/
j:s/G/\=substitute(submatch(0), '.', '[34m^V^@[m', '')/
j:s/H/\=substitute(submatch(0), '.', '\[34m^V^@[m', '')/
j:s/I/\=substitute(submatch(0), '.', '\\[34m^V^@[m', '')/
j:s/J/\=substitute(submatch(0), '.', '\n', '')/
j:s/K/\=substitute(submatch(0), '.', "\r", '')/
j:s/L/\=substitute(submatch(0), '.', "\n", '')/
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^TEST/[?25l[60;7H[K[60;1H[1;59r[59;1H
[1;60r[59;1HTEST_4:[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HaAa[?12l[?25h[?25l
:[?12l[?25hs/A/\=substitute(submatch(0), '.', '\', '')/[?25l[59;2H\[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HbBb[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/B/\=substitute(submatch(0), '.', '\\', '')/[?25l[59;2H\[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HcCc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/C/\=substitute(submatch(0), '.', '^[34m^M[m', '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hc[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HdDd[?12l[?25h[?25l
:[?12l[?25hs/D/\=substitute(submatch(0), '.', '\^[34m^M[m', '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hd[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HeEe[?12l[?25h[?25l
:[?12l[?25hs/E/\=substitute(submatch(0), '.', '\\^[34m^M[m', '')/[?25l[1;59r[59;1H
[1;60r[58;2H\[58;3H[K[59;1He[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HfFf[?12l[?25h[?25l
:[?12l[?25hs/F/\=substitute(submatch(0), '.', '\r', '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hf[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HgGg[?12l[?25h[?25l
:[?12l[?25hs/G/\=substitute(submatch(0), '.', '^[34m^@[m', '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hg[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HhHh[?12l[?25h[?25l
:[?12l[?25hs/H/\=substitute(submatch(0), '.', '\^[34m^@[m', '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hh[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HiIi[?12l[?25h[?25l
:[?12l[?25hs/I/\=substitute(submatch(0), '.', '\\^[34m^@[m', '')/[?25l[1;59r[59;1H
[1;60r[58;2H\[58;3H[K[59;1Hi[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HjJj[?12l[?25h[?25l
:[?12l[?25hs/J/\=substitute(submatch(0), '.', '\n', '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hj[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HkKk[?12l[?25h[?25l
:[?12l[?25hs/K/\=substitute(submatch(0), '.', "\r", '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hk[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HlLl[?12l[?25h[?25l
:[?12l[?25hs/L/\=substitute(submatch(0), '.', "\n", '')/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1Hl[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set magic&[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H4 lines, 222 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[5M[1;60r[55;1H:set cpo&
/^TEST/
j:s/A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\=submatch(0) . submatch(9) . submatch(8) . subb[58;1Hmatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)/
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^TEST/[?25l[60;7H[K[60;1H[1;59r[59;1H
[1;60r[59;1HTEST_5:[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HA123456789[?12l[?25h[?25l
:[?12l[?25hs/A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\=submatch(0) . submatch(9) . submatch(8) . sub
[59;98Hm[60;1Hatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) . submatch(2) . submatch(1)/[?25l[1;1H[L[1;1Hi[59;11H987654321[60;1H[K[59;1H[?12l[?25h[?25l
/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set magic&[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H8 lines, 80 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[8M[1;60r[52;1H/^TEST/
:set cpo+=/
j:s/A/a/
j:s/B/%/
:set cpo-=/
j:s/C/c/
j:s/D/%/
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^TEST/[?25l[60;7H[K[60;1H[1;59r[59;1H
[1;60r[59;1HTEST_6:[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset cpo+=/[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HA[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/A/a/[?25l[59;1Ha[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HB[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/B/%/[?25l[59;1Ha[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo-=/[?25l[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HC[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/C/c/[?25l[59;1Hc[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HD[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/D/%/[?25l[59;1H%[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[2M[1;60r[59;1HSTARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:set magic&[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H8 lines, 164 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[8M[1;60r[52;1H:set cpo&
/^TEST_7/
j:s/A./\=submatch(0)/
j:s/B./\=submatch(0)/
/^Q$
:s/Q[^\n]Q/\=submatch(0)."foobar"/
:" Avoid :s error breaks dotest map on Windows.
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^TEST_7/[?25l[60;9H[K[60;1H[1;59r[59;1H
[1;60r[59;1HTEST_7:[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HA[34m^M[mA[?12l[?25h[?25l
:[?12l[?25hs/A./\=submatch(0)/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1HA[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1HB[34m^@[mB[?12l[?25h[?25l
:[?12l[?25hs/B./\=submatch(0)/[?25l[1;59r[59;1H
[1;60r[58;2H[K[59;1HB[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^Q$[?25l[1;59r[59;1H
[1;60r[59;1HQ[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/Q[^\n]Q/\=submatch(0)."foobar"/[?25l[1m[37m[41mE486: Pattern not found: Q[^\n]Q[m[60;33H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Avoid :s error breaks dotest map on Windows.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[1;59r[1;1H[3M[1;60r[57;1HQ

STARTTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:g/^STARTTEST/.,/^ENDTEST/d[?12l[?25h[?25l
:set ff=unix cpo-=A[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H2 lines, 56 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[59;1H[?12l[?25h[?25l
/ENDTEST[60;10H[K[60;1H[59;19H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H:1;/^Results/,$wq! test.out[60;1H[K[59;19H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l121 fewer lines[60;16H[K[1;1He[1;2H[K[2;1Hf\rf
g
g
h\
h
i\\
i
j\nj
k[10;2H[K[11;1Hk[11;2H[K[12;1Hl[12;2H[K[13;1Hl[13;2H[K[14;1H[K[15;1H[K[16;1HTEST_4:
a\a
b\b[18;4H[K[19;1Hc[19;2H[K[20;1Hc
d[21;2H[K[22;1Hd[22;2H[K[23;1He\[23;3H[K[24;1He[24;2H[K[25;1Hf[25;2H[K[26;1Hf[26;2H[K[27;1Hg[27;2H[K[28;1Hg[28;2H[K[29;1Hh[29;2H[K[30;1Hh[30;2H[K[31;1Hi\
i[32;2H[K[33;1Hj
j
k
k
l
l[38;2H[K[39;1H[K[40;1H[K[41;1HTEST_5:[41;8H[K[42;1HA123456789987654321[42;20H[K[43;1H[K[44;1H[K[45;1HTEST_6:[45;8H[K[46;1Ha[46;2H[K[47;1Ha[47;2H[K[48;1Hc
%[49;2H[K[50;1H[K[51;1H[K[52;1HTEST_7:
A
A
B
B
Q[57;2H[K[58;1HQ[58;2H[K[59;1H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h1;/^Results/,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 124 lines, 421 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test80.failed test.ok test.out X* viminfo
cp test80.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test80.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test80.in" 180 lines, 5272 characters[1;1HTest for *sub-replace-special* and *sub-replace-expression* on substitue().
Test for submatch() on substitue().
Test for *:s%* on :substitute.

STARTTEST
:so small.vim
ENDTEST

TEST_1:

STARTTEST
:set magic
:set cpo&
:$put =\"\n\nTEST_1:\"
:$put =substitute('A', 'A', '&&', '')
:$put =substitute('B', 'B', '\&', '')
:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\\[18;1H3\2\1', '')
:$put =substitute('D', 'D', 'd', '')
:$put =substitute('E', 'E', '~', '')
:$put =substitute('F', 'F', '\~', '')
:$put =substitute('G', 'G', '\ugg', '')
:$put =substitute('H', 'H', '\Uh\Eh', '')
:$put =substitute('I', 'I', '\lII', '')
:$put =substitute('J', 'J', '\LJ\EJ', '')
:$put =substitute('K', 'K', '\Uk\ek', '')
:$put =substitute('lLl', 'L', '[34m^V^M[m', '')
:$put =substitute('mMm', 'M', '\r', '')
:$put =substitute('nNn', 'N', '\[34m^V^M[m', '')
:$put =substitute('oOo', 'O', '\n', '')
:$put =substitute('pPp', 'P', '\b', '')
:$put =substitute('qQq', 'Q', '\t', '')
:$put =substitute('rRr', 'R', '\\', '')
:$put =substitute('sSs', 'S', '\c', '')
:$put =substitute('uUu', 'U', \"\n\", '')
:$put =substitute('vVv', 'V', \"\b\", '')
:$put =substitute('wWw', 'W', \"\\\", '')
:$put =substitute('xXx', 'X', \"\r\", '')
:$put =substitute('Y', 'Y', '\L\uyYy\l\EY', '')
:$put =substitute('Z', 'Z', '\U\lZzZ\u\Ez', '')
/^TEST_2
ENDTEST

TEST_2:

STARTTEST
:set nomagic
:set cpo&
:$put =\"\n\nTEST_2:\"
:$put =substitute('A', 'A', '&&', '')
:$put =substitute('B', 'B', '\&', '')
:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\\[53;1H3\2\1', '')
:$put =substitute('D', 'D', 'd', '')
:$put =substitute('E', 'E', '~', '')
:$put =substitute('F', 'F', '\~', '')
:$put =substitute('G', 'G', '\ugg', '')
:$put =substitute('H', 'H', '\Uh\Eh', '')
:$put =substitute('I', 'I', '\lII', '')[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for *sub-replace-special* and *sub-replace-expression* on substitue().[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 1 line, 14 characters written[6;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[7;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[8;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[11;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H29 lines, 1142 characters written[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[12;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[42;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_1:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1HSTARTTEST
:set magic&
:$put =\"\n\nTEST_6:\"
:set cpo+=/
:$put =substitute('A', 'A', 'a', '')
:$put =substitute('B', 'B', '%', '')
:set cpo-=/
:$put =substitute('C', 'C', 'c', '')
:$put =substitute('D', 'D', '%', '')
/^TEST_7
ENDTEST

TEST_7:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_7:\"
:$put =substitute('A[34m^V^M[mA', 'A.', '\=submatch(0)', '')
:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
/^TEST_8
ENDTEST

TEST_8:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_8:\"
:$put =',,X'
:s/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'
:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:
ENDTEST

TEST_9:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_9:\"
:$put ='xxx'
:s/x/X/gc
yyq/^TEST_10:
ENDTEST

TEST_10:

STARTTEST
:/^Results/,$wq! test.out
ENDTEST

Results of test72:


TEST_1:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =substitute('A', 'A', '&&', '')[?25l[1;59r[59;1H
[1;60r[59;1HAA[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('B', 'B', '\&', '')[?25l[1;59r[59;1H
[1;60r[59;1H&[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4
[59;98H\[60;1H3\2\1', '')[?25l[1;1H[L[1;1H:set cpo+=/
:$put =substitute('A', 'A', 'a', '')[3;20HB', 'B', '%
:set cpo-=/[4;12H[K[5;2H$put =substitute('C', 'C', 'c', '')[6;20HD', 'D', '%
/^TEST_7[7;9H[K[8;1HENDTEST[8;8H[K[9;1H[K[10;1HTEST_7:[11;1H[K[12;1HSTARTTEST
:set magic&[14;6Hcpo&[14;10H[K[15;2H$put =\"\n\nTEST_7:\"[16;8Hsubstitute('A[34m^V^M[mA', 'A.', '\=submatch(0)', '')[17;19H\"B\nB\", 'B
/^TEST_8[18;9H[K[19;1HENDTEST[19;8H[K[20;1H[K[21;1HTEST_8:[22;1H[K[23;1HSTARTTEST
:set magic&[25;6Hcpo&[25;10H[K[26;2H$put =\"\n\nTEST_8:\"[27;8H',,X'[27;13H[K[28;2Hs/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'[29;13H[K[30;2Hs/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'[31;14H[K[32;1H:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:[33;12H[K[34;1HENDTEST[34;8H[K[35;1H[K[36;1HTEST_9:[37;1H[K[38;1HSTARTTEST
:set magic&[40;6Hcpo&[40;10H[K[41;2H$put =\"\n\nTEST_9:\"[42;8H'xxx'[42;13H[K[43;2Hs/x/X/gc[43;10H[K[44;1Hyyq/^TEST_10:
ENDTEST[45;8H[K[46;1H[K[47;1HTEST_10:[48;1H[K[49;1HSTARTTEST
:/^Results/,$wq! test.out
ENDTEST[51;8H[K[52;1H[K[53;1HResults of test72:[54;1H[K[56;1HTEST_1:
AA[57;3H[K[58;1H&[58;2H[K[59;1HC123456789987654321[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('D', 'D', 'd', '')[?25l[1;59r[59;1H
[1;60r[59;1Hd[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('E', 'E', '~', '')[?25l[1;59r[59;1H
[1;60r[59;1H~[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('F', 'F', '\~', '')[?25l[1;59r[59;1H
[1;60r[59;1H~[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('G', 'G', '\ugg', '')[?25l[1;59r[59;1H
[1;60r[59;1HGg[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('H', 'H', '\Uh\Eh', '')[?25l[1;59r[59;1H
[1;60r[59;1HHh[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('I', 'I', '\lII', '')[?25l[1;59r[59;1H
[1;60r[59;1HiI[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('J', 'J', '\LJ\EJ', '')[?25l[1;59r[59;1H
[1;60r[59;1HjJ[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('K', 'K', '\Uk\ek', '')[?25l[1;59r[59;1H
[1;60r[59;1HKk[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('lLl', 'L', '^[34m^M[m', '')[?25l[1;59r[59;1H
[1;60r[59;1Hl[34m^M[ml[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('mMm', 'M', '\r', '')[?25l[1;59r[59;1H
[1;60r[59;1Hm[34m^M[mm[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('nNn', 'N', '\^[34m^M[m', '')[?25l[1;59r[59;1H
[1;60r[59;1Hn[34m^M[mn[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('oOo', 'O', '\n', '')[?25l[1;59r[1;1H[2M[1;60r[58;1Ho
o[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('pPp', 'P', '\b', '')[?25l[1;59r[59;1H
[1;60r[59;1Hp[34m^H[mp[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('qQq', 'Q', '\t', '')[?25l[1;59r[59;1H
[1;60r[59;1Hq[7Cq[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('rRr', 'R', '\\', '')[?25l[1;59r[59;1H
[1;60r[59;1Hr\r[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('sSs', 'S', '\c', '')[?25l[1;59r[59;1H
[1;60r[59;1Hscs[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('uUu', 'U', \"\n\", '')[?25l[1;59r[1;1H[2M[1;60r[58;1Hu
u[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('vVv', 'V', \"\b\", '')[?25l[1;59r[59;1H
[1;60r[59;1Hv[34m^H[mv[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('wWw', 'W', \"\\\", '')[?25l[1;59r[59;1H
[1;60r[59;1Hw\w[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('xXx', 'X', \"\r\", '')[?25l[1;59r[59;1H
[1;60r[59;1Hx[34m^M[mx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('Y', 'Y', '\L\uyYy\l\EY', '')[?25l[1;59r[59;1H
[1;60r[59;1HYyyY[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('Z', 'Z', '\U\lZzZ\u\Ez', '')[?25l[1;59r[59;1H
[1;60r[59;1HzZZz[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^TEST_2[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H:$put =substitute('A', 'A', '&&', '')
:$put =substitute('B', 'B', '\&', '')
:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\\[4;1H3\2\1', '')
:$put =substitute('D', 'D', 'd', '')
:$put =substitute('E', 'E', '~', '')
:$put =substitute('F', 'F', '\~', '')
:$put =substitute('G', 'G', '\ugg', '')
:$put =substitute('H', 'H', '\Uh\Eh', '')
:$put =substitute('I', 'I', '\lII', '')
:$put =substitute('J', 'J', '\LJ\EJ', '')
:$put =substitute('K', 'K', '\Uk\ek', '')
:$put =substitute('lLl', 'L', '[34m^V^M[m', '')
:$put =substitute('mMm', 'M', '\r', '')
:$put =substitute('nNn', 'N', '\[34m^V^M[m', '')
:$put =substitute('oOo', 'O', '\n', '')
:$put =substitute('pPp', 'P', '\b', '')
:$put =substitute('qQq', 'Q', '\t', '')
:$put =substitute('rRr', 'R', '\\', '')
:$put =substitute('sSs', 'S', '\c', '')
:$put =substitute('uUu', 'U', \"\n\", '')
:$put =substitute('vVv', 'V', \"\b\", '')
:$put =substitute('wWw', 'W', \"\\\", '')
:$put =substitute('xXx', 'X', \"\r\", '')
:$put =substitute('Y', 'Y', '\L\uyYy\l\EY', '')
:$put =substitute('Z', 'Z', '\U\lZzZ\u\Ez', '')
/^TEST_2
ENDTEST

TEST_2:

STARTTEST
:set nomagic
:set cpo&
:$put =\"\n\nTEST_2:\"
:$put =substitute('A', 'A', '&&', '')
:$put =substitute('B', 'B', '\&', '')
:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\\[39;1H3\2\1', '')
:$put =substitute('D', 'D', 'd', '')
:$put =substitute('E', 'E', '~', '')
:$put =substitute('F', 'F', '\~', '')
:$put =substitute('G', 'G', '\ugg', '')
:$put =substitute('H', 'H', '\Uh\Eh', '')
:$put =substitute('I', 'I', '\lII', '')
:$put =substitute('J', 'J', '\LJ\EJ', '')
:$put =substitute('K', 'K', '\Uk\ek', '')
:$put =substitute('lLl', 'L', '[34m^V^M[m', '')
:$put =substitute('mMm', 'M', '\r', '')
:$put =substitute('nNn', 'N', '\[34m^V^M[m', '')
:$put =substitute('oOo', 'O', '\n', '')
:$put =substitute('pPp', 'P', '\b', '')
:$put =substitute('qQq', 'Q', '\t', '')
:$put =substitute('rRr', 'R', '\\', '')
:$put =substitute('sSs', 'S', '\c', '')
:$put =substitute('tTt', 'T', \"\r\", '')
:$put =substitute('uUu', 'U', \"\n\", '')
:$put =substitute('vVv', 'V', \"\b\", '')
:$put =substitute('wWw', 'W', \"\\\", '')
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H29 lines, 1144 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[4M[1;60r[56;1H:$put =substitute('X', 'X', '\L\uxXx\l\EX', '')
:$put =substitute('Y', 'Y', '\U\lYyY\u\Ey', '')
/^TEST_3
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nomagic[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_2:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1H:s/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'
:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:
ENDTEST

TEST_9:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_9:\"
:$put ='xxx'
:s/x/X/gc
yyq/^TEST_10:
ENDTEST

TEST_10:

STARTTEST
:/^Results/,$wq! test.out
ENDTEST

Results of test72:


TEST_1:
AA
&
C123456789987654321
d
~
~
Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
u
u
v[34m^H[mv
w\w
x[34m^M[mx
YyyY
zZZz


TEST_2:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =substitute('A', 'A', '&&', '')[?25l[1;59r[59;1H
[1;60r[59;1HAA[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('B', 'B', '\&', '')[?25l[1;59r[59;1H
[1;60r[59;1H&[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4
[59;98H\[60;1H3\2\1', '')[?25l[1;1H[L[1;1Ha:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:[3;12H[K[4;1HENDTEST[4;8H[K[5;1H[K[6;1HTEST_9:[7;1H[K[8;1HSTARTTEST
:set magic&[10;6Hcpo&[10;10H[K[11;2H$put =\"\n\nTEST_9:\"[12;8H'xxx'[12;13H[K[13;2Hs/x/X/gc[13;10H[K[14;1Hyyq/^TEST_10:
ENDTEST[15;8H[K[16;1H[K[17;1HTEST_10:[18;1H[K[19;1HSTARTTEST
:/^Results/,$wq! test.out
ENDTEST[21;8H[K[22;1H[K[23;1HResults of test72:[24;1H[K[26;1HTEST_1:
AA[27;3H[K[28;1H&[28;2H[K[29;1HC123456789987654321
d[30;2H[K[31;1H~

Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[2Cm
n[2Cn
o[41;2H[K[43;1Hp[34m^H[mp
q       q
r\r[45;9H[K[46;1Hscs
u[47;2H[K[49;1Hv[34m^H[mv
w\w[50;4H[K[51;1Hx[34m^M[mx
YyyY
zZZz[54;1H[K[56;1HTEST_2:
AA[57;3H[K[58;1H&[58;2H[K[59;1HC123456789987654321[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('D', 'D', 'd', '')[?25l[1;59r[59;1H
[1;60r[59;1Hd[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('E', 'E', '~', '')[?25l[1;59r[59;1H
[1;60r[59;1H~[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('F', 'F', '\~', '')[?25l[1;59r[59;1H
[1;60r[59;1H~[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('G', 'G', '\ugg', '')[?25l[1;59r[59;1H
[1;60r[59;1HGg[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('H', 'H', '\Uh\Eh', '')[?25l[1;59r[59;1H
[1;60r[59;1HHh[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('I', 'I', '\lII', '')[?25l[1;59r[59;1H
[1;60r[59;1HiI[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('J', 'J', '\LJ\EJ', '')[?25l[1;59r[59;1H
[1;60r[59;1HjJ[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('K', 'K', '\Uk\ek', '')[?25l[1;59r[59;1H
[1;60r[59;1HKk[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('lLl', 'L', '^[34m^M[m', '')[?25l[1;59r[59;1H
[1;60r[59;1Hl[34m^M[ml[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('mMm', 'M', '\r', '')[?25l[1;59r[59;1H
[1;60r[59;1Hm[34m^M[mm[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('nNn', 'N', '\^[34m^M[m', '')[?25l[1;59r[59;1H
[1;60r[59;1Hn[34m^M[mn[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('oOo', 'O', '\n', '')[?25l[1;59r[1;1H[2M[1;60r[58;1Ho
o[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('pPp', 'P', '\b', '')[?25l[1;59r[59;1H
[1;60r[59;1Hp[34m^H[mp[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('qQq', 'Q', '\t', '')[?25l[1;59r[59;1H
[1;60r[59;1Hq[7Cq[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('rRr', 'R', '\\', '')[?25l[1;59r[59;1H
[1;60r[59;1Hr\r[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('sSs', 'S', '\c', '')[?25l[1;59r[59;1H
[1;60r[59;1Hscs[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('tTt', 'T', \"\r\", '')[?25l[1;59r[59;1H
[1;60r[59;1Ht[34m^M[mt[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('uUu', 'U', \"\n\", '')[?25l[1;59r[1;1H[2M[1;60r[58;1Hu
u[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('vVv', 'V', \"\b\", '')[?25l[1;59r[59;1H
[1;60r[59;1Hv[34m^H[mv[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('wWw', 'W', \"\\\", '')[?25l[1;59r[59;1H
[1;60r[59;1Hw\w[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('X', 'X', '\L\uxXx\l\EX', '')[?25l[1;59r[59;1H
[1;60r[59;1HXxxX[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('Y', 'Y', '\U\lYyY\u\Ey', '')[?25l[1;59r[59;1H
[1;60r[59;1HyYYy[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^TEST_3[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H:$put =substitute('A', 'A', '&&', '')
:$put =substitute('B', 'B', '\&', '')
:$put =substitute('C123456789', 'C\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\0\9\8\7\6\5\4\\[4;1H3\2\1', '')
:$put =substitute('D', 'D', 'd', '')
:$put =substitute('E', 'E', '~', '')
:$put =substitute('F', 'F', '\~', '')
:$put =substitute('G', 'G', '\ugg', '')
:$put =substitute('H', 'H', '\Uh\Eh', '')
:$put =substitute('I', 'I', '\lII', '')
:$put =substitute('J', 'J', '\LJ\EJ', '')
:$put =substitute('K', 'K', '\Uk\ek', '')
:$put =substitute('lLl', 'L', '[34m^V^M[m', '')
:$put =substitute('mMm', 'M', '\r', '')
:$put =substitute('nNn', 'N', '\[34m^V^M[m', '')
:$put =substitute('oOo', 'O', '\n', '')
:$put =substitute('pPp', 'P', '\b', '')
:$put =substitute('qQq', 'Q', '\t', '')
:$put =substitute('rRr', 'R', '\\', '')
:$put =substitute('sSs', 'S', '\c', '')
:$put =substitute('tTt', 'T', \"\r\", '')
:$put =substitute('uUu', 'U', \"\n\", '')
:$put =substitute('vVv', 'V', \"\b\", '')
:$put =substitute('wWw', 'W', \"\\\", '')
:$put =substitute('X', 'X', '\L\uxXx\l\EX', '')
:$put =substitute('Y', 'Y', '\U\lYyY\u\Ey', '')
/^TEST_3
ENDTEST

TEST_3:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_3:\"
:let y = substitute('aAa', 'A', '\="\\"', '')[11C| $put =y
:let y = substitute('bBb', 'B', '\="\\\\"', '')[9C| $put =y
:let y = substitute('cCc', 'C', '\="[34m^V^M[m"', '')[9C| $put =y
:let y = substitute('dDd', 'D', '\="\\[34m^V^M[m"', '')[7C| $put =y
:let y = substitute('eEe', 'E', '\="\\\\[34m^V^M[m"', '')     | $put =y
:let y = substitute('fFf', 'F', '\="\\r"', '')[10C| $put =y
:let y = substitute('jJj', 'J', '\="\\n"', '')[10C| $put =y
:let y = substitute('kKk', 'K', '\="\r"', '')[11C| $put =y
:let y = substitute('lLl', 'L', '\="\n"', '')[11C| $put =y
/^TEST_4
ENDTEST

TEST_4:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_4:\"
:let y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '')[7C| $put =y
:let y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '')     | $put =y
:let y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", "[34m^V^M[m", "")', '')     | $put =y
:let y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\[34m^V^M[m", "")', '')   | $put =y
:let y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\[34m^V^M[m", "")', '') | $put =y
:let y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '')      | $put =y
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H13 lines, 642 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[46;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_3:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1H&
C123456789987654321
d
~
~
Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
u
u
v[34m^H[mv
w\w
x[34m^M[mx
YyyY
zZZz


TEST_2:
AA
&
C123456789987654321
d
~
~
Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
t[34m^M[mt
u
u
v[34m^H[mv
w\w
XxxX
yYYy


TEST_3:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet y = substitute('aAa', 'A', '\="\\"', '')           | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Ha\a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('bBb', 'B', '\="\\\\"', '')         | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hb\\b[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('cCc', 'C', '\="^[34m^M[m"', '')         | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hc[34m^M[mc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('dDd', 'D', '\="\\^[34m^M[m"', '')       | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hd\[34m^M[md[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('eEe', 'E', '\="\\\\^[34m^M[m"', '')     | $put =y[?25l[1;59r[59;1H
[1;60r[59;1He\\[34m^M[me[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('fFf', 'F', '\="\\r"', '')          | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hf\rf[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('jJj', 'J', '\="\\n"', '')          | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hj\nj[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('kKk', 'K', '\="\r"', '')           | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hk[34m^M[mk[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('lLl', 'L', '\="\n"', '')           | $put =y[?25l[1;59r[1;1H[2M[1;60r[58;1Hl
l[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^TEST_4[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H:$put =substitute('rRr', 'R', '\\', '')
:$put =substitute('sSs', 'S', '\c', '')
:$put =substitute('tTt', 'T', \"\r\", '')
:$put =substitute('uUu', 'U', \"\n\", '')
:$put =substitute('vVv', 'V', \"\b\", '')
:$put =substitute('wWw', 'W', \"\\\", '')
:$put =substitute('X', 'X', '\L\uxXx\l\EX', '')
:$put =substitute('Y', 'Y', '\U\lYyY\u\Ey', '')
/^TEST_3
ENDTEST

TEST_3:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_3:\"
:let y = substitute('aAa', 'A', '\="\\"', '')[11C| $put =y
:let y = substitute('bBb', 'B', '\="\\\\"', '')[9C| $put =y
:let y = substitute('cCc', 'C', '\="[34m^V^M[m"', '')[9C| $put =y
:let y = substitute('dDd', 'D', '\="\\[34m^V^M[m"', '')[7C| $put =y
:let y = substitute('eEe', 'E', '\="\\\\[34m^V^M[m"', '')     | $put =y
:let y = substitute('fFf', 'F', '\="\\r"', '')[10C| $put =y
:let y = substitute('jJj', 'J', '\="\\n"', '')[10C| $put =y
:let y = substitute('kKk', 'K', '\="\r"', '')[11C| $put =y
:let y = substitute('lLl', 'L', '\="\n"', '')[11C| $put =y
/^TEST_4
ENDTEST

TEST_4:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_4:\"
:let y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '')[7C| $put =y
:let y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '')     | $put =y
:let y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", "[34m^V^M[m", "")', '')     | $put =y
:let y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\[34m^V^M[m", "")', '')   | $put =y
:let y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\[34m^V^M[m", "")', '') | $put =y
:let y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '')      | $put =y
:let y = substitute('jJj', 'J', '\=substitute(submatch(0), ".", "\\n", "")', '')      | $put =y
:let y = substitute('kKk', 'K', '\=substitute(submatch(0), ".", "\r", "")', '')[7C| $put =y
:let y = substitute('lLl', 'L', '\=substitute(submatch(0), ".", "\n", "")', '')[7C| $put =y
/^TEST_5
ENDTEST

TEST_5:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_5:\"
:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) ..[55;1H submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) ..[56;1H submatch(2) . submatch(1)', '')
/^TEST_6
ENDTEST

[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H13 lines, 912 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[46;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[47;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_4:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1Ho
o
p[34m^H[mp
q[7Cq
r\r
scs
u
u
v[34m^H[mv
w\w
x[34m^M[mx
YyyY
zZZz


TEST_2:
AA
&
C123456789987654321
d
~
~
Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
t[34m^M[mt
u
u
v[34m^H[mv
w\w
XxxX
yYYy


TEST_3:
a\a
b\\b
c[34m^M[mc
d\[34m^M[md
e\\[34m^M[me
f\rf
j\nj
k[34m^M[mk
l
l


TEST_4:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '')       | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Ha\a[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '')     | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hb\b[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", "^[34m^M[m", "")', '')     | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hc[34m^M[mc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\^[34m^M[m", "")', '')   | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hd[34m^M[md[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\^[34m^M[m", "")', '') | $put =y[?25l[1;59r[59;1H
[1;60r[59;1He\[34m^M[me[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '')      | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hf[34m^M[mf[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('jJj', 'J', '\=substitute(submatch(0), ".", "\\n", "")', '')      | $put =y[?25l[1;59r[1;1H[2M[1;60r[58;1Hj
j[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('kKk', 'K', '\=substitute(submatch(0), ".", "\r", "")', '')       | $put =y[?25l[1;59r[59;1H
[1;60r[59;1Hk[34m^M[mk[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hlet y = substitute('lLl', 'L', '\=substitute(submatch(0), ".", "\n", "")', '')       | $put =y[?25l[1;59r[1;1H[2M[1;60r[58;1Hl
l[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^TEST_5[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H:let y = substitute('bBb', 'B', '\="\\\\"', '')[9C| $put =y
:let y = substitute('cCc', 'C', '\="[34m^V^M[m"', '')[9C| $put =y
:let y = substitute('dDd', 'D', '\="\\[34m^V^M[m"', '')[7C| $put =y
:let y = substitute('eEe', 'E', '\="\\\\[34m^V^M[m"', '')     | $put =y
:let y = substitute('fFf', 'F', '\="\\r"', '')[10C| $put =y
:let y = substitute('jJj', 'J', '\="\\n"', '')[10C| $put =y
:let y = substitute('kKk', 'K', '\="\r"', '')[11C| $put =y
:let y = substitute('lLl', 'L', '\="\n"', '')[11C| $put =y
/^TEST_4
ENDTEST

TEST_4:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_4:\"
:let y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '')[7C| $put =y
:let y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '')     | $put =y
:let y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", "[34m^V^M[m", "")', '')     | $put =y
:let y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\[34m^V^M[m", "")', '')   | $put =y
:let y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\[34m^V^M[m", "")', '') | $put =y
:let y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '')      | $put =y
:let y = substitute('jJj', 'J', '\=substitute(submatch(0), ".", "\\n", "")', '')      | $put =y
:let y = substitute('kKk', 'K', '\=substitute(submatch(0), ".", "\r", "")', '')[7C| $put =y
:let y = substitute('lLl', 'L', '\=substitute(submatch(0), ".", "\n", "")', '')[7C| $put =y
/^TEST_5
ENDTEST

TEST_5:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_5:\"
:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) ..[37;1H submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) ..[38;1H submatch(2) . submatch(1)', '')
/^TEST_6
ENDTEST

TEST_6:

STARTTEST
:set magic&
:$put =\"\n\nTEST_6:\"
:set cpo+=/
:$put =substitute('A', 'A', 'a', '')
:$put =substitute('B', 'B', '%', '')
:set cpo-=/
:$put =substitute('C', 'C', 'c', '')
:$put =substitute('D', 'D', '%', '')
/^TEST_7
ENDTEST

TEST_7:

STARTTEST
:set magic&
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H5 lines, 283 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[40;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[41;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[41;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[41;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_5:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[2;1HTEST_2:
AA
&
C123456789987654321
d
~
~
Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
t[34m^M[mt
u
u
v[34m^H[mv
w\w
XxxX
yYYy


TEST_3:
a\a
b\\b
c[34m^M[mc
d\[34m^M[md
e\\[34m^M[me
f\rf
j\nj
k[34m^M[mk
l
l


TEST_4:
a\a
b\b
c[34m^M[mc
d[34m^M[md
e\[34m^M[me
f[34m^M[mf
j
j
k[34m^M[mk
l
l


TEST_5:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) 
[59;98H.[60;1H submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) 
[59;98H.[60;1H submatch(2) . submatch(1)', '')[?25l[1;1H[2L[1;1HTEST_2:
AA
&[3;2H[K[4;1HC123456789987654321
d[5;2H[K[6;1H~

Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[2Cm
n[2Cn
o[16;2H[K[18;1Hp[34m^H[mp
q       q
r\r[20;9H[K[21;1Hscs
t[34m^M[mt
u[23;2H[K[25;1Hv[34m^H[mv
w\w[26;4H[K[27;1HXxxX
yYYy[29;1H[K[31;1HTEST_3:
a\a[32;4H[K[33;1Hb\\b
c[34m^M[mc
d\[34m^M[md
e\\[34m^M[me
f\rf[37;5H[K[38;1Hj\nj
k[34m^M[mk
l[40;2H[K[42;1H[K[44;1HTEST_4:
a\a[45;4H[K[46;1Hb\b
c[34m^M[mc
d[2Cd
e\[34m^M[me
f[34m^M[mf[50;5H[K[51;1Hj[51;2H[K[53;1Hk[34m^M[mk
l[54;2H[K[56;1H[K[58;1HTEST_5:
A123456789987654321[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^TEST_6[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[2;1HSTARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_4:\"
:let y = substitute('aAa', 'A', '\=substitute(submatch(0), ".", "\\", "")', '')[7C| $put =y
:let y = substitute('bBb', 'B', '\=substitute(submatch(0), ".", "\\\\", "")', '')     | $put =y
:let y = substitute('cCc', 'C', '\=substitute(submatch(0), ".", "[34m^V^M[m", "")', '')     | $put =y
:let y = substitute('dDd', 'D', '\=substitute(submatch(0), ".", "\\[34m^V^M[m", "")', '')   | $put =y
:let y = substitute('eEe', 'E', '\=substitute(submatch(0), ".", "\\\\[34m^V^M[m", "")', '') | $put =y
:let y = substitute('fFf', 'F', '\=substitute(submatch(0), ".", "\\r", "")', '')      | $put =y
:let y = substitute('jJj', 'J', '\=substitute(submatch(0), ".", "\\n", "")', '')      | $put =y
:let y = substitute('kKk', 'K', '\=substitute(submatch(0), ".", "\r", "")', '')[7C| $put =y
:let y = substitute('lLl', 'L', '\=substitute(submatch(0), ".", "\n", "")', '')[7C| $put =y
/^TEST_5
ENDTEST

TEST_5:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_5:\"
:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) ..[25;1H submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) ..[26;1H submatch(2) . submatch(1)', '')
/^TEST_6
ENDTEST

TEST_6:

STARTTEST
:set magic&
:$put =\"\n\nTEST_6:\"
:set cpo+=/
:$put =substitute('A', 'A', 'a', '')
:$put =substitute('B', 'B', '%', '')
:set cpo-=/
:$put =substitute('C', 'C', 'c', '')
:$put =substitute('D', 'D', '%', '')
/^TEST_7
ENDTEST

TEST_7:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_7:\"
:$put =substitute('A[34m^V^M[mA', 'A.', '\=submatch(0)', '')
:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
/^TEST_8
ENDTEST

TEST_8:

STARTTEST
:set magic&
:set cpo&
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H9 lines, 216 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[42;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_6:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1HC123456789987654321
d
~
~
Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
t[34m^M[mt
u
u
v[34m^H[mv
w\w
XxxX
yYYy


TEST_3:
a\a
b\\b
c[34m^M[mc
d\[34m^M[md
e\\[34m^M[me
f\rf
j\nj
k[34m^M[mk
l
l


TEST_4:
a\a
b\b
c[34m^M[mc
d[34m^M[md
e\[34m^M[me
f[34m^M[mf
j
j
k[34m^M[mk
l
l


TEST_5:
A123456789987654321


TEST_6:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo+=/[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =substitute('A', 'A', 'a', '')[?25l[1;59r[59;1H
[1;60r[59;1Ha[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('B', 'B', '%', '')[?25l[1;59r[59;1H
[1;60r[59;1H%[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset cpo-=/[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =substitute('C', 'C', 'c', '')[?25l[1;59r[59;1H
[1;60r[59;1Hc[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute('D', 'D', '%', '')[?25l[1;59r[59;1H
[1;60r[59;1H%[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^TEST_7[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H/^TEST_5
ENDTEST

TEST_5:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_5:\"
:$put =substitute('A123456789', 'A\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)', '\=submatch(0) ..[11;1H submatch(9) . submatch(8) . submatch(7) . submatch(6) . submatch(5) . submatch(4) . submatch(3) ..[12;1H submatch(2) . submatch(1)', '')
/^TEST_6
ENDTEST

TEST_6:

STARTTEST
:set magic&
:$put =\"\n\nTEST_6:\"
:set cpo+=/
:$put =substitute('A', 'A', 'a', '')
:$put =substitute('B', 'B', '%', '')
:set cpo-=/
:$put =substitute('C', 'C', 'c', '')
:$put =substitute('D', 'D', '%', '')
/^TEST_7
ENDTEST

TEST_7:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_7:\"
:$put =substitute('A[34m^V^M[mA', 'A.', '\=submatch(0)', '')
:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
/^TEST_8
ENDTEST

TEST_8:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_8:\"
:$put =',,X'
:s/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'
:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:
ENDTEST

TEST_9:

STARTTEST
:set magic&
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H6 lines, 162 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[39;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_7:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1HjJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
t[34m^M[mt
u
u
v[34m^H[mv
w\w
XxxX
yYYy


TEST_3:
a\a
b\\b
c[34m^M[mc
d\[34m^M[md
e\\[34m^M[me
f\rf
j\nj
k[34m^M[mk
l
l


TEST_4:
a\a
b\b
c[34m^M[mc
d[34m^M[md
e\[34m^M[me
f[34m^M[mf
j
j
k[34m^M[mk
l
l


TEST_5:
A123456789987654321


TEST_6:
a
%
c
%


TEST_7:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =substitute('A^[34m^M[mA', 'A.', '\=submatch(0)', '')[?25l[1;59r[59;1H
[1;60r[59;1HA[34m^M[mA[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')[?25l[1;59r[1;1H[2M[1;60r[58;1HB
B[60;1H[K[59;1H[?12l[?25h[?25l
/[?12l[?25h^TEST_8[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H/^TEST_6
ENDTEST

TEST_6:

STARTTEST
:set magic&
:$put =\"\n\nTEST_6:\"
:set cpo+=/
:$put =substitute('A', 'A', 'a', '')
:$put =substitute('B', 'B', '%', '')
:set cpo-=/
:$put =substitute('C', 'C', 'c', '')
:$put =substitute('D', 'D', '%', '')
/^TEST_7
ENDTEST

TEST_7:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_7:\"
:$put =substitute('A[34m^V^M[mA', 'A.', '\=submatch(0)', '')
:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
/^TEST_8
ENDTEST

TEST_8:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_8:\"
:$put =',,X'
:s/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'
:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:
ENDTEST

TEST_9:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_9:\"
:$put ='xxx'
:s/x/X/gc
yyq/^TEST_10:
ENDTEST

TEST_10:

STARTTEST
:/^Results/,$wq! test.out
ENDTEST
[31msearch hit BOTTOM, continuing at TOP[29;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[31;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H10 lines, 186 characters written[32;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[32;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[42;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[43;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_8:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1Ho
p[34m^H[mp
q[7Cq
r\r
scs
t[34m^M[mt
u
u
v[34m^H[mv
w\w
XxxX
yYYy


TEST_3:
a\a
b\\b
c[34m^M[mc
d\[34m^M[md
e\\[34m^M[me
f\rf
j\nj
k[34m^M[mk
l
l


TEST_4:
a\a
b\b
c[34m^M[mc
d[34m^M[md
e\[34m^M[me
f[34m^M[mf
j
j
k[34m^M[mk
l
l


TEST_5:
A123456789987654321


TEST_6:
a
%
c
%


TEST_7:
A[34m^M[mA
B
B


TEST_8:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =',,X'[?25l[1;59r[59;1H
[1;60r[59;1H,,X[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(^\|,\)\ze\(,\|X\)/\1N/g[?25l[59;1HN,,NX[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =',,Y'[?25l[1;59r[59;1H
[1;60r[59;1H,,Y[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(^\|,\)\ze\(,\|Y\)/\1N/gc[?25l[59;1H[7m,[m
[32mreplace with \1N (y/n/a/q/l/^E/^Y)?[?12l[?25h[?25l[m[60;1H[K[60;1H[59;1HN,,NY[?12l[?25h[?25l
:[?12l[?25h$put =',,Z'[?25l[1;59r[59;1H
[1;60r[59;1H,,Z[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/\(^\|,\)\ze\(,\|Z\)/\1N/gc[?25l[59;1H[7m,[m
[32mreplace with \1N (y/n/a/q/l/^E/^Y)?[?12l[?25h[?25l[m[60;1H[K[60;1H[59;1HN,[7m,[mZ
[32mreplace with \1N (y/n/a/q/l/^E/^Y)?[?12l[?25h[?25l[m[60;1H[K[60;1H[59;3H,NZ[?12l[?25h[?25l
/[?12l[?25h^TEST_9:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H/^TEST_7
ENDTEST

TEST_7:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_7:\"
:$put =substitute('A[34m^V^M[mA', 'A.', '\=submatch(0)', '')
:$put =substitute(\"B\nB\", 'B.', '\=submatch(0)', '')
/^TEST_8
ENDTEST

TEST_8:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_8:\"
:$put =',,X'
:s/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'
:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:
ENDTEST

TEST_9:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_9:\"
:$put ='xxx'
:s/x/X/gc
yyq/^TEST_10:
ENDTEST

TEST_10:

STARTTEST
:/^Results/,$wq! test.out
ENDTEST

Results of test72:


TEST_1:
AA
&
C123456789987654321
d
~
~
Gg
Hh
iI
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H6 lines, 82 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[39;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset magic&[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo&[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =\"\n\nTEST_9:\"[?25l3 more lines[60;13H[K[27m[23m[m[H[2J[1;1Hu
u
v[34m^H[mv
w\w
XxxX
yYYy


TEST_3:
a\a
b\\b
c[34m^M[mc
d\[34m^M[md
e\\[34m^M[me
f\rf
j\nj
k[34m^M[mk
l
l


TEST_4:
a\a
b\b
c[34m^M[mc
d[34m^M[md
e\[34m^M[me
f[34m^M[mf
j
j
k[34m^M[mk
l
l


TEST_5:
A123456789987654321


TEST_6:
a
%
c
%


TEST_7:
A[34m^M[mA
B
B


TEST_8:
N,,NX
N,,NY
N,,NZ


TEST_9:
3 more lines[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put ='xxx'[?25l[1;59r[59;1H
[1;60r[59;1Hxxx[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hs/x/X/gc[?25l[59;1H[7mx[m
[32mreplace with X (y/n/a/q/l/^E/^Y)?[?12l[?25h[?25l[m[60;1H[K[60;1H[59;1HX[7mx[m
[32mreplace with X (y/n/a/q/l/^E/^Y)?[?12l[?25h[?25l[m[60;1H[K[60;1H[59;2HX[7mx[m
[32mreplace with X (y/n/a/q/l/^E/^Y)?[?12l[?25h[?25l[m[60;1H[K[60;1H[59;3Hx[?12l[?25h[?25l
/[?12l[?25h^TEST_10:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[23m[m[H[2J[1;1H/^TEST_8
ENDTEST

TEST_8:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_8:\"
:$put =',,X'
:s/\(^\|,\)\ze\(,\|X\)/\1N/g
:$put =',,Y'
:s/\(^\|,\)\ze\(,\|Y\)/\1N/gc
a:$put =',,Z'
:s/\(^\|,\)\ze\(,\|Z\)/\1N/gc
yy/^TEST_9:
ENDTEST

TEST_9:

STARTTEST
:set magic&
:set cpo&
:$put =\"\n\nTEST_9:\"
:$put ='xxx'
:s/x/X/gc
yyq/^TEST_10:
ENDTEST

TEST_10:

STARTTEST
:/^Results/,$wq! test.out
ENDTEST

Results of test72:


TEST_1:
AA
&
C123456789987654321
d
~
~
Gg
Hh
iI
jJ
Kk
l[34m^M[ml
m[34m^M[mm
n[34m^M[mn
o
o
p[34m^H[mp
q[7Cq
r\r
scs
[31msearch hit BOTTOM, continuing at TOP[30;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H1 line, 26 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[34;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[35;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^Results/,$wq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 115 lines, 454 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test81.failed test.ok test.out X* viminfo
cp test81.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test81.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test81.in" 22 lines, 308 characters[1;1HTest for t movement command and 'cpo-;' setting

STARTTEST
:set nocompatible viminfo+=nviminfo
:set cpo-=;
/firstline/
j0tt;D
0fz;D
$Fy;D
$Ty;D:set cpo+=;
j0tt;;D
$Ty;;D:?firstline?+1,$w! test.out
:qa!
ENDTEST

firstline
aaa two three four
    zzz
yyy
bbb yee yoo four
ccc two three four
ddd yee yoo four
[1m[34m~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for t movement command and 'cpo-;' setting[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 10 lines, 143 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[14;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[15;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[15;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo-=;[?25l[15;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25hfirstline/[?25l[60;11H[K[60;1H[16;1H[?12l[?25h
aaa two[?25l[17;9H[K[17;7H[?12l[?25h[18;7H    z[?25l[18;6H[K[18;5H[?12l[?25h
yyy  [?25l[19;2H[K[19;1H[?12l[?25h
[15C[?25l[20;6H[K[20;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cpo+=;[?25l[20;5H[?12l[?25h
ccc ccc[?25l[21;5H[K[21;3H[?12l[?25h
dd[13C[?25l[22;10H[K[22;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h?firstline?+1,$w! test.out[?25l"test.out" [60;12H[K[60;12H[New] 6L, 36C written[22;9H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test82.failed test.ok test.out X* viminfo
cp test82.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test82.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test82.in" 103 lines, 3165 characters[1;1HTests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c)
Also test "g~ap".

STARTTEST
:so small.vim
:if !has("multi_byte")
: e! test.ok
: w! test.out
: qa!
:endif
:set enc=utf8
ggdG
:
:function! Ch(a, op, b, expected)
:  if eval(printf('"%s" %s "%s"', a:a, a:op, a:b)) != a:expected
:    call append(line('$'), printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expected))
:  else
:    let b:passed += 1
:  endif
:endfunction
:
:function! Chk(a, b, result)
:  if a:result == 0
:    call Ch(a:a, '==?', a:b, 1)
:    call Ch(a:a, '!=?', a:b, 0)
:    call Ch(a:a, '<=?', a:b, 1)
:    call Ch(a:a, '>=?', a:b, 1)
:    call Ch(a:a, '<?', a:b, 0)
:    call Ch(a:a, '>?', a:b, 0)
:  elseif a:result > 0
:    call Ch(a:a, '==?', a:b, 0)
:    call Ch(a:a, '!=?', a:b, 1)
:    call Ch(a:a, '<=?', a:b, 0)
:    call Ch(a:a, '>=?', a:b, 1)
:    call Ch(a:a, '<?', a:b, 0)
:    call Ch(a:a, '>?', a:b, 1)
:  else
:    call Ch(a:a, '==?', a:b, 0)
:    call Ch(a:a, '!=?', a:b, 1)
:    call Ch(a:a, '<=?', a:b, 1)
:    call Ch(a:a, '>=?', a:b, 0)
:    call Ch(a:a, '<?', a:b, 1)
:    call Ch(a:a, '>?', a:b, 0)
:  endif
:endfunction
:
:function! Check(a, b, result)
:  call Chk(a:a, a:b, a:result)
:  call Chk(a:b, a:a, -a:result)
:endfunction
:
:function! LT(a, b)
:  call Check(a:a, a:b, -1)
:endfunction
:
:function! GT(a, b)
:  call Check(a:a, a:b, 1)
:endfunction
:[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c)[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 97 lines, 3054 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[48M[1;60r[12;1H:function! EQ(a, b)
:  call Check(a:a, a:b, 0)
:endfunction
:
:let b:passed=0
:call EQ('', '')
:call LT('', 'a')
:call EQ('abc', 'abc')
:call EQ('Abc', 'abC')
:call LT('ab', 'abc')
:call LT('AB', 'abc')
:call LT('ab', 'aBc')
:call EQ('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xb9\xd0\xa6\xd0\xa3\xd0\xba\xd00[25;1H\x95\xd0\xbd')
:call LT('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xaf\xd1\x86\xd1\x83\xd0\xba\xd00[27;1H\xb5\xd0\xbd')
:call EQ('\xe2\x84\xaa', 'k')
:call LT('\xe2\x84\xaa', 'kkkkkk')
:call EQ('\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa', 'kkk')
:call LT('kk', '\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa')
:call EQ('\xe2\x84\xaa\xe2\x84\xa6k\xe2\x84\xaak\xcf\x89', 'k\xcf\x89\xe2\x84\xaakk\xe2\x84\xa6')
:call EQ('Abc\x80', 'AbC\x80')
:call LT('Abc\x80', 'AbC\x81')
:call LT('Abc', 'AbC\x80')
:call LT('abc\x80DEF', 'abc\x80def')  " case folding stops at the first bad character
:call LT('\xc3XYZ', '\xc3xyz')
:call EQ('\xef\xbc\xba', '\xef\xbd\x9a')  " FF3A (upper), FF5A (lower)
:call GT('\xef\xbc\xba', '\xef\xbc\xff')  " first string is ok and equals \xef\xbd\x9a after foldii[40;1Hng, second string is illegal and was left unchanged, then the strings were bytewise compared
:call LT('\xc3', '\xc3\x83')
:call EQ('\xc3\xa3xYz', '\xc3\x83XyZ')
:for n in range(0x60, 0xFF) | call LT(printf('xYz\x%.2X', n-1), printf('XyZ\x%.2X', n)) | endfor
:for n in range(0x80, 0xBF) | call EQ(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n))[45;1H) | endfor
:for n in range(0xC0, 0xFF) | call LT(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n))[47;1H) | endfor
:call append(0, printf('%d checks passed', b:passed))
:"
:" test that g~ap changes one paragraph only.
:new
iabcd

defg[34m^[[mgg0g~ap:let lns = getline(1,3)
:q!
:call append(line('$'), lns)
:"
:wq! test.out
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has("multi_byte")[?25l
:  [?12l[?25h: e! test.ok
[?25l:  [?12l[?25h: w! test.out
[?25l:  [?12l[?25h: qa!
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:endfunction
:
:function! LT(a, b)
:  call Check(a:a, a:b, -1)[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset enc=utf8[?25l[27m[23m[m[H[2J[1;1H:endfunction
:
:function! LT(a, b)
:  call Check(a:a, a:b, -1)
:endfunction
:
:function! GT(a, b)
:  call Check(a:a, a:b, 1)
:endfunction
:
:function! EQ(a, b)
:  call Check(a:a, a:b, 0)
:endfunction
:
:let b:passed=0
:call EQ('', '')
:call LT('', 'a')
:call EQ('abc', 'abc')
:call EQ('Abc', 'abC')
:call LT('ab', 'abc')
:call LT('AB', 'abc')
:call LT('ab', 'aBc')
:call EQ('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xb9\xd0\xa6\xd0\xa3\xd0\xba\xd00[24;1H\x95\xd0\xbd')
:call LT('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xaf\xd1\x86\xd1\x83\xd0\xba\xd00[26;1H\xb5\xd0\xbd')
:call EQ('\xe2\x84\xaa', 'k')
:call LT('\xe2\x84\xaa', 'kkkkkk')
:call EQ('\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa', 'kkk')
:call LT('kk', '\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa')
:call EQ('\xe2\x84\xaa\xe2\x84\xa6k\xe2\x84\xaak\xcf\x89', 'k\xcf\x89\xe2\x84\xaakk\xe2\x84\xa6')
:call EQ('Abc\x80', 'AbC\x80')
:call LT('Abc\x80', 'AbC\x81')
:call LT('Abc', 'AbC\x80')
:call LT('abc\x80DEF', 'abc\x80def')  " case folding stops at the first bad character
:call LT('\xc3XYZ', '\xc3xyz')
:call EQ('\xef\xbc\xba', '\xef\xbd\x9a')  " FF3A (upper), FF5A (lower)
:call GT('\xef\xbc\xba', '\xef\xbc\xff')  " first string is ok and equals \xef\xbd\x9a after foldii[39;1Hng, second string is illegal and was left unchanged, then the strings were bytewise compared
:call LT('\xc3', '\xc3\x83')
:call EQ('\xc3\xa3xYz', '\xc3\x83XyZ')
:for n in range(0x60, 0xFF) | call LT(printf('xYz\x%.2X', n-1), printf('XyZ\x%.2X', n)) | endfor
:for n in range(0x80, 0xBF) | call EQ(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n))[44;1H) | endfor
:for n in range(0xC0, 0xFF) | call LT(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n))[46;1H) | endfor
:call append(0, printf('%d checks passed', b:passed))
:"
:" test that g~ap changes one paragraph only.
:new
iabcd

defg[34m^[[mgg0g~ap:let lns = getline(1,3)
:q!
:call append(line('$'), lns)
:"
:wq! test.out
ENDTEST
[?12l[?25h[?25l[1;59r[1;1H[49L[1;60r[1;1HTests for case-insensitive UTF-8 comparisons (utf_strnicmp() in mbyte.c)
Also test "g~ap".

STARTTEST
:so small.vim
:if !has("multi_byte")
: e! test.ok
: w! test.out
: qa!
:endif
:set enc=utf8
ggdG
:
:function! Ch(a, op, b, expected)
:  if eval(printf('"%s" %s "%s"', a:a, a:op, a:b)) != a:expected
:    call append(line('$'), printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expected))
:  else
:    let b:passed += 1
:  endif
:endfunction
:
:function! Chk(a, b, result)
:  if a:result == 0
:    call Ch(a:a, '==?', a:b, 1)
:    call Ch(a:a, '!=?', a:b, 0)
:    call Ch(a:a, '<=?', a:b, 1)
:    call Ch(a:a, '>=?', a:b, 1)
:    call Ch(a:a, '<?', a:b, 0)
:    call Ch(a:a, '>?', a:b, 0)
:  elseif a:result > 0
:    call Ch(a:a, '==?', a:b, 0)
:    call Ch(a:a, '!=?', a:b, 1)
:    call Ch(a:a, '<=?', a:b, 0)
:    call Ch(a:a, '>=?', a:b, 1)
:    call Ch(a:a, '<?', a:b, 0)
:    call Ch(a:a, '>?', a:b, 1)
:  else
:    call Ch(a:a, '==?', a:b, 0)
:    call Ch(a:a, '!=?', a:b, 1)
:    call Ch(a:a, '<=?', a:b, 1)
:    call Ch(a:a, '>=?', a:b, 0)
:    call Ch(a:a, '<?', a:b, 1)
:    call Ch(a:a, '>?', a:b, 0)
:  endif
:endfunction
:
:function! Check(a, b, result)
:  call Chk(a:a, a:b, a:result)
:  call Chk(a:b, a:a, -a:result)[1;1H[?12l[?25h[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! Ch(a, op, b, expected)[?25l
:  [?12l[?25h:  if eval(printf('"%s" %s "%s"', a:a, a:op, a:b)) != a:expected
[?25l:    [?12l[?25h:    call append(line('$'), printf('"%s" %s "%s" should return %d', a:a, a:op, a:b, a:expect
[59;98He[60;1Hd))
[?25l:    [?12l[?25h:  else
[?25l:    [?12l[?25h:    let b:passed += 1
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endfunction[1;1H[7L[?25l[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! Chk(a, b, result)[?25l
:  [?12l[?25h:  if a:result == 0
[?25l:    [?12l[?25h:    call Ch(a:a, '==?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '!=?', a:b, 0)
[?25l:    [?12l[?25h:    call Ch(a:a, '<=?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '>=?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '<?', a:b, 0)
[?25l:    [?12l[?25h:    call Ch(a:a, '>?', a:b, 0)
[?25l:    [?12l[?25h:  elseif a:result > 0
[?25l:    [?12l[?25h:    call Ch(a:a, '==?', a:b, 0)
[?25l:    [?12l[?25h:    call Ch(a:a, '!=?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '<=?', a:b, 0)
[?25l:    [?12l[?25h:    call Ch(a:a, '>=?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '<?', a:b, 0)
[?25l:    [?12l[?25h:    call Ch(a:a, '>?', a:b, 1)
[?25l:    [?12l[?25h:  else
[?25l:    [?12l[?25h:    call Ch(a:a, '==?', a:b, 0)
[?25l:    [?12l[?25h:    call Ch(a:a, '!=?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '<=?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '>=?', a:b, 0)
[?25l:    [?12l[?25h:    call Ch(a:a, '<?', a:b, 1)
[?25l:    [?12l[?25h:    call Ch(a:a, '>?', a:b, 0)
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endfunction[1;1H[23L[?25l[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! Check(a, b, result)[?25l
:  [?12l[?25h:  call Chk(a:a, a:b, a:result)
[?25l:  [?12l[?25h:  call Chk(a:b, a:a, -a:result)
[?25l:  [?12l[?25h:endfunction[1;1H[3L[?25l[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! LT(a, b)[?25l
:  [?12l[?25h:  call Check(a:a, a:b, -1)
[?25l:  [?12l[?25h:endfunction[1;1H[2L[?25l[2;1H[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! GT(a, b)[?25l
:  [?12l[?25h:  call Check(a:a, a:b, 1)
[?25l:  [?12l[?25h:endfunction[1;1H[2L[?25l[2;1H[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction! EQ(a, b)[?25l
:  [?12l[?25h:  call Check(a:a, a:b, 0)
[?25l:  [?12l[?25h:endfunction[1;1H[2L[?25l[2;1H[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet b:passed=0[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('', '')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('', 'a')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('abc', 'abc')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('Abc', 'abC')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('ab', 'abc')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('AB', 'abc')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('ab', 'aBc')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xb9\xd0\xa6\xd0\xa3\xd0\xba\xd
[59;98H0[60;1H\x95\xd0\xbd')[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall LT('\xd0\xb9\xd1\x86\xd1\x83\xd0\xba\xd0\xb5\xd0\xbd', '\xd0\xaf\xd1\x86\xd1\x83\xd0\xba\xd
[59;98H0[60;1H\xb5\xd0\xbd')[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall EQ('\xe2\x84\xaa', 'k')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('\xe2\x84\xaa', 'kkkkkk')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa', 'kkk')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('kk', '\xe2\x84\xaa\xe2\x84\xaa\xe2\x84\xaa')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('\xe2\x84\xaa\xe2\x84\xa6k\xe2\x84\xaak\xcf\x89', 'k\xcf\x89\xe2\x84\xaakk\xe2\x84\xa6')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('Abc\x80', 'AbC\x80')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('Abc\x80', 'AbC\x81')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('Abc', 'AbC\x80')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('abc\x80DEF', 'abc\x80def')  " case folding stops at the first bad character[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall LT('\xc3XYZ', '\xc3xyz')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('\xef\xbc\xba', '\xef\xbd\x9a')  " FF3A (upper), FF5A (lower)[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall GT('\xef\xbc\xba', '\xef\xbc\xff')  " first string is ok and equals \xef\xbd\x9a after fold
[59;98Hi[60;1Hng, second string is illegal and was left unchanged, then the strings were bytewise compared[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall LT('\xc3', '\xc3\x83')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall EQ('\xc3\xa3xYz', '\xc3\x83XyZ')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor n in range(0x60, 0xFF) | call LT(printf('xYz\x%.2X', n-1), printf('XyZ\x%.2X', n)) | endfor[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor n in range(0x80, 0xBF) | call EQ(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n
[59;98H)[60;1H) | endfor[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hfor n in range(0xC0, 0xFF) | call LT(printf('xYz\xc2\x%.2XUvW', n), printf('XyZ\xc2\x%.2XuVw', n
[59;98H)[60;1H) | endfor[?25l[1;1H[L[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall append(0, printf('%d checks passed', b:passed))[?25l[1;59r[1;1H[L[1;60r[1;1H3732 checks passed[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test that g~ap changes one paragraph only.[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;1H[K[59;1H[7mtest82.in [+]                                                                                     [1;1H[?12l[?25h[?25l[mabcd[2;1H[K[3;1Hdefg[3;5H[K[30;11H[1m[7m[+][3;4H[?12l[?25h[1;1H[?25l[mABCD[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet lns = getline(1,3)[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[1;1H3732 checks passed

[1m[34m~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), lns)[?25l[3;1HABCD[3;5H[K[4;1H[K[5;1Hdefg[5;5H[K[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 5 lines, 31 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test83.failed test.ok test.out X* viminfo
cp test83.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test83.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test83.in" 76 lines, 1265 characters[1;1HTests for tag search with !_TAG_FILE_ENCODING.

STARTTEST
:so mbyte.vim
:set enc=utf8
:if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"
: e! test.ok
: w! test.out
: qa!
:endif

:/^text for tags1$/,/^text for tags1$/+1w! Xtags1.txt
:/^text for tags2$/,/^text for tags2$/+1w! Xtags2.txt
:/^text for tags3$/,/^text for tags3$/+1w! Xtags3.txt
:/^tags1$/+1,/^tags1-end$/-1w! Xtags1

ggdG

:call setline('.', 'Results of test83')

:" case1:
:new
:set tags=Xtags1
:let v:errmsg = ''
:tag abcdefghijklmnopqrs
:if v:errmsg =~ 'E426:' || getline('.') != 'abcdefghijklmnopqrs'
: close
: put ='case1: failed'
:else
: close
: put ='case1: ok'
:endif

:" case2:
:new
:set tags=test83-tags2
:let v:errmsg = ''
:tag /.ï¼¢ï¼£
:if v:errmsg =~ 'E426:' || getline('.') != 'ï¼¡ï¼¢ï¼£'
: close
: put ='case2: failed'
:else
: close
: put ='case2: ok'
:endif

:" case3:
:new
:set tags=test83-tags3
:let v:errmsg = ''
:tag abc50
:if v:errmsg =~ 'E426:' || getline('.') != 'ï¼¡ï¼¢ï¼£'
: close
: put ='case3: failed'
:else
: close
: put ='case3: ok'
:endif
:close[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for tag search with !_TAG_FILE_ENCODING.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 58 lines, 1013 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[3M[1;60r[58;1H:wq! test.out
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset enc=utf8[?25l[27m[23m[m[H[2J[1;1H:set enc=utf8
:if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"
: e! test.ok
: w! test.out
: qa!
:endif

:/^text for tags1$/,/^text for tags1$/+1w! Xtags1.txt
:/^text for tags2$/,/^text for tags2$/+1w! Xtags2.txt
:/^text for tags3$/,/^text for tags3$/+1w! Xtags3.txt
:/^tags1$/+1,/^tags1-end$/-1w! Xtags1

ggdG

:call setline('.', 'Results of test83')

:" case1:
:new
:set tags=Xtags1
:let v:errmsg = ''
:tag abcdefghijklmnopqrs
:if v:errmsg =~ 'E426:' || getline('.') != 'abcdefghijklmnopqrs'
: close
: put ='case1: failed'
:else
: close
: put ='case1: ok'
:endif

:" case2:
:new
:set tags=test83-tags2
:let v:errmsg = ''
:tag /.ï¼¢ï¼£
:if v:errmsg =~ 'E426:' || getline('.') != 'ï¼¡ï¼¢ï¼£'
: close
: put ='case2: failed'
:else
: close
: put ='case2: ok'
:endif

:" case3:
:new
:set tags=test83-tags3
:let v:errmsg = ''
:tag abc50
:if v:errmsg =~ 'E426:' || getline('.') != 'ï¼¡ï¼¢ï¼£'
: close
: put ='case3: failed'
:else
: close
: put ='case3: ok'
:endif
:close

:wq! test.out
ENDTEST
[?12l[?25h[?25l
:[?12l[?25hif !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"[?25l
:  [?12l[?25h: e! test.ok
[?25l:  [?12l[?25h: w! test.out
[?25l:  [?12l[?25h: qa!
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1H:set enc=utf8
:if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"
: e! test.ok
: w! test.out[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Htext for tags1[?12l[?25h[?25l
:[?12l[?25h/^text for tags1$/,/^text for tags1$/+1w! Xtags1.txt[?25l[31msearch hit BOTTOM, continuing at TOP[m[60;37H[K[60;1H"Xtags1.txt" [60;14H[K[60;14H[New File] 2 lines, 35 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^text for tags2$/,/^text for tags2$/+1w! Xtags2.txt[?25l"Xtags2.txt" [60;14H[K[60;14H[New File] 2 lines, 25 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^text for tags3$/,/^text for tags3$/+1w! Xtags3.txt[?25l"Xtags3.txt" [60;14H[K[60;14H[New File] 2 lines, 25 characters written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^tags1$/+1,/^tags1-end$/-1w! Xtags1[?25l"Xtags1" [60;10H[K[60;10H[New File] 2 lines, 81 characters written[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Habcdefghijklmnopqrs[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[1;1H[6L[1;60r[1;1HTests for tag search with !_TAG_FILE_ENCODING.

STARTTEST
:so mbyte.vim
:set enc=utf8
:if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"[1;1H[?12l[?25h[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall setline('.', 'Results of test83')[?25l[1;1HResults of test83[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" case1:[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[30;1H[1m[7m[No Name]                                                                                         [m[31;1HResults of test83[31;18H[K[59;1H[7mtest83.in [+]                                                                                     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset tags=Xtags1[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet v:errmsg = ''[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htag abcdefghijklmnopqrs[?25l"Xtags1.txt" [60;14H[K[60;14H2 lines, 35 characters[1;1Htext for tags1
abcdefghijklmnopqrs[2;20H[K[30;1H[1m[7mXtags1.txt[2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif v:errmsg =~ 'E426:' || getline('.') != 'abcdefghijklmnopqrs'[?25l
:  [?12l[?25h: close
[?25l:  [?12l[?25h: put ='case1: failed'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: close
[?25l:  [?12l[?25h: put ='case1: ok'
[?25l:  [?12l[?25h:endif[1;1H[6L[?25l[1;1HResults of test83
case1: ok
[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[2;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" case2:[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;1Hcase1: ok[31;10H[K[59;1H[7mtest83.in [+]                                                                                     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset tags=test83-tags2[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet v:errmsg = ''[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htag /.ï¼¢ï¼£[?25l"Xtags2.txt" 2 lines, 25 characters[1;1Htext for tags2
ï¼¡ï¼¢ï¼£[2;7H[K[30;1H[1m[7mXtags2.txt[2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif v:errmsg =~ 'E426:' || getline('.') != 'ï¼¡ï¼¢ï¼£'[?25l
:  [?12l[?25h: close
[?25l:  [?12l[?25h: put ='case2: failed'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: close
[?25l:  [?12l[?25h: put ='case2: ok'
[?25l:  [?12l[?25h:endif[1;1H[6L[?25l[1;1HResults of test83
case1: ok
case2: ok
[1m[34m~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[3;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" case3:[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;1Hcase1: ok[31;10H[K[32;1Hcase2: ok[32;10H[K[59;1H[7mtest83.in [+]                                                                                     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset tags=test83-tags3[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet v:errmsg = ''[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htag abc50[?25l"Xtags3.txt" 2 lines, 25 characters[1;1Htext for tags3
ï¼¡ï¼¢ï¼£[2;7H[K[30;1H[1m[7mXtags3.txt[2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hif v:errmsg =~ 'E426:' || getline('.') != 'ï¼¡ï¼¢ï¼£'[?25l
:  [?12l[?25h: close
[?25l:  [?12l[?25h: put ='case3: failed'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: close
[?25l:  [?12l[?25h: put ='case3: ok'
[?25l:  [?12l[?25h:endif[1;1H[6L[?25l[1;1HResults of test83
case1: ok
case2: ok
case3: ok
[1m[34m~                                                                                                 [6;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[4;1H[?12l[?25h[?25l[60;1H:[?12l[?25hclose[?25l[1m[37m[41mE37: No write since last change (add ! to override)[4;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwq! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 4 lines, 48 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test84.failed test.ok test.out X* viminfo
cp test84.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test84.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test84.in" 35 lines, 786 characters[1;1HTests for curswant not changing when setting an option

STARTTEST
:so small.vim
:/^start target options$/+1,/^end target options$/-1 yank
:let target_option_names = split(@0)
:function TestCurswant(option_name)
:  normal! ggf8j
:  let curswant_before = winsaveview().curswant
:  execute 'let' '&'.a:option_name '=' '&'.a:option_name
:  let curswant_after = winsaveview().curswant
:  return [a:option_name, curswant_before, curswant_after]
:endfunction
:
:new
:put =['1234567890', '12345']
:1 delete _
:let result = []
:for option_name in target_option_names
:  call add(result, TestCurswant(option_name))
:endfor
:
:new
:put =map(copy(result), 'join(v:val, '' '')')
:1 delete _
:write test.out
:
:qall!
ENDTEST

start target options[32;9Htabstop[33;9Htimeoutlen[34;9Httimeoutlen
end target options
[1m[34m~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for curswant not changing when setting an option[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 25 lines, 637 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[29;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start target options$/+1,/^end target options$/-1 yank[?25l3 lines yanked[60;15H[K[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet target_option_names = split(@0)[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction TestCurswant(option_name)[?25l
:  [?12l[?25h:  normal! ggf8j
[?25l:  [?12l[?25h:  let curswant_before = winsaveview().curswant
[?25l:  [?12l[?25h:  execute 'let' '&'.a:option_name '=' '&'.a:option_name
[?25l:  [?12l[?25h:  let curswant_after = winsaveview().curswant
[?25l:  [?12l[?25h:  return [a:option_name, curswant_before, curswant_after]
[?25l:  [?12l[?25h:endfunction[1;1H[6L[?25l[1;1HTests for curswant not changing when setting an option

STARTTEST
:so small.vim
:/^start target options$/+1,/^end target options$/-1 yank
:let target_option_names = split(@0)[60;1H[K[30;1H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;1H:1 delete _[31;12H[K[32;1H:let result = []
:for option_name in target_option_names
:  call add(result, TestCurswant(option_name))
:endfo[35;8H[K[36;1H:[36;2H[K[37;1H:new[37;5H[K[38;1H:put =map(copy(result), 'join(v:val, '' '')')[38;46H[K[39;1H:1 delete _[39;12H[K[40;1H:write test.out[40;16H[K[41;1H:[41;2H[K[42;1H:qall![42;7H[K[43;1HENDTEST[43;8H[K[44;1H[K[45;1Hstart target options[45;21H[K[46;1H        tabstop[46;16H[K[47;1H        timeoutlen[47;19H[K[48;1H        ttimeoutlen[48;20H[K[49;1Hend target options[49;19H[K[59;1H[7mtest84.in                                                                                         [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput =['1234567890', '12345'][?25l[2;1H1234567890[2;11H[K[3;1H12345[3;6H[K[30;11H[1m[7m[+][3;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1 delete _[?25l[1;29r[29;1H
[1;60r[29;1H[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hlet result = [][?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor option_name in target_option_names[?25l
:  [?12l[?25h:  call add(result, TestCurswant(option_name))
[?25l:  [?12l[?25h:endfor[1;1H[2L[?25l[1;1H1234567890
12345[60;1H[K[2;5H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[2;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew[?25l[27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [m[20;1H[1m[7m[No Name]                                                                                         [m[21;1H12345
[1m[34m~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [m[40;1H[7m[No Name] [+]                                                                                     [m[41;1H:
:new
:put =map(copy(result), 'join(v:val, '' '')')
:1 delete _
:write test.out
:
:qall!
ENDTEST

start target options[51;9Htabstop[52;9Htimeoutlen[53;9Httimeoutlen
end target options
[1m[34m~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7mtest84.in                                                                                         [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hput =map(copy(result), 'join(v:val, '' '')')[?25l3 more lines[60;13H[K[2;1Htabstop 7 4[2;12H[K[3;1Htimeoutlen 7 7[3;15H[K[4;1Httimeoutlen 7 7[4;16H[K[20;11H[1m[7m[+][4;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1 delete _[?25l[1;19r[19;1H
[1;60r[19;1H[1m[34m~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hwrite test.out[?25l"test.out" [60;12H[K[60;12H[New File] 3 lines, 43 characters written[20;1H[1m[7mtest.out]      [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqall![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test85.failed test.ok test.out X* viminfo
cp test85.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test85.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test85.in" 85 lines, 1868 characters[1;1HTest for Lua interface and luaeval() function

STARTTEST
:so small.vim
:so lua.vim
:set nocompatible viminfo+=nviminfo
:lua l = vim.list():add"item0":add"dictionary with list OK":add"item2"
:lua h = vim.dict(); h.list = l
:call garbagecollect()
/^1
:" change buffer contents
:lua curbuf = vim.buffer()
:lua curline = vim.eval"line('.')"
:lua curbuf[curline] = "1 changed line 1"
:" scalar test
:let tmp_string = luaeval('"string"')
:let tmp_1000 = luaeval('1000')
:if printf("%s%.0f", 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 = luaeval("h").list[1]
:/^2/put =tmp
:" circular list (at the same time test lists containing lists)
:lua l[2] = l
:let l2 = luaeval("h").list
:if l2[2] == l2
:let res = "OK"
:else
:let res = "FAILED"
:endif
:call setline(search("^3"), "circular test " . res)

:let l = []
:lua l = vim.eval("l")
:lua l:add(123)
:lua l:add("abc")
:lua l:add(vim.eval("[1, 2, 3]"))
:lua l:add(vim.eval("{'a':1, 'b':2, 'c':3}"))
:lua l:insert(123)
:lua l:insert("abc")
:lua l:insert(vim.eval("[1, 2, 3]"))
:lua l:insert(vim.eval("{'a':1, 'b':2, 'c':3}"))
:lua l[0] = l[0]
:lua l[1] = l[1]
:lua l[2] = l[2]
:lua l[3] = l[3]
:lua l[0] = 123
:lua l[1] = "abc"
:lua l[2] = vim.eval("[1, 2, 3]")
:lua l[3] = vim.eval("{'a':1, 'b':2, 'c':3}")
:lua l[3] = nil
:lua l[2] = nil
:lua l[1] = nil
:lua l[0] = nil
:lua l = nil[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for Lua interface and luaeval() function[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 77 lines, 1775 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[22M[1;60r[38;1H:$put =string(l)

:let d = {}
:lua d = vim.eval("d")
:lua d[0] = 123
:lua d[1] = "abc"
:lua d[2] = vim.eval("[1, 2, 3]")
:lua d[3] = vim.eval("{'a':1, 'b':2, 'c':3}")
:lua d[4] = d[0]
:lua d[5] = d[1]
:lua d[6] = d[2]
:lua d[7] = d[3]
:lua d[3] = nil
:lua d[2] = nil
:lua d[1] = nil
:lua d[0] = nil
:lua d = nil
:$put =string(d)

:?^1?,$w! test.out
:qa!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso lua.vim[?25l"test.ok" [60;11H[K[60;11H7 lines, 206 characters
"test.out" [New File] 7 lines, 206 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test86.failed test.ok test.out X* viminfo
cp test86.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test86.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test86.in" 1320 lines, 34942 characters[1;1HTests for various python features.     vim: set ft=vim :

NOTE: This will cause errors when run under valgrind.
This would require recompiling Python with:
  ./configure --without-pymalloc
See http://svn.python.org/view/python/trunk/Misc/README.valgrind?view=markup

STARTTEST
:so small.vim
:set encoding=latin1
:set noswapfile
:if !has('python') | e! test.ok | wq! test.out | endif
:lang C
:fun Test()
:py import vim
:let l = []
:py l=vim.bindeval('l')
:py f=vim.bindeval('function("strlen")')
:" Extending List directly with different types
:py l.extend([1, "as'd", [1, 2, f, {'a': 1}]])
:$put =string(l)
:$put =string(l[-1])
:try
:  $put =string(l[-4])
:catch
:  $put =v:exception[:13]
:endtry
:" List assignment
:py l[0]=0
:$put =string(l)
:py l[-2]=f
:$put =string(l)
:"
:" Extending Dictionary directly with different types
:let d = {}
:fun d.f()
:  return 1
:endfun
py << EOF
d=vim.bindeval('d')
d['1']='asd'
d.update(b=[1, 2, f])
d.update((('-1', {'a': 1}),))
d.update({'0': -1})
dk = d.keys()
dv = d.values()
di = d.items()
cmpfun = lambda a, b: cmp(repr(a), repr(b))
dk.sort(cmpfun)
dv.sort(cmpfun)
di.sort(cmpfun)
EOF
:$put =pyeval('d[''f''](self={})')
:$put =pyeval('repr(dk)')
:$put =substitute(pyeval('repr(dv)'),'0x\x\+','','g')
:$put =substitute(pyeval('repr(di)'),'0x\x\+','','g')
:for [key, Val] in sort(items(d))
:  $put =string(key) . ' : ' . string(Val)
:  unlet key Val[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for various python features.     vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[8;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 1309 lines, 34649 characters written[9;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[9;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1Hdel tmsss
EOF
:"
:" Test exceptions
:fun Exe(e)
:   execute a:e
:endfun
py << EOF
Exe = vim.bindeval('function("Exe")')
ee('vim.command("throw \'abcN\'")')
ee('Exe("throw \'def\'")')
ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
del Exe
EOF
:delfunction Exe
:"
:" Cleanup
py << EOF
del cb
del ee
del sys
del os
del vim
EOF
:endfun
:"
:fun RunTest()
:let checkrefs = !empty($PYTHONDUMPREFS)
:let start = getline(1, '$')
:for i in range(checkrefs ? 10 : 1)
:   if i != 0
:[7C%d _
:[7Ccall setline(1, start)
:   endif
:   call Test()
:   if i == 0
:[7Clet result = getline(1, '$')
:   endif
:endfor
:if checkrefs
:   %d _
:   call setline(1, result)
:endif
:endfun
:"
:call RunTest()
:delfunction RunTest
:delfunction Test
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
:" vim: et ts=4 isk-=\:
:call getchar()
ENDTEST

start:[57;1H[?12l[?25h
[?25l

:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset encoding=latin1[?25l[27m[23m[m[H[2J[1;1Hdel tmsss
EOF
:"
:" Test exceptions
:fun Exe(e)
:   execute a:e
:endfun
py << EOF
Exe = vim.bindeval('function("Exe")')
ee('vim.command("throw \'abcN\'")')
ee('Exe("throw \'def\'")')
ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
del Exe
EOF
:delfunction Exe
:"
:" Cleanup
py << EOF
del cb
del ee
del sys
del os
del vim
EOF
:endfun
:"
:fun RunTest()
:let checkrefs = !empty($PYTHONDUMPREFS)
:let start = getline(1, '$')
:for i in range(checkrefs ? 10 : 1)
:   if i != 0
:[7C%d _
:[7Ccall setline(1, start)
:   endif
:   call Test()
:   if i == 0
:[7Clet result = getline(1, '$')
:   endif
:endfor
:if checkrefs
:   %d _
:   call setline(1, result)
:endif
:endfun
:"
:call RunTest()
:delfunction RunTest
:delfunction Test
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
:" vim: et ts=4 isk-=\:
:call getchar()
ENDTEST

start:[58;1H[?12l[?25h[?25l

:[?12l[?25hset noswapfile[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has('python') | e! test.ok | wq! test.out | endif[?25l"test.ok" [60;11H[K[60;11H1197 lines, 56672 characters
"test.out" [New File] 1197 lines, 56672 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test87.failed test.ok test.out X* viminfo
cp test87.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test87.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test87.in" 1271 lines, 33847 characters[1;1HTests for various python features.     vim: set ft=vim :

STARTTEST
:so small.vim
:set noswapfile
:if !has('python3') | e! test.ok | wq! test.out | endif
:lang C
:fun Test()
:py3 import vim
:let l = []
:py3 l=vim.bindeval('l')
:py3 f=vim.bindeval('function("strlen")')
:" Extending List directly with different types
:py3 l+=[1, "as'd", [1, 2, f, {'a': 1}]]
:$put =string(l)
:$put =string(l[-1])
:try
:  $put =string(l[-4])
:catch
:  $put =v:exception[:13]
:endtry
:" List assignment
:py3 l[0]=0
:$put =string(l)
:py3 l[-2]=f
:$put =string(l)
:"
:" Extending Dictionary directly with different types
:let d = {}
:fun d.f()
:  return 1
:endfun
py3 << EOF
d=vim.bindeval('d')
d['1']='asd'
d.update(b=[1, 2, f])
d.update((('-1', {'a': 1}),))
d.update({'0': -1})
dk = d.keys()
dv = d.values()
di = d.items()
dk.sort(key=repr)
dv.sort(key=repr)
di.sort(key=repr)
EOF
:$put =py3eval('d[''f''](self={})')
:$put =py3eval('repr(dk)')
:$put =substitute(py3eval('repr(dv)'),'0x\x\+','','g')
:$put =substitute(py3eval('repr(di)'),'0x\x\+','','g')
:for [key, Val] in sort(items(d))
:  $put =string(key) . ' : ' . string(Val)
:  unlet key Val
:endfor
:py3 del dk
:py3 del di
:py3 del dv
:"
:" removing items with del
:py3 del l[2][1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for various python features.     vim: set ft=vim :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 1265 lines, 33763 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1Hdel tmsss
EOF
:"
:" Test exceptions
:fun Exe(e)
:   execute a:e
:endfun
py3 << EOF
Exe = vim.bindeval('function("Exe")')
ee('vim.command("throw \'abcN\'")')
ee('Exe("throw \'def\'")')
ee('vim.eval("Exe(\'throw \'\'ghi\'\'\')")')
ee('vim.eval("Exe(\'echoerr \'\'jkl\'\'\')")')
ee('vim.eval("Exe(\'xxx_non_existent_command_xxx\')")')
ee('vim.bindeval("Exe(\'xxx_non_existent_command_xxx\')")')
del Exe
EOF
:delfunction Exe
:"
:" Cleanup
py3 << EOF
del cb
del ee
del sys
del os
del vim
EOF
:endfun
:"
:fun RunTest()
:let checkrefs = !empty($PYTHONDUMPREFS)
:let start = getline(1, '$')
:for i in range(checkrefs ? 10 : 1)
:   if i != 0
:[7C%d _
:[7Ccall setline(1, start)
:   endif
:   call Test()
:   if i == 0
:[7Clet result = getline(1, '$')
:   endif
:endfor
:if checkrefs
:   %d _
:   call setline(1, result)
:endif
:endfun
:"
:call RunTest()
:delfunction RunTest
:delfunction Test
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
:" vim: et ts=4 isk-=\:
:call getchar()
ENDTEST

start:[57;1H[?12l[?25h
[?25l

:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noswapfile[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has('python3') | e! test.ok | wq! test.out | endif[?25l"test.ok" [60;11H[K[60;11H1186 lines, 66350 characters
"test.out" [New File] 1186 lines, 66350 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test88.failed test.ok test.out X* viminfo
cp test88.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test88.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test88.in" 88 lines, 1352 characters[1;1Hvim: set ft=vim

Tests for correct display (cursor column position) with +conceal and
tabulators.

STARTTEST
:so small.vim
:if !has('conceal')
   e! test.ok
   wq! test.out
:endif
:" Conceal settings.
:set conceallevel=2
:set concealcursor=nc
:syntax match test /|/ conceal
:" Save current cursor position. Only works in <expr> mode, can't be used
:" with :normal because it moves the cursor to the command line. Thanks to ZyX
:" <zyx.vim@gmail.com> for the idea to use an <expr> mapping.
:let positions = []
:nnoremap <expr> GG ":let positions += ['".screenrow().":".screencol()."']\n"
:" Start test.
/^start:
:normal ztj
GGk
:" We should end up in the same column when running these commands on the two
:" lines.
:normal ft
GGk
:normal $
GGk
:normal 0j
GGk
:normal ft
GGk
:normal $
GGk
:normal 0j0j
GGk
:" Same for next test block.
:normal ft
GGk
:normal $
GGk
:normal 0j
GGk
:normal ft
GGk
:normal $
GGk
:normal 0j0j
GGk
:" And check W with multiple tabs and conceals in a line.
:normal W
GGk
:normal W
GGk
:normal W
GGk
:normal $[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1Hvim: set ft=vim[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 71 lines, 1119 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[19M[1;60r[41;1HGGk
:normal 0j
GGk
:normal W
GGk
:normal W
GGk
:normal W
GGk
:normal $
GGk
:set lbr
:normal $
GGk
:" Display result.
:call append('$', 'end:')
:call append('$', positions)
:/^end/,$wq! test.out
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has('conceal')[?25l
:  [?12l[?25h   e! test.ok
[?25l"test.ok" 24 lines, 112 characters
:  [?12l[?25h   wq! test.out
[?25l"test.out" [New File] 24 lines, 112 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test89.failed test.ok test.out X* viminfo
cp test89.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test89.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test89.in" 71 lines, 1514 characters[1;1H- Some tests for setting 'number' and 'relativenumber'
  This is not all that useful now that the options are no longer reset when
  setting the other.
- Some tests for findfile() function

STARTTEST
:so small.vim
:set hidden nocp nu rnu viminfo+=nviminfo
:redir @a | set nu? rnu? | redir END
:e! xx
:redir @b | set nu? rnu? | redir END
:e! #
:$put ='results:'
:$put a
:$put b
:"
:set nonu nornu
:setglobal nu
:setlocal rnu
:redir @c | setglobal nu? | redir END
:set nonu nornu
:setglobal rnu
:setlocal nu
:redir @d | setglobal rnu? | redir END
:$put =':setlocal must NOT reset the other global value'
:$put c
:$put d
:"
:set nonu nornu
:setglobal nu
:setglobal rnu
:redir @e | setglobal nu? | redir END
:set nonu nornu
:setglobal rnu
:setglobal nu
:redir @f | setglobal rnu? | redir END
:$put =':setglobal MUST reset the other global value'
:$put e
:$put f
:"
:set nonu nornu
:set nu
:set rnu
:redir @g | setglobal nu? | redir END
:set nonu nornu
:set rnu
:set nu
:redir @h | setglobal rnu? | redir END
:$put =':set MUST reset the other global value'
:$put g
:$put h
:"
:let cwd=getcwd()
:cd ..
:" Tests may be run from a shadow directory, so an extra cd needs to be done to
:" get above src/
:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif
:$put =''
:$put ='Testing findfile'[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1H- Some tests for setting 'number' and 'relativenumber'[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 63 lines, 1305 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[11M[1;60r[49;1H:$put =''
:set ssl
:$put =findfile('test19.in','src/test*')
:exe "cd" cwd
:cd ..
:$put =findfile('test19.in','test*')
:$put =findfile('test19.in','testdir')
:exe "cd" cwd
:/^results/,$w! test.out
:q!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset hidden nocp nu rnu viminfo+=nviminfo[?25l[1;1H[33m 58 [m:$put ='results:'
[33m 57 [m:$put a
[33m 56 [m:$put b
[33m 55 [m:"
[33m 54 [m:set nonu nornu
[33m 53 [m:setglobal nu
[33m 52 [m:setlocal rnu
[33m 51 [m:redir @c | setglobal nu? | redir END
[33m 50 [m:set nonu nornu
[33m 49 [m:setglobal rnu
[33m 48 [m:setlocal nu
[33m 47 [m:redir @d | setglobal rnu? | redir END
[33m 46 [m:$put =':setlocal must NOT reset the other global value'
[33m 45 [m:$put c
[33m 44 [m:$put d
[33m 43 [m:"
[33m 42 [m:set nonu nornu
[33m 41 [m:setglobal nu
[33m 40 [m:setglobal rnu
[33m 39 [m:redir @e | setglobal nu? | redir END
[33m 38 [m:set nonu nornu
[33m 37 [m:setglobal rnu
[33m 36 [m:setglobal nu
[33m 35 [m:redir @f | setglobal rnu? | redir END
[33m 34 [m:$put =':setglobal MUST reset the other global value'
[33m 33 [m:$put e
[33m 32 [m:$put f
[33m 31 [m:"
[33m 30 [m:set nonu nornu
[33m 29 [m:set nu
[33m 28 [m:set rnu
[33m 27 [m:redir @g | setglobal nu? | redir END
[33m 26 [m:set nonu nornu
[33m 25 [m:set rnu
[33m 24 [m:set nu
[33m 23 [m:redir @h | setglobal rnu? | redir END
[33m 22 [m:$put =':set MUST reset the other global value'
[33m 21 [m:$put g
[33m 20 [m:$put h
[33m 19 [m:"
[33m 18 [m:let cwd=getcwd()
[33m 17 [m:cd ..
[33m 16 [m:" Tests may be run from a shadow directory, so an extra cd needs to be done to
[33m 15 [m:" get above src/
[33m 14 [m:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif
[33m 13 [m:$put =''
[33m 12 [m:$put ='Testing findfile'
[33m 11 [m:$put =''
[33m 10 [m:set ssl
[33m  9 [m:$put =findfile('test19.in','src/test*')
[33m  8 [m:exe "cd" cwd
[33m  7 [m:cd ..
[33m  6 [m:$put =findfile('test19.in','test*')
[33m  5 [m:$put =findfile('test19.in','testdir')
[33m  4 [m:exe "cd" cwd
[33m  3 [m:/^results/,$w! test.out
[33m  2 [m:q!
[33m  1 [mENDTEST
[33m71  [?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hredir @a | set nu? rnu? | redir END[?25l[60;1H[K[60;1H  number
  relativenumber
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he! xx[?25l"xx" [New File][1;1H[2L[1;1H[33m1   [m
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;3H[K[1;5H[?12l[?25h[?25l[60;1H:[?12l[?25hredir @b | set nu? rnu? | redir END[?25l[60;1H[K[60;1H  number
  relativenumber
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25he! #[?25l"test89.in" line 71 of 71 --100%-- col 1[1;1H[2L[1;1H[33m 58 [m:$put ='results:'
[33m 57 [m:$put a
[33m 56 [m:$put b[3;12H[K[4;1H[33m 55 [m:"[4;7H[K[5;1H[33m 54 [m:set nonu nornu[5;20H[K[6;1H[33m 53 [m:setglobal nu[6;18H[K[7;1H[33m 52 [m:setlocal rnu[7;18H[K[8;1H[33m 51 [m:redir @c | setglobal nu? | redir END[8;42H[K[9;1H[33m 50 [m:set nonu nornu[9;20H[K[10;1H[33m 49 [m:setglobal rnu[10;19H[K[11;1H[33m 48 [m:setlocal nu[11;17H[K[12;1H[33m 47 [m:redir @d | setglobal rnu? | redir END[12;43H[K[13;1H[33m 46 [m:$put =':setlocal must NOT reset the other global value'[13;61H[K[14;1H[33m 45 [m:$put c[14;12H[K[15;1H[33m 44 [m:$put d[15;12H[K[16;1H[33m 43 [m:"[16;7H[K[17;1H[33m 42 [m:set nonu nornu[17;20H[K[18;1H[33m 41 [m:setglobal nu[18;18H[K[19;1H[33m 40 [m:setglobal rnu[19;19H[K[20;1H[33m 39 [m:redir @e | setglobal nu? | redir END[20;42H[K[21;1H[33m 38 [m:set nonu nornu[21;20H[K[22;1H[33m 37 [m:setglobal rnu[22;19H[K[23;1H[33m 36 [m:setglobal nu[23;18H[K[24;1H[33m 35 [m:redir @f | setglobal rnu? | redir END[24;43H[K[25;1H[33m 34 [m:$put =':setglobal MUST reset the other global value'[25;58H[K[26;1H[33m 33 [m:$put e[26;12H[K[27;1H[33m 32 [m:$put f[27;12H[K[28;1H[33m 31 [m:"[28;7H[K[29;1H[33m 30 [m:set nonu nornu[29;20H[K[30;1H[33m 29 [m:set nu[30;12H[K[31;1H[33m 28 [m:set rnu[31;13H[K[32;1H[33m 27 [m:redir @g | setglobal nu? | redir END[32;42H[K[33;1H[33m 26 [m:set nonu nornu[33;20H[K[34;1H[33m 25 [m:set rnu[34;13H[K[35;1H[33m 24 [m:set nu[35;12H[K[36;1H[33m 23 [m:redir @h | setglobal rnu? | redir END[36;43H[K[37;1H[33m 22 [m:$put =':set MUST reset the other global value'[37;52H[K[38;1H[33m 21 [m:$put g[38;12H[K[39;1H[33m 20 [m:$put h[39;12H[K[40;1H[33m 19 [m:"[40;7H[K[41;1H[33m 18 [m:let cwd=getcwd()[41;22H[K[42;1H[33m 17 [m:cd ..[42;11H[K[43;1H[33m 16 [m:" Tests may be run from a shadow directory, so an extra cd needs to be done to[43;84H[K[44;1H[33m 15 [m:" get above src/[44;22H[K[45;1H[33m 14 [m:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif[45;79H[K[46;1H[33m 13 [m:$put =''[46;14H[K[47;1H[33m 12 [m:$put ='Testing findfile'[47;30H[K[48;1H[33m 11 [m:$put =''[48;14H[K[49;1H[33m 10 [m:set ssl[49;13H[K[50;1H[33m  9 [m:$put =findfile('test19.in','src/test*')[50;45H[K[51;1H[33m  8 [m:exe "cd" cwd[51;18H[K[52;1H[33m  7 [m:cd ..[52;11H[K[53;1H[33m  6 [m:$put =findfile('test19.in','test*')[53;41H[K[54;1H[33m  5 [m:$put =findfile('test19.in','testdir')[54;43H[K[55;1H[33m  4 [m:exe "cd" cwd[55;18H[K[56;1H[33m  3 [m:/^results/,$w! test.out[56;29H[K[57;1H[33m  2 [m:q![57;8H[K[58;1H[33m  1 [mENDTEST[58;12H[K[59;1H[33m71  [m[59;5H[K[60;3H[K[60;1H"test89.in" line 71 of 71 --100%-- col 1[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put ='results:'[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
72  [mresults:[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25h$put a[?25l3 more lines[1;59r[1;1H[3M[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2 
  1 [m  number
[33m75  [m  relativenumber[60;1H[K[60;1H3 more lines[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put b[?25l3 more lines[1;59r[1;1H[3M[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2 
  1 [m  number
[33m78  [m  relativenumber[60;1H[K[60;1H3 more lines[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nonu nornu[?25l[1;1H:redir @c | setglobal nu? | redir END[1;39H[K[2;1H:set nonu nornu[2;16H[K[3;1H:setglobal rnu[3;16H[K[4;1H:setlocal nu[4;13H[K[5;1H:redir @d | setglobal rnu? | redir END[5;40H[K[6;1H:$put =':setlocal must NOT reset the other global value'[6;57H[K[7;1H:$put c[7;8H[K[8;1H:$put d[8;8H[K[9;1H:"[9;3H[K[10;1H:set nonu nornu[10;16H[K[11;1H:setglobal nu[11;14H[K[12;1H:setglobal rnu[12;16H[K[13;1H:redir @e | setglobal nu? | redir END[13;39H[K[14;1H:set nonu nornu[14;16H[K[15;1H:setglobal rnu[15;16H[K[16;1H:setglobal nu[16;14H[K[17;1H:redir @f | setglobal rnu? | redir END[17;40H[K[18;1H:$put =':setglobal MUST reset the other global value'[18;54H[K[19;1H:$put e[19;8H[K[20;1H:$put f[20;8H[K[21;1H:"[21;3H[K[22;1H:set nonu nornu[22;16H[K[23;1H:set nu[23;8H[K[24;1H:set rnu[24;10H[K[25;1H:redir @g | setglobal nu? | redir END[25;39H[K[26;1H:set nonu nornu[26;16H[K[27;1H:set rnu[27;10H[K[28;1H:set nu[28;8H[K[29;1H:redir @h | setglobal rnu? | redir END[29;40H[K[30;1H:$put =':set MUST reset the other global value'[30;48H[K[31;1H:$put g[31;8H[K[32;1H:$put h[32;8H[K[33;1H:"[33;3H[K[34;1H:let cwd=getcwd()[34;18H[K[35;1H:cd ..[35;7H[K[36;1H:" Tests may be run from a shadow directory, so an extra cd needs to be done to[36;80H[K[37;1H:" get above src/[37;18H[K[38;1H:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif[38;75H[K[39;1H:$put =''[39;11H[K[40;1H:$put ='Testing findfile'[40;26H[K[41;1H:$put =''[41;11H[K[42;1H:set ssl[42;10H[K[43;1H:$put =findfile('test19.in','src/test*')[43;41H[K[44;1H:exe "cd" cwd[44;15H[K[45;1H:cd ..[45;7H[K[46;1H:$put =findfile('test19.in','test*')[46;37H[K[47;1H:$put =findfile('test19.in','testdir')[47;39H[K[48;1H:exe "cd" cwd[48;15H[K[49;1H:/^results/,$w! test.ou[49;25H[K[50;1H:q![50;4H[K[51;1HENDTEST[51;8H[K[52;1H[K[53;1Hresults:[53;9H[K[54;1H[K[55;1H  number[55;9H[K[56;1H  relativenumber[56;17H[K[57;1H[K[58;1H  number[58;9H[K[59;1H  relativenumber[59;17H[K[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetglobal nu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetlocal rnu[?25l[1;1H[33m 58 [m:redir @c | setglobal nu? | redir END
[33m 57 [m:set nonu nornu
[33m 56 [m:setglobal rnu
[33m 55 [m:setlocal nu
[33m 54 [m:redir @d | setglobal rnu? | redir END
[33m 53 [m:$put =':setlocal must NOT reset the other global value'
[33m 52 [m:$put c
[33m 51 [m:$put d
[33m 50 [m:"
[33m 49 [m:set nonu nornu
[33m 48 [m:setglobal nu
[33m 47 [m:setglobal rnu
[33m 46 [m:redir @e | setglobal nu? | redir END
[33m 45 [m:set nonu nornu
[33m 44 [m:setglobal rnu
[33m 43 [m:setglobal nu
[33m 42 [m:redir @f | setglobal rnu? | redir END
[33m 41 [m:$put =':setglobal MUST reset the other global value'
[33m 40 [m:$put e
[33m 39 [m:$put f
[33m 38 [m:"
[33m 37 [m:set nonu nornu
[33m 36 [m:set nu
[33m 35 [m:set rnu
[33m 34 [m:redir @g | setglobal nu? | redir END
[33m 33 [m:set nonu nornu
[33m 32 [m:set rnu
[33m 31 [m:set nu
[33m 30 [m:redir @h | setglobal rnu? | redir END
[33m 29 [m:$put =':set MUST reset the other global value'
[33m 28 [m:$put g
[33m 27 [m:$put h
[33m 26 [m:"
[33m 25 [m:let cwd=getcwd()
[33m 24 [m:cd ..
[33m 23 [m:" Tests may be run from a shadow directory, so an extra cd needs to be done to
[33m 22 [m:" get above src/
[33m 21 [m:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif
[33m 20 [m:$put =''
[33m 19 [m:$put ='Testing findfile'
[33m 18 [m:$put =''
[33m 17 [m:set ssl
[33m 16 [m:$put =findfile('test19.in','src/test*')
[33m 15 [m:exe "cd" cwd
[33m 14 [m:cd ..
[33m 13 [m:$put =findfile('test19.in','test*')
[33m 12 [m:$put =findfile('test19.in','testdir')
[33m 11 [m:exe "cd" cwd
[33m 10 [m:/^results/,$w! test.out
[33m  9 [m:q!
[33m  8 [mENDTEST
[33m  7 
  6 [mresults:
[33m  5 
  4 [m  number
[33m  3 [m  relativenumber
[33m  2 
  1 [m  number
[33m  0 [m  relativenumber[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir @c | setglobal nu? | redir END[?25l[60;1H[K[60;1H  number[59;7H[?12l[?25h[?25l[60;3H[K[60;1H:[?12l[?25hset nonu nornu[?25l[1;1H:redir @c | setglobal nu? | redir END[1;39H[K[2;1H:set nonu nornu[2;16H[K[3;1H:setglobal rnu[3;16H[K[4;1H:setlocal nu[4;13H[K[5;1H:redir @d | setglobal rnu? | redir END[5;40H[K[6;1H:$put =':setlocal must NOT reset the other global value'[6;57H[K[7;1H:$put c[7;8H[K[8;1H:$put d[8;8H[K[9;1H:"[9;3H[K[10;1H:set nonu nornu[10;16H[K[11;1H:setglobal nu[11;14H[K[12;1H:setglobal rnu[12;16H[K[13;1H:redir @e | setglobal nu? | redir END[13;39H[K[14;1H:set nonu nornu[14;16H[K[15;1H:setglobal rnu[15;16H[K[16;1H:setglobal nu[16;14H[K[17;1H:redir @f | setglobal rnu? | redir END[17;40H[K[18;1H:$put =':setglobal MUST reset the other global value'[18;54H[K[19;1H:$put e[19;8H[K[20;1H:$put f[20;8H[K[21;1H:"[21;3H[K[22;1H:set nonu nornu[22;16H[K[23;1H:set nu[23;8H[K[24;1H:set rnu[24;10H[K[25;1H:redir @g | setglobal nu? | redir END[25;39H[K[26;1H:set nonu nornu[26;16H[K[27;1H:set rnu[27;10H[K[28;1H:set nu[28;8H[K[29;1H:redir @h | setglobal rnu? | redir END[29;40H[K[30;1H:$put =':set MUST reset the other global value'[30;48H[K[31;1H:$put g[31;8H[K[32;1H:$put h[32;8H[K[33;1H:"[33;3H[K[34;1H:let cwd=getcwd()[34;18H[K[35;1H:cd ..[35;7H[K[36;1H:" Tests may be run from a shadow directory, so an extra cd needs to be done to[36;80H[K[37;1H:" get above src/[37;18H[K[38;1H:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif[38;75H[K[39;1H:$put =''[39;11H[K[40;1H:$put ='Testing findfile'[40;26H[K[41;1H:$put =''[41;11H[K[42;1H:set ssl[42;10H[K[43;1H:$put =findfile('test19.in','src/test*')[43;41H[K[44;1H:exe "cd" cwd[44;15H[K[45;1H:cd ..[45;7H[K[46;1H:$put =findfile('test19.in','test*')[46;37H[K[47;1H:$put =findfile('test19.in','testdir')[47;39H[K[48;1H:exe "cd" cwd[48;15H[K[49;1H:/^results/,$w! test.ou[49;25H[K[50;1H:q![50;4H[K[51;1HENDTEST[51;8H[K[52;1H[K[53;1Hresults:[53;9H[K[54;1H[K[55;1H  number[55;9H[K[56;1H  relativenumber[56;17H[K[57;1H[K[58;1H  number[58;9H[K[59;1H  relativenumber[59;17H[K[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetglobal rnu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetlocal nu[?25l[1;1H[33m 20 [m:redir @c | setglobal nu? | redir END
[33m 21 [m:set nonu nornu
[33m 22 [m:setglobal rnu
[33m 23 [m:setlocal nu
[33m 24 [m:redir @d | setglobal rnu? | redir END
[33m 25 [m:$put =':setlocal must NOT reset the other global value'
[33m 26 [m:$put c
[33m 27 [m:$put d
[33m 28 [m:"
[33m 29 [m:set nonu nornu
[33m 30 [m:setglobal nu
[33m 31 [m:setglobal rnu
[33m 32 [m:redir @e | setglobal nu? | redir END
[33m 33 [m:set nonu nornu
[33m 34 [m:setglobal rnu
[33m 35 [m:setglobal nu
[33m 36 [m:redir @f | setglobal rnu? | redir END
[33m 37 [m:$put =':setglobal MUST reset the other global value'
[33m 38 [m:$put e
[33m 39 [m:$put f
[33m 40 [m:"
[33m 41 [m:set nonu nornu
[33m 42 [m:set nu
[33m 43 [m:set rnu
[33m 44 [m:redir @g | setglobal nu? | redir END
[33m 45 [m:set nonu nornu
[33m 46 [m:set rnu
[33m 47 [m:set nu
[33m 48 [m:redir @h | setglobal rnu? | redir END
[33m 49 [m:$put =':set MUST reset the other global value'
[33m 50 [m:$put g
[33m 51 [m:$put h
[33m 52 [m:"
[33m 53 [m:let cwd=getcwd()
[33m 54 [m:cd ..
[33m 55 [m:" Tests may be run from a shadow directory, so an extra cd needs to be done to
[33m 56 [m:" get above src/
[33m 57 [m:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif
[33m 58 [m:$put =''
[33m 59 [m:$put ='Testing findfile'
[33m 60 [m:$put =''
[33m 61 [m:set ssl
[33m 62 [m:$put =findfile('test19.in','src/test*')
[33m 63 [m:exe "cd" cwd
[33m 64 [m:cd ..
[33m 65 [m:$put =findfile('test19.in','test*')
[33m 66 [m:$put =findfile('test19.in','testdir')
[33m 67 [m:exe "cd" cwd
[33m 68 [m:/^results/,$w! test.out
[33m 69 [m:q!
[33m 70 [mENDTEST
[33m 71 
 72 [mresults:
[33m 73 
 74 [m  number
[33m 75 [m  relativenumber
[33m 76 
 77 [m  number
[33m 78 [m  relativenumber[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir @d | setglobal rnu? | redir END[?25l[60;1H[K[60;1H  relativenumber[59;7H[?12l[?25h[?25l[60;3H[K[60;1H:[?12l[?25h$put =':setlocal must NOT reset the other global value'[?25l[1;59r[59;1H
[1;60r[59;1H[33m 79 [m:setlocal must NOT reset the other global value[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25h$put c[?25l[1;59r[1;1H[2M[1;60r[58;1H[33m 80 
 81 [m  number[60;1H[K[59;7H[?12l[?25h[?25l
:[?12l[?25h$put d[?25l[1;59r[1;1H[2M[1;60r[58;1H[33m 82 
 83 [m  relativenumber[60;1H[K[59;7H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nonu nornu[?25l[1;1H:$put =':setlocal must NOT reset the other global value'[1;57H[K[2;1H:$put c[2;8H[K[3;1H:$put d[3;8H[K[4;1H:"[4;3H[K[5;1H:set nonu nornu[5;16H[K[6;1H:setglobal nu[6;14H[K[7;1H:setglobal rnu[7;16H[K[8;1H:redir @e | setglobal nu? | redir END[8;39H[K[9;1H:set nonu nornu[9;16H[K[10;1H:setglobal rnu[10;16H[K[11;1H:setglobal nu[11;14H[K[12;1H:redir @f | setglobal rnu? | redir END[12;40H[K[13;1H:$put =':setglobal MUST reset the other global value'[13;54H[K[14;1H:$put e[14;8H[K[15;1H:$put f[15;8H[K[16;1H:"[16;3H[K[17;1H:set nonu nornu[17;16H[K[18;1H:set nu[18;8H[K[19;1H:set rnu[19;10H[K[20;1H:redir @g | setglobal nu? | redir END[20;39H[K[21;1H:set nonu nornu[21;16H[K[22;1H:set rnu[22;10H[K[23;1H:set nu[23;8H[K[24;1H:redir @h | setglobal rnu? | redir END[24;40H[K[25;1H:$put =':set MUST reset the other global value'[25;48H[K[26;1H:$put g[26;8H[K[27;1H:$put h[27;8H[K[28;1H:"[28;3H[K[29;1H:let cwd=getcwd()[29;18H[K[30;1H:cd ..[30;7H[K[31;1H:" Tests may be run from a shadow directory, so an extra cd needs to be done to[31;80H[K[32;1H:" get above src/[32;18H[K[33;1H:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif[33;75H[K[34;1H:$put =''[34;11H[K[35;1H:$put ='Testing findfile'[35;26H[K[36;1H:$put =''[36;11H[K[37;1H:set ssl[37;10H[K[38;1H:$put =findfile('test19.in','src/test*')[38;41H[K[39;1H:exe "cd" cwd[39;15H[K[40;1H:cd ..[40;7H[K[41;1H:$put =findfile('test19.in','test*')[41;37H[K[42;1H:$put =findfile('test19.in','testdir')[42;39H[K[43;1H:exe "cd" cwd[43;15H[K[44;1H:/^results/,$w! test.ou[44;25H[K[45;1H:q![45;4H[K[46;1HENDTEST[46;8H[K[47;1H[K[48;1Hresults:[48;9H[K[49;1H[K[50;1H  number[50;9H[K[51;1H  relativenumber[51;17H[K[52;1H[K[53;1H  number[53;9H[K[54;1H  relativenumber[54;17H[K[55;1H:setlocal must NOT reset the other global value[55;48H[K[56;1H[K[57;1H  number[57;9H[K[58;1H[K[59;1H  relativenumber[59;17H[K[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetglobal nu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetglobal rnu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir @e | setglobal nu? | redir END[?25l[60;1H[K[60;1H  number[59;3H[?12l[?25h[?25l[60;3H[K[60;1H:[?12l[?25hset nonu nornu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetglobal rnu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetglobal nu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir @f | setglobal rnu? | redir END[?25l[60;1H[K[60;1H  relativenumber[59;3H[?12l[?25h[?25l[60;3H[K[60;1H:[?12l[?25h$put =':setglobal MUST reset the other global value'[?25l[1;59r[59;1H
[1;60r[59;1H:setglobal MUST reset the other global value[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put e[?25l[1;59r[1;1H[2M[1;60r[59;3Hnumber[60;1H[K[59;3H[?12l[?25h[?25l
:[?12l[?25h$put f[?25l[1;59r[1;1H[2M[1;60r[59;3Hrelativenumber[60;1H[K[59;3H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nonu nornu[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nu[?25l[1;1H[33m 30 [m:setglobal nu
[33m 31 [m:setglobal rnu
[33m 32 [m:redir @e | setglobal nu? | redir END
[33m 33 [m:set nonu nornu
[33m 34 [m:setglobal rnu
[33m 35 [m:setglobal nu
[33m 36 [m:redir @f | setglobal rnu? | redir END
[33m 37 [m:$put =':setglobal MUST reset the other global value'
[33m 38 [m:$put e
[33m 39 [m:$put f
[33m 40 [m:"
[33m 41 [m:set nonu nornu
[33m 42 [m:set nu
[33m 43 [m:set rnu
[33m 44 [m:redir @g | setglobal nu? | redir END
[33m 45 [m:set nonu nornu
[33m 46 [m:set rnu
[33m 47 [m:set nu
[33m 48 [m:redir @h | setglobal rnu? | redir END
[33m 49 [m:$put =':set MUST reset the other global value'
[33m 50 [m:$put g
[33m 51 [m:$put h
[33m 52 [m:"
[33m 53 [m:let cwd=getcwd()
[33m 54 [m:cd ..
[33m 55 [m:" Tests may be run from a shadow directory, so an extra cd needs to be done to
[33m 56 [m:" get above src/
[33m 57 [m:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif
[33m 58 [m:$put =''
[33m 59 [m:$put ='Testing findfile'
[33m 60 [m:$put =''
[33m 61 [m:set ssl
[33m 62 [m:$put =findfile('test19.in','src/test*')
[33m 63 [m:exe "cd" cwd
[33m 64 [m:cd ..
[33m 65 [m:$put =findfile('test19.in','test*')
[33m 66 [m:$put =findfile('test19.in','testdir')
[33m 67 [m:exe "cd" cwd
[33m 68 [m:/^results/,$w! test.out
[33m 69 [m:q!
[33m 70 [mENDTEST
[33m 71 
 72 [mresults:
[33m 73 
 74 [m  number
[33m 75 [m  relativenumber
[33m 76 
 77 [m  number
[33m 78 [m  relativenumber
[33m 79 [m:setlocal must NOT reset the other global value
[33m 80 
 81 [m  number
[33m 82 
 83 [m  relativenumber
[33m 84 [m:setglobal MUST reset the other global value
[33m 85 
 86 [m  number
[33m 87 
 88 [m  relativenumber[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset rnu[?25l[1;2H[33m58
 57
 56
 55
 5
 53
 52
 51
 50
 4
 48
 47
 46
 45

 43
 42
 41
 40
 3
 38
 37
 36
 35
 3
 33
 32
 31
 30
 2
 28
 27
 26
 25
 2
 23
 22
 21
 20
 1
 18
 17
 16
 15
 1
 13
 12
 11
 10
  
  8
  7
  6
  5
  
  3
  2
  1
88  [m  [?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir @g | setglobal nu? | redir END[?25l[60;1H[K[60;1H  number[59;7H[?12l[?25h[?25l[60;3H[K[60;1H:[?12l[?25hset nonu nornu[?25l[1;1H:setglobal nu[1;14H[K[2;1H:setglobal rnu[2;16H[K[3;1H:redir @e | setglobal nu? | redir END[3;39H[K[4;1H:set nonu nornu[4;16H[K[5;1H:setglobal rnu[5;16H[K[6;1H:setglobal nu[6;14H[K[7;1H:redir @f | setglobal rnu? | redir END[7;40H[K[8;1H:$put =':setglobal MUST reset the other global value'[8;54H[K[9;1H:$put e[9;8H[K[10;1H:$put f[10;8H[K[11;1H:"[11;3H[K[12;1H:set nonu nornu[12;16H[K[13;1H:set nu[13;8H[K[14;1H:set rnu[14;10H[K[15;1H:redir @g | setglobal nu? | redir END[15;39H[K[16;1H:set nonu nornu[16;16H[K[17;1H:set rnu[17;10H[K[18;1H:set nu[18;8H[K[19;1H:redir @h | setglobal rnu? | redir END[19;40H[K[20;1H:$put =':set MUST reset the other global value'[20;48H[K[21;1H:$put g[21;8H[K[22;1H:$put h[22;8H[K[23;1H:"[23;3H[K[24;1H:let cwd=getcwd()[24;18H[K[25;1H:cd ..[25;7H[K[26;1H:" Tests may be run from a shadow directory, so an extra cd needs to be done to[26;80H[K[27;1H:" get above src/[27;18H[K[28;1H:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif[28;75H[K[29;1H:$put =''[29;11H[K[30;1H:$put ='Testing findfile'[30;26H[K[31;1H:$put =''[31;11H[K[32;1H:set ssl[32;10H[K[33;1H:$put =findfile('test19.in','src/test*')[33;41H[K[34;1H:exe "cd" cwd[34;15H[K[35;1H:cd ..[35;7H[K[36;1H:$put =findfile('test19.in','test*')[36;37H[K[37;1H:$put =findfile('test19.in','testdir')[37;39H[K[38;1H:exe "cd" cwd[38;15H[K[39;1H:/^results/,$w! test.ou[39;25H[K[40;1H:q![40;4H[K[41;1HENDTEST[41;8H[K[42;1H[K[43;1Hresults:[43;9H[K[44;1H[K[45;1H  number[45;9H[K[46;1H  relativenumber[46;17H[K[47;1H[K[48;1H  number[48;9H[K[49;1H  relativenumber[49;17H[K[50;1H:setlocal must NOT reset the other global value[50;48H[K[51;1H[K[52;1H  number[52;9H[K[53;1H[K[54;1H  relativenumber[54;17H[K[55;1H:setglobal MUST reset the other global value[55;45H[K[56;1H[K[57;1H  number[57;9H[K[58;1H[K[59;1H  relativenumber[59;17H[K[59;3H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset rnu[?25l[1;1H[33m 58 [m:setglobal nu
[33m 57 [m:setglobal rnu
[33m 56 [m:redir @e | setglobal nu? | redir END
[33m 55 [m:set nonu nornu
[33m 54 [m:setglobal rnu
[33m 53 [m:setglobal nu
[33m 52 [m:redir @f | setglobal rnu? | redir END
[33m 51 [m:$put =':setglobal MUST reset the other global value'
[33m 50 [m:$put e
[33m 49 [m:$put f
[33m 48 [m:"
[33m 47 [m:set nonu nornu
[33m 46 [m:set nu
[33m 45 [m:set rnu
[33m 44 [m:redir @g | setglobal nu? | redir END
[33m 43 [m:set nonu nornu
[33m 42 [m:set rnu
[33m 41 [m:set nu
[33m 40 [m:redir @h | setglobal rnu? | redir END
[33m 39 [m:$put =':set MUST reset the other global value'
[33m 38 [m:$put g
[33m 37 [m:$put h
[33m 36 [m:"
[33m 35 [m:let cwd=getcwd()
[33m 34 [m:cd ..
[33m 33 [m:" Tests may be run from a shadow directory, so an extra cd needs to be done to
[33m 32 [m:" get above src/
[33m 31 [m:if fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif
[33m 30 [m:$put =''
[33m 29 [m:$put ='Testing findfile'
[33m 28 [m:$put =''
[33m 27 [m:set ssl
[33m 26 [m:$put =findfile('test19.in','src/test*')
[33m 25 [m:exe "cd" cwd
[33m 24 [m:cd ..
[33m 23 [m:$put =findfile('test19.in','test*')
[33m 22 [m:$put =findfile('test19.in','testdir')
[33m 21 [m:exe "cd" cwd
[33m 20 [m:/^results/,$w! test.out
[33m 19 [m:q!
[33m 18 [mENDTEST
[33m 17 
 16 [mresults:
[33m 15 
 14 [m  number
[33m 13 [m  relativenumber
[33m 12 
 11 [m  number
[33m 10 [m  relativenumber
[33m  9 [m:setlocal must NOT reset the other global value
[33m  8 
  7 [m  number
[33m  6 
  5 [m  relativenumber
[33m  4 [m:setglobal MUST reset the other global value
[33m  3 
  2 [m  number
[33m  1 
  0 [m  relativenumber[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nu[?25l[59;1H[33m88  [m  [?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hredir @h | setglobal rnu? | redir END[?25l[60;1H[K[60;1H  relativenumber[59;7H[?12l[?25h[?25l[60;3H[K[60;1H:[?12l[?25h$put =':set MUST reset the other global value'[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
89  [m:set MUST reset the other global value[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25h$put g[?25l[1;59r[1;1H[2M[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1 
91  [m  number[60;1H[K[59;7H[?12l[?25h[?25l
:[?12l[?25h$put h[?25l[1;59r[1;1H[2M[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1 
93  [m  relativenumber[60;1H[K[59;7H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet cwd=getcwd()[?25l[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Tests may be run from a shadow directory, so an extra cd needs to be done to[?25l[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" get above src/[?25l[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif fnamemodify(getcwd(), ':t') != 'src' | cd ../.. | else | cd .. | endif[?25l/sources/vim74[60;15H[K[59;7H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =''[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
94  [m[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25h$put ='Testing findfile'[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
95  [mTesting findfile[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25h$put =''[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
96  [m[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25hset ssl[?25l[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =findfile('test19.in','src/test*')[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
97  [msrc/testdir/test19.in[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25hexe "cd" cwd[?25l/sources/vim74/src/testdir[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcd ..[?25l/sources/vim74/src[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =findfile('test19.in','test*')[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
98  [mtestdir/test19.in[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25h$put =findfile('test19.in','testdir')[?25l[1;59r[59;1H
[1;60r[1;3H[33m8
 57
 56
 55
 54
 53
 52
 51
 50
 49
 48
 47
 46
 45
 44
 43
 42
 41
 40
 39
 38
 37
 36
 35
 34
 33
 32
 31
 30
 29
 28
 27
 26
 25
 24
 23
 22
 21
 20
 19
 18
 17
 16
 15
 14
 13
 12
 11
 10
  9
  8
  7
  6
  5
  4
  3
  2
  1
99  [mtestdir/test19.in[60;1H[K[59;5H[?12l[?25h[?25l
:[?12l[?25hexe "cd" cwd[?25l/sources/vim74/src/testdir[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^results/,$w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New] 28L, 356C written[59;5H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test90.failed test.ok test.out X* viminfo
cp test90.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test90.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test90.in" 53 lines, 1203 characters[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :

STARTTEST
:so small.vim
:if !has('cryptv') || !exists('*sha256')
   e! test.ok
   wq! test.out
:endif
:"
:let testcase='test for empty string: '
:if sha256("") ==# 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
: let res='ok'
:else
: let res='ng'
:endif
:$put =testcase.res
:"
:let testcase='test for 1 char: '
:if sha256("a") ==# 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb'
: let res='ok'
:else
: let res='ng'
:endif
:$put =testcase.res
:"
:let testcase='test for 3 chars: '
:if sha256("abc") ==# 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'
: let res='ok'
:else
: let res='ng'
:endif
:$put =testcase.res
:"
:let testcase='test for contains meta char: '
:if sha256("foo\nbar") ==# '807eff6267f3f926a21d234f7b0cf867a86f47e07a532f15e8cc39ed110ca776'
: let res='ok'
:else
: let res='ng'
:endif
:$put =testcase.res
:"
:let testcase='test for contains non-ascii char: '
:if sha256("\xde\xad\xbe\xef") ==# '5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa81399[44;1H53'
: let res='ok'
:else
: let res='ng'
:endif
:$put =testcase.res
"
:/^start:/,$wq! test.out
ENDTEST

start:
[1m[34m~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 47 lines, 1113 characters written[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[52;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has('cryptv') || !exists('*sha256')[?25l
:  [?12l[?25h   e! test.ok
[?25l:  [?12l[?25h   wq! test.out
[?25l:  [?12l[?25h:endif[1;1H[3L[?25l[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :

STARTTEST[60;1H[K[53;1H[?12l[?25h[?25l[60;1H:[?12l[?25h"[?25l[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet testcase='test for empty string: '[?25l[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif sha256("") ==# 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'[?25l
:  [?12l[?25h: let res='ok'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: let res='ng'
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :

STARTTEST
:so small.vim[60;1H[K[53;1H[?12l[?25h[?25l[60;1H:[?12l[?25h$put =testcase.res[?25l[55;1Htest for empty string: ok[55;26H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet testcase='test for 1 char: '[?25l[55;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif sha256("a") ==# 'ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb'[?25l
:  [?12l[?25h: let res='ok'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: let res='ng'
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :

STARTTEST
:so small.vim[60;1H[K[55;1H[?12l[?25h[?25l[60;1H:[?12l[?25h$put =testcase.res[?25l[56;1Htest for 1 char: ok[56;20H[K[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet testcase='test for 3 chars: '[?25l[56;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif sha256("abc") ==# 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'[?25l
:  [?12l[?25h: let res='ok'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: let res='ng'
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :

STARTTEST
:so small.vim[60;1H[K[56;1H[?12l[?25h[?25l[60;1H:[?12l[?25h$put =testcase.res[?25l[57;1Htest for 3 chars: ok[57;21H[K[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet testcase='test for contains meta char: '[?25l[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif sha256("foo\nbar") ==# '807eff6267f3f926a21d234f7b0cf867a86f47e07a532f15e8cc39ed110ca776'[?25l
:  [?12l[?25h: let res='ok'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: let res='ng'
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :

STARTTEST
:so small.vim[60;1H[K[57;1H[?12l[?25h[?25l


:[?12l[?25h$put =testcase.res[?25l[58;1Htest for contains meta char: ok[58;32H[K[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet testcase='test for contains non-ascii char: '[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif sha256("\xde\xad\xbe\xef") ==# '5f78c33274e43fa9de5659265c1d917e25c03722dcb0b8d27db8d5feaa813
[59;98H9[60;1H53'[?25l[60;1H[K[60;1H:  [?12l[?25h: let res='ok'
[?25l:  [?12l[?25h:else
[?25l:  [?12l[?25h: let res='ng'
[?25l:  [?12l[?25h:endif[1;1H[4L[?25l[1;1HTests for sha256() function.    vim: set ft=vim et ts=2 sw=2 :

STARTTEST
:so small.vim[60;1H[K[58;1H[?12l[?25h[?25l

:[?12l[?25h$put =testcase.res[?25l[59;1Htest for contains non-ascii char: ok[59;37H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start:/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 6 lines, 143 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test91.failed test.ok test.out X* viminfo
cp test91.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test91.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test91.in" 111 lines, 3044 characters[1;1HTests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar().
vim: set ft=vim :

STARTTEST
:so small.vim
:so mbyte.vim
:"
:" Test for getbufvar()
:" Use strings to test for memory leaks.
:let b:var_num = '1234'
:let def_num = '5678'
:$put =string(getbufvar(1, 'var_num'))
:$put =string(getbufvar(1, 'var_num', def_num))
:$put =string(getbufvar(1, ''))
:$put =string(getbufvar(1, '', def_num))
:unlet b:var_num
:$put =string(getbufvar(1, 'var_num', def_num))
:$put =string(getbufvar(1, ''))
:$put =string(getbufvar(1, '', def_num))
:$put =string(getbufvar(9, ''))
:$put =string(getbufvar(9, '', def_num))
:unlet def_num
:$put =string(getbufvar(1, '&autoindent'))
:$put =string(getbufvar(1, '&autoindent', 1))
:"
:" Open new window with forced option values
:set fileformats=unix,dos
:new ++ff=dos ++bin ++enc=iso-8859-2
:let otherff = getbufvar(bufnr('%'), '&fileformat')
:let otherbin = getbufvar(bufnr('%'), '&bin')
:let otherfenc = getbufvar(bufnr('%'), '&fenc')
:close
:$put =otherff
:$put =string(otherbin)
:$put =otherfenc
:unlet otherff otherbin otherfenc
:" test for getwinvar()
:let w:var_str = "Dance"
:let def_str = "Chance"
:$put =string(getwinvar(1, 'var_str'))
:$put =string(getwinvar(1, 'var_str', def_str))
:$put =string(getwinvar(1, ''))
:$put =string(getwinvar(1, '', def_str))
:unlet w:var_str
:$put =string(getwinvar(1, 'var_str', def_str))
:$put =string(getwinvar(1, ''))
:$put =string(getwinvar(1, '', def_str))
:$put =string(getwinvar(9, ''))
:$put =string(getwinvar(9, '', def_str))
:$put =string(getwinvar(1, '&nu'))
:$put =string(getwinvar(1, '&nu',  1))
:unlet def_str
:"
:" test for gettabvar()
:tabnew
:tabnew
:let t:var_list = [1, 2, 3]
:let def_list = [4, 5, 6, 7]
:tabrewind[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for getbufvar(), getwinvar(), gettabvar() and gettabwinvar().[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 104 lines, 2931 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[50M[1;60r[10;1H:$put =string(gettabvar(3, 'var_list'))
:$put =string(gettabvar(3, 'var_list', def_list))
:$put =string(gettabvar(3, ''))
:$put =string(gettabvar(3, '', def_list))
:tablast
:unlet t:var_list
:tabrewind
:$put =string(gettabvar(3, 'var_list', def_list))
:$put =string(gettabvar(9, ''))
:$put =string(gettabvar(9, '', def_list))
:$put =string(gettabvar(3, '&nu'))
:$put =string(gettabvar(3, '&nu', def_list))
:unlet def_list
:tabonly
:"
:" test for gettabwinvar()
:tabnew
:tabnew
:tabprev
:split
:split
:wincmd w
:vert split
:wincmd w
:let w:var_dict = {'dict': 'tabwin'}
:let def_dict = {'dict2': 'newval'}
:wincmd b
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict'))
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:tabnext
:3wincmd w
:unlet w:var_dict
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:$put =string(gettabwinvar(2, 9, ''))
:$put =string(gettabwinvar(2, 9, '', def_dict))
:$put =string(gettabwinvar(9, 3, ''))
:$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict
:$put =string(gettabwinvar(2, 3, '&nux'))
:$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"
:/^start/,$wq! test.out
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Test for getbufvar()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Use strings to test for memory leaks.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet b:var_num = '1234'[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet def_num = '5678'[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =string(getbufvar(1, 'var_num'))[?25l[1;59r[1;1H[2M[1;60r[58;1Hstart:
'1234'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(1, 'var_num', def_num))[?25l[1;59r[59;1H
[1;60r[59;1H'1234'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(1, ''))[?25l[1;59r[59;1H
[1;60r[59;1H{'var_num': '1234'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(1, '', def_num))[?25l[1;59r[59;1H
[1;60r[59;1H{'var_num': '1234'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet b:var_num[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =string(getbufvar(1, 'var_num', def_num))[?25l[1;59r[59;1H
[1;60r[59;1H'5678'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(1, ''))[?25l[1;59r[59;1H
[1;60r[59;1H{}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(1, '', def_num))[?25l[1;59r[59;1H
[1;60r[59;1H{}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(9, ''))[?25l[1;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(9, '', def_num))[?25l[1;59r[59;1H
[1;60r[59;1H'5678'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet def_num[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =string(getbufvar(1, '&autoindent'))[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getbufvar(1, '&autoindent', 1))[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Open new window with forced option values[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset fileformats=unix,dos[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew ++ff=dos ++bin ++enc=iso-8859-2[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2Htabrewind[31;11H[K[32;2H$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))[33;35H'))[33;38H[K[34;36H, def_dict))[35;31H9, ''))[35;38H[K[36;36H, def_dict))[37;28H9, 3, ''))[37;38H[K[38;36H, def_dict))
:unlet def_dict[39;16H[K[40;2H$put =string(gettabwinvar(2, 3, '&nux'))[41;40H, 1))
:tabonly[42;9H[K[43;2H"[43;3H[K[44;2H/^start/,$wq! test.out
ENDTEST[45;8H[K[46;1H[K[47;1Hstart:
'1234'

{'var_num': '1234'}

'5678'[52;7H[K[53;1H{}[53;3H[K[55;1H''
'5678'
0[57;2H[K[59;1H[7mtest91.in [+]                                                                                     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet otherff = getbufvar(bufnr('%'), '&fileformat')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet otherbin = getbufvar(bufnr('%'), '&bin')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet otherfenc = getbufvar(bufnr('%'), '&fenc')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hclose[?25l[1;1H:tablast
:unlet t:var_list[2;18H[K[3;1H:tabrewind[3;11H[K[4;1H:$put =string(gettabvar(3, 'var_list', def_list))[4;50H[K[5;1H:$put =string(gettabvar(9, ''))[5;32H[K[6;1H:$put =string(gettabvar(9, '', def_list))[6;42H[K[7;1H:$put =string(gettabvar(3, '&nu'))[7;35H[K[8;1H:$put =string(gettabvar(3, '&nu', def_list))[8;45H[K[9;1H:unlet def_list[9;16H[K[10;1H:tabonly[10;9H[K[11;1H:"[11;3H[K[12;1H:" test for gettabwinvar()[12;27H[K[13;1H:tabnew[13;8H[K[14;1H:tabnew[14;8H[K[15;1H:tabprev[15;9H[K[16;1H:split[16;7H[K[17;1H:split[17;7H[K[18;1H:wincmd w[18;10H[K[19;1H:vert split[19;12H[K[20;1H:wincmd w[20;10H[K[21;1H:let w:var_dict = {'dict': 'tabwin'}[21;37H[K[22;1H:let def_dict = {'dict2': 'newval'}[22;36H[K[23;1H:wincmd b[23;10H[K[24;1H:tabrewind[24;11H[K[25;1H:$put =string(gettabwinvar(2, 3, 'var_dict'))[25;46H[K[26;1H:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))[26;56H[K[27;1H:$put =string(gettabwinvar(2, 3, ''))[27;38H[K[28;1H:$put =string(gettabwinvar(2, 3, '', def_dict))[28;48H[K[29;1H:tabnext[29;9H[K[30;1H:3wincmd w[30;11H[K[31;2Hunlet w:var_dict
:tabrewind[32;11H[K[33;35Hvar_dict', def_dict))[34;36H))[34;38H[K[35;31H3, '', def_dict))[36;36H))[36;38H[K[37;28H2, 9, '', def_dict))[38;36H))[38;38H[K[39;2H$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict[40;16H[K[41;40H))[41;42H[K[42;2H$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"[44;3H[K[45;1H:/^start/,$wq! test.out
ENDTEST[47;1H[K[48;1Hstart:

'1234'[50;7H[K[52;1H{'var_num': '1234'}
'5678'

{}
''[56;3H[K[57;1H'5678'

0[59;2H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =otherff[?25l[1;59r[59;1H
[1;60r[59;1Hdos[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(otherbin)[?25l[1;59r[59;1H
[1;60r[59;1H1[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =otherfenc[?25l[1;59r[59;1H
[1;60r[59;1Hiso-8859-2[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet otherff otherbin otherfenc[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for getwinvar()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet w:var_str = "Dance"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet def_str = "Chance"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =string(getwinvar(1, 'var_str'))[?25l[1;59r[59;1H
[1;60r[59;1H'Dance'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(1, 'var_str', def_str))[?25l[1;59r[59;1H
[1;60r[59;1H'Dance'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(1, ''))[?25l[1;59r[59;1H
[1;60r[59;1H{'var_str': 'Dance'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(1, '', def_str))[?25l[1;59r[59;1H
[1;60r[59;1H{'var_str': 'Dance'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet w:var_str[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =string(getwinvar(1, 'var_str', def_str))[?25l[1;59r[59;1H
[1;60r[59;1H'Chance'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(1, ''))[?25l[1;59r[59;1H
[1;60r[59;1H{}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(1, '', def_str))[?25l[1;59r[59;1H
[1;60r[59;1H{}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(9, ''))[?25l[1;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(9, '', def_str))[?25l[1;59r[59;1H
[1;60r[59;1H'Chance'[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(1, '&nu'))[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(getwinvar(1, '&nu',  1))[?25l[1;59r[59;1H
[1;60r[59;1H0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet def_str[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for gettabvar()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in [m[1m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25htabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in  [No Name] [m[1m [No Name] [m[7m                                                               [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hlet t:var_list = [1, 2, 3][?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet def_list = [4, 5, 6, 7][?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabrewind[?25l[27m[23m[m[H[2J[1;1H[1m + test91.in [m[4m[30m[47m [No Name]  [No Name] [m[7m                                                               [m[1;98H[4m[30m[47mX[m[2;1H:split
:split
:wincmd w
:vert split
:wincmd w
:let w:var_dict = {'dict': 'tabwin'}
:let def_dict = {'dict2': 'newval'}
:wincmd b
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict'))
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:tabnext
:3wincmd w
:unlet w:var_dict
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:$put =string(gettabwinvar(2, 9, ''))
:$put =string(gettabwinvar(2, 9, '', def_dict))
:$put =string(gettabwinvar(9, 3, ''))
:$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict
:$put =string(gettabwinvar(2, 3, '&nux'))
:$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"
:/^start/,$wq! test.out
ENDTEST

start:
'1234'
'1234'
{'var_num': '1234'}
{'var_num': '1234'}
'5678'
{}
{}
''
'5678'
0
0
dos
1
iso-8859-2
'Dance'
'Dance'
{'var_str': 'Dance'}
{'var_str': 'Dance'}
'Chance'
{}
{}
''
'Chance'
0
0[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(3, 'var_list'))[?25l[2;59r[59;1H
[1;60r[59;1H[1, 2, 3][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(3, 'var_list', def_list))[?25l[2;59r[59;1H
[1;60r[59;1H[1, 2, 3][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(3, ''))[?25l[2;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(3, '', def_list))[?25l[2;59r[59;1H
[1;60r[59;1H[4, 5, 6, 7][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htablast[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in  [No Name] [m[1m [No Name] [m[7m                                                               [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hunlet t:var_list[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabrewind[?25l[27m[23m[m[H[2J[1;1H[1m + test91.in [m[4m[30m[47m [No Name]  [No Name] [m[7m                                                               [m[1;98H[4m[30m[47mX[m[2;1H:wincmd w
:let w:var_dict = {'dict': 'tabwin'}
:let def_dict = {'dict2': 'newval'}
:wincmd b
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict'))
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:tabnext
:3wincmd w
:unlet w:var_dict
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:$put =string(gettabwinvar(2, 9, ''))
:$put =string(gettabwinvar(2, 9, '', def_dict))
:$put =string(gettabwinvar(9, 3, ''))
:$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict
:$put =string(gettabwinvar(2, 3, '&nux'))
:$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"
:/^start/,$wq! test.out
ENDTEST

start:
'1234'
'1234'
{'var_num': '1234'}
{'var_num': '1234'}
'5678'
{}
{}
''
'5678'
0
0
dos
1
iso-8859-2
'Dance'
'Dance'
{'var_str': 'Dance'}
{'var_str': 'Dance'}
'Chance'
{}
{}
''
'Chance'
0
0
[1, 2, 3]
[1, 2, 3]
''
[4, 5, 6, 7][?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(3, 'var_list', def_list))[?25l[2;59r[59;1H
[1;60r[59;1H[4, 5, 6, 7][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(9, ''))[?25l[2;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(9, '', def_list))[?25l[2;59r[59;1H
[1;60r[59;1H[4, 5, 6, 7][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(3, '&nu'))[?25l[2;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabvar(3, '&nu', def_list))[?25l[2;59r[59;1H
[1;60r[59;1H[4, 5, 6, 7][60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet def_list[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabonly[?25l[1;1H:tabrewind[1;11H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" test for gettabwinvar()[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in [m[1m [No Name] [m[7m                                                                          [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25htabnew[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in  [No Name] [m[1m [No Name] [m[7m                                                               [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25htabprev[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in [m[1m [No Name] [m[4m[30m[47m [No Name] [m[7m                                                               [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hsplit[?25l[1;15H[1m[35m2[m[1mN o[No Name] [m[4m[30m[47m [No Name] [m[60C[7m [m[1;98H[4m[30m[47mX[m[30;1H[1m[7m[No Name]                                                                                         [m[31;1H[K[59;1H[7m[No Name]                                                                                         [2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in [m[1m [m[1m[35m3[m[1m [No Name] [m[4m[30m[47m [No Name] [m[7m                                                             [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [m[21;1H[1m[7m[No Name]                                                                                         [m[23;1H[1m[34m~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [m[40;1H[7m[No Name]                                                                                         [m[42;1H[1m[34m~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7m[No Name]                                                                                         [2;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hwincmd w[?25l[21;1H[7m[No Name][m[1m[7m [m[7m                                                                                         [m[40;1H[1m[7m[No Name]                                                                                         [m[1;98H[7m [m[1;98H[4m[30m[47mX[22;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hvert split[?25l[1;15H[1m[35m4[m[1m [m[81C[7m [m[1;98H[4m[30m[47mX[m[22;50H[7m|[23;50H|[24;50H|[25;50H|[26;50H|[27;50H|[28;50H|[29;50H|[30;50H|[31;50H|[32;50H|[33;50H|[34;50H|[35;50H|[36;50H|[37;50H|[38;50H|[39;50H|[m[23;51H[1m[34m~[24;51H~[25;51H~[26;51H~[27;51H~[28;51H~[29;51H~[30;51H~[31;51H~[32;51H~[33;51H~[34;51H~[35;51H~[36;51H~[37;51H~[38;51H~[39;51H~[m[40;51H[7m[No Name]                                       [22;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd w[?25l[40;1H[7m[No Name][m[1m[7m [m[7m                                         [m[1m[7m[No Name]                                       [m[1;98H[7m [m[1;98H[4m[30m[47mX[22;51H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet w:var_dict = {'dict': 'tabwin'}[?25l[22;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet def_dict = {'dict2': 'newval'}[?25l[22;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd b[?25l[40;51H[7m[No Name][m[1m[7m [m[7m                                       [m[59;1H[1m[7m[No Name]                                                                                         [m[1;98H[7m [m[1;98H[4m[30m[47mX[41;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25htabrewind[?25l[27m[23m[m[H[2J[1;1H[1m + test91.in [m[4m[30m[47m [m[4m[35m[47m4[m[4m[30m[47m [No Name]  [No Name] [m[7m                                                             [m[1;98H[4m[30m[47mX[m[2;1H:$put =string(gettabwinvar(2, 3, 'var_dict'))
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:tabnext
:3wincmd w
:unlet w:var_dict
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:$put =string(gettabwinvar(2, 9, ''))
:$put =string(gettabwinvar(2, 9, '', def_dict))
:$put =string(gettabwinvar(9, 3, ''))
:$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict
:$put =string(gettabwinvar(2, 3, '&nux'))
:$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"
:/^start/,$wq! test.out
ENDTEST

start:
'1234'
'1234'
{'var_num': '1234'}
{'var_num': '1234'}
'5678'
{}
{}
''
'5678'
0
0
dos
1
iso-8859-2
'Dance'
'Dance'
{'var_str': 'Dance'}
{'var_str': 'Dance'}
'Chance'
{}
{}
''
'Chance'
0
0
[1, 2, 3]
[1, 2, 3]
''
[4, 5, 6, 7]
[4, 5, 6, 7]
''
[4, 5, 6, 7]
''
[4, 5, 6, 7][?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, 'var_dict'))[?25l[2;59r[59;1H
[1;60r[59;1H{'dict': 'tabwin'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))[?25l[2;59r[59;1H
[1;60r[59;1H{'dict': 'tabwin'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, ''))[?25l[2;59r[59;1H
[1;60r[59;1H{'var_dict': {'dict': 'tabwin'}}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, '', def_dict))[?25l[2;59r[59;1H
[1;60r[59;1H{'var_dict': {'dict': 'tabwin'}}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabnext[?25l[27m[23m[m[H[2J[1;1H[4m[30m[47m + test91.in [m[1m [m[1m[35m4[m[1m [No Name] [m[4m[30m[47m [No Name] [m[7m                                                             [m[1;98H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [m[21;1H[7m[No Name]                                                                                         [22;50H|[23;50H|[24;50H|[25;50H|[26;50H|[27;50H|[28;50H|[29;50H|[30;50H|[31;50H|[32;50H|[33;50H|[34;50H|[35;50H|[36;50H|[37;50H|[38;50H|[39;50H|[m[23;1H[1m[34m~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                [m
[7m[No Name]                                         [m[23;51H[1m[34m~                                               [24;51H~                                               [25;51H~                                               [26;51H~                                               [27;51H~                                               [28;51H~                                               [29;51H~                                               [30;51H~                                               [31;51H~                                               [32;51H~                                               [33;51H~                                               [34;51H~                                               [35;51H~                                               [36;51H~                                               [37;51H~                                               [38;51H~                                               [39;51H~                                               [m[40;51H[7m[No Name]                                       [m[42;1H[1m[34m~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[1m[7m[No Name]                                                                                         [41;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25h3wincmd w[?25l[40;51H[1m[7m[No Name]                                       [m[59;1H[7m[No Name][m[1m[7m [m[7m                                                                                         [1;98H [m[1;98H[4m[30m[47mX[22;51H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hunlet w:var_dict[?25l[22;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25htabrewind[?25l[27m[23m[m[H[2J[1;1H[1m + test91.in [m[4m[30m[47m [m[4m[35m[47m4[m[4m[30m[47m [No Name]  [No Name] [m[7m                                                             [m[1;98H[4m[30m[47mX[m[2;1H:tabnext
:3wincmd w
:unlet w:var_dict
:tabrewind
:$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))
:$put =string(gettabwinvar(2, 3, ''))
:$put =string(gettabwinvar(2, 3, '', def_dict))
:$put =string(gettabwinvar(2, 9, ''))
:$put =string(gettabwinvar(2, 9, '', def_dict))
:$put =string(gettabwinvar(9, 3, ''))
:$put =string(gettabwinvar(9, 3, '', def_dict))
:unlet def_dict
:$put =string(gettabwinvar(2, 3, '&nux'))
:$put =string(gettabwinvar(2, 3, '&nux', 1))
:tabonly
:"
:/^start/,$wq! test.out
ENDTEST

start:
'1234'
'1234'
{'var_num': '1234'}
{'var_num': '1234'}
'5678'
{}
{}
''
'5678'
0
0
dos
1
iso-8859-2
'Dance'
'Dance'
{'var_str': 'Dance'}
{'var_str': 'Dance'}
'Chance'
{}
{}
''
'Chance'
0
0
[1, 2, 3]
[1, 2, 3]
''
[4, 5, 6, 7]
[4, 5, 6, 7]
''
[4, 5, 6, 7]
''
[4, 5, 6, 7]
{'dict': 'tabwin'}
{'dict': 'tabwin'}
{'var_dict': {'dict': 'tabwin'}}
{'var_dict': {'dict': 'tabwin'}}[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, 'var_dict', def_dict))[?25l[2;59r[59;1H
[1;60r[59;1H{'dict2': 'newval'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, ''))[?25l[2;59r[59;1H
[1;60r[59;1H{}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, '', def_dict))[?25l[2;59r[59;1H
[1;60r[59;1H{}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 9, ''))[?25l[2;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 9, '', def_dict))[?25l[2;59r[59;1H
[1;60r[59;1H{'dict2': 'newval'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(9, 3, ''))[?25l[2;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(9, 3, '', def_dict))[?25l[2;59r[59;1H
[1;60r[59;1H{'dict2': 'newval'}[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet def_dict[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h$put =string(gettabwinvar(2, 3, '&nux'))[?25l[2;59r[59;1H
[1;60r[59;1H''[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h$put =string(gettabwinvar(2, 3, '&nux', 1))[?25l[2;59r[59;1H
[1;60r[59;1H1[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25htabonly[?25l[1;1H:$put =string(gettabwinvar(2, 9, '', def_dict))[1;48H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h/^start/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New File] 48 lines, 456 characters written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test92.failed test.ok test.out X* viminfo
cp test92.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test92.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test92.in" 48 lines, 842 characters[1;1Hvim: set ft=vim fenc=utf-8:

Tests if :mksession saves cursor columns correctly in presence of tab and
multibyte characters when fileencoding=utf-8.

STARTTEST
:so mbyte.vim
:if !has('mksession')
:  e! test.ok
:  wq! test.out
:endif
:set sessionoptions=buffers splitbelow fileencoding=utf-8
/^start:
:vsplit
j16|:split
j16|:split
j16|:split
j8|:split
j8|:split
j16|:split
j16|:split
j16|:wincmd l
/^start:
:set nowrap
j16|3zl:split
j016|3zl:split
j016|3zl:split
j08|3zl:split
j08|3zl:split
j016|3zl:split
j016|3zl:split
j016|3zl:split
:mksession! test.out
:new test.out
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
:w
:qa!
ENDTEST

start:
no multibyte chAracter[42;9Hone leaDing tab
    four leadinG spaces
two[13Cconsecutive tabs
two     tabs    in one line
one â[34m~@[m¦ multibyteCharacter
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters
[1m[34m~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1Hvim: set ft=vim fenc=utf-8:[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 31 lines, 457 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[38;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has('mksession')[?25l
:  [?12l[?25h:  e! test.ok
[?25l:  [?12l[?25h:  wq! test.out
[?25l:  [?12l[?25h:endif[1;1H[3L[?25l[1;1Hvim: set ft=vim fenc=utf-8:

Tests if :mksession saves cursor columns correctly in presence of tab and[60;1H[K[39;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset sessionoptions=buffers splitbelow fileencoding=utf-8[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start:[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hvsplit[?25l[1;1H                           [22C[7m|[m
Tests if :mksession saves cursor columns correctl[7m|[m
y in presence of tab and                         [7m|[4;50H|[5;50H|[6;50H|[7;50H|[8;50H|[9;50H|[10;50H|[11;50H|[12;50H|[m
ng=utf-8[41C[7m|[m
/^start:[41C[7m|[m
:vsplit   [39C[7m|[16;50H|[17;50H|[m
j16|:split[39C[7m|[19;50H|[m
j8|:split [39C[7m|[21;50H|[m[22;6Hsplit   [36C[7m|[m
j16|:wincmd l[36C[7m|[m
/^start:   [38C[7m|[m
:set nowrap  [36C[7m|[m
j16|3zl:split [35C[7m|[27;50H|[m
j016|3zl:split[35C[7m|[29;50H|[m
j08|3zl:split [35C[7m|[31;50H|[32;50H|[m
j016|3zl:split      [29C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out                         [11C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w  [45C[7m|[m
:qa!   [42C[7m|[m
ENDTEST[42C[7m|[m
      [43C[7m|[m
start:                [27C[7m|[m
no multibyte chAracter [26C[7m|[m
        one leaDing tab[26C[7m|[m
    four leadinG spaces         [17C[7m|[m[45;9H        consecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[1C[34m@[m¦ multibyteCharacter           [11C[7m|[m
a â[1C[34m@~\[mbâ[1C[34m@~][m two multiByte characters           [7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|[50;50H|[51;50H|[52;50H|[53;50H|[54;50H|[55;50H|[56;50H|[57;50H|[58;50H|[m
[1m[7mtest92.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=utf-8.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=utf-8[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone â[34m~@[m¦ multibyteCharacter[48;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[49;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[49;94H[K[50;51H[1m[34m~[51;51H~[52;51H~[53;51H~[54;51H~[55;51H~[56;51H~[57;51H~[58;51H~[m[59;51H[7mtest92.in [+]                                   [41;1H[?12l[?25h
[15C[?25l[m[60;1H[K[60;1H:[?12l[?25hsplit[?25l[1;1Hj16|:split
j16|:wincmd l                                    
/^start:                
:set nowrap                                  
j16|3zl:split
j016|3zl:split
j016|3zl:split
j08|3zl:split        
j08|3zl:split
j016|3zl:split 
j016|3zl:split
j016|3zl:split                                   
:mksession! test.out
:new test.out
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
:w        
:qa!      
ENDTEST   
         
start:   
no multibyte chAracter
        one leaDing tab
    four leadinG spaces
two     [8Cconsecutive tabs
two     tabs    in one line
one â[34m~@[m¦ multibyteCharacter
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters
[7mtest92.in [+]                                    [m
j16|:split   
j16|:wincmd l 
/^start:      
:set nowrap   
j16|3zl:split       
j016|3zl:split
j016|3zl:split                        
j08|3zl:split
j08|3zl:split
j016|3zl:split
j016|3zl:split
j016|3zl:split
:mksession! test.out  
:new test.out          
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
:w [13C                
:qa!                       
ENDTEST                    
                                      
start:                                     
no multibyte chAracter                           
        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
one â[34m~@[m¦ multibyteCharacter                      
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters           
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [50;16H[?12l[?25h[51;16H[?25l[60;1H[K[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1Hj08|3zl:split[36C[7m|[m
j08|3zl:split[36C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[12;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[15;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m
j08|3zl:split[36C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[31;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[34;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m
j08|3zl:split[36C[7m|[m
j08|3zl:split[36C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[51;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[54;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
[1m[7mtest92.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=utf-8.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=utf-8[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone â[34m~@[m¦ multibyteCharacter[48;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[49;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest92.in [+]                                   [54;16H[?12l[?25h[55;16H[?25l[60;1H[m:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1Hj016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[37;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[40;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[52;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[55;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
[1m[7mtest92.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=utf-8.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=utf-8[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone â[34m~@[m¦ multibyteCharacter[48;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[49;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest92.in [+]                                   [56;16H[?12l[?25h[57;16H[57;8H[?25l


[m:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[6;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[9;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[18;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[21;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[29;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[40;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[43;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[52;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[55;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
[1m[7mtest92.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=utf-8.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=utf-8[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone â[34m~@[m¦ multibyteCharacter[48;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[49;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest92.in [+]                                   [57;8H[?12l[?25h[58;8H[?25l

[m:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[5;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[8;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[14;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[17;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[24;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[27;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[34;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[37;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[42;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[52;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[55;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
[1m[7mtest92.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=utf-8.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=utf-8[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone â[34m~@[m¦ multibyteCharacter[48;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[49;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest92.in [+]                                   [58;8H[?12l[?25h[?25l[m[50;1HENDTEST                                          
                                                 
start:                                           
no multibyte chAracter                           
        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
                                                 one â[34m~@[m¦ multibyteCharacter[58;8H[?12l[?25h[8C[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[4;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[7;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[11;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[14;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[19;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[22;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[27;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[30;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[35;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[38;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[51;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[54;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
[1m[7mtest92.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=utf-8.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=utf-8[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone â[34m~@[m¦ multibyteCharacter[48;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[49;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest92.in [+]                                   [58;16H[?12l[?25h[?25l[m[51;1Hstart:                                           
no multibyte chAracter                           
        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
one â[34m~@[m¦ multibyteCharacter                      
                                                 a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[58;16H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m
no multibyte chAracter[27C[7m|[m[53;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
[1m[7mtest92.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=utf-8.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=utf-8[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone â[34m~@[m¦ multibyteCharacter[48;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[49;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest92.in [+]                                   [58;16H[?12l[?25h[?25l[m[52;1H        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
one â[34m~@[m¦ multibyteCharacter                      
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters           
                                                 â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[58;16H[?12l[?25h[?25l

:[?12l[?25hwincmd l[?25l[59;1H[7mtest92.in [+][m[1m[7m [m[7m                                     [m[1m[7mtest92.in [+]                                   [41;51H[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25h^start:[?25l[31msearch hit BOTTOM, continuing at TOP[41;51H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset nowrap[?25l[3;51Hmultibyte characters when fileencoding=utf-8.[4;51H[K[5;51HSTARTTEST[6;51H:so mbyte.vim[7;52Hif !has('mksession')[8;52H  e! test.ok[8;64H[K[9;54Hwq! test.out[10;52Hendif[10;58H[K[11;52Hset sessionoptions=buffers splitbelow fileencod[12;51H/^start:[12;59H[K[13;51H:vsplit[13;58H[K[14;51Hj16|:split[15;51Hj16|:split[17;52H8|:split[17;60H[K[18;52H8|:split[18;60H[K[19;52H16|:split[20;52H16|:split[21;56Hwincmd l[22;51H/^start:[22;59H[K[23;51H:set nowrap[23;63H[K[24;51Hj16|3zl:split[25;51Hj016|3zl:split[26;52H016|3zl:split[27;53H8|3zl:split[27;64H[K[28;53H8|3zl:split[28;64H[K[29;53H16|3zl:split[30;53H16|3zl:split[32;51H:mksession! test.out[33;51H:new test.out[33;64H[K[34;52Hv/\(^ *normal! 0\|^ *exe 'normal!\)/d[35;52Hw[35;53H[K[36;52Hqa![36;55H[K[37;51HENDTEST[38;51H[K[39;51Hstart:[39;57H[K[40;51Hno multibyte chAracter[41;51H        one leaDing tab[42;51H    four leadinG spaces[43;51Htwo             consecutive tabs[44;51Htwo     tabs    in one line[45;51Hone â[34m~@[m¦ multibyteCharacter[45;79H[K[46;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[47;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[48;51H[1m[34m~                                               [49;51H~                                               [39;51H[?12l[?25h[40;51H[15C[?25l[m[2;51Hts if :mksession saves cursor columns correctly [3;51Htibyte characters when fileencoding=utf-8.[3;93H[K[5;51HRTTES[5;57H[K[6;51H mbyte.vim[6;61H[K[7;51H !has('mksession')[7;69H[K[8;51He! test.ok[8;61H[K[9;51Hwq! test.out[9;63H[K[10;51Hdif[10;54H[K[11;51Ht sessionoptions=buffers splitbelow fileencoding[12;51Htart:[12;56H[K[13;51Hplit[13;55H[K[14;51H|:split[14;58H[K[15;51H|:split[15;58H[K[16;51H|:split[16;58H[K[17;51H:split[17;57H[K[18;51H:split[18;57H[K[19;51H|:split[19;58H[K[20;51H|:split[20;58H[K[21;51H|:wincmd l[21;61H[K[22;51Htart:[22;56H[K[23;51Ht nowrap[23;59H[K[24;51H|3zl:split[24;61H[K[25;51H6|3zl:split[25;62H[K[26;51H6|3zl:split[26;62H[K[27;51H|3zl:split[27;61H[K[28;51H|3zl:split[28;61H[K[29;51H6|3zl:split[29;62H[K[30;51H6|3zl:split[30;62H[K[31;51H6|3zl:split[31;62H[K[32;51Hsession! test.out[32;68H[K[33;51Hw test.out[33;61H[K[34;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[34;86H[K[35;51H[K[36;51H![36;52H[K[37;51HTES[37;55H[K[39;51Hrt:[39;54H[K[40;51Hmultibyte chAracter[40;70H[K[41;56Hone leaDing tab[41;71H[K[42;52Hfour leadinG spaces[42;71H[K[43;51H   [10Cconsecutive tabs[43;80H[K[44;51H     tabs    in one line[44;75H[K[45;51H â[34m~@[m¦ multibyteCharacter[45;75H[K[46;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[46;86H[K[47;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[47;91H[K[40;63H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsplit[?25l[1;51H|:wincmd l[2;52Hart:[2;57H[K[3;52H nowrap[3;59H[K[4;51H|3zl:split[5;51H6|3zl:split[6;51H6|3zl:split[7;51H|3zl:split[7;61H[K[8;51H|3zl:split[9;51H6|3zl:split[9;62H[K[10;51H6|3zl:split[11;51H6|3zl:split[11;62H[K[12;51Hsession! test.out[13;51Hw test.out[14;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[15;51H[K[16;51H![16;52H[K[17;51HTEST[17;55H[K[18;51H[K[19;51Hrt:[19;54H[K[20;51Hmultibyte chAracter[21;51H     one leaDing tab[22;51H four leadinG spaces[23;51H             consecutive tabs[24;51H     tabs    in one line[25;51H â[34m~@[m¦ multibyteCharacter[26;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[27;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[28;51H[1m[34m~                                               [m[29;51H[7mtest92.in [+]                                   [m[30;51H|:wincmd l[30;61H[K[31;51Htart:[31;56H[K[32;51Ht nowrap[32;60H[K[33;51H|3zl:spli[34;51H6|3zl:split[34;62H[K[35;51H6|3zl:split[36;51H|3zl:split[37;51H|3zl:split[38;51H6|3zl:split[39;51H6|3zl:split[40;51H6|3zl:split[40;62H[K[41;51Hsession! test.out[41;68H[K[42;51Hw test.out[42;61H[K[43;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[44;56H[K[45;51H![45;52H[K[46;51HTEST[46;55H[K[47;51H[K[48;51Hrt:[48;54H[K[49;51Hmultibyte chAracter[49;70H[K[50;51H     one leaDing tab[50;71H[K[51;51H four leadinG spaces[51;71H[K[52;51H             consecutive tabs[52;80H[K[53;51H     tabs    in one line[53;75H[K[54;51H â[34m~@[m¦ multibyteCharacter[54;75H[K[55;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[55;86H[K[56;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[56;91H[K[49;63H[?12l[?25h[50;63H[?25l[30;51Hj16|:wincmd l[31;51H/^start:[32;51H:set nowrap[33;51Hj16|3zl:split[34;51Hj016|3zl:split[35;51Hj016|3zl:split[36;51Hj08|3zl:split[37;51Hj08|3zl:split[38;51Hj016|3zl:split[39;51Hj016|3zl:split[40;51Hj016|3zl:split[41;51H:mksession! test.out[42;51H:new test.out[43;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[44;51H:w[45;51H:qa![46;51HENDTEST[48;51Hstart:[49;51Hno multibyte chAracter[50;56H   one leaDing tab[51;52H   four leadinG spaces[52;51Htwo[10C   consecutive tabs[53;51Htwo     tabs    in one line[54;51Hone â[34m~@[m¦ multibyteCharacter[55;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[56;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[50;58H[?12l[?25h[8C[?25l[30;51H|:wincmd l[30;61H[K[31;51Htart:[31;56H[K[32;51Ht nowrap[32;59H[K[33;51H|3zl:split[33;61H[K[34;51H6|3zl:split[34;62H[K[35;51H6|3zl:split[35;62H[K[36;51H|3zl:split[36;61H[K[37;51H|3zl:split[37;61H[K[38;51H6|3zl:split[38;62H[K[39;51H6|3zl:split[39;62H[K[40;51H6|3zl:split[40;62H[K[41;51Hsession! test.out[41;68H[K[42;51Hw test.out[42;61H[K[43;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[43;86H[K[44;51H[K[45;51H![45;52H[K[46;51HTES[46;55H[K[48;51Hrt:[48;54H[K[49;51Hmultibyte chAracter[49;70H[K[50;56Hone leaDing tab[50;71H[K[51;52Hfour leadinG spaces[51;71H[K[52;51H   [10Cconsecutive tabs[52;80H[K[53;51H     tabs    in one line[53;75H[K[54;51H â[34m~@[m¦ multibyteCharacter[54;75H[K[55;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[55;86H[K[56;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[56;91H[K[50;63H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51H|3zl:split[2;51H6|3zl:split[3;51H6|3zl:split[4;51H6|3zl:split[5;51Hsession! test.out[6;51Hw test.out[7;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[9;51H![10;51HTEST[12;51Hrt:[13;51Hmultibyte chAracter[14;56Hone leaDing tab[15;52Hfour leadinG spaces[16;64Hconsecutive tabs[17;56Htabs    in one line[18;52Hâ[34m~@[m¦ multibyteCharacter[19;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[20;51H[7mtest92.in [+]                                   [m[21;51H6|3zl:split[22;51H6|3zl:split[23;51H6|3zl:split[24;51Hsession! test.out[25;51Hw test.out[26;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[28;51H![29;51HTEST[31;51Hrt:[32;51Hmultibyte chAracter[33;56Hone leaDing tab[34;52Hfour leadinG spaces[35;64Hconsecutive tabs[36;56Htabs    in one line[37;52Hâ[34m~@[m¦ multibyteCharacter[38;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[39;51H[7mtest92.in [+]                                   [m[40;51H|3zl:split[41;51H6|3zl:split[42;51H6|3zl:split[43;51H6|3zl:split[44;51Hsession! test.out[45;51Hw test.out[46;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[48;51H![49;51HTEST[51;51Hrt:[52;51Hmultibyte chAracter[53;56Hone leaDing tab[54;52Hfour leadinG spaces[55;64Hconsecutive tabs[56;56Htabs    in one line[57;52Hâ[34m~@[m¦ multibyteCharacter[58;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[59;51H[1m[7mtest92.in [+]                                   [53;63H[?12l[?25h[54;63H[?25l[m[40;51Hj08|3zl:split[41;51Hj016|3zl:split[42;51Hj016|3zl:split[43;51Hj016|3zl:split[44;51H:mksession! test.out[45;51H:new test.out[46;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[47;51H:w[48;51H:qa![49;51HENDTEST[51;51Hstart:[52;51Hno multibyte chAracter[53;56H   one leaDing tab[54;52H   four leadinG spaces[55;51Htwo[10C   consecutive tabs[56;51Htwo     tabs    in one line[57;51Hone â[34m~@[m¦ multibyteCharacter[58;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[54;51H[?12l[?25h[15C[?25l[40;51H|3zl:split[40;61H[K[41;51H6|3zl:split[41;62H[K[42;51H6|3zl:split[42;62H[K[43;51H6|3zl:split[43;62H[K[44;51Hsession! test.out[44;68H[K[45;51Hw test.out[45;61H[K[46;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[46;86H[K[47;51H[K[48;51H![48;52H[K[49;51HTES[49;55H[K[51;51Hrt:[51;54H[K[52;51Hmultibyte chAracter[52;70H[K[53;56Hone leaDing tab[53;71H[K[54;52Hfour leadinG spaces[54;71H[K[55;51H   [10Cconsecutive tabs[55;80H[K[56;51H     tabs    in one line[56;75H[K[57;51H â[34m~@[m¦ multibyteCharacter[57;75H[K[58;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[58;86H[K[54;63H[?12l[?25h[?25l[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51H6|3zl:split[2;51Hsession! test.out[3;51Hw test.out[4;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[6;51H![7;51HTEST[9;51Hrt:[10;51Hmultibyte chAracter[11;56Hone leaDing tab[12;52Hfour leadinG spaces[13;64Hconsecutive tabs[14;56Htabs    in one line[15;51H[7mtest92.in [+]                                   [m[16;51Hsession! test.out[17;51Hw test.out[18;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[20;51H![21;51HTEST[23;51Hrt:[24;51Hmultibyte chAracter[25;56Hone leaDing tab[26;52Hfour leadinG spaces[27;64Hconsecutive tabs[28;56Htabs    in one line[29;52Hâ[34m~@[m¦ multibyteCharacter[30;51H[7mtest92.in [+]                                   [m[31;51Hw test.out[32;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[34;51H![35;51HTEST[37;51Hrt:[38;51Hmultibyte chAracter[39;56Hone leaDing tab[40;52Hfour leadinG spaces[41;64Hconsecutive tabs[42;56Htabs    in one line[43;52Hâ[34m~@[m¦ multibyteCharacter[44;51H[7mtest92.in [+]                                   [m[45;51Hsession! test.out[46;51Hw test.out[47;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[49;51H![50;51HTEST[52;51Hrt:[53;51Hmultibyte chAracter[54;56Hone leaDing tab[55;52Hfour leadinG spaces[56;64Hconsecutive tabs[57;56Htabs    in one line[58;52Hâ[34m~@[m¦ multibyteCharacter[59;51H[1m[7mtest92.in [+]                                   [55;63H[?12l[?25h[56;63H[?25l[m[45;51H:mksession! test.out[46;51H:new test.out[47;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[48;51H:w[49;51H:qa![50;51HENDTEST[52;51Hstart:[53;51Hno multibyte chAracter[54;56H   one leaDing tab[55;52H   four leadinG spaces[56;51Htwo[10C   consecutive tabs[57;51Htwo     tabs    in one line[58;51Hone â[34m~@[m¦ multibyteCharacter[56;51H[?12l[?25h[7C[?25l[45;51Hsession! test.out[45;68H[K[46;51Hw test.out[46;61H[K[47;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[47;86H[K[48;51H[K[49;51H![49;52H[K[50;51HTES[50;55H[K[52;51Hrt:[52;54H[K[53;51Hmultibyte chAracter[53;70H[K[54;56Hone leaDing tab[54;71H[K[55;52Hfour leadinG spaces[55;71H[K[56;51H   [10Cconsecutive tabs[56;80H[K[57;51H     tabs    in one line[57;75H[K[58;51H â[34m~@[m¦ multibyteCharacter[58;75H[K[56;55H[?12l[?25h[?25l[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51Hw test.out[2;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[4;51H![5;51HTEST[7;51Hrt:[8;51Hmultibyte chAracter[9;56Hone leaDing tab[10;52Hfour leadinG spaces[11;64Hconsecutive tabs[12;51H[7mtest92.in [+]                                   [m[13;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[15;51H![16;51HTEST[18;51Hrt:[19;51Hmultibyte chAracter[20;56Hone leaDing tab[21;52Hfour leadinG spaces[22;64Hconsecutive tabs[23;56Htabs    in one line[24;51H[7mtest92.in [+]                                   [m[25;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[27;51H![28;51HTEST[30;51Hrt:[31;51Hmultibyte chAracter[32;56Hone leaDing tab[33;52Hfour leadinG spaces[34;64Hconsecutive tabs[35;56Htabs    in one line[36;51H[7mtest92.in [+]                                   [m[38;51H![39;51HTEST[41;51Hrt:[42;51Hmultibyte chAracter[43;56Hone leaDing tab[44;52Hfour leadinG spaces[45;64Hconsecutive tabs[46;56Htabs    in one line[47;51H[7mtest92.in [+]                                   [m[48;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[50;51H![51;51HTEST[53;51Hrt:[54;51Hmultibyte chAracter[55;56Hone leaDing tab[56;52Hfour leadinG spaces[57;64Hconsecutive tabs[58;56Htabs    in one line[59;51H[1m[7mtest92.in [+]                                   [57;55H[?12l[?25h[58;55H[?25l[m[48;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[49;51H:w[50;51H:qa![51;51HENDTEST[53;51Hstart:[54;51Hno multibyte chAracter[55;56H   one leaDing tab[56;52H   four leadinG spaces[57;51Htwo[10C   consecutive tabs[58;51Htwo     tabs    in one line[58;51H[?12l[?25h[7C[?25l[48;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[48;86H[K[49;51H[K[50;51H![50;52H[K[51;51HTES[51;55H[K[53;51Hrt:[53;54H[K[54;51Hmultibyte chAracter[54;70H[K[55;56Hone leaDing tab[55;71H[K[56;52Hfour leadinG spaces[56;71H[K[57;51H   [10Cconsecutive tabs[57;80H[K[58;51H     tabs    in one line[58;75H[K[58;55H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[3;51H![4;51HTEST[6;51Hrt:[7;51Hmultibyte chAracter[8;56Hone leaDing tab[9;52Hfour leadinG spaces[10;51H[7mtest92.in [+]                                   [m[12;51H![13;51HTEST[15;51Hrt:[16;51Hmultibyte chAracter[17;56Hone leaDing tab[18;52Hfour leadinG spaces[19;64Hconsecutive tabs[20;51H[7mtest92.in [+]                                   [m[21;51H![22;51HTEST[24;51Hrt:[25;51Hmultibyte chAracter[26;56Hone leaDing tab[27;52Hfour leadinG spaces[28;64Hconsecutive tabs[29;56Htabs    in one line[30;51H[7mtest92.in [+]                                   [m[31;51H![32;51HTEST[34;51Hrt:[35;51Hmultibyte chAracter[36;56Hone leaDing tab[37;52Hfour leadinG spaces[38;64Hconsecutive tabs[39;56Htabs    in one line[40;51H[7mtest92.in [+]                                   [m[41;51HTEST[43;51Hrt:[44;51Hmultibyte chAracter[45;56Hone leaDing tab[46;52Hfour leadinG spaces[47;64Hconsecutive tabs[48;56Htabs    in one line[49;51H[7mtest92.in [+]                                   [m[50;51H![51;51HTEST[53;51Hrt:[54;51Hmultibyte chAracter[55;56Hone leaDing tab[56;52Hfour leadinG spaces[57;64Hconsecutive tabs[58;56Htabs    in one line[59;51H[1m[7mtest92.in [+]                                   [58;55H[?12l[?25h[?25l[m[50;51HTEST                                            [51;51H                                                [52;51Hrt:                                             [53;51Hmultibyte chAracter                             [54;51H     one leaDing tab                            [55;51H four leadinG spaces                            [56;51H             consecutive tabs                   [57;51H     tabs    in one line                        [58;51H                                                [58;52Hâ[34m~@[m¦ multibyteCharacter[58;55H[?12l[?25h[?25l[50;51HENDTEST[52;51Hstart:[53;51Hno multibyte chAracter[54;56H   one leaDing tab[55;52H   four leadinG spaces[56;51Htwo[10C   consecutive tabs[57;51Htwo     tabs    in one line[58;51Hone â[34m~@[m¦ multibyteCharacter[58;51H[?12l[?25h[15C[?25l[50;51HTES[50;55H[K[52;51Hrt:[52;54H[K[53;51Hmultibyte chAracter[53;70H[K[54;56Hone leaDing tab[54;71H[K[55;52Hfour leadinG spaces[55;71H[K[56;51H   [10Cconsecutive tabs[56;80H[K[57;51H     tabs    in one line[57;75H[K[58;51H â[34m~@[m¦ multibyteCharacter[58;75H[K[58;63H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51H![2;51HTEST[4;51Hrt:[5;51Hmultibyte chAracter[6;56Hone leaDing tab[7;52Hfour leadinG spaces[8;51H[7mtest92.in [+]                                   [m[9;51HTEST[11;51Hrt:[12;51Hmultibyte chAracter[13;56Hone leaDing tab[14;52Hfour leadinG spaces[15;64Hconsecutive tabs[16;51H[7mtest92.in [+]                                   [m[17;51H![18;51HTEST[20;51Hrt:[21;51Hmultibyte chAracter[22;56Hone leaDing tab[23;52Hfour leadinG spaces[24;64Hconsecutive tabs[25;51H[7mtest92.in [+]                                   [m[27;51Hrt:[28;51Hmultibyte chAracter[29;56Hone leaDing tab[30;52Hfour leadinG spaces[31;64Hconsecutive tabs[32;56Htabs    in one line[33;51H[7mtest92.in [+]                                   [m[34;51HTEST[36;51Hrt:[37;51Hmultibyte chAracter[38;56Hone leaDing tab[39;52Hfour leadinG spaces[40;64Hconsecutive tabs[41;56Htabs    in one line[42;51H[7mtest92.in [+]                                   [m[43;51Hrt:[44;51Hmultibyte chAracter[45;56Hone leaDing tab[46;52Hfour leadinG spaces[47;64Hconsecutive tabs[48;56Htabs    in one line[49;52Hâ[34m~@[m¦ multibyteCharacter[50;51H[7mtest92.in [+]                                   [m[52;51Hrt:[53;51Hmultibyte chAracter[54;56Hone leaDing tab[55;52Hfour leadinG spaces[56;64Hconsecutive tabs[57;56Htabs    in one line[58;52Hâ[34m~@[m¦ multibyteCharacter[59;51H[1m[7mtest92.in [+]                                   [58;63H[?12l[?25h[?25l[m[51;51Hrt:                                             [52;51Hmultibyte chAracter                             [53;51H     one leaDing tab                            [54;51H four leadinG spaces                            [55;51H             consecutive tabs                   [56;51H     tabs    in one line                        [57;51H â[34m~@[m¦ multibyteCharacter                        [58;51H                                                [58;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[58;63H[?12l[?25h[?25l[51;51Hstart:[52;51Hno multibyte chAracter[53;56H   one leaDing tab[54;52H   four leadinG spaces[55;51Htwo[10C   consecutive tabs[56;51Htwo     tabs    in one line[57;51Hone â[34m~@[m¦ multibyteCharacter[58;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[58;51H[?12l[?25h[15C[?25l[51;51Hrt:[51;54H[K[52;51Hmultibyte chAracter[52;70H[K[53;56Hone leaDing tab[53;71H[K[54;52Hfour leadinG spaces[54;71H[K[55;51H   [10Cconsecutive tabs[55;80H[K[56;51H     tabs    in one line[56;75H[K[57;51H â[34m~@[m¦ multibyteCharacter[57;75H[K[58;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[58;86H[K[58;63H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51H![2;51HTEST[4;51Hrt:[5;51Hmultibyte chAracter[6;56Hone leaDing tab[7;51H[7mtest92.in [+]                                   [m[8;51HTEST[10;51Hrt:[11;51Hmultibyte chAracter[12;56Hone leaDing tab[13;52Hfour leadinG spaces[14;51H[7mtest92.in [+]                                   [m[16;51Hrt:[17;51Hmultibyte chAracter[18;56Hone leaDing tab[19;52Hfour leadinG spaces[20;64Hconsecutive tabs[21;51H[7mtest92.in [+]                                   [m[23;51Hrt:[24;51Hmultibyte chAracter[25;56Hone leaDing tab[26;52Hfour leadinG spaces[27;64Hconsecutive tabs[28;56Htabs    in one line[29;51H[7mtest92.in [+]                                   [m[30;51Hrt:[31;51Hmultibyte chAracter[32;56Hone leaDing tab[33;52Hfour leadinG spaces[34;64Hconsecutive tabs[35;56Htabs    in one line[36;51H[7mtest92.in [+]                                   [m[37;51Hrt:[38;51Hmultibyte chAracter[39;56Hone leaDing tab[40;52Hfour leadinG spaces[41;64Hconsecutive tabs[42;56Htabs    in one line[43;52Hâ[34m~@[m¦ multibyteCharacter[44;51H[7mtest92.in [+]                                   [m[45;56Hone leaDing tab[46;52Hfour leadinG spaces[47;64Hconsecutive tabs[48;56Htabs    in one line[49;52Hâ[34m~@[m¦ multibyteCharacter[50;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[51;51H[7mtest92.in [+]                                   [m[52;51Hmultibyte chAracter[53;56Hone leaDing tab[54;52Hfour leadinG spaces[55;64Hconsecutive tabs[56;56Htabs    in one line[57;52Hâ[34m~@[m¦ multibyteCharacter[58;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[59;51H[1m[7mtest92.in [+]                                   [58;63H[?12l[?25h[?25l[m[52;51H     one leaDing tab                            [53;51H four leadinG spaces                            [54;51H             consecutive tabs                   [55;51H     tabs    in one line                        [56;51H â[34m~@[m¦ multibyteCharacter                        [57;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters             [58;51H                                                [58;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[58;63H[?12l[?25h[?25l[52;56H   one leaDing tab[53;52H   four leadinG spaces[54;51Htwo[10C   consecutive tabs[55;51Htwo     tabs    in one line[56;51Hone â[34m~@[m¦ multibyteCharacter[57;51Ha â[34m~@~\[mbâ[34m~@~][m two multiByte characters[58;51Hâ[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[58;51H[?12l[?25h[15C[?25l[52;56Hone leaDing tab[52;71H[K[53;52Hfour leadinG spaces[53;71H[K[54;51H   [10Cconsecutive tabs[54;80H[K[55;51H     tabs    in one line[55;75H[K[56;51H â[34m~@[m¦ multibyteCharacter[56;75H[K[57;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[57;86H[K[58;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[58;91H[K[58;63H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51H![2;51HTEST[4;51Hrt:[5;51Hmultibyte chAracter[6;56Hone leaDing tab[7;51H[7mtest92.in [+]                                   [m[9;51Hrt:[10;51Hmultibyte chAracter[11;56Hone leaDing tab[12;52Hfour leadinG spaces[13;51H[7mtest92.in [+]                                   [m[15;51Hrt:[16;51Hmultibyte chAracter[17;56Hone leaDing tab[18;52Hfour leadinG spaces[19;64Hconsecutive tabs[20;51H[7mtest92.in [+]                                   [m[21;51Hrt:[22;51Hmultibyte chAracter[23;56Hone leaDing tab[24;52Hfour leadinG spaces[25;64Hconsecutive tabs[26;51H[7mtest92.in [+]                                   [m[27;51Hrt:[28;51Hmultibyte chAracter[29;56Hone leaDing tab[30;52Hfour leadinG spaces[31;64Hconsecutive tabs[32;56Htabs    in one line[33;51H[7mtest92.in [+]                                   [m[34;56Hone leaDing tab[35;52Hfour leadinG spaces[36;64Hconsecutive tabs[37;56Htabs    in one line[38;52Hâ[34m~@[m¦ multibyteCharacter[39;51H[7mtest92.in [+]                                   [m[40;56Hone leaDing tab[41;52Hfour leadinG spaces[42;64Hconsecutive tabs[43;56Htabs    in one line[44;52Hâ[34m~@[m¦ multibyteCharacter[45;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[46;51H[7mtest92.in [+]                                   [m[47;64Hconsecutive tabs[48;56Htabs    in one line[49;52Hâ[34m~@[m¦ multibyteCharacter[50;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[51;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[52;51H[7mtest92.in [+]                                   [m[53;52Hfour leadinG spaces[54;64Hconsecutive tabs[55;56Htabs    in one line[56;52Hâ[34m~@[m¦ multibyteCharacter[57;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[58;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[59;51H[1m[7mtest92.in [+]                                   [58;63H[?12l[?25h[?25l

[m:[?12l[?25hmksession! test.out[?25l[58;63H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew test.out[?25l"test.out" [60;12H[K[60;12H280 lines, 5346 characters[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test92.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test92.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|
test92.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|
test92.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one â[34m~@[m¦ multibyteCharacter[22C[7m|[m
a â[34m~@~\[mbâ[34m~@~][m two multiByte characters[11C[7m|[m
â[34m~@~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters      [7m|
test92.in [+]                                     [m[1;51HTEST[3;51Hrt:[4;51Hmultibyte chAracter[5;56Hone leaDing tab[6;51H[7mtest92.in [+]                                   [m[8;51Hrt:[9;51Hmultibyte chAracter[10;56Hone leaDing tab[11;52Hfour leadinG spaces[12;51H[7mtest92.in [+]                                   [m[13;51Hrt:[14;51Hmultibyte chAracter[15;56Hone leaDing tab[16;52Hfour leadinG spaces[17;64Hconsecutive tabs[18;51H[7mtest92.in [+]                                   [m[19;51Hrt:[20;51Hmultibyte chAracter[21;56Hone leaDing tab[22;52Hfour leadinG spaces[23;64Hconsecutive tabs[24;51H[7mtest92.in [+]                                   [m[25;51Hmultibyte chAracter[26;56Hone leaDing tab[27;52Hfour leadinG spaces[28;64Hconsecutive tabs[29;56Htabs    in one line[30;51H[7mtest92.in [+]                                   [m[31;56Hone leaDing tab[32;52Hfour leadinG spaces[33;64Hconsecutive tabs[34;56Htabs    in one line[35;52Hâ[34m~@[m¦ multibyteCharacter[36;51H[7mtest92.in [+]                                   [m[37;52Hfour leadinG spaces[38;64Hconsecutive tabs[39;56Htabs    in one line[40;52Hâ[34m~@[m¦ multibyteCharacter[41;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[42;51H[7mtest92.in [+]                                   [m[43;64Hconsecutive tabs[44;56Htabs    in one line[45;52Hâ[34m~@[m¦ multibyteCharacter[46;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[47;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[48;51H[7mtest92.in [+]                                   [m[49;56Htabs    in one line[50;52Hâ[34m~@[m¦ multibyteCharacter[51;51H[34m~@~\[mbâ[34m~@~][m two multiByte characters[52;51H[34m~\[mcâ[34m~@~][m1â[34m~B[m¬ three mulTibyte characters[53;51H[7mtest92.in [+]                                   [m[54;51Hlet SessionLoad = 1[55;51Hif !&cp | set cp | endif[56;51Hlet s:so_save = &so | let s:siso_save = &siso |[57;51Hlet v:this_session=expand("<sfile>:p")[58;51Hsilent only[59;51H[1m[7mtest.out                                        [54;51H[?12l[?25h[?25l[60;1H[m:[?12l[?25hv/\(^ *normal! 0\|^ *exe 'normal!\)/d[?25l254 fewer lines[60;17H[K[54;51H  normal! 016|[54;65H[K[55;51H  exe 'normal! ' . s:c . '|zs' . 16 . '|'[56;51H  normal! 016|[56;65H[K[57;51H  exe 'normal! ' . s:c . '|zs' . 16 . '|'[58;51H  normal! 016|[59;60H[1m[7m[+][58;53H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 26 lines, 611 characters written[59;60H[1m[7m    [58;53H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test93.failed test.ok test.out X* viminfo
cp test93.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test93.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test93.in" 48 lines, 833 characters[1;1Hvim: set ft=vim fenc=latin1:

Tests if :mksession saves cursor columns correctly in presence of tab and
multibyte characters when fileencoding=latin1.

STARTTEST
:so mbyte.vim
:if !has('mksession')
:  e! test.ok
:  wq! test.out
:endif
:set sessionoptions=buffers splitbelow fileencoding=latin1
/^start:
:vsplit
j16|:split
j16|:split
j16|:split
j8|:split
j8|:split
j16|:split
j16|:split
j16|:wincmd l
/^start:
:set nowrap
j16|3zl:split
j016|3zl:split
j016|3zl:split
j08|3zl:split
j08|3zl:split
j016|3zl:split
j016|3zl:split
j016|3zl:split
:mksession! test.out
:new test.out
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
:w
:qa!
ENDTEST

start:
no multibyte chAracter[42;9Hone leaDing tab
    four leadinG spaces
two[13Cconsecutive tabs
two     tabs    in one line
one ä multibyteCharacter
aä Ä  two multiByte characters
Aäöü  three mulTibyte characters
[1m[34m~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1Hvim: set ft=vim fenc=latin1:[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 31 lines, 458 characters written[7;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[38;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hif !has('mksession')[?25l
:  [?12l[?25h:  e! test.ok
[?25l:  [?12l[?25h:  wq! test.out
[?25l:  [?12l[?25h:endif[1;1H[3L[?25l[1;1Hvim: set ft=vim fenc=latin1:

Tests if :mksession saves cursor columns correctly in presence of tab and[60;1H[K[39;1H[?12l[?25h[?25l[60;1H:[?12l[?25hset sessionoptions=buffers splitbelow fileencoding=latin1[?25l[39;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^start:[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hvsplit[?25l[1;1H                            [21C[7m|[m
Tests if :mksession saves cursor columns correctl[7m|[m
y in presence of tab and                         [7m|[4;50H|[5;50H|[6;50H|[7;50H|[8;50H|[9;50H|[10;50H|[11;50H|[12;50H|[m
ng=latin1[40C[7m|[m
/^start:[41C[7m|[m
:vsplit   [39C[7m|[16;50H|[17;50H|[m
j16|:split[39C[7m|[19;50H|[m
j8|:split [39C[7m|[21;50H|[m[22;6Hsplit   [36C[7m|[m
j16|:wincmd l[36C[7m|[m
/^start:   [38C[7m|[m
:set nowrap  [36C[7m|[m
j16|3zl:split [35C[7m|[27;50H|[m
j016|3zl:split[35C[7m|[29;50H|[m
j08|3zl:split [35C[7m|[31;50H|[32;50H|[m
j016|3zl:split      [29C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out                         [11C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w  [45C[7m|[m
:qa!   [42C[7m|[m
ENDTEST[42C[7m|[m
      [43C[7m|[m
start:                [27C[7m|[m
no multibyte chAracter [26C[7m|[m
        one leaDing tab[26C[7m|[m
    four leadinG spaces         [17C[7m|[m[45;9H        consecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter      [19C[7m|[m
aä Ä  two multiByte characters  [17C[7m|[m
Aäöü  three mulTibyte characters                 [7m|[50;50H|[51;50H|[52;50H|[53;50H|[54;50H|[55;50H|[56;50H|[57;50H|[58;50H|[m
[1m[7mtest93.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=latin1.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=latin1[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone ä multibyteCharacter[48;51Haä Ä  two multiByte characters[49;51HAäöü  three mulTibyte characters[49;83H[K[50;51H[1m[34m~[51;51H~[52;51H~[53;51H~[54;51H~[55;51H~[56;51H~[57;51H~[58;51H~[m[59;51H[7mtest93.in [+]                                   [41;1H[?12l[?25h
[15C[?25l[m[60;1H[K[60;1H:[?12l[?25hsplit[?25l[1;1Hj16|:split
j16|:wincmd l                                    
/^start:                
:set nowrap                                   
j16|3zl:split
j016|3zl:split
j016|3zl:split
j08|3zl:split        
j08|3zl:split
j016|3zl:split 
j016|3zl:split
j016|3zl:split                                   
:mksession! test.out
:new test.out
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
:w        
:qa!      
ENDTEST   
         
start:   
no multibyte chAracter
        one leaDing tab
    four leadinG spaces
two     [8Cconsecutive tabs
two     tabs    in one line
one ä multibyteCharacter
aä Ä  two multiByte characters
Aäöü  three mulTibyte characters
[7mtest93.in [+]                                    [m
j16|:split   
j16|:wincmd l 
/^start:      
:set nowrap   
j16|3zl:split       
j016|3zl:split
j016|3zl:split                        
j08|3zl:split
j08|3zl:split
j016|3zl:split
j016|3zl:split
j016|3zl:split
:mksession! test.out  
:new test.out          
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d
:w [13C                
:qa!                       
ENDTEST                 
                              
start:                          
no multibyte chAracter                           
        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
one ä multibyteCharacter                         
aä Ä  two multiByte characters                   
Aäöü  three mulTibyte characters                 [50;16H[?12l[?25h[51;16H[?25l[60;1H[K[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1Hj08|3zl:split[36C[7m|[m
j08|3zl:split[36C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[12;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[15;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m
j08|3zl:split[36C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[31;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[34;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m
j08|3zl:split[36C[7m|[m
j08|3zl:split[36C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[51;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[54;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
[1m[7mtest93.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=latin1.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=latin1[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone ä multibyteCharacter[48;51Haä Ä  two multiByte characters[49;51HAäöü  three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest93.in [+]                                   [54;16H[?12l[?25h[55;16H[?25l[60;1H[m:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1Hj016|3zl:split[35C[7m|[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[37;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[40;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
j016|3zl:split[35C[7m|[m
:mksession! test.out[29C[7m|[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[52;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[55;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
[1m[7mtest93.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=latin1.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=latin1[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone ä multibyteCharacter[48;51Haä Ä  two multiByte characters[49;51HAäöü  three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest93.in [+]                                   [56;16H[?12l[?25h[57;16H[57;8H[?25l


[m:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[6;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[9;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
:new test.out[36C[7m|[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[18;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[21;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[29;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[40;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[43;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[52;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[55;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
[1m[7mtest93.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=latin1.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=latin1[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone ä multibyteCharacter[48;51Haä Ä  two multiByte characters[49;51HAäöü  three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest93.in [+]                                   [57;8H[?12l[?25h[58;8H[?25l

[m:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[11C[7m|[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[5;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[8;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[14;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[17;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[24;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[27;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[34;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[37;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[42;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[52;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[55;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
[1m[7mtest93.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=latin1.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=latin1[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone ä multibyteCharacter[48;51Haä Ä  two multiByte characters[49;51HAäöü  three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest93.in [+]                                   [58;8H[?12l[?25h[?25l[m[50;1HENDTEST                                          
                                                 
start:                                           
no multibyte chAracter                           
        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
                                                 one ä multibyteCharacter[58;8H[?12l[?25h[8C[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:w[47C[7m|[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[4;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[7;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[11;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[14;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[m
:qa![45C[7m|[m
ENDTEST[42C[7m|[19;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[22;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[27;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[30;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[35;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[38;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[51;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[54;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
[1m[7mtest93.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=latin1.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=latin1[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone ä multibyteCharacter[48;51Haä Ä  two multiByte characters[49;51HAäöü  three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest93.in [+]                                   [58;16H[?12l[?25h[?25l[m[51;1Hstart:                                           
no multibyte chAracter                           
        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
one ä multibyteCharacter                         
                                                 aä Ä  two multiByte characters[58;16H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m
no multibyte chAracter[27C[7m|[m[53;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
[1m[7mtest93.in [+]                                     [m[2;51HTests if :mksession saves cursor columns correct[3;51Hly in presence of tab and[4;51Hmultibyte characters when fileencoding=latin1.[6;51HSTARTTEST[7;51H:so mbyte.vim[8;51H:if !has('mksession')[9;51H:  e! test.ok[10;51H:  wq! test.out[11;51H:endif[12;51H:set sessionoptions=buffers splitbelow fileencod[13;51Hing=latin1[14;51H/^start:[15;51H:vsplit[16;51Hj16|:split[17;51Hj16|:split[18;51Hj16|:split[19;51Hj8|:split[20;51Hj8|:split[21;51Hj16|:split[22;51Hj16|:split[23;51Hj16|:wincmd l[24;51H/^start:[25;51H:set nowrap[26;51Hj16|3zl:split[27;51Hj016|3zl:split[28;51Hj016|3zl:split[29;51Hj08|3zl:split[30;51Hj08|3zl:split[31;51Hj016|3zl:split[32;51Hj016|3zl:split[33;51Hj016|3zl:split[34;51H:mksession! test.out[35;51H:new test.out[36;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[37;51H:w[38;51H:qa![39;51HENDTEST[41;51Hstart:[42;51Hno multibyte chAracter[43;59Hone leaDing tab[44;55Hfour leadinG spaces[45;51Htwo[13Cconsecutive tabs[46;51Htwo     tabs    in one line[47;51Hone ä multibyteCharacter[48;51Haä Ä  two multiByte characters[49;51HAäöü  three mulTibyte characters[50;51H[1m[34m~                                               [51;51H~                                               [52;51H~                                               [53;51H~                                               [54;51H~                                               [55;51H~                                               [56;51H~                                               [57;51H~                                               [58;51H~                                               [m[59;51H[7mtest93.in [+]                                   [58;16H[?12l[?25h[?25l[m[52;1H        one leaDing tab                          
    four leadinG spaces                          
two             consecutive tabs                 
two     tabs    in one line                      
one ä multibyteCharacter                         
aä Ä  two multiByte characters                   
                                                 Aäöü  three mulTibyte characters[58;16H[?12l[?25h[?25l

:[?12l[?25hwincmd l[?25l[59;1H[7mtest93.in [+][m[1m[7m [m[7m                                     [m[1m[7mtest93.in [+]                                   [41;51H[?12l[?25h[?25l[m[60;1H[K[60;1H/[?12l[?25h^start:[?25l[31msearch hit BOTTOM, continuing at TOP[41;51H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset nowrap[?25l[3;51Hmultibyte characters when fileencoding=latin1.[4;51H[K[5;51HSTARTTEST[6;51H:so mbyte.vim[7;52Hif !has('mksession')[8;52H  e! test.ok[8;64H[K[9;54Hwq! test.out[10;52Hendif[10;58H[K[11;52Hset sessionoptions=buffers splitbelow fileencod[12;51H/^start:[12;59H[K[13;51H:vspli[13;58H[K[14;51Hj16|:split[15;51Hj16|:split[17;52H8|:split[17;60H[K[18;52H8|:split[18;60H[K[19;52H16|:split[20;52H16|:split[21;56Hwincmd l[22;51H/^start:[22;59H[K[23;51H:set nowrap[23;63H[K[24;51Hj16|3zl:split[25;51Hj016|3zl:split[26;52H016|3zl:split[27;53H8|3zl:split[27;64H[K[28;53H8|3zl:split[28;64H[K[29;53H16|3zl:split[30;53H16|3zl:split[32;51H:mksession! test.out[33;51H:new test.out[33;64H[K[34;52Hv/\(^ *normal! 0\|^ *exe 'normal!\)/d[35;52Hw[35;53H[K[36;52Hqa![36;55H[K[37;51HENDTEST[38;51H[K[39;51Hstart:[39;57H[K[40;51Hno multibyte chAracter[41;51H        one leaDing tab[42;51H    four leadinG spaces[43;51Htwo             consecutive tabs[44;51Htwo     tabs    in one line[45;51Hone ä multibyteCharacter[45;75H[K[46;51Haä Ä  two multiByte characters[47;51HAäöü  three mulTibyte characters[48;51H[1m[34m~                                               [49;51H~                                               [39;51H[?12l[?25h[40;51H[15C[?25l[m[2;51Hts if :mksession saves cursor columns correctly [3;51Htibyte characters when fileencoding=latin1.[3;94H[K[5;51HRTTES[5;57H[K[6;51H mbyte.vim[6;61H[K[7;51H !has('mksession')[7;69H[K[8;51He! test.ok[8;61H[K[9;51Hwq! test.out[9;63H[K[10;51Hdif[10;54H[K[11;51Ht sessionoptions=buffers splitbelow fileencoding[12;51Htart:[12;56H[K[13;51Hplit[13;55H[K[14;51H|:split[14;58H[K[15;51H|:split[15;58H[K[16;51H|:split[16;58H[K[17;51H:split[17;57H[K[18;51H:split[18;57H[K[19;51H|:split[19;58H[K[20;51H|:split[20;58H[K[21;51H|:wincmd l[21;61H[K[22;51Htart:[22;56H[K[23;51Ht nowrap[23;59H[K[24;51H|3zl:split[24;61H[K[25;51H6|3zl:split[25;62H[K[26;51H6|3zl:split[26;62H[K[27;51H|3zl:split[27;61H[K[28;51H|3zl:split[28;61H[K[29;51H6|3zl:split[29;62H[K[30;51H6|3zl:split[30;62H[K[31;51H6|3zl:split[31;62H[K[32;51Hsession! test.out[32;68H[K[33;51Hw test.out[33;61H[K[34;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[34;86H[K[35;51H[K[36;51H![36;52H[K[37;51HTES[37;55H[K[39;51Hrt:[39;54H[K[40;51Hmultibyte chAracter[40;70H[K[41;56Hone leaDing tab[41;71H[K[42;52Hfour leadinG spaces[42;71H[K[43;51H   [10Cconsecutive tabs[43;80H[K[44;51H     tabs    in one line[44;75H[K[45;51H ä multibyteCharacter[45;72H[K[46;51HÄ  two multiByte characters[46;78H[K[47;51Hü  three mulTibyte characters[47;80H[K[40;63H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsplit[?25l[1;51H|:wincmd l[2;52Hart:[2;57H[K[3;52H nowrap[3;59H[K[4;51H|3zl:split[5;51H6|3zl:split[6;51H6|3zl:split[7;51H|3zl:split[7;61H[K[8;51H|3zl:split[9;51H6|3zl:split[9;62H[K[10;51H6|3zl:split[11;51H6|3zl:split[11;62H[K[12;51Hsession! test.out[13;51Hw test.out[14;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[15;51H[K[16;51H![16;52H[K[17;51HTEST[17;55H[K[18;51H[K[19;51Hrt:[19;54H[K[20;51Hmultibyte chAracter[21;51H     one leaDing tab[22;51H four leadinG spaces[23;51H             consecutive tabs[24;51H     tabs    in one line[25;51H ä multibyteCharacter[26;51HÄ  two multiByte characters[27;51Hü  three mulTibyte characters[28;51H[1m[34m~                                               [m[29;51H[7mtest93.in [+]                                   [m[30;51H|:wincmd l[30;61H[K[31;51Htart:[31;56H[K[32;51Ht nowrap[32;60H[K[33;51H|3zl:spli[34;51H6|3zl:split[34;62H[K[35;51H6|3zl:split[36;51H|3zl:split[37;51H|3zl:split[38;51H6|3zl:split[39;51H6|3zl:split[40;51H6|3zl:split[40;62H[K[41;51Hsession! test.out[41;68H[K[42;51Hw test.out[42;61H[K[43;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[44;56H[K[45;51H![45;52H[K[46;51HTEST[46;55H[K[47;51H[K[48;51Hrt:[48;54H[K[49;51Hmultibyte chAracter[49;70H[K[50;51H     one leaDing tab[50;71H[K[51;51H four leadinG spaces[51;71H[K[52;51H             consecutive tabs[52;80H[K[53;51H     tabs    in one line[53;75H[K[54;51H ä multibyteCharacter[54;72H[K[55;51HÄ  two multiByte characters[55;78H[K[56;51Hü  three mulTibyte characters[56;80H[K[49;63H[?12l[?25h[50;63H[?25l[30;51Hj16|:wincmd l[31;51H/^start:[32;51H:set nowrap[33;51Hj16|3zl:split[34;51Hj016|3zl:split[35;51Hj016|3zl:split[36;51Hj08|3zl:split[37;51Hj08|3zl:split[38;51Hj016|3zl:split[39;51Hj016|3zl:split[40;51Hj016|3zl:split[41;51H:mksession! test.out[42;51H:new test.out[43;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[44;51H:w[45;51H:qa![46;51HENDTEST[48;51Hstart:[49;51Hno multibyte chAracter[50;56H   one leaDing tab[51;52H   four leadinG spaces[52;51Htwo[10C   consecutive tabs[53;51Htwo     tabs    in one line[54;51Hone ä multibyteCharacter[55;51Haä Ä  two multiByte characters[56;51HAäöü  three mulTibyte characters[50;58H[?12l[?25h[8C[?25l[30;51H|:wincmd l[30;61H[K[31;51Htart:[31;56H[K[32;51Ht nowrap[32;59H[K[33;51H|3zl:split[33;61H[K[34;51H6|3zl:split[34;62H[K[35;51H6|3zl:split[35;62H[K[36;51H|3zl:split[36;61H[K[37;51H|3zl:split[37;61H[K[38;51H6|3zl:split[38;62H[K[39;51H6|3zl:split[39;62H[K[40;51H6|3zl:split[40;62H[K[41;51Hsession! test.out[41;68H[K[42;51Hw test.out[42;61H[K[43;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[43;86H[K[44;51H[K[45;51H![45;52H[K[46;51HTES[46;55H[K[48;51Hrt:[48;54H[K[49;51Hmultibyte chAracter[49;70H[K[50;56Hone leaDing tab[50;71H[K[51;52Hfour leadinG spaces[51;71H[K[52;51H   [10Cconsecutive tabs[52;80H[K[53;51H     tabs    in one line[53;75H[K[54;51H ä multibyteCharacter[54;72H[K[55;51HÄ  two multiByte characters[55;78H[K[56;51Hü  three mulTibyte characters[56;80H[K[50;63H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51H|3zl:split[2;51H6|3zl:split[3;51H6|3zl:split[4;51H6|3zl:split[5;51Hsession! test.out[6;51Hw test.out[7;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[9;51H![10;51HTEST[12;51Hrt:[13;51Hmultibyte chAracter[14;56Hone leaDing tab[15;52Hfour leadinG spaces[16;64Hconsecutive tabs[17;56Htabs    in one line[18;52Hä multibyteCharacter[19;51HÄ  two multiByte characters[20;51H[7mtest93.in [+]                                   [m[21;51H6|3zl:split[22;51H6|3zl:split[23;51H6|3zl:split[24;51Hsession! test.out[25;51Hw test.out[26;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[28;51H![29;51HTEST[31;51Hrt:[32;51Hmultibyte chAracter[33;56Hone leaDing tab[34;52Hfour leadinG spaces[35;64Hconsecutive tabs[36;56Htabs    in one line[37;52Hä multibyteCharacter[38;51HÄ  two multiByte characters[39;51H[7mtest93.in [+]                                   [m[40;51H|3zl:split[41;51H6|3zl:split[42;51H6|3zl:split[43;51H6|3zl:split[44;51Hsession! test.out[45;51Hw test.out[46;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[48;51H![49;51HTEST[51;51Hrt:[52;51Hmultibyte chAracter[53;56Hone leaDing tab[54;52Hfour leadinG spaces[55;64Hconsecutive tabs[56;56Htabs    in one line[57;52Hä multibyteCharacter[58;51HÄ  two multiByte characters[59;51H[1m[7mtest93.in [+]                                   [53;63H[?12l[?25h[54;63H[?25l[m[40;51Hj08|3zl:split[41;51Hj016|3zl:split[42;51Hj016|3zl:split[43;51Hj016|3zl:split[44;51H:mksession! test.out[45;51H:new test.out[46;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[47;51H:w[48;51H:qa![49;51HENDTEST[51;51Hstart:[52;51Hno multibyte chAracter[53;56H   one leaDing tab[54;52H   four leadinG spaces[55;51Htwo[10C   consecutive tabs[56;51Htwo     tabs    in one line[57;51Hone ä multibyteCharacter[58;51Haä Ä  two multiByte characters[54;51H[?12l[?25h[15C[?25l[40;51H|3zl:split[40;61H[K[41;51H6|3zl:split[41;62H[K[42;51H6|3zl:split[42;62H[K[43;51H6|3zl:split[43;62H[K[44;51Hsession! test.out[44;68H[K[45;51Hw test.out[45;61H[K[46;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[46;86H[K[47;51H[K[48;51H![48;52H[K[49;51HTES[49;55H[K[51;51Hrt:[51;54H[K[52;51Hmultibyte chAracter[52;70H[K[53;56Hone leaDing tab[53;71H[K[54;52Hfour leadinG spaces[54;71H[K[55;51H   [10Cconsecutive tabs[55;80H[K[56;51H     tabs    in one line[56;75H[K[57;51H ä multibyteCharacter[57;72H[K[58;51HÄ  two multiByte characters[58;78H[K[54;63H[?12l[?25h[?25l[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51H6|3zl:split[2;51Hsession! test.out[3;51Hw test.out[4;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[6;51H![7;51HTEST[9;51Hrt:[10;51Hmultibyte chAracter[11;56Hone leaDing tab[12;52Hfour leadinG spaces[13;64Hconsecutive tabs[14;56Htabs    in one line[15;51H[7mtest93.in [+]                                   [m[16;51Hsession! test.out[17;51Hw test.out[18;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[20;51H![21;51HTEST[23;51Hrt:[24;51Hmultibyte chAracter[25;56Hone leaDing tab[26;52Hfour leadinG spaces[27;64Hconsecutive tabs[28;56Htabs    in one line[29;52Hä multibyteCharacter[30;51H[7mtest93.in [+]                                   [m[31;51Hw test.out[32;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[34;51H![35;51HTEST[37;51Hrt:[38;51Hmultibyte chAracter[39;56Hone leaDing tab[40;52Hfour leadinG spaces[41;64Hconsecutive tabs[42;56Htabs    in one line[43;52Hä multibyteCharacter[44;51H[7mtest93.in [+]                                   [m[45;51Hsession! test.out[46;51Hw test.out[47;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[49;51H![50;51HTEST[52;51Hrt:[53;51Hmultibyte chAracter[54;56Hone leaDing tab[55;52Hfour leadinG spaces[56;64Hconsecutive tabs[57;56Htabs    in one line[58;52Hä multibyteCharacter[59;51H[1m[7mtest93.in [+]                                   [55;63H[?12l[?25h[56;63H[?25l[m[45;51H:mksession! test.out[46;51H:new test.out[47;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[48;51H:w[49;51H:qa![50;51HENDTEST[52;51Hstart:[53;51Hno multibyte chAracter[54;56H   one leaDing tab[55;52H   four leadinG spaces[56;51Htwo[10C   consecutive tabs[57;51Htwo     tabs    in one line[58;51Hone ä multibyteCharacter[56;51H[?12l[?25h[7C[?25l[45;51Hsession! test.out[45;68H[K[46;51Hw test.out[46;61H[K[47;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[47;86H[K[48;51H[K[49;51H![49;52H[K[50;51HTES[50;55H[K[52;51Hrt:[52;54H[K[53;51Hmultibyte chAracter[53;70H[K[54;56Hone leaDing tab[54;71H[K[55;52Hfour leadinG spaces[55;71H[K[56;51H   [10Cconsecutive tabs[56;80H[K[57;51H     tabs    in one line[57;75H[K[58;51H ä multibyteCharacter[58;72H[K[56;55H[?12l[?25h[?25l[60;1H:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51Hw test.out[2;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[4;51H![5;51HTEST[7;51Hrt:[8;51Hmultibyte chAracter[9;56Hone leaDing tab[10;52Hfour leadinG spaces[11;64Hconsecutive tabs[12;51H[7mtest93.in [+]                                   [m[13;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[15;51H![16;51HTEST[18;51Hrt:[19;51Hmultibyte chAracter[20;56Hone leaDing tab[21;52Hfour leadinG spaces[22;64Hconsecutive tabs[23;56Htabs    in one line[24;51H[7mtest93.in [+]                                   [m[25;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[27;51H![28;51HTEST[30;51Hrt:[31;51Hmultibyte chAracter[32;56Hone leaDing tab[33;52Hfour leadinG spaces[34;64Hconsecutive tabs[35;56Htabs    in one line[36;51H[7mtest93.in [+]                                   [m[38;51H![39;51HTEST[41;51Hrt:[42;51Hmultibyte chAracter[43;56Hone leaDing tab[44;52Hfour leadinG spaces[45;64Hconsecutive tabs[46;56Htabs    in one line[47;51H[7mtest93.in [+]                                   [m[48;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[50;51H![51;51HTEST[53;51Hrt:[54;51Hmultibyte chAracter[55;56Hone leaDing tab[56;52Hfour leadinG spaces[57;64Hconsecutive tabs[58;56Htabs    in one line[59;51H[1m[7mtest93.in [+]                                   [57;55H[?12l[?25h[58;55H[?25l[m[48;51H:v/\(^ *normal! 0\|^ *exe 'normal!\)/d[49;51H:w[50;51H:qa![51;51HENDTEST[53;51Hstart:[54;51Hno multibyte chAracter[55;56H   one leaDing tab[56;52H   four leadinG spaces[57;51Htwo[10C   consecutive tabs[58;51Htwo     tabs    in one line[58;51H[?12l[?25h[7C[?25l[48;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[48;86H[K[49;51H[K[50;51H![50;52H[K[51;51HTES[51;55H[K[53;51Hrt:[53;54H[K[54;51Hmultibyte chAracter[54;70H[K[55;56Hone leaDing tab[55;71H[K[56;52Hfour leadinG spaces[56;71H[K[57;51H   [10Cconsecutive tabs[57;80H[K[58;51H     tabs    in one line[58;75H[K[58;55H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51H\(^ *normal! 0\|^ *exe 'normal!\)/d[3;51H![4;51HTEST[6;51Hrt:[7;51Hmultibyte chAracter[8;56Hone leaDing tab[9;52Hfour leadinG spaces[10;51H[7mtest93.in [+]                                   [m[12;51H![13;51HTEST[15;51Hrt:[16;51Hmultibyte chAracter[17;56Hone leaDing tab[18;52Hfour leadinG spaces[19;64Hconsecutive tabs[20;51H[7mtest93.in [+]                                   [m[21;51H![22;51HTEST[24;51Hrt:[25;51Hmultibyte chAracter[26;56Hone leaDing tab[27;52Hfour leadinG spaces[28;64Hconsecutive tabs[29;56Htabs    in one line[30;51H[7mtest93.in [+]                                   [m[31;51H![32;51HTEST[34;51Hrt:[35;51Hmultibyte chAracter[36;56Hone leaDing tab[37;52Hfour leadinG spaces[38;64Hconsecutive tabs[39;56Htabs    in one line[40;51H[7mtest93.in [+]                                   [m[41;51HTEST[43;51Hrt:[44;51Hmultibyte chAracter[45;56Hone leaDing tab[46;52Hfour leadinG spaces[47;64Hconsecutive tabs[48;56Htabs    in one line[49;51H[7mtest93.in [+]                                   [m[50;51H![51;51HTEST[53;51Hrt:[54;51Hmultibyte chAracter[55;56Hone leaDing tab[56;52Hfour leadinG spaces[57;64Hconsecutive tabs[58;56Htabs    in one line[59;51H[1m[7mtest93.in [+]                                   [58;55H[?12l[?25h[?25l[m[50;51HTEST                                            [51;51H                                                [52;51Hrt:                                             [53;51Hmultibyte chAracter                             [54;51H     one leaDing tab                            [55;51H four leadinG spaces                            [56;51H             consecutive tabs                   [57;51H     tabs    in one line                        [58;51H                                                [58;52Hä multibyteCharacter[58;55H[?12l[?25h[?25l[50;51HENDTEST[52;51Hstart:[53;51Hno multibyte chAracter[54;56H   one leaDing tab[55;52H   four leadinG spaces[56;51Htwo[10C   consecutive tabs[57;51Htwo     tabs    in one line[58;51Hone ä multibyteCharacter[58;51H[?12l[?25h[15C[?25l[50;51HTES[50;55H[K[52;51Hrt:[52;54H[K[53;51Hmultibyte chAracter[53;70H[K[54;56Hone leaDing tab[54;71H[K[55;52Hfour leadinG spaces[55;71H[K[56;51H   [10Cconsecutive tabs[56;80H[K[57;51H     tabs    in one line[57;75H[K[58;51H ä multibyteCharacter[58;72H[K[58;63H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51H![2;51HTEST[4;51Hrt:[5;51Hmultibyte chAracter[6;56Hone leaDing tab[7;52Hfour leadinG spaces[8;51H[7mtest93.in [+]                                   [m[9;51HTEST[11;51Hrt:[12;51Hmultibyte chAracter[13;56Hone leaDing tab[14;52Hfour leadinG spaces[15;64Hconsecutive tabs[16;51H[7mtest93.in [+]                                   [m[17;51H![18;51HTEST[20;51Hrt:[21;51Hmultibyte chAracter[22;56Hone leaDing tab[23;52Hfour leadinG spaces[24;64Hconsecutive tabs[25;51H[7mtest93.in [+]                                   [m[27;51Hrt:[28;51Hmultibyte chAracter[29;56Hone leaDing tab[30;52Hfour leadinG spaces[31;64Hconsecutive tabs[32;56Htabs    in one line[33;51H[7mtest93.in [+]                                   [m[34;51HTEST[36;51Hrt:[37;51Hmultibyte chAracter[38;56Hone leaDing tab[39;52Hfour leadinG spaces[40;64Hconsecutive tabs[41;56Htabs    in one line[42;51H[7mtest93.in [+]                                   [m[43;51Hrt:[44;51Hmultibyte chAracter[45;56Hone leaDing tab[46;52Hfour leadinG spaces[47;64Hconsecutive tabs[48;56Htabs    in one line[49;52Hä multibyteCharacter[50;51H[7mtest93.in [+]                                   [m[52;51Hrt:[53;51Hmultibyte chAracter[54;56Hone leaDing tab[55;52Hfour leadinG spaces[56;64Hconsecutive tabs[57;56Htabs    in one line[58;52Hä multibyteCharacter[59;51H[1m[7mtest93.in [+]                                   [58;63H[?12l[?25h[?25l[m[51;51Hrt:                                             [52;51Hmultibyte chAracter                             [53;51H     one leaDing tab                            [54;51H four leadinG spaces                            [55;51H             consecutive tabs                   [56;51H     tabs    in one line                        [57;51H ä multibyteCharacter                           [58;51H                                                [58;51HÄ  two multiByte characters[58;63H[?12l[?25h[?25l[51;51Hstart:[52;51Hno multibyte chAracter[53;56H   one leaDing tab[54;52H   four leadinG spaces[55;51Htwo[10C   consecutive tabs[56;51Htwo     tabs    in one line[57;51Hone ä multibyteCharacter[58;51Haä Ä  two multiByte characters[58;51H[?12l[?25h[15C[?25l[51;51Hrt:[51;54H[K[52;51Hmultibyte chAracter[52;70H[K[53;56Hone leaDing tab[53;71H[K[54;52Hfour leadinG spaces[54;71H[K[55;51H   [10Cconsecutive tabs[55;80H[K[56;51H     tabs    in one line[56;75H[K[57;51H ä multibyteCharacter[57;72H[K[58;51HÄ  two multiByte characters[58;78H[K[58;63H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51H![2;51HTEST[4;51Hrt:[5;51Hmultibyte chAracter[6;56Hone leaDing tab[7;51H[7mtest93.in [+]                                   [m[8;51HTEST[10;51Hrt:[11;51Hmultibyte chAracter[12;56Hone leaDing tab[13;52Hfour leadinG spaces[14;51H[7mtest93.in [+]                                   [m[16;51Hrt:[17;51Hmultibyte chAracter[18;56Hone leaDing tab[19;52Hfour leadinG spaces[20;64Hconsecutive tabs[21;51H[7mtest93.in [+]                                   [m[23;51Hrt:[24;51Hmultibyte chAracter[25;56Hone leaDing tab[26;52Hfour leadinG spaces[27;64Hconsecutive tabs[28;56Htabs    in one line[29;51H[7mtest93.in [+]                                   [m[30;51Hrt:[31;51Hmultibyte chAracter[32;56Hone leaDing tab[33;52Hfour leadinG spaces[34;64Hconsecutive tabs[35;56Htabs    in one line[36;51H[7mtest93.in [+]                                   [m[37;51Hrt:[38;51Hmultibyte chAracter[39;56Hone leaDing tab[40;52Hfour leadinG spaces[41;64Hconsecutive tabs[42;56Htabs    in one line[43;52Hä multibyteCharacter[44;51H[7mtest93.in [+]                                   [m[45;56Hone leaDing tab[46;52Hfour leadinG spaces[47;64Hconsecutive tabs[48;56Htabs    in one line[49;52Hä multibyteCharacter[50;51HÄ  two multiByte characters[51;51H[7mtest93.in [+]                                   [m[52;51Hmultibyte chAracter[53;56Hone leaDing tab[54;52Hfour leadinG spaces[55;64Hconsecutive tabs[56;56Htabs    in one line[57;52Hä multibyteCharacter[58;51HÄ  two multiByte characters[59;51H[1m[7mtest93.in [+]                                   [58;63H[?12l[?25h[?25l[m[52;51H     one leaDing tab                            [53;51H four leadinG spaces                            [54;51H             consecutive tabs                   [55;51H     tabs    in one line                        [56;51H ä multibyteCharacter                           [57;51HÄ  two multiByte characters                     [58;51H                                                [58;51Hü  three mulTibyte characters[58;63H[?12l[?25h[?25l[52;56H   one leaDing tab[53;52H   four leadinG spaces[54;51Htwo[10C   consecutive tabs[55;51Htwo     tabs    in one line[56;51Hone ä multibyteCharacter[57;51Haä Ä  two multiByte characters[58;51HAäöü  three mulTibyte characters[58;51H[?12l[?25h[15C[?25l[52;56Hone leaDing tab[52;71H[K[53;52Hfour leadinG spaces[53;71H[K[54;51H   [10Cconsecutive tabs[54;80H[K[55;51H     tabs    in one line[55;75H[K[56;51H ä multibyteCharacter[56;72H[K[57;51HÄ  two multiByte characters[57;78H[K[58;51Hü  three mulTibyte characters[58;80H[K[58;63H[?12l[?25h[?25l

:[?12l[?25hsplit[?25l[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51H![2;51HTEST[4;51Hrt:[5;51Hmultibyte chAracter[6;56Hone leaDing tab[7;51H[7mtest93.in [+]                                   [m[9;51Hrt:[10;51Hmultibyte chAracter[11;56Hone leaDing tab[12;52Hfour leadinG spaces[13;51H[7mtest93.in [+]                                   [m[15;51Hrt:[16;51Hmultibyte chAracter[17;56Hone leaDing tab[18;52Hfour leadinG spaces[19;64Hconsecutive tabs[20;51H[7mtest93.in [+]                                   [m[21;51Hrt:[22;51Hmultibyte chAracter[23;56Hone leaDing tab[24;52Hfour leadinG spaces[25;64Hconsecutive tabs[26;51H[7mtest93.in [+]                                   [m[27;51Hrt:[28;51Hmultibyte chAracter[29;56Hone leaDing tab[30;52Hfour leadinG spaces[31;64Hconsecutive tabs[32;56Htabs    in one line[33;51H[7mtest93.in [+]                                   [m[34;56Hone leaDing tab[35;52Hfour leadinG spaces[36;64Hconsecutive tabs[37;56Htabs    in one line[38;52Hä multibyteCharacter[39;51H[7mtest93.in [+]                                   [m[40;56Hone leaDing tab[41;52Hfour leadinG spaces[42;64Hconsecutive tabs[43;56Htabs    in one line[44;52Hä multibyteCharacter[45;51HÄ  two multiByte characters[46;51H[7mtest93.in [+]                                   [m[47;64Hconsecutive tabs[48;56Htabs    in one line[49;52Hä multibyteCharacter[50;51HÄ  two multiByte characters[51;51Hü  three mulTibyte characters[52;51H[7mtest93.in [+]                                   [m[53;52Hfour leadinG spaces[54;64Hconsecutive tabs[55;56Htabs    in one line[56;52Hä multibyteCharacter[57;51HÄ  two multiByte characters[58;51Hü  three mulTibyte characters[59;51H[1m[7mtest93.in [+]                                   [58;63H[?12l[?25h[?25l

[m:[?12l[?25hmksession! test.out[?25l[58;63H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnew test.out[?25l"test.out" [60;12H[K[60;12H280 lines, 5346 characters[27m[23m[m[H[2J[1;1H:qa![45C[7m|[m
ENDTEST[42C[7m|[3;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[6;9Hone leaDing tab[26C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[9;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[12;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|
test93.in [+]                                    |[15;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[18;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
ENDTEST[42C[7m|[23;50H|[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[26;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[32;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|
test93.in [+]                                    |[m
start:[43C[7m|[m
no multibyte chAracter[27C[7m|[m[39;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|
test93.in [+]                                    |[m[45;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|
test93.in [+]                                    |[m[52;9Hone leaDing tab[26C[7m|[m
    four leadinG spaces[26C[7m|[m
two[13Cconsecutive tabs[17C[7m|[m
two     tabs    in one line[22C[7m|[m
one ä multibyteCharacter[25C[7m|[m
aä Ä  two multiByte characters[19C[7m|[m
Aäöü  three mulTibyte characters[17C[7m|
test93.in [+]                                     [m[1;51HTEST[3;51Hrt:[4;51Hmultibyte chAracter[5;56Hone leaDing tab[6;51H[7mtest93.in [+]                                   [m[8;51Hrt:[9;51Hmultibyte chAracter[10;56Hone leaDing tab[11;52Hfour leadinG spaces[12;51H[7mtest93.in [+]                                   [m[13;51Hrt:[14;51Hmultibyte chAracter[15;56Hone leaDing tab[16;52Hfour leadinG spaces[17;64Hconsecutive tabs[18;51H[7mtest93.in [+]                                   [m[19;51Hrt:[20;51Hmultibyte chAracter[21;56Hone leaDing tab[22;52Hfour leadinG spaces[23;64Hconsecutive tabs[24;51H[7mtest93.in [+]                                   [m[25;51Hmultibyte chAracter[26;56Hone leaDing tab[27;52Hfour leadinG spaces[28;64Hconsecutive tabs[29;56Htabs    in one line[30;51H[7mtest93.in [+]                                   [m[31;56Hone leaDing tab[32;52Hfour leadinG spaces[33;64Hconsecutive tabs[34;56Htabs    in one line[35;52Hä multibyteCharacter[36;51H[7mtest93.in [+]                                   [m[37;52Hfour leadinG spaces[38;64Hconsecutive tabs[39;56Htabs    in one line[40;52Hä multibyteCharacter[41;51HÄ  two multiByte characters[42;51H[7mtest93.in [+]                                   [m[43;64Hconsecutive tabs[44;56Htabs    in one line[45;52Hä multibyteCharacter[46;51HÄ  two multiByte characters[47;51Hü  three mulTibyte characters[48;51H[7mtest93.in [+]                                   [m[49;56Htabs    in one line[50;52Hä multibyteCharacter[51;51HÄ  two multiByte characters[52;51Hü  three mulTibyte characters[53;51H[7mtest93.in [+]                                   [m[54;51Hlet SessionLoad = 1[55;51Hif !&cp | set cp | endif[56;51Hlet s:so_save = &so | let s:siso_save = &siso |[57;51Hlet v:this_session=expand("<sfile>:p")[58;51Hsilent only[59;51H[1m[7mtest.out                                        [54;51H[?12l[?25h[?25l[60;1H[m:[?12l[?25hv/\(^ *normal! 0\|^ *exe 'normal!\)/d[?25l254 fewer lines[60;17H[K[54;51H  normal! 016|[54;65H[K[55;51H  exe 'normal! ' . s:c . '|zs' . 16 . '|'[56;51H  normal! 016|[56;65H[K[57;51H  exe 'normal! ' . s:c . '|zs' . 16 . '|'[58;51H  normal! 016|[59;60H[1m[7m[+][58;53H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 26 lines, 611 characters written[59;60H[1m[7m    [58;53H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test94.failed test.ok test.out X* viminfo
cp test94.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test94.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test94.in" 95 lines, 2163 characters[1;1HTest for Visual mode and operators

Tests for the two kinds of operations: Those executed with Visual mode
followed by an operator and those executed via Operator-pending mode. Also
part of the test are mappings, counts, and repetition with the . command.

Test cases:
- Visual modes (v V CTRL-V) followed by an operator; count; repeating
- Visual mode maps; count; repeating
  - Simple
  - With an Ex command (custom text object)
- Operator-pending mode maps
  - Simple
  - With Ex command moving the cursor
  - With Ex command and Visual selection (custom text object)
- Patch 7.3.879: Properly abort Ex command in Operator-pending mode

STARTTEST
:so small.vim
:set nocp viminfo+=nviminfo
:
:" User functions
:function MoveToCap()
:  call search('\u', 'W')
:endfunction
:function SelectInCaps()
:  let [line1, col1] = searchpos('\u', 'bcnW')
:  let [line2, col2] = searchpos('.\u', 'nW')
:  call setpos("'<", [0, line1, col1, 0])
:  call setpos("'>", [0, line2, col2, 0])
:  normal! gv
:endfunction
:
:" Visual modes followed by operator
/^apple
lvld.l3vd.:
/^line 1
Vcnewline[34m^[[mj.j2Vd.:
/^xxxx
[34m^V[mjlc  [34m^[[ml.l2[34m^V[mc----[34m^[[ml.:
:
:" Visual mode maps (movement and text object)
:vnoremap W /\u/s-1<CR>
:vnoremap iW :<C-U>call SelectInCaps()<CR>
/^Kiwi
vWcNo[34m^[[ml.fD2vd.:
/^Jambu
llviWc-[34m^[[ml.l2vdl.:
:
:" Operator-pending mode maps (movement and text object)
:onoremap W /\u/<CR>
:onoremap <Leader>W :<C-U>call MoveToCap()<CR>
:onoremap iW :<C-U>call SelectInCaps()<CR>
/^Pineapple
cW-[34m^[[ml.l2.l.:
/^Juniper
g?\WfD.:
/^Lemon
yiWPlciWNew[34m^[[mfr.:[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for Visual mode and operators[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[18;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 50 lines, 1176 characters written[19;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[19;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[10M[1;60r[50;1H:
:" Patch 7.3.879: Properly abort Operator-pending mode for "dv:<Esc>" etc.
/^zzzz
dV:[34m^M[mdv:[34m^M[m:set noma | let v:errmsg = ''
d:[34m^M[m:set ma | put = v:errmsg =~# '^E21' ? 'ok' : 'failed'
dv:[34m^[[mdV:[34m^[[m:set noma | let v:errmsg = ''
d:[34m^[[m:set ma | put = v:errmsg =~# '^E21' ? 'failed' : 'ok'
:/^start:/+2,$w! test.out
:q!
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocp viminfo+=nviminfo[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" User functions[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfunction MoveToCap()[?25l
:  [?12l[?25h:  call search('\u', 'W')
[?25l:  [?12l[?25h:endfunction[1;1H[2L[?25l[1;1H- Operator-pending mode maps
  - Simple[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hfunction SelectInCaps()[?25l
:  [?12l[?25h:  let [line1, col1] = searchpos('\u', 'bcnW')
[?25l:  [?12l[?25h:  let [line2, col2] = searchpos('.\u', 'nW')
[?25l:  [?12l[?25h:  call setpos("'<", [0, line1, col1, 0])
[?25l:  [?12l[?25h:  call setpos("'>", [0, line2, col2, 0])
[?25l:  [?12l[?25h:  normal! gv
[?25l:  [?12l[?25h:endfunction[1;1H[6L[?25l[1;1H- Operator-pending mode maps
  - Simple
  - With Ex command moving the cursor
  - With Ex command and Visual selection (custom text object)
- Patch 7.3.879: Properly abort Ex command in Operator-pending mode[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Visual modes followed by operator[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^apple[?25l[1;59r[1;1H[3M[1;60r[57;1Hstart:

apple banana cherry[60;1H[K[59;1H[?12l[?25ha[?25l
[1m-- VISUAL --[59;2H[?12l[?25h[?25l[m[7mp[?12l[?25h[?25l[mle banana cherry[59;18H[K[60;1H[K[59;2H[?12l[?25h[?25l banana cherry[59;16H[K[59;2H[?12l[?25h [?25l[7mbanan[m
[1m-- VISUAL --[59;8H[?12l[?25h[?25l[ma  cherry[59;10H[K[60;1H[K[59;3H[?12l[?25h[?25ly[59;4H[K[59;3H[?12l[?25h[?25l
:[?12l[?25h[?25l[59;3H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^line 1[?25l[1;59r[1;1H[2M[1;60r[59;1Hline 1 line 1[60;1H[K[59;1H[?12l[?25h[?25ll[7mine 1 line 1 [m
[1m-- VISUAL LINE --[59;1H[?12l[?25h[?25l
-- INSERT --N[m[60;13H[K[60;1H[K[59;1Hnewline[59;8H[K[59;7H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hline 2 line 2[59;7H[?12l[?25h[?25l
[1m-- INSERT --[m[60;1H[K[59;1Hnewline[59;8H[K[59;7H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1Hline 3 line 3[59;7H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[58;1H[7mline 3 line 3 
line 4[m [7mline 4 [m
[1m-- VISUAL LINE --[59;7H[?12l[?25h[?25l[m[58;1Hline 5 line 5[58;14H[K[59;1Hline 6 line 6[59;14H[K[60;1H[K[58;1H[?12l[?25h[?25l[58;1H[K[59;1Hxxxxxxxxxxxxx[58;1H[?12l[?25h[?25l

:[?12l[?25h[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^xxxx[?25l[59;1H[?12l[?25h[?25l
[1m-- VISUAL BLOCK --[59;1H[?12l[?25h[?25l[1;59r[m[59;1H
[1;60r[58;1H[7mx[m
xxxxxxxxxxxxx[?12l[?25h[?25l[58;2H[7mx
x[?12l[?25h[?25l[m[60;4H[1mINSERT --O[m[60;13H[K[60;1H[K[58;1H  
  [58;2H[?12l[?25h [?25l

[1m-- INSERT --[m[60;1H[K[58;3H  
    [58;4H[?12l[?25h [?25l[1;59r[1;1H[2M[1;60r[56;5H[7mxxxx
[m    [7mxxxx[m
xxxx[7mxxxx[mxxxxx
xxxx[7mxxx[mxxxxxx
[1m-- VISUAL BLOCK --[59;8H[?12l[?25h[?25l
-- INSERT --O[m[60;13H[K[60;1H[K[56;5H----
    ----
xxxx----
xxxx----[56;8H[?12l[?25h-[?25l[60;1H[1m-- INSERT --[m[60;1H[K[56;9H----[57;9H----[58;9H----[59;9H----[56;12H[?12l[?25h[?25l[60;1H:[?12l[?25h[?25l[56;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[56;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Visual mode maps (movement and text object)[?25l[56;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hvnoremap W /\u/s-1<CR>[?25l[56;12H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hvnoremap iW :<C-U>call SelectInCaps()<CR>[?25l[56;12H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Kiwi[?25l[1;59r[1;1H[2M[1;60r[59;1HKiwiRaspberryDateWatermelonPeach[60;1H[K[59;1H[?12l[?25h[?25l
[1m-- VISUAL --[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H/\u/s-1[59;1H[7mKiw[?12l[?25h[?25l[m
[1m-- INSERT --[m[60;1H[K[59;1HNoRaspberryDateWatermelonPeach[59;31H[K[59;2H[?12l[?25ho[?25l
[1m-- INSERT --[m[60;1H[K[59;3HNoberryDateWatermelonPeach[59;29H[K[59;4H[?12l[?25hoberry[?25l[7mDateWat[m
[1m-- VISUAL --[59;17H[?12l[?25h[?25l[m[59;10HrmelonPeach[59;21H[K[60;1H[K[59;10H[?12l[?25h[?25lach[59;13H[K[59;10H[?12l[?25h[?25l
:[?12l[?25h[?25l[59;10H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Jambu[?25l[1;59r[59;1H
[1;60r[59;1HJambuRambutanBananaTangerineMango[60;1H[K[59;1H[?12l[?25hJa[?25l
[1m-- VISUAL --[59;3H[?12l[?25h[?25l[m[60;1H[K[60;1H:'<,'>[60;2H[K[60;2Hcall SelectInCaps()[59;1H[7mJamb[?12l[?25h[?25l[m
[1m-- INSERT --[m[60;13H[K[60;1H[K[59;1H-RambutanBananaTangerineMango[59;30H[K[59;1H[?12l[?25h-[?25l
[1m-- INSERT --[m[60;1H[K[59;2H-tanBananaTangerineMango[59;26H[K[59;2H[?12l[?25h-[?25l[7mtanBanana[m
[1m-- VISUAL --[59;12H[?12l[?25h[?25l[m--angerineMango[59;16H[K[60;1H[K[59;3H[?12l[?25ha[?25lgo[59;6H[K[59;4H[?12l[?25h[?25l
:[?12l[?25h[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Operator-pending mode maps (movement and text object)[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25honoremap W /\u/<CR>[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25honoremap <Leader>W :<C-U>call MoveToCap()<CR>[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25honoremap iW :<C-U>call SelectInCaps()<CR>[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Pineapple[?25l[1;59r[1;1H[2M[1;60r[59;1HPineappleQuinceLoganberryOrangeGrapefruitKiwiZ[60;1H[K[59;1H[?12l[?25h[?25l
/\u/[60;4H[K[60;1H[60;1H[K[59;1H-QuinceLoganberryOrangeGrapefruitKiwiZ[59;39H[K[59;1H[?12l[?25h-[?25l
/\u/[60;4H[K[60;1H[1m-- INSERT --[m[60;1H[K[59;2H-LoganberryOrangeGrapefruitKiwiZ[59;34H[K[59;2H[?12l[?25h-[?25l
/\u/[60;4H[K[60;1H[1m-- INSERT --[m[60;1H[K[59;3H-GrapefruitKiwiZ[59;19H[K[59;3H[?12l[?25h-[?25l
/\u/[60;4H[K[60;1H[1m-- INSERT --[m[60;1H[K[59;4H-Z[59;6H[K[59;4H[?12l[?25h[?25l
:[?12l[?25h[?25l[59;4H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Juniper[?25l[1;59r[59;1H
[1;60r[59;1HJuniperDurianZ[60;1H[K[59;1H[?12l[?25h[?25l
:call MoveToCap()[59;1HWhavcre[?12l[?25h[7C[?25l[60;1H[K[60;1H:call MoveToCap()[59;8HQhevna[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[59;8H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^Lemon[?25l[1;59r[59;1H
[1;60r[59;1HLemonNectarineZ[60;1H[K[59;1H[?12l[?25h[?25l
:call SelectInCaps()[59;1H[?12l[?25h[?25lLemonLemonNectarineZLemo[?12l[?25hn[?25l[60;1H[K[60;1H:call SelectInCaps()[60;1H[K[59;6HNewNectarineZ[59;19H[K[59;8H[?12l[?25hwNecta[?25l
:call SelectInCaps()[60;1H[K[59;11HwZ[59;13H[K[59;11H[?12l[?25h[?25l
:[?12l[?25h[?25l[59;11H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[59;11H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Patch 7.3.879: Properly abort Operator-pending mode for "dv:<Esc>" etc.[?25l[59;11H[?12l[?25h[?25l[60;1H[K[60;1H/[?12l[?25h^zzzz[?25l[1;59r[1;1H[2M[1;60r[59;1Hzzzz[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[59;4H[K[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset noma | let v:errmsg = ''[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[1m[37m[41mE21: Cannot make changes, 'modifiable' is off[59;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset ma | put = v:errmsg =~# '^E21' ? 'ok' : 'failed'[?25l[1;59r[59;1H
[1;60r[59;1Hok[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h[?25l[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h[?25l[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset noma | let v:errmsg = ''[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset ma | put = v:errmsg =~# '^E21' ? 'failed' : 'ok'[?25l[1;59r[59;1H
[1;60r[59;1Hok[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/^start:/+2,$w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New] 20L, 144C written[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test95.failed test.ok test.out X* viminfo
cp test95.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test95.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test95.in" 135 lines, 5453 characters[1;1HTest for regexp patterns with multi-byte support, using utf-8.
See test64 for the non-multi-byte tests.

A pattern that gives the expected result produces OK, so that we know it was
actually tried.

STARTTEST
:so small.vim
:so mbyte.vim
:set nocp encoding=utf-8 viminfo+=nviminfo nomore
:" tl is a List of Lists with:
:"    2: test auto/old/new  0: test auto/old  1: test auto/new
:"    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 = []

:"""" Multi-byte character tests. These will fail unless vim is compiled
:"""" with Multibyte (FEAT_MBYTE) or BIG/HUGE features.
:call add(tl, [2, '[[:alpha:][=a=]]\+', '879 aiaÃ£Ã¢aiuvna ', 'aiaÃ£Ã¢aiuvna'])
:call add(tl, [2, '[[=a=]]\+', 'ddaÃ£Ã¢bcd', 'aÃ£Ã¢'])[43C  [26;1H [13C" equivalence classes
:call add(tl, [2, '[^à¸¡ ]\+', 'à¸¡à¸¡ oijasoifjos ifjoisj f osij j à¸¡à¸¡à¸¡à¸¡à¸¡ abcd', 'oijasoo[28;1Hifjos'])
:call add(tl, [2, ' [^ ]\+', 'start à¸¡abcdà¸¡ ', ' à¸¡abcdà¸¡'])
:call add(tl, [2, '[à¸¡[:alpha:][=a=]]\+', '879 aiaÃ£à¸¡Ã¢à¸¡aiuvna ', 'aiaÃ£à¸¡Ã¢à¸¡aiuvna'])

:" this is not a normal "i" but 0xec
:call add(tl, [2, '\p\+', 'Ã¬a', 'Ã¬a'])
:call add(tl, [2, '\p*', 'aã[34m~A~B[m', 'aã[34m~A~B[m'])

:"""" Test recognition of some character classes
:call add(tl, [2, '\i\+', '&*Â¨xx ', 'xx'])
:call add(tl, [2, '\f\+', '&*Â[34m~_[mfname ', 'fname'])

:"""" Test composing character matching
:call add(tl, [2, '.à¸¡', 'xà¸¡à¹[34m~H[mx yà¸¡y', 'yà¸¡'])
:call add(tl, [2, '.à¸¡à¹[34m~H[m', 'xà¸¡à¹[34m~H[mx yà¸¡y', 'xà¸¡à¹[34m~H[m'])
:call add(tl, [2, "\u05b9", " x\u05b9 ", "x\u05b9"])
:call add(tl, [2, ".\u05b9", " x\u05b9 ", "x\u05b9"])
:call add(tl, [2, "\u05b9\u05bb", " x\u05b9\u05bb ", "x\u05b9\u05bb"])
:call add(tl, [2, ".\u05b9\u05bb", " x\u05b9\u05bb ", "x\u05b9\u05bb"])
:call add(tl, [2, "\u05bb\u05b9", " x\u05b9\u05bb ", "x\u05b9\u05bb"])
:call add(tl, [2, ".\u05bb\u05b9", " x\u05b9\u05bb ", "x\u05b9\u05bb"])
:call add(tl, [2, "\u05b9", " y\u05bb x\u05b9 ", "x\u05b9"])
:call add(tl, [2, ".\u05b9", " y\u05bb x\u05b9 ", "x\u05b9"])
:call add(tl, [2, "\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"])
:call add(tl, [2, ".\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"])
:call add(tl, [1, "\u05b9\u05bb", " y\u05b9 x\u05b9\u05bb ", "x\u05b9\u05bb"])
:call add(tl, [2, ".\u05b9\u05bb", " y\u05bb x\u05b9\u05bb ", "x\u05b9\u05bb"])


:"""" Test \Z
:call add(tl, [2, 'Ãº\Z', 'x'])
:call add(tl, [2, '×[34m~Y[m×[34m~T[m×[34m~U[m×[34m~T[m\Z', '×[34m~Y[m×[34m~T[m×[34m~U[m×[34m~T[m', '×[34m~Y[m×[34m~T[m×[34m~U[m×[34m~T[m'])[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for regexp patterns with multi-byte support, using utf-8.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[7;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 125 lines, 5216 characters written[8;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[8;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[27m[23m[m[H[2J[1;1H:  let text = t[2]
:  let matchidx = 3
:  for engine in [0, 1, 2]
:    if engine == 2 && re == 0 || engine == 1 && re == 1
:      continue
:    endif
:    let &regexpengine = engine
:    try
:      let l = matchlist(text, pat)
:    catch
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exx[12;1Hception . '\"'
:    endtry
:" check the match itself
:    if len(l) == 0 && len(t) > matchidx
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' .  [17;1Ht[matchidx] . '\"'
:    elseif len(l) > 0 && len(t) == matchidx
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expectt[20;1Hed no match'
:    elseif len(t) > matchidx && l[0] != t[matchidx]
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expectt[23;1Hed: \"' . t[matchidx] . '\"'
:    else
:      $put ='OK ' . engine . ' - ' . pat
:    endif
:    if len(l) > 0
:"   check all the nine submatches
:      for i in range(1, 9)
:[8Cif len(t) <= matchidx + i
:[10Clet e = ''
:[8Celse
:[10Clet e = t[matchidx + i]
:[8Cendif
:[8Cif l[i] != e
:[10C$put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . ll[37;1H[i] . '\", expected: \"' . e . '\"'
:[8Cendif
:      endfor
:      unlet i
:    endif
:  endfor
:endfor
:unlet t tl e l

:" check that 'ambiwidth' does not change the meaning of \p
:set regexpengine=1 ambiwidth=single
:$put ='eng 1 ambi single: ' . match(\"\u00EC\", '\p')
:set regexpengine=1 ambiwidth=double
:$put ='eng 1 ambi double: ' . match(\"\u00EC\", '\p')
:set regexpengine=2 ambiwidth=single
:$put ='eng 2 ambi single: ' . match(\"\u00EC\", '\p')
:set regexpengine=2 ambiwidth=double
:$put ='eng 2 ambi double: ' . match(\"\u00EC\", '\p')

:/\%#=1^Results/,$wq! test.out
ENDTEST

Results of test95:[57;1H[?12l[?25h
[?25l

:so! Xdotest[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso mbyte.vim[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset nocp encoding=utf-8 viminfo+=nviminfo nomore[?25l[27m[23m[m[H[2J[1;1H:  let text = t[2]
:  let matchidx = 3
:  for engine in [0, 1, 2]
:    if engine == 2 && re == 0 || engine == 1 && re == 1
:      continue
:    endif
:    let &regexpengine = engine
:    try
:      let l = matchlist(text, pat)
:    catch
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"' . v:exx[12;1Hception . '\"'
:    endtry
:" check the match itself
:    if len(l) == 0 && len(t) > matchidx
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected: \"' .  [17;1Ht[matchidx] . '\"'
:    elseif len(l) > 0 && len(t) == matchidx
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expectt[20;1Hed no match'
:    elseif len(t) > matchidx && l[0] != t[matchidx]
:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\", expectt[23;1Hed: \"' . t[matchidx] . '\"'
:    else
:      $put ='OK ' . engine . ' - ' . pat
:    endif
:    if len(l) > 0
:"   check all the nine submatches
:      for i in range(1, 9)
:[8Cif len(t) <= matchidx + i
:[10Clet e = ''
:[8Celse
:[10Clet e = t[matchidx + i]
:[8Cendif
:[8Cif l[i] != e
:[10C$put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i . ': \"' . ll[37;1H[i] . '\", expected: \"' . e . '\"'
:[8Cendif
:      endfor
:      unlet i
:    endif
:  endfor
:endfor
:unlet t tl e l

:" check that 'ambiwidth' does not change the meaning of \p
:set regexpengine=1 ambiwidth=single
:$put ='eng 1 ambi single: ' . match(\"\u00EC\", '\p')
:set regexpengine=1 ambiwidth=double
:$put ='eng 1 ambi double: ' . match(\"\u00EC\", '\p')
:set regexpengine=2 ambiwidth=single
:$put ='eng 2 ambi single: ' . match(\"\u00EC\", '\p')
:set regexpengine=2 ambiwidth=double
:$put ='eng 2 ambi double: ' . match(\"\u00EC\", '\p')

:/\%#=1^Results/,$wq! test.out
ENDTEST

Results of test95:[58;1H[?12l[?25h[?25l

:[?12l[?25h" tl is a List of Lists with:[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    2: test auto/old/new  0: test auto/old  1: test auto/new[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    regexp pattern[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    text to test the pattern on[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    expected match (optional)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    expected submatch 1 (optional)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    expected submatch 2 (optional)[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"    etc.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"  When there is no match use only the first two items.[?25l[58;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet tl = [][?25l[58;1H[?12l[?25h
[?25l[60;1H[K[60;1H:[?12l[?25h"""" Multi-byte character tests. These will fail unless vim is compiled[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" with Multibyte (FEAT_MBYTE) or BIG/HUGE features.[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[[:alpha:][=a=]]\+', '879 aiaÃ£Ã¢aiuvna ', 'aiaÃ£Ã¢aiuvna'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[[=a=]]\+', 'ddaÃ£Ã¢bcd', 'aÃ£Ã¢'])[34m^I^I^I^I^I^I^I^I[m" equivalence classes[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^à¸¡ ]\+', 'à¸¡à¸¡ oijasoifjos ifjoisj f osij j à¸¡à¸¡à¸¡à¸¡à¸¡ abcd', 'oijasoifjos'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, ' [^ ]\+', 'start à¸¡abcdà¸¡ ', ' à¸¡abcdà¸¡'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[à¸¡[:alpha:][=a=]]\+', '879 aiaÃ£à¸¡Ã¢à¸¡aiuvna ', 'aiaÃ£à¸¡Ã¢à¸¡aiuvna'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" this is not a normal "i" but 0xec[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\p\+', 'Ã¬a', 'Ã¬a'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\p*', 'aã‚', 'aã‚'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Test recognition of some character classes[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\i\+', '&*Â¨xx ', 'xx'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '\f\+', '&*[34m<9f>[mfname ', 'fname'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Test composing character matching[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.à¸¡', 'xà¸¡à¸¡à¹ˆx yà¸¡y', 'yà¸¡'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '.à¸¡à¸¡à¹ˆ', 'xà¸¡à¸¡à¹ˆx yà¸¡y', 'xà¸¡à¸¡à¹ˆ'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\u05b9", " x\u05b9 ", "x\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, ".\u05b9", " x\u05b9 ", "x\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\u05b9\u05bb", " x\u05b9\u05bb ", "x\u05b9\u05bb"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, ".\u05b9\u05bb", " x\u05b9\u05bb ", "x\u05b9\u05bb"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\u05bb\u05b9", " x\u05b9\u05bb ", "x\u05b9\u05bb"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, ".\u05bb\u05b9", " x\u05b9\u05bb ", "x\u05b9\u05bb"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\u05b9", " y\u05bb x\u05b9 ", "x\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, ".\u05b9", " y\u05bb x\u05b9 ", "x\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, ".\u05b9", " y\u05bb\u05b9 x\u05b9 ", "y\u05bb\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [1, "\u05b9\u05bb", " y\u05b9 x\u05b9\u05bb ", "x\u05b9\u05bb"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, ".\u05b9\u05bb", " y\u05bb x\u05b9\u05bb ", "x\u05b9\u05bb"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Test \Z[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, 'Ãº\Z', 'x'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '×™×”×•×”\Z', '×™×”×•×”', '×™×”×•×”'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '×™×™Ö°×”×•×•Ö¸×”\Z', '×™×”×•×”', '×™×”×•×”'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '×™×”×•×”\Z', '×™×™Ö°×”×•×•Ö¸×”', '×™×™Ö°×”×•×•Ö¸×”'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '×™×™Ö°×”×•×•Ö¸×”\Z', '×™×™Ö°×”×•×•Ö¸×”', '×™×™Ö°×”×•×•Ö¸×”'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '×™×™Ö°\Z', '×•×•Ö°×™×™Ö·', '×™×™Ö·'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "×§\u200d\u05b9x\\Z", "x×§\u200d\u05b9xy", "×§\u200d\u05b9x"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "×§\u200d\u05b9x\\Z", "x×§\u200dxy", "×§\u200dx"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "×§\u200dx\\Z", "x×§\u200d\u05b9xy", "×§\u200d\u05b9x"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "×§\u200dx\\Z", "x×§\u200dxy", "×§\u200dx"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\u05b9\\Z", "xyz"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\\Z\u05b9", "xyz"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\u05b9\\Z", "xy\u05b9z", "y\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, "\\Z\u05b9", "xy\u05b9z", "y\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [1, "\u05b9\\+\\Z", "xy\u05b9z\u05b9 ", "y\u05b9z\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [1, "\\Z\u05b9\\+", "xy\u05b9z\u05b9 ", "y\u05b9z\u05b9"])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Combining different tests and features[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall add(tl, [2, '[^[=a=]]\+', 'ddaÃ£Ã¢bcd', 'dd'])[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"""" Run the tests[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h"[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor t in tl[?25l
:  [?12l[?25h:  let re = t[0]
[?25l:  [?12l[?25h:  let pat = t[1]
[?25l:  [?12l[?25h:  let text = t[2]
[?25l:  [?12l[?25h:  let matchidx = 3
[?25l:  [?12l[?25h:  for engine in [0, 1, 2]
[?25l:    [?12l[?25h:    if engine == 2 && re == 0 || engine == 1 && re == 1
[?25l:      [?12l[?25h:      continue
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:    let &regexpengine = engine
[?25l:    [?12l[?25h:    try
[?25l:      [?12l[?25h:      let l = matchlist(text, pat)
[?25l:      [?12l[?25h:    catch
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", caused an exception: \"
[59;98H'[60;1H . v:exception . '\"'
[?25l:      [?12l[?25h:    endtry
[?25l:    [?12l[?25h:" check the match itself
[?25l:    [?12l[?25h:    if len(l) == 0 && len(t) > matchidx
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", did not match, expected
[59;98H:[60;1H \"' . t[matchidx] . '\"'
[?25l:      [?12l[?25h:    elseif len(l) > 0 && len(t) == matchidx
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\"
[59;98H,[60;1H expected no match'
[?25l:      [?12l[?25h:    elseif len(t) > matchidx && l[0] != t[matchidx]
[?25l:      [?12l[?25h:      $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", match: \"' . l[0] . '\"
[59;98H,[60;1H expected: \"' . t[matchidx] . '\"'
[?25l:      [?12l[?25h:    else
[?25l:      [?12l[?25h:      $put ='OK ' . engine . ' - ' . pat
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:    if len(l) > 0
[?25l:      [?12l[?25h:"   check all the nine submatches
[?25l:      [?12l[?25h:      for i in range(1, 9)
[?25l:[8C[?12l[?25h:        if len(t) <= matchidx + i
[?25l:[10C[?12l[?25h:          let e = ''
[?25l:[10C[?12l[?25h:        else
[?25l:[10C[?12l[?25h:          let e = t[matchidx + i]
[?25l:[10C[?12l[?25h:        endif
[?25l:[8C[?12l[?25h:        if l[i] != e
[?25l:[10C[?12l[?25h:          $put ='ERROR: pat: \"' . pat . '\", text: \"' . text . '\", submatch ' . i 
[59;98H.[60;1H ': \"' . l[i] . '\", expected: \"' . e . '\"'
[?25l:[10C[?12l[?25h:        endif
[?25l:[8C[?12l[?25h:      endfor
[?25l:      [?12l[?25h:      unlet i
[?25l:      [?12l[?25h:    endif
[?25l:    [?12l[?25h:  endfor
[?25l:  [?12l[?25h:endfor[1;1H[45L[?25l[1;1HOK 1 - Ö¹
OK 2 - Ö¹
OK 0 - .Ö¹
OK 1 - .Ö¹
OK 2 - .Ö¹
OK 0 - Ö¹Ö»
OK 2 - Ö¹Ö»
OK 0 - .Ö¹Ö»
OK 1 - .Ö¹Ö»
OK 2 - .Ö¹Ö»
OK 0 - Ãº\Z
OK 1 - Ãº\Z
OK 2 - Ãº\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™Ö°\Z
OK 1 - ×™Ö°\Z
OK 2 - ×™Ö°\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹[46;10H[K[47;1HOK 0 - Ö¹\Z[47;10H[K[48;1HOK 1 - Ö¹\Z[48;10H[K[49;1HOK 2 - Ö¹\Z[49;10H[K[50;1HOK 0 - \ZÖ¹[50;10H[K[51;1HOK 1 - \ZÖ¹[51;10H[K[52;1HOK 2 - \ZÖ¹[52;10H[K[53;1HOK 0 - Ö¹\+\Z[53;12H[K[54;1HOK 2 - Ö¹\+\Z[54;13H[K[55;1HOK 0 - \ZÖ¹\+
OK 2 - \ZÖ¹\+[56;12H[K[57;1HOK 0 - [^[=a=]]\+
OK 1 - [^[=a=]]\+
OK 2 - [^[=a=]]\+[59;18H[K[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hunlet t tl e l[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" check that 'ambiwidth' does not change the meaning of \p[?25l[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset regexpengine=1 ambiwidth=single[?25l[27m[23m[m[H[2J[1;1HOK 1 - Ö¹
OK 2 - Ö¹
OK 0 - .Ö¹
OK 1 - .Ö¹
OK 2 - .Ö¹
OK 0 - Ö¹Ö»
OK 2 - Ö¹Ö»
OK 0 - .Ö¹Ö»
OK 1 - .Ö¹Ö»
OK 2 - .Ö¹Ö»
OK 0 - Ãº\Z
OK 1 - Ãº\Z
OK 2 - Ãº\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™Ö°\Z
OK 1 - ×™Ö°\Z
OK 2 - ×™Ö°\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\+\Z
OK 2 - Ö¹\+\Z
OK 0 - \ZÖ¹\+
OK 2 - \ZÖ¹\+
OK 0 - [^[=a=]]\+
OK 1 - [^[=a=]]\+
OK 2 - [^[=a=]]\+[?12l[?25h[?25l
:[?12l[?25h$put ='eng 1 ambi single: ' . match(\"\u00EC\", '\p')[?25l[1;59r[59;1H
[1;60r[59;1Heng 1 ambi single: 0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset regexpengine=1 ambiwidth=double[?25l[27m[23m[m[H[2J[1;1HOK 2 - Ö¹
OK 0 - .Ö¹
OK 1 - .Ö¹
OK 2 - .Ö¹
OK 0 - Ö¹Ö»
OK 2 - Ö¹Ö»
OK 0 - .Ö¹Ö»
OK 1 - .Ö¹Ö»
OK 2 - .Ö¹Ö»
OK 0 - Ãº\Z
OK 1 - Ãº\Z
OK 2 - Ãº\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™Ö°\Z
OK 1 - ×™Ö°\Z
OK 2 - ×™Ö°\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\+\Z
OK 2 - Ö¹\+\Z
OK 0 - \ZÖ¹\+
OK 2 - \ZÖ¹\+
OK 0 - [^[=a=]]\+
OK 1 - [^[=a=]]\+
OK 2 - [^[=a=]]\+
eng 1 ambi single: 0[?12l[?25h[?25l
:[?12l[?25h$put ='eng 1 ambi double: ' . match(\"\u00EC\", '\p')[?25l[1;59r[59;1H
[1;60r[59;1Heng 1 ambi double: 0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset regexpengine=2 ambiwidth=single[?25l[27m[23m[m[H[2J[1;1HOK 0 - .Ö¹
OK 1 - .Ö¹
OK 2 - .Ö¹
OK 0 - Ö¹Ö»
OK 2 - Ö¹Ö»
OK 0 - .Ö¹Ö»
OK 1 - .Ö¹Ö»
OK 2 - .Ö¹Ö»
OK 0 - Ãº\Z
OK 1 - Ãº\Z
OK 2 - Ãº\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™Ö°\Z
OK 1 - ×™Ö°\Z
OK 2 - ×™Ö°\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\+\Z
OK 2 - Ö¹\+\Z
OK 0 - \ZÖ¹\+
OK 2 - \ZÖ¹\+
OK 0 - [^[=a=]]\+
OK 1 - [^[=a=]]\+
OK 2 - [^[=a=]]\+
eng 1 ambi single: 0
eng 1 ambi double: 0[?12l[?25h[?25l
:[?12l[?25h$put ='eng 2 ambi single: ' . match(\"\u00EC\", '\p')[?25l[1;59r[59;1H
[1;60r[59;1Heng 2 ambi single: 0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25hset regexpengine=2 ambiwidth=double[?25l[27m[23m[m[H[2J[1;1HOK 1 - .Ö¹
OK 2 - .Ö¹
OK 0 - Ö¹Ö»
OK 2 - Ö¹Ö»
OK 0 - .Ö¹Ö»
OK 1 - .Ö¹Ö»
OK 2 - .Ö¹Ö»
OK 0 - Ãº\Z
OK 1 - Ãº\Z
OK 2 - Ãº\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™×”×•×”\Z
OK 1 - ×™×”×•×”\Z
OK 2 - ×™×”×•×”\Z
OK 0 - ×™Ö°×”×•Ö¸×”\Z
OK 1 - ×™Ö°×”×•Ö¸×”\Z
OK 2 - ×™Ö°×”×•Ö¸×”\Z
OK 0 - ×™Ö°\Z
OK 1 - ×™Ö°\Z
OK 2 - ×™Ö°\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - ×§[34m<200d>[mx\Z
OK 1 - ×§[34m<200d>[mx\Z
OK 2 - ×§[34m<200d>[mx\Z
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\Z
OK 1 - Ö¹\Z
OK 2 - Ö¹\Z
OK 0 - \ZÖ¹
OK 1 - \ZÖ¹
OK 2 - \ZÖ¹
OK 0 - Ö¹\+\Z
OK 2 - Ö¹\+\Z
OK 0 - \ZÖ¹\+
OK 2 - \ZÖ¹\+
OK 0 - [^[=a=]]\+
OK 1 - [^[=a=]]\+
OK 2 - [^[=a=]]\+
eng 1 ambi single: 0
eng 1 ambi double: 0
eng 2 ambi single: 0[?12l[?25h[?25l
:[?12l[?25h$put ='eng 2 ambi double: ' . match(\"\u00EC\", '\p')[?25l[1;59r[59;1H
[1;60r[59;1Heng 2 ambi double: 0[60;1H[K[59;1H[?12l[?25h[?25l
:[?12l[?25h/\%#=1^Results/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [60;12H[K[60;12H[New] 122L, 1815C written
[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test96.failed test.ok test.out X* viminfo
cp test96.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test96.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test96.in" 142 lines, 3330 characters[1;1HThis will test for problems in quickfix:
A. incorrectly copying location lists which caused the location list to show a
   different name than the file that was actually being displayed.
B. not reusing the window for which the location list window is opened but
   instead creating new windows.
C. make sure that the location list window is not reused instead of the window
   it belongs to.

Note: to debug a problem comment out the last ":b 1" in a test and testing will
stop at this point.

STARTTEST
:so small.vim
: enew
: w! test.out
: b 1
: " Set up the test environment:
: function! ReadTestProtocol(name)
:   let base = substitute(a:name, '\v^test://(.*)%(\.[^.]+)?', '\1', '')
:   let word = substitute(base, '\v(.*)\..*', '\1', '')
:
:   setl modifiable
:   setl noreadonly
:   setl noswapfile
:   setl bufhidden=delete
:   %del _
:   " For problem 2:
:   " 'buftype' has to be set to reproduce the constant opening of new windows
:   setl buftype=nofile
:
:   call setline(1, word)
:
:   setl nomodified
:   setl nomodifiable
:   setl readonly
:   exe 'doautocmd BufRead ' . substitute(a:name, '\v^test://(.*)', '\1', '')
: endfunction
: augroup testgroup
:   au!
:   autocmd BufReadCmd test://* call ReadTestProtocol(expand("<amatch>"))
: augroup END
: let words = [ "foo", "bar", "baz", "quux", "shmoo", "spam", "eggs" ]
:
: let qflist = []
: for word in words
:   call add(qflist, {'filename': 'test://' . word . '.txt', 'text': 'file ' . word . '.txt', })
:   " NOTE: problem 1:
:   " intentionally not setting 'lnum' so that the quickfix entries are not
:   " valid
:   call setloclist(0, qflist, ' ')
: endfor
ENDTEST

Test A:
STARTTEST
:lrewind
:enew
:lopen
:lnext[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HThis will test for problems in quickfix:[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[12;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 39 lines, 1123 characters written[13;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[13;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[52;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h enew[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h w! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 0 lines, 0 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h b 1[?25l"test96.in" 142 lines, 3330 characters[1;1H:   setl noswapfile
:   setl bufhidden=delete[2;26H[K[3;1H:   %del _[3;11H[K[4;1H:   " For problem 2:[4;21H[K[5;1H:   " 'buftype' has to be set to reproduce the constant opening of new windows[5;79H[K[6;1H:   setl buftype=nofile[6;24H[K[7;1H:[7;2H[K[8;1H:   call setline(1, word)[8;26H[K[9;1H:[9;2H[K[10;1H:   setl nomodified[10;20H[K[11;1H:   setl nomodifiable[11;22H[K[12;1H:   setl readonly[12;18H[K[13;1H:   exe 'doautocmd BufRead ' . substitute(a:name, '\v^test://(.*)', '\1', '')[13;78H[K[14;1H: endfunction[14;14H[K[15;1H: augroup testgroup[15;20H[K[16;1H:   au![16;8H[K[17;1H:   autocmd BufReadCmd test://* call ReadTestProtocol(expand("<amatch>"))[17;74H[K[18;1H: augroup END[18;14H[K[19;1H: let words = [ "foo", "bar", "baz", "quux", "shmoo", "spam", "eggs" ][19;71H[K[20;1H:[20;2H[K[21;1H: let qflist = [][21;18H[K[22;1H: for word in words[22;20H[K[23;1H:   call add(qflist, {'filename': 'test://' . word . '.txt', 'text': 'file ' . word . '.txt', })[23;97H[K[24;1H:   " NOTE: problem 1:[24;23H[K[25;1H:   " intentionally not setting 'lnum' so that the quickfix entries are not[25;76H[K[26;1H:   " valid[26;12H[K[27;1H:   call setloclist(0, qflist, ' ')[27;36H[K[28;1H: endfor[28;9H[K[29;1HENDTEST[29;8H[K[30;1H[K[31;1HTest A:[31;8H[K[32;1HSTARTTEST[32;10H[K[33;1H:lrewind[33;9H[K[34;1H:enew[34;6H[K[35;1H:lopen[35;7H[K[36;1H:lnext[36;7H[K[37;1H:lnext[37;7H[K[38;1H:lnext[38;7H[K[39;1H:lnext[39;7H[K[40;1H:vert split[40;12H[K[41;1H:wincmd L[41;10H[K[42;1H:lopen[42;7H[K[43;1H:wincmd p[43;10H[K[44;1H:lnext[44;7H[K[45;1H:"b 1[45;6H[K[46;1H:let fileName = expand("%")[46;28H[K[47;1H:wincmd p[47;10H[K[48;1H:let locationListFileName = substitute(getline(line('.')), '\([^|]*\)|.*', '\1', '')[48;85H[K[49;1H:wincmd n[49;10H[K[50;1H:wincmd K[50;10H[K[51;1H:b test.out[51;12H[K[52;1H:let fileName = substitute(fileName, '\\', '/', 'g')[52;53H[K[53;1H:let locationListFileName = substitute(locationListFileName, '\\', '/', 'g')[53;77H[K[54;1H:call append(line('$'), "Test A:")[54;35H[K[55;1H:call append(line('$'), "  - file name displayed: " . fileName)[55;64H[K[56;1H:call append(line('$'), "  - quickfix claims that the file name displayed is: " . locationListFilee[57;1HName)[57;6H[K[58;1H:w[58;3H[K[59;1H:wincmd o[59;10H[K[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h " Set up the test environment:[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h function! ReadTestProtocol(name)[?25l
:  [?12l[?25h:   let base = substitute(a:name, '\v^test://(.*)%(\.[^.]+)?', '\1', '')
[?25l:  [?12l[?25h:   let word = substitute(base, '\v(.*)\..*', '\1', '')
[?25l:  [?12l[?25h:
[?25l:  [?12l[?25h:   setl modifiable
[?25l:  [?12l[?25h:   setl noreadonly
[?25l:  [?12l[?25h:   setl noswapfile
[?25l:  [?12l[?25h:   setl bufhidden=delete
[?25l:  [?12l[?25h:   %del _
[?25l:  [?12l[?25h:   " For problem 2:
[?25l:  [?12l[?25h:   " 'buftype' has to be set to reproduce the constant opening of new windows
[?25l:  [?12l[?25h:   setl buftype=nofile
[?25l:  [?12l[?25h:
[?25l:  [?12l[?25h:   call setline(1, word)
[?25l:  [?12l[?25h:
[?25l:  [?12l[?25h:   setl nomodified
[?25l:  [?12l[?25h:   setl nomodifiable
[?25l:  [?12l[?25h:   setl readonly
[?25l:  [?12l[?25h:   exe 'doautocmd BufRead ' . substitute(a:name, '\v^test://(.*)', '\1', '')
[?25l:  [?12l[?25h: endfunction[1;1H[19L[?25l[1;1H:   setl noswapfile
:   setl bufhidden=delete
:   %del _
:   " For problem 2:
:   " 'buftype' has to be set to reproduce the constant opening of new windows
:   setl buftype=nofile
:
:   call setline(1, word)
:
:   setl nomodified
:   setl nomodifiable
:   setl readonly
:   exe 'doautocmd BufRead ' . substitute(a:name, '\v^test://(.*)', '\1', '')
: endfunction
: augroup testgroup
:   au!
:   autocmd BufReadCmd test://* call ReadTestProtocol(expand("<amatch>"))
: augroup END
: let words = [ "foo", "bar", "baz", "quux", "shmoo", "spam", "eggs" ][60;1H[K[30;1H[?12l[?25h[?25l[60;1H:[?12l[?25h augroup testgroup[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h   au![?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h   autocmd BufReadCmd test://* call ReadTestProtocol(expand("<amatch>"))[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h augroup END[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h let words = [ "foo", "bar", "baz", "quux", "shmoo", "spam", "eggs" ][?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h let qflist = [][?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h for word in words[?25l
:  [?12l[?25h:   call add(qflist, {'filename': 'test://' . word . '.txt', 'text': 'file ' . word . '.txt', 
[59;98H}[60;1H)
[?25l:  [?12l[?25h:   " NOTE: problem 1:
[?25l:  [?12l[?25h:   " intentionally not setting 'lnum' so that the quickfix entries are not
[?25l:  [?12l[?25h:   " valid
[?25l:  [?12l[?25h:   call setloclist(0, qflist, ' ')
[?25l:  [?12l[?25h: endfor[1;1H[7L[?25l[1;1H:   setl noswapfile
:   setl bufhidden=delete
:   %del _
:   " For problem 2:
:   " 'buftype' has to be set to reproduce the constant opening of new windows
:   setl buftype=nofile
:[60;1H[K[30;1H[?12l[?25h[?25l[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H27 lines, 608 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1H:b 1
ENDTEST[60;1H[K[59;1H[?12l[?25h[?25l[1;59r[59;1H
[1;60r[59;1H[?12l[?25h[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlrewind[?25lNo matching autocommands
(1 of 7): file foo.txt
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25henew[?25l[1;1H[2L[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hlopen[?25l[48;1H[7m[No Name]                                                                                         [m[49;1H[30m[43mtest://foo.txt|| file foo.txt                                                                     [m[50;1Htest://bar.txt|| file bar.txt[50;30H[K[51;1Htest://baz.txt|| file baz.txt[51;30H[K[52;1Htest://quux.txt|| file quux.txt[52;32H[K[53;1Htest://shmoo.txt|| file shmoo.txt[53;34H[K[54;1Htest://spam.txt|| file spam.txt[54;32H[K[55;1Htest://eggs.txt|| file eggs.txt[55;32H[K[59;1H[1m[7m[Location List]                                                                                   [49;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlnext[?25lNo matching autocommands[1;1Hbar[48;1H[1m[7mtest://bar.txt [RO]                                                                               [m[49;1Htest://foo.txt|| file foo.txt[49;30H[K[50;1H[30m[43mtest://bar.txt|| file bar.txt                                                                     [m[59;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlnext[?25lNo matching autocommands[1;3Hz[48;10H[1m[7mz.[m

test://bar.txt|| file bar.txt[50;30H[K[51;1H[30m[43mtest://baz.txt|| file baz.txt                                                                     [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlnext[?25lNo matching autocommands[1;1Hquux[48;8H[1m[7mquux.txt [RO][m


test://baz.txt|| file baz.txt[51;30H[K[52;1H[30m[43mtest://quux.txt|| file quux.txt                                                                   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlnext[?25lNo matching autocommands[1;1Hshmoo[48;8H[1m[7mshmoo.txt [RO][m[52;1Htest://quux.txt|| file quux.txt[52;32H[K[53;1H[30m[43mtest://shmoo.txt|| file shmoo.txt                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hvert split[?25l[1;50H[7m|[2;50H|[3;50H|[4;50H|[5;50H|[6;50H|[7;50H|[8;50H|[9;50H|[10;50H|[11;50H|[12;50H|[13;50H|[14;50H|[15;50H|[16;50H|[17;50H|[18;50H|[19;50H|[20;50H|[21;50H|[22;50H|[23;50H|[24;50H|[25;50H|[26;50H|[27;50H|[28;50H|[29;50H|[30;50H|[31;50H|[32;50H|[33;50H|[34;50H|[35;50H|[36;50H|[37;50H|[38;50H|[39;50H|[40;50H|[41;50H|[42;50H|[43;50H|[44;50H|[45;50H|[46;50H|[47;50H|[m[1;51Hshmoo[2;51H[1m[34m~[3;51H~[4;51H~[5;51H~[6;51H~[7;51H~[8;51H~[9;51H~[10;51H~[11;51H~[12;51H~[13;51H~[14;51H~[15;51H~[16;51H~[17;51H~[18;51H~[19;51H~[20;51H~[21;51H~[22;51H~[23;51H~[24;51H~[25;51H~[26;51H~[27;51H~[28;51H~[29;51H~[30;51H~[31;51H~[32;51H~[33;51H~[34;51H~[35;51H~[36;51H~[37;51H~[38;51H~[39;51H~[40;51H~[41;51H~[42;51H~[43;51H~[44;51H~[45;51H~[46;51H~[47;51H~[m[48;51H[7mtest://shmoo.txt [RO]                           [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd L[?25l[1;49H[7m|[2;49H|[3;49H|[4;49H|[5;49H|[6;49H|[7;49H|[8;49H|[9;49H|[10;49H|[11;49H|[12;49H|[13;49H|[14;49H|[15;49H|[16;49H|[17;49H|[18;49H|[19;49H|[20;49H|[21;49H|[22;49H|[23;49H|[24;49H|[25;49H|[26;49H|[27;49H|[28;49H|[29;49H|[30;49H|[31;49H|[32;49H|[33;49H|[34;49H|[35;49H|[36;49H|[37;49H|[38;49H|[39;49H|[40;49H|[41;49H|[42;49H|[43;49H|[44;49H|[45;49H|[46;49H|[47;49H|
test://shmoo.txt [RO][m[1m[7m [m[7m                           |[49;49H|[50;49H|[51;49H|[52;49H|[53;49H|[54;49H|[55;49H|[56;49H|[57;49H|[58;49H|[m[1;50Hshmo[1;55H[K[2;50H[1m[34m~  [3;50H~  [4;50H~  [5;50H~  [6;50H~  [7;50H~  [8;50H~  [9;50H~  [10;50H~  [11;50H~  [12;50H~  [13;50H~  [14;50H~  [15;50H~  [16;50H~  [17;50H~  [18;50H~  [19;50H~  [20;50H~  [21;50H~  [22;50H~  [23;50H~  [24;50H~  [25;50H~  [26;50H~  [27;50H~  [28;50H~  [29;50H~  [30;50H~  [31;50H~  [32;50H~  [33;50H~  [34;50H~  [35;50H~  [36;50H~  [37;50H~  [38;50H~  [39;50H~  [40;50H~  [41;50H~  [42;50H~  [43;50H~  [44;50H~  [45;50H~  [46;50H~  [47;50H~  [48;50H~                                                [49;50H~                                                [50;50H~                                                [51;50H~                                                [52;50H~                                                [53;50H~                                                [54;50H~                                                [55;50H~                                                [56;50H~[57;50H~[58;50H~[m[59;50H[1m[7mtest://shmoo.txt [RO]                            [1;50H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlopen[?25l[48;50H[7mtest://shmoo.txt [RO]                            [m[49;50H[30m[43mtest://foo.txt|| file foo.txt                    [m[50;50Htest://bar.txt|| file bar.txt[50;79H[K[51;50Htest://baz.txt|| file baz.txt[51;79H[K[52;50Htest://quux.txt|| file quux.txt[52;81H[K[53;50Htest://shmoo.txt|| file shmoo.txt[53;83H[K[54;50Htest://spam.txt|| file spam.txt[54;81H[K[55;50Htest://eggs.txt|| file eggs.txt[55;81H[K[59;50H[1m[7m[Location List]t       [49;50H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[48;50H[1m[7mtest://shmoo.txt [RO]                            [m[59;50H[7m[Location List][m[1m[7m [m[7m                                  [1;50H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlnext[?25lNo matching autocommands[1;50Hbar[1;53H[K[48;57H[1m[7mbar.txt [RO]O   [m[49;50Htest://foo.txt|| file foo.txt[49;79H[K[50;50H[30m[43mtest://bar.txt|| file bar.txt                    [1;50H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h"b 1[?25l[1;50H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet fileName = expand("%")[?25l[1;50H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[48;50H[7mtest://bar.txt [RO][m[1m[7m [m[7m                              [m[59;50H[1m[7m[Location List]                                  [50;50H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet locationListFileName = substitute(getline(line('.')), '\([^|]*\)|.*', '\1', '')[?25l[50;50H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd n[?25l[27m[23m[m[H[2J[1;1Hshmoo[43C[7m|[2;49H|[3;49H|[4;49H|[5;49H|[6;49H|[7;49H|[8;49H|[9;49H|[10;49H|[11;49H|[12;49H|[13;49H|[14;49H|[15;49H|[16;49H|[17;49H|[18;49H|[19;49H|[20;49H|[21;49H|[22;49H|[23;49H|[24;49H|[25;49H|[26;49H|[27;49H|[28;49H|[29;49H|[30;49H|[31;49H|[32;49H|[33;49H|[34;49H|[35;49H|[36;49H|[37;49H|[38;49H|[39;49H|[40;49H|[41;49H|[42;49H|[43;49H|[44;49H|[45;49H|[46;49H|[47;49H|[m[2;1H[1m[34m~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               [m
[7mtest://shmoo.txt [RO]                           |[m
test://foo.txt|| file foo.txt[19C[7m|[m
test://bar.txt|| file bar.txt[19C[7m|[m
test://baz.txt|| file baz.txt[19C[7m|[m
test://quux.txt|| file quux.txt[17C[7m|[m
[30m[43mtest://shmoo.txt|| file shmoo.txt               [m[7m|[m
test://spam.txt|| file spam.txt[17C[7m|[m
test://eggs.txt|| file eggs.txt[17C[7m|[56;49H|[57;49H|[58;49H|[m[56;1H[1m[34m~                                               
~                                               
~                                               [m
[7m[Location List]                                  [m[1;50Hbar[2;50H[1m[34m~                                                [3;50H~                                                [4;50H~                                                [5;50H~                                                [6;50H~                                                [7;50H~                                                [8;50H~                                                [9;50H~                                                [10;50H~                                                [11;50H~                                                [12;50H~                                                [13;50H~                                                [14;50H~                                                [15;50H~                                                [16;50H~                                                [17;50H~                                                [18;50H~                                                [19;50H~                                                [20;50H~                                                [21;50H~                                                [22;50H~                                                [23;50H~                                                [m[24;50H[7mtest://bar.txt [RO]                              [m[26;50H[1m[34m~                                                [27;50H~                                                [28;50H~                                                [29;50H~                                                [30;50H~                                                [31;50H~                                                [32;50H~                                                [33;50H~                                                [34;50H~                                                [35;50H~                                                [36;50H~                                                [37;50H~                                                [38;50H~                                                [39;50H~                                                [40;50H~                                                [41;50H~                                                [42;50H~                                                [43;50H~                                                [44;50H~                                                [45;50H~                                                [46;50H~                                                [47;50H~                                                [m[48;50H[1m[7m[No Name]                                        [m[49;50H[30m[43mtest://bar.txt|| file bar.txt                    [m[50;50Htest://baz.txt|| file baz.txt[51;50Htest://quux.txt|| file quux.txt[52;50Htest://shmoo.txt|| file shmoo.txt[53;50Htest://spam.txt|| file spam.txt[54;50Htest://eggs.txt|| file eggs.txt[55;50H[1m[34m~                                                [56;50H~                                                [57;50H~                                                [58;50H~                                                [m[59;50H[7m[Location List]                                  [25;50H[?12l[?25h[?25l[60;1H[m:[?12l[?25hwincmd K[?25l[27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [m[20;1H[1m[7m[No Name]                                                                                         [m[21;1Hshmoo[43C[7m|[22;49H|[23;49H|[24;49H|[25;49H|[26;49H|[27;49H|[28;49H|[29;49H|[30;49H|[31;49H|[32;49H|[33;49H|[34;49H|[35;49H|[36;49H|[37;49H|[38;49H|[39;49H|[40;49H|[41;49H|[42;49H|[43;49H|[44;49H|[45;49H|[46;49H|[47;49H|[48;49H|[49;49H|[50;49H|[51;49H|[m[22;1H[1m[34m~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               
~                                               [m
[7mtest://shmoo.txt [RO]                           |[m
[30m[43mtest://shmoo.txt|| file shmoo.txt               [m[7m|[m
test://spam.txt|| file spam.txt[17C[7m|[m
test://eggs.txt|| file eggs.txt[17C[7m|[56;49H|[57;49H|[58;49H|[m[56;1H[1m[34m~                                               
~                                               
~                                               [m
[7m[Location List]                                  [m[21;50Hbar[22;50H[1m[34m~                                                [23;50H~                                                [24;50H~                                                [25;50H~                                                [26;50H~                                                [27;50H~                                                [28;50H~                                                [29;50H~                                                [30;50H~                                                [31;50H~                                                [32;50H~                                                [33;50H~                                                [34;50H~                                                [35;50H~                                                [36;50H~                                                [37;50H~                                                [38;50H~                                                [39;50H~                                                [40;50H~                                                [41;50H~                                                [42;50H~                                                [43;50H~                                                [44;50H~                                                [45;50H~                                                [46;50H~                                                [47;50H~                                                [48;50H~                                                [49;50H~                                                [50;50H~                                                [51;50H~                                                [m[52;50H[7mtest://bar.txt [RO]                              [m[53;50H[30m[43mtest://bar.txt|| file bar.txt                    [m[54;50Htest://baz.txt|| file baz.txt[55;50Htest://quux.txt|| file quux.txt[56;50Htest://shmoo.txt|| file shmoo.txt[57;50Htest://spam.txt|| file spam.txt[58;50Htest://eggs.txt|| file eggs.txt[59;50H[7m[Location List]                                  [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hb test.out[?25l"test.out" 0 lines, 0 characters[20;1H[1m[7mtest.out]  [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet fileName = substitute(fileName, '\\', '/', 'g')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet locationListFileName = substitute(locationListFileName, '\\', '/', 'g')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), "Test A:")[?25l[2;1HTest A:[2;8H[K[20;10H[1m[7m[+][1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), "  - file name displayed: " . fileName)[?25l[3;1H  - file name displayed: test://bar.txt[3;40H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), "  - quickfix claims that the file name displayed is: " . locationListFil
[59;98He[60;1HName)[?25l[1;1H[L[4;1H  - quickfix claims that the file name displayed is: test://bar.txt[4;68H[K[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw[?25l"test.out" 4 lines, 117 characters written[20;10H[1m[7m    [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd o[?25l[20;1H[1m[34m~                                                                                                 [21;1H~                                                                                                 [22;49H   [23;49H   [24;49H   [25;49H   [26;49H   [27;49H   [28;49H   [29;49H   [30;49H   [31;49H   [32;49H   [33;49H   [34;49H   [35;49H   [36;49H   [37;49H   [38;49H   [39;49H   [40;49H   [41;49H   [42;49H   [43;49H   [44;49H   [45;49H   [46;49H   [47;49H   [48;49H   [49;49H   [50;49H   [51;49H   
~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;49H                                                  [57;49H                                                  [58;49H                                                  [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hb 1[?25l"test96.in" 142 lines, 3330 characters[1;1H:lrewind
:enew[2;6H[K[3;1H:lopen[3;7H[K[4;1H:lnext[4;7H[K[5;1H:lnext[5;7H[K[6;1H:lnext[6;7H[K[7;1H:lnext[7;7H[K[8;1H:vert split[8;12H[K[9;1H:wincmd L[9;10H[K[10;1H:lopen[10;7H[K[11;1H:wincmd p[11;10H[K[12;1H:lnext[12;7H[K[13;1H:"b 1[13;6H[K[14;1H:let fileName = expand("%")[14;28H[K[15;1H:wincmd p[15;10H[K[16;1H:let locationListFileName = substitute(getline(line('.')), '\([^|]*\)|.*', '\1', '')[16;85H[K[17;1H:wincmd n[17;10H[K[18;1H:wincmd K[18;10H[K[19;1H:b test.out[19;12H[K[20;1H:let fileName = substitute(fileName, '\\', '/', 'g')[20;53H[K[21;1H:let locationListFileName = substitute(locationListFileName, '\\', '/', 'g')[21;77H[K[22;1H:call append(line('$'), "Test A:")[22;35H[K[23;1H:call append(line('$'), "  - file name displayed: " . fileName)[23;64H[K[24;1H:call append(line('$'), "  - quickfix claims that the file name displayed is: " . locationListFilee[25;1HName)[25;6H[K[26;1H:w[26;3H[K[27;1H:wincmd o[27;10H[K[28;1H:b 1[28;5H[K[29;1HENDTEST[29;8H[K[30;1H[K[31;1HTest B:[31;8H[K[32;1HSTARTTEST[32;10H[K[33;1H:lrewind[33;9H[K[34;1H:lopen[34;7H[K[35;1H:2[35;3H[K[36;1H:exe "normal \<CR>"[36;20H[K[37;1H:wincmd p[37;10H[K[38;1H:3[38;3H[K[39;1H:exe "normal \<CR>"[39;20H[K[40;1H:wincmd p[40;10H[K[41;1H:4[41;3H[K[42;1H:exe "normal \<CR>"[42;20H[K[43;1H:let numberOfWindowsOpen = winnr('$')[43;38H[K[44;1H:wincmd n[44;10H[K[45;1H:wincmd K[45;10H[K[46;1H:b test.out[46;12H[K[47;1H:call append(line('$'), "Test B:")[47;35H[K[48;1H:call append(line('$'), "  - number of window open: " . numberOfWindowsOpen)[48;77H[K[49;1H:w[49;3H[K[50;1H:wincmd o[50;10H[K[51;1H:b 1[51;5H[K[52;1HENDTEST[52;8H[K[53;1H[K[54;1HTest C:[54;8H[K[55;1HSTARTTEST[55;10H[K[56;1H:lrewind[56;9H[K[57;1H:lopen[57;7H[K[58;1H:" Let's move the location list window to the top to check whether it (the first[58;81H[K[59;1H:" window found) will be reused when we try to open new windows:[59;65H[K[30;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H19 lines, 305 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[52;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[53;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlrewind[?25lNo matching autocommands
(1 of 7): file foo.txt
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlopen[?25l[1;1H[2L[1;1Hfoo
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [m[48;1H[7mtest://foo.txt [RO]                                                                               [m[49;1H[30m[43mtest://foo.txt|| file foo.txt                                                                     [m[50;1Htest://bar.txt|| file bar.txt
test://baz.txt|| file baz.txt
test://quux.txt|| file quux.txt
test://shmoo.txt|| file shmoo.txt
test://spam.txt|| file spam.txt
test://eggs.txt|| file eggs.txt
[1m[34m~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[1m[7m[Location List]                                                                                   [m[60;1H[K[49;1H[?12l[?25h[?25l[60;1H:[?12l[?25h2[?25l[50;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexe "normal \<CR>"[?25lNo matching autocommands[1;1Hbar[48;1H[1m[7mtest://bar.txt [RO]                                                                               [m[49;1Htest://foo.txt|| file foo.txt[49;30H[K[50;1H[30m[43mtest://bar.txt|| file bar.txt                                                                     [m[59;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[48;1H[7mtest://bar.txt [RO][m[1m[7m [m[7m                                                                               [m[59;1H[1m[7m[Location List]                                                                                   [50;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h3[?25l[51;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexe "normal \<CR>"[?25lNo matching autocommands[1;3Hz[48;1H[1m[7mtest://baz.txt [RO]                                                                               [m[50;1Htest://bar.txt|| file bar.txt[50;30H[K[51;1H[30m[43mtest://baz.txt|| file baz.txt                                                                     [m[59;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[48;1H[7mtest://baz.txt [RO][m[1m[7m [m[7m                                                                               [m[59;1H[1m[7m[Location List]                                                                                   [51;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h4[?25l[52;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexe "normal \<CR>"[?25lNo matching autocommands[1;1Hquux[48;1H[1m[7mtest://quux.txt [RO]                                                                              [m[51;1Htest://baz.txt|| file baz.txt[51;30H[K[52;1H[30m[43mtest://quux.txt|| file quux.txt                                                                   [m[59;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet numberOfWindowsOpen = winnr('$')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd n[?25l[1;1H[K[24;1H[1m[7m[No Name]                                                                                         [m[25;1Hquux[25;5H[K[48;1H[7mtest://quux.txt [RO][m[1m[7m [m[7m                                                                              [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd K[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hb test.out[?25l"test.out" 4 lines, 117 characters[2;1HTest A:[2;8H[K[3;1H  - file name displayed: test://bar.txt[3;40H[K[4;1H  - quickfix claims that the file name displayed is: test://bar.txt[4;68H[K[24;1H[1m[7mtest.out]  [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), "Test B:")[?25l[5;1HTest B:[5;8H[K[24;10H[1m[7m[+][1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), "  - number of window open: " . numberOfWindowsOpen)[?25l[6;1H  - number of window open: 2[6;29H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 6 lines, 154 characters written[24;10H[1m[7m    [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd o[?25l[24;1H[1m[34m~                                                                                                 [25;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hb 1[?25l"test96.in" 142 lines, 3330 characters[1;1H:call append(line('$'), "  - quickfix claims that the file name displayed is: " . locationListFilee[2;1HName)[2;6H[K[3;1H:w[3;3H[K[4;1H:wincmd o[4;10H[K[5;1H:b 1[5;6H[K[6;1HENDTEST[6;8H[K[7;1H[K[8;1HTest B:[8;8H[K[9;1HSTARTTEST[9;10H[K[10;1H:lrewind[10;9H[K[11;1H:lopen[11;7H[K[12;1H:2[12;3H[K[13;1H:exe "normal \<CR>"[13;20H[K[14;1H:wincmd p[14;10H[K[15;1H:3[15;3H[K[16;1H:exe "normal \<CR>"[16;20H[K[17;1H:wincmd p[17;10H[K[18;1H:4[18;3H[K[19;1H:exe "normal \<CR>"[19;20H[K[20;1H:let numberOfWindowsOpen = winnr('$')[20;38H[K[21;1H:wincmd n[21;10H[K[22;1H:wincmd K[22;10H[K[23;1H:b test.out[23;12H[K[24;1H:call append(line('$'), "Test B:")[24;35H[K[25;1H:call append(line('$'), "  - number of window open: " . numberOfWindowsOpen)[25;77H[K[26;1H:w[26;3H[K[27;1H:wincmd o[27;10H[K[28;1H:b 1[28;5H[K[29;1HENDTEST[29;8H[K[30;1H[K[31;1HTest C:[31;8H[K[32;1HSTARTTEST[32;10H[K[33;1H:lrewind[33;9H[K[34;1H:lopen[34;7H[K[35;1H:" Let's move the location list window to the top to check whether it (the first[35;81H[K[36;1H:" window found) will be reused when we try to open new windows:[36;65H[K[37;1H:wincmd K[37;10H[K[38;1H:2[38;3H[K[39;1H:exe "normal \<CR>"[39;20H[K[40;1H:wincmd p[40;10H[K[41;1H:3[41;3H[K[42;1H:exe "normal \<CR>"[42;20H[K[43;1H:wincmd p[43;10H[K[44;1H:4[44;3H[K[45;1H:exe "normal \<CR>"[45;20H[K[46;1H:1wincmd w[46;11H[K[47;1H:let locationListWindowBufType = &buftype[47;42H[K[48;1H:2wincmd w[48;11H[K[49;1H:let bufferName = expand("%")[49;30H[K[50;1H:wincmd n[50;10H[K[51;1H:wincmd K[51;10H[K[52;1H:b test.out[52;12H[K[53;1H:let bufferName = substitute(bufferName, '\\', '/', 'g')[53;57H[K[54;1H:call append(line('$'), "Test C:")[54;35H[K[55;1H:call append(line('$'), "  - 'buftype' of the location list window: " . locationListWindowBufType)[56;1H:call append(line('$'), "  - buffer displayed in the 2nd window: " . bufferName)[56;81H[K[57;1H:w[57;3H[K[58;1H:wincmd o[58;10H[K[59;1H:b 1[59;5H[K[30;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[32;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H27 lines, 677 characters written[33;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[33;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[1;59r[1;1H[2M[1;60r[58;1HENDTEST[60;1H[K[58;1H[?12l[?25h
[?25l
:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlrewind[?25lNo matching autocommands
(1 of 7): file foo.txt
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlopen[?25l[1;1H[2L[1;1Hfoo
[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [m[48;1H[7mtest://foo.txt [RO]                                                                               [m[49;1H[30m[43mtest://foo.txt|| file foo.txt                                                                     [m[50;1Htest://bar.txt|| file bar.txt
test://baz.txt|| file baz.txt[51;30H[K[52;1Htest://quux.txt|| file quux.txt[52;32H[K[53;1Htest://shmoo.txt|| file shmoo.txt[53;34H[K[54;1Htest://spam.txt|| file spam.txt[54;32H[K[55;1Htest://eggs.txt|| file eggs.txt
[1m[34m~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[1m[7m[Location List]                                                                                   [m[60;1H[K[49;1H[?12l[?25h[?25l[60;1H:[?12l[?25h" Let's move the location list window to the top to check whether it (the first[?25l[49;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" window found) will be reused when we try to open new windows:[?25l[49;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd K[?25l[1;1H[30m[43mtest://foo.txt|| file foo.txt                                                                     [m[2;1Htest://bar.txt|| file bar.txt[2;30H[K[3;1Htest://baz.txt|| file baz.txt[3;30H[K[4;1Htest://quux.txt|| file quux.txt[4;32H[K[5;1Htest://shmoo.txt|| file shmoo.txt[5;34H[K[6;1Htest://spam.txt|| file spam.txt[6;32H[K[7;1Htest://eggs.txt|| file eggs.txt[7;32H[K[11;1H[1m[7m[Location List]                                                                                   [m[12;1Hfoo[12;4H[K[48;1H[1m[34m~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [m[59;1H[7mtest://foo.txt [RO]                                                                               [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h2[?25l[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexe "normal \<CR>"[?25lNo matching autocommands[1;1Htest://foo.txt|| file foo.txt[1;30H[K[2;1H[30m[43mtest://bar.txt|| file bar.txt                                                                     [m[11;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [m[12;1Hbar[59;1H[1m[7mtest://bar.txt [RO]                                                                               [12;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[11;1H[1m[7m[Location List]                                                                                   [m[59;1H[7mtest://bar.txt [RO][m[1m[7m [m[7m                                                                               [2;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h3[?25l[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexe "normal \<CR>"[?25lNo matching autocommands[2;1Htest://bar.txt|| file bar.txt[2;30H[K[3;1H[30m[43mtest://baz.txt|| file baz.txt                                                                     [m[11;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [m[12;3Hz[59;1H[1m[7mtest://baz.txt [RO]                                                                               [12;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[11;1H[1m[7m[Location List]                                                                                   [m[59;1H[7mtest://baz.txt [RO][m[1m[7m [m[7m                                                                               [3;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h4[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hexe "normal \<CR>"[?25lNo matching autocommands[3;1Htest://baz.txt|| file baz.txt[3;30H[K[4;1H[30m[43mtest://quux.txt|| file quux.txt                                                                   [m[11;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [m[12;1Hquux[59;1H[1m[7mtest://quux.txt [RO]                                                                              [12;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25h1wincmd w[?25l[11;1H[1m[7m[Location List]                                                                                   [m[59;1H[7mtest://quux.txt [RO][m[1m[7m [m[7m                                                                              [4;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet locationListWindowBufType = &buftype[?25l[4;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h2wincmd w[?25l[11;1H[7m[Location List][m[1m[7m [m[7m                                                                                   [m[59;1H[1m[7mtest://quux.txt [RO]                                                                              [12;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet bufferName = expand("%")[?25l[12;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd n[?25l[12;1H[K[35;1H[1m[7m[No Name]                                                                                         [m[36;1Hquux[36;5H[K[59;1H[7mtest://quux.txt [RO][m[1m[7m [m[7m                                                                              [12;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd K[?25l[27m[23m[m[H[2J[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [m[24;1H[1m[7m[No Name]                                                                                         [m[25;1Htest://bar.txt|| file bar.txt
test://baz.txt|| file baz.txt
[30m[43mtest://quux.txt|| file quux.txt                                                                   [m[28;1Htest://shmoo.txt|| file shmoo.txt
test://spam.txt|| file spam.txt
test://eggs.txt|| file eggs.txt
[1m[34m~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [m[35;1H[7m[Location List]                                                                                   [m[36;1Hquux
[1m[34m~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [m[59;1H[7mtest://quux.txt [RO]                                                                              [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hb test.out[?25l"test.out" 6 lines, 154 characters[2;1HTest A:[2;8H[K[3;1H  - file name displayed: test://bar.txt[3;40H[K[4;1H  - quickfix claims that the file name displayed is: test://bar.txt[4;68H[K[5;1HTest B:[5;8H[K[6;1H  - number of window open: 2[6;29H[K[24;1H[1m[7mtest.out]  [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hlet bufferName = substitute(bufferName, '\\', '/', 'g')[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), "Test C:")[?25l[7;1HTest C:[7;8H[K[24;10H[1m[7m[+][1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hcall append(line('$'), "  - 'buftype' of the location list window: " . locationListWindowBufType
[59;98H)[60;1H[?25l[1;1H[L[8;1H  - 'buftype' of the location list window: quickfix[8;52H[K[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hcall append(line('$'), "  - buffer displayed in the 2nd window: " . bufferName)[?25l[9;1H  - buffer displayed in the 2nd window: test://quux.txt[9;56H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" 9 lines, 270 characters written[24;10H[1m[7m    [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hwincmd o[?25l[27m[23m[m[H[2J[2;1HTest A:
  - file name displayed: test://bar.txt
  - quickfix claims that the file name displayed is: test://bar.txt
Test B:
  - number of window open: 2
Test C:
  - 'buftype' of the location list window: quickfix
  - buffer displayed in the 2nd window: test://quux.txt
[1m[34m~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hb 1[?25l"test96.in" 142 lines, 3330 characters[2;6HB
STARTTEST[3;10H[K[4;1H:lrewind[4;9H[K[5;1H:lopen[5;7H[K[6;1H:2[6;3H[K[7;1H:exe "normal \<CR>"
:wincmd p[8;10H[K[9;1H:3[9;3H[K[10;1H:exe "normal \<CR>"[10;20H[K[11;1H:wincmd p[11;10H[K[12;1H:4[12;3H[K[13;1H:exe "normal \<CR>"[13;20H[K[14;1H:let numberOfWindowsOpen = winnr('$')[14;38H[K[15;1H:wincmd n[15;10H[K[16;1H:wincmd K[16;10H[K[17;1H:b test.out[17;12H[K[18;1H:call append(line('$'), "Test B:")[18;35H[K[19;1H:call append(line('$'), "  - number of window open: " . numberOfWindowsOpen)[19;77H[K[20;1H:w[20;3H[K[21;1H:wincmd o[21;10H[K[22;1H:b 1[22;5H[K[23;1HENDTEST[23;8H[K[24;1H[K[25;1HTest C:[25;8H[K[26;1HSTARTTEST[26;10H[K[27;1H:lrewind[27;9H[K[28;1H:lopen[28;7H[K[29;1H:" Let's move the location list window to the top to check whether it (the first[29;81H[K[30;1H:" window found) will be reused when we try to open new windows:[30;65H[K[31;1H:wincmd K[31;10H[K[32;1H:2[32;3H[K[33;1H:exe "normal \<CR>"[33;20H[K[34;1H:wincmd p[34;10H[K[35;1H:3[35;3H[K[36;1H:exe "normal \<CR>"[36;20H[K[37;1H:wincmd p[37;10H[K[38;1H:4[38;3H[K[39;1H:exe "normal \<CR>"[39;20H[K[40;1H:1wincmd w[40;11H[K[41;1H:let locationListWindowBufType = &buftype[41;42H[K[42;1H:2wincmd w[42;11H[K[43;1H:let bufferName = expand("%")[43;30H[K[44;1H:wincmd n[44;10H[K[45;1H:wincmd K[45;10H[K[46;1H:b test.out[46;12H[K[47;1H:let bufferName = substitute(bufferName, '\\', '/', 'g')[47;57H[K[48;1H:call append(line('$'), "Test C:")[48;35H[K[49;1H:call append(line('$'), "  - 'buftype' of the location list window: " . locationListWindowBufType)[50;1H:call append(line('$'), "  - buffer displayed in the 2nd window: " . bufferName)[50;81H[K[51;1H:w[51;3H[K[52;1H:wincmd o[52;10H[K[53;1H:b 1[53;5H[K[54;1HENDTEST[54;8H[K[55;1H[K[56;1HSTARTTEST[56;10H[K[57;1H:qa[57;4H[K[58;1HENDTEST[58;8H[K[59;1H[K[55;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[56;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H1 line, 4 characters written[57;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[57;1H[?12l[?25h[?25l


/ENDTEST[60;10H[K[60;1H[58;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[59;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa[?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test97.failed test.ok test.out X* viminfo
cp test97.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test97.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test97.in" 17 lines, 264 characters[1;1HTest whether glob()/globpath() return correct results with certain escaped
characters.

STARTTEST
:so small.vim
:set shell=doesnotexist
:e test.out
:put =glob('Xxx\{')
:put =glob('Xxx\$')
:w! Xxx{
:w! Xxx\$
:put =glob('Xxx\{')
:put =glob('Xxx\$')
:w
:qa!
ENDTEST

[1m[34m~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest whether glob()/globpath() return correct results with certain escaped[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 11 lines, 157 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[16;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[17;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[17;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset shell=doesnotexist[?25l[17;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25he test.out[?25l"test.out" [New File][1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput =glob('Xxx\{')[?25l[2;1H[K[2;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hput =glob('Xxx\$')[?25l[3;1H[K[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw! Xxx{[?25l
Cannot execute shell doesnotexist
[m
E79: Cannot expand wildcards
"Xxx{" [New File] 3 lines, 3 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hw! Xxx\$[?25l"Xxx$" [60;8H[K[60;8H[New File] 3 lines, 3 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hput =glob('Xxx\{')[?25l[27m[23m[m[H[2J[4;1HXxx{
[1m[34m~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [4;1H[?12l[?25h[?25l[60;1H[m:[?12l[?25hput =glob('Xxx\$')[?25l[5;1HXxx$[5;5H[K[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hw[?25l"test.out" [New File] 5 lines, 13 characters written[5;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo
rm -rf test98.failed test.ok test.out X* viminfo
cp test98.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.
../vim -u unix.vim -U NONE --noplugin -s dotest.in test98.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;60r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[60;1H"test98.in" 43 lines, 908 characters[1;1HTest for 'scrollbind' causing an unexpected scroll of one of the windows.
STARTTEST
:so small.vim
:" We don't want the status line to cause problems:
:set laststatus=0
:let g:totalLines = &lines * 20
:let middle = g:totalLines / 2
:wincmd n
:wincmd o
:for i in range(1, g:totalLines)
:    call setline(i, 'LINE ' . i)
:endfor
:exe string(middle)
:normal zt
:normal M
:aboveleft vert new
:for i in range(1, g:totalLines)
:    call setline(i, 'line ' . i)
:endfor
:exe string(middle)
:normal zt
:normal M
:" Execute the following two command at once to reproduce the problem.
:setl scb | wincmd p
:setl scb
:wincmd w
:let topLineLeft = line('w0')
:wincmd p
:let topLineRight = line('w0')
:setl noscrollbind
:wincmd p
:setl noscrollbind
:q!
:%del _
:call setline(1, 'Difference between the top lines (left - right): ' . string(topLineLeft - topLinn[36;1HeRight))
:w! test.out
:brewind
ENDTEST

STARTTEST
:qa!
ENDTEST

[1m[34m~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hmap dotest /^STARTTEST^[34m^M[mj:set ff=unix cpo-=A^[34m^M[m:.,/ENDTEST/-1w! Xdotest^[34m^M[m:set ff& cpo+=A^[34m^M[mnj0:so!
Xdotest^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for 'scrollbind' causing an unexpected scroll of one of the windows.[60;1H[K[1;1H[?12l[?25h[?25l[60;1H/^STARTTEST[2;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H[New File] 35 lines, 791 characters written[3;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[3;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[39;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hso small.vim[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" We don't want the status line to cause problems:[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hset laststatus=0[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet g:totalLines = &lines * 20[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet middle = g:totalLines / 2[?25l[40;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd n[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [m[30;1H[1m[7m[No Name]                                                                                         [m[31;2Hnormal zt
:normal M[32;10H[K[33;2H" Execute the following two command at once to reproduce the problem.
:setl scb | wincmd p
:setl scb[35;10H[K[36;1H:wincmd w
:let topLineLeft = line('w0')
:wincmd p
:let topLineRight = line('w0')
:setl noscrollbind
:wincmd p
:setl noscrollbind
:q![43;4H[K[44;1H:%del _
:call setline(1, 'Difference between the top lines (left - right): ' . string(topLineLeft - topLinn[46;1HeRight))[46;9H[K[47;1H:w! test.out[47;13H[K[48;1H:brewind[48;9H[K[49;1HENDTEST[49;8H[K[50;1H[K[51;1HSTARTTEST[51;10H[K[52;1H:qa![52;5H[K[53;1HENDTEST[53;8H[K[54;1H[K[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd o[?25l[30;1H[1m[34m~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [1;1H[?12l[?25h[?25l[m[60;1H[K[60;1H:[?12l[?25hfor i in range(1, g:totalLines)[?25l
:  [?12l[?25h:    call setline(i, 'LINE ' . i)
[?25l:  [?12l[?25h:endfor[1;1H[2L[?25l[1;1HLINE 1
LINE 2
LINE 3[3;7H[K[4;1HLINE 4[4;7H[K[5;1HLINE 5[5;7H[K[6;1HLINE 6[6;7H[K[7;1HLINE 7[7;7H[K[8;1HLINE 8[8;7H[K[9;1HLINE 9[9;7H[K[10;1HLINE 10[10;8H[K[11;1HLINE 11[11;8H[K[12;1HLINE 12[12;8H[K[13;1HLINE 13[13;8H[K[14;1HLINE 14[14;8H[K[15;1HLINE 15[15;8H[K[16;1HLINE 16[16;8H[K[17;1HLINE 17[17;8H[K[18;1HLINE 18[18;8H[K[19;1HLINE 19[19;8H[K[20;1HLINE 20[20;8H[K[21;1HLINE 21[21;8H[K[22;1HLINE 22[22;8H[K[23;1HLINE 23[23;8H[K[24;1HLINE 24[24;8H[K[25;1HLINE 25[25;8H[K[26;1HLINE 26[26;8H[K[27;1HLINE 27[27;8H[K[28;1HLINE 28[28;8H[K[29;1HLINE 29[29;8H[K[30;1HLINE 30[30;8H[K[31;1HLINE 31[31;8H[K[32;1HLINE 32[32;8H[K[33;1HLINE 33[33;8H[K[34;1HLINE 34[34;8H[K[35;1HLINE 35[35;8H[K[36;1HLINE 36[36;8H[K[37;1HLINE 37[37;8H[K[38;1HLINE 38[38;8H[K[39;1HLINE 39[39;8H[K[40;1HLINE 40[40;8H[K[41;1HLINE 41[41;8H[K[42;1HLINE 42[42;8H[K[43;1HLINE 43[43;8H[K[44;1HLINE 44[44;8H[K[45;1HLINE 45[45;8H[K[46;1HLINE 46[46;8H[K[47;1HLINE 47[47;8H[K[48;1HLINE 48[48;8H[K[49;1HLINE 49[49;8H[K[50;1HLINE 50[50;8H[K[51;1HLINE 51[51;8H[K[52;1HLINE 52[52;8H[K[53;1HLINE 53[53;8H[K[54;1HLINE 54[54;8H[K[55;1HLINE 55[55;8H[K[56;1HLINE 56[56;8H[K[57;1HLINE 57[57;8H[K[58;1HLINE 58[58;8H[K[59;1HLINE 59[59;8H[K[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hexe string(middle)[?25l[27m[23m[m[H[2J[1;1HLINE 571
LINE 572
LINE 573
LINE 574
LINE 575
LINE 576
LINE 577
LINE 578
LINE 579
LINE 580
LINE 581
LINE 582
LINE 583
LINE 584
LINE 585
LINE 586
LINE 587
LINE 588
LINE 589
LINE 590
LINE 591
LINE 592
LINE 593
LINE 594
LINE 595
LINE 596
LINE 597
LINE 598
LINE 599
LINE 600
LINE 601
LINE 602
LINE 603
LINE 604
LINE 605
LINE 606
LINE 607
LINE 608
LINE 609
LINE 610
LINE 611
LINE 612
LINE 613
LINE 614
LINE 615
LINE 616
LINE 617
LINE 618
LINE 619
LINE 620
LINE 621
LINE 622
LINE 623
LINE 624
LINE 625
LINE 626
LINE 627
LINE 628
LINE 629[30;1H[?12l[?25h[?25l[60;1H:[?12l[?25hnormal zt[?25l[1;59r[1;1H[29M[1;60r[31;1HLINE 630
LINE 631
LINE 632
LINE 633
LINE 634
LINE 635
LINE 636
LINE 637
LINE 638
LINE 639
LINE 640
LINE 641
LINE 642
LINE 643
LINE 644
LINE 645
LINE 646
LINE 647
LINE 648
LINE 649
LINE 650
LINE 651
LINE 652
LINE 653
LINE 654
LINE 655
LINE 656
LINE 657
LINE 658[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hnormal M[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25haboveleft vert new[?25l[1;1H        [41C[7m|[2;50H|[3;50H|[4;50H|[5;50H|[6;50H|[7;50H|[8;50H|[9;50H|[10;50H|[11;50H|[12;50H|[13;50H|[14;50H|[15;50H|[16;50H|[17;50H|[18;50H|[19;50H|[20;50H|[21;50H|[22;50H|[23;50H|[24;50H|[25;50H|[26;50H|[27;50H|[28;50H|[29;50H|[30;50H|[31;50H|[32;50H|[33;50H|[34;50H|[35;50H|[36;50H|[37;50H|[38;50H|[39;50H|[40;50H|[41;50H|[42;50H|[43;50H|[44;50H|[45;50H|[46;50H|[47;50H|[48;50H|[49;50H|[50;50H|[51;50H|[52;50H|[53;50H|[54;50H|[55;50H|[56;50H|[57;50H|[58;50H|[59;50H|[m[2;1H[1m[34m~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                
~                                                [m[1;51HLINE 600[2;51HLINE 601[3;51HLINE 602[4;51HLINE 603[5;51HLINE 604[6;51HLINE 605[7;51HLINE 606[8;51HLINE 607[9;51HLINE 608[10;51HLINE 609[11;51HLINE 610[12;51HLINE 611[13;51HLINE 612[14;51HLINE 613[15;51HLINE 614[16;51HLINE 615[17;51HLINE 616[18;51HLINE 617[19;51HLINE 618[20;51HLINE 619[21;51HLINE 620[22;51HLINE 621[23;51HLINE 622[24;51HLINE 623[25;51HLINE 624[26;51HLINE 625[27;51HLINE 626[28;51HLINE 627[29;51HLINE 628[30;51HLINE 629[31;51HLINE 630[32;51HLINE 631[33;51HLINE 632[34;51HLINE 633[35;51HLINE 634[36;51HLINE 635[37;51HLINE 636[38;51HLINE 637[39;51HLINE 638[40;51HLINE 639[41;51HLINE 640[42;51HLINE 641[43;51HLINE 642[44;51HLINE 643[45;51HLINE 644[46;51HLINE 645[47;51HLINE 646[48;51HLINE 647[49;51HLINE 648[50;51HLINE 649[51;51HLINE 650[52;51HLINE 651[53;51HLINE 652[54;51HLINE 653[55;51HLINE 654[56;51HLINE 655[57;51HLINE 656[58;51HLINE 657[59;51HLINE 658[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hfor i in range(1, g:totalLines)[?25l
:  [?12l[?25h:    call setline(i, 'line ' . i)
[?25l:  [?12l[?25h:endfor[1;1H[2L[?25l[1;1Hline 1[43C[7m|[m
line 2[43C[7m|[m
line 3                                           
line 4                                           
line 5                                           
line 6                                           
line 7                                           
line 8                                           
line 9                                           
line 10                                          
line 11                                          
line 12                                          
line 13                                          
line 14                                          
line 15                                          
line 16                                          
line 17                                          
line 18                                          
line 19                                          
line 20                                          
line 21                                          
line 22                                          
line 23                                          
line 24                                          
line 25                                          
line 26                                          
line 27                                          
line 28                                          
line 29                                          
line 30                                          
line 31                                          
line 32                                          
line 33                                          
line 34                                          
line 35                                          
line 36                                          
line 37                                          
line 38                                          
line 39                                          
line 40                                          
line 41                                          
line 42                                          
line 43                                          
line 44                                          
line 45                                          
line 46                                          
line 47                                          
line 48                                          
line 49                                          
line 50                                          
line 51                                          
line 52                                          
line 53                                          
line 54                                          
line 55                                          
line 56                                          
line 57                                          
line 58                                          
line 59                                          [1;51HLINE 600[2;51HLINE 601[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hexe string(middle)[?25l[1;6H571[2;6H572[3;6H573[4;6H574[5;7H75[6;6H576[7;6H577[8;6H578[9;6H579[10;6H580[11;6H581[12;6H582[13;6H583[14;6H584[15;6H585[16;6H586[17;6H587[18;6H588[19;6H589[20;6H590[21;6H591[22;6H592[23;6H593[24;6H594[25;6H595[26;6H596[27;6H597[28;6H598[29;6H599[30;6H600[31;6H601[32;6H602[33;6H603[34;6H604[35;6H605[36;6H606[37;6H607[38;6H608[39;6H609[40;6H610[41;6H611[42;6H612[43;6H613[44;6H614[45;6H615[46;6H616[47;6H617[48;6H618[49;6H619[50;6H620[51;6H621[52;6H622[53;6H623[54;6H624[55;6H625[56;6H626[57;6H627[58;6H628[59;6H629[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hnormal zt[?25l[1;1Hline 600                                         
line 601                                         
line 602                                         
line 603                                         
line 604                                         
line 605                                         
line 606                                         
line 607                                         
line 608                                         
line 609                                         
line 610                                         
line 611                                         
line 612                                         
line 613                                         
line 614                                         
line 615                                         
line 616                                         
line 617                                         
line 618                                         
line 619                                         
line 620                                         
line 621                                         
line 622                                         
line 623                                         
line 624                                         
line 625                                         
line 626                                         
line 627                                         
line 628                                         
line 629                                         
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 
                                                 [31;1Hline 630
line 631
line 632
line 633
line 634
line 635
line 636
line 637
line 638
line 639
line 640
line 641
line 642
line 643
line 644
line 645
line 646
line 647
line 648
line 649
line 650
line 651
line 652
line 653
line 654
line 655
line 656
line 657
line 658[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hnormal M[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h" Execute the following two command at once to reproduce the problem.[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetl scb | wincmd p[?25l[30;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetl scb[?25l[30;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd w[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet topLineLeft = line('w0')[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[30;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hlet topLineRight = line('w0')[?25l[30;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetl noscrollbind[?25l[30;51H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hwincmd p[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hsetl noscrollbind[?25l[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hq![?25l[1;1HLINE[1;50H[K[2;1HLINE[2;50H[K[3;1HLINE[3;50H[K[4;1HLINE[4;50H[K[5;1HLINE[5;50H[K[6;1HLINE[6;50H[K[7;1HLINE[7;50H[K[8;1HLINE[8;50H[K[9;1HLINE[9;50H[K[10;1HLINE[10;50H[K[11;1HLINE[11;50H[K[12;1HLINE[12;50H[K[13;1HLINE[13;50H[K[14;1HLINE[14;50H[K[15;1HLINE[15;50H[K[16;1HLINE[16;50H[K[17;1HLINE[17;50H[K[18;1HLINE[18;50H[K[19;1HLINE[19;50H[K[20;1HLINE[20;50H[K[21;1HLINE[21;50H[K[22;1HLINE[22;50H[K[23;1HLINE[23;50H[K[24;1HLINE[24;50H[K[25;1HLINE[25;50H[K[26;1HLINE[26;50H[K[27;1HLINE[27;50H[K[28;1HLINE[28;50H[K[29;1HLINE[29;50H[K[30;1HLINE[30;50H[K[31;1HLINE[31;50H[K[32;1HLINE[32;50H[K[33;1HLINE[33;50H[K[34;1HLINE[34;50H[K[35;1HLINE[35;50H[K[36;1HLINE[36;50H[K[37;1HLINE[37;50H[K[38;1HLINE[38;50H[K[39;1HLINE[39;50H[K[40;1HLINE[40;50H[K[41;1HLINE[41;50H[K[42;1HLINE[42;50H[K[43;1HLINE[43;50H[K[44;1HLINE[44;50H[K[45;1HLINE[45;50H[K[46;1HLINE[46;50H[K[47;1HLINE[47;50H[K[48;1HLINE[48;50H[K[49;1HLINE[49;50H[K[50;1HLINE[50;50H[K[51;1HLINE[51;50H[K[52;1HLINE[52;50H[K[53;1HLINE[53;50H[K[54;1HLINE[54;50H[K[55;1HLINE[55;50H[K[56;1HLINE[56;50H[K[57;1HLINE[57;50H[K[58;1HLINE[58;50H[K[59;1HLINE[59;50H[K[30;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25h%del _[?25l[1;1H[K[2;1H[1m[34m~                                                                                                 [3;1H~                                                                                                 [4;1H~                                                                                                 [5;1H~                                                                                                 [6;1H~                                                                                                 [7;1H~                                                                                                 [8;1H~                                                                                                 [9;1H~                                                                                                 [10;1H~                                                                                                 [11;1H~                                                                                                 [12;1H~                                                                                                 [13;1H~                                                                                                 [14;1H~                                                                                                 [15;1H~                                                                                                 [16;1H~                                                                                                 [17;1H~                                                                                                 [18;1H~                                                                                                 [19;1H~                                                                                                 [20;1H~                                                                                                 [21;1H~                                                                                                 [22;1H~                                                                                                 [23;1H~                                                                                                 [24;1H~                                                                                                 [25;1H~                                                                                                 [26;1H~                                                                                                 [27;1H~                                                                                                 [28;1H~                                                                                                 [29;1H~                                                                                                 [30;1H~                                                                                                 [31;1H~                                                                                                 [32;1H~                                                                                                 [33;1H~                                                                                                 [34;1H~                                                                                                 [35;1H~                                                                                                 [36;1H~                                                                                                 [37;1H~                                                                                                 [38;1H~                                                                                                 [39;1H~                                                                                                 [40;1H~                                                                                                 [41;1H~                                                                                                 [42;1H~                                                                                                 [43;1H~                                                                                                 [44;1H~                                                                                                 [45;1H~                                                                                                 [46;1H~                                                                                                 [47;1H~                                                                                                 [48;1H~                                                                                                 [49;1H~                                                                                                 [50;1H~                                                                                                 [51;1H~                                                                                                 [52;1H~                                                                                                 [53;1H~                                                                                                 [54;1H~                                                                                                 [55;1H~                                                                                                 [56;1H~                                                                                                 [57;1H~                                                                                                 [58;1H~                                                                                                 [59;1H~                                                                                                 [m[60;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hcall setline(1, 'Difference between the top lines (left - right): ' . string(topLineLeft - topLi
[59;98Hn[60;1HeRight))[?25l[1;1H[L[1;1HDifference between the top lines (left - right): 0[60;1H[K[1;1H[?12l[?25h[?25l[60;1H:[?12l[?25hw! test.out[?25l"test.out" [60;12H[K[60;12H[New File] 1 line, 51 characters written[1;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hbrewind[?25l"test98.in" 43 lines, 908 characters[1;1HTest for 'scrollbind' causing an unexpected scroll of one of the windows.
STARTTEST[2;10H[K[3;1H:so small.vim[3;14H[K[4;1H:" We don't want the status line to cause problems:[4;52H[K[5;1H:set laststatus=0[5;18H[K[6;1H:let g:totalLines = &lines * 20[6;32H[K[7;1H:let middle = g:totalLines / 2[7;31H[K[8;1H:wincmd n[8;10H[K[9;1H:wincmd o[9;10H[K[10;1H:for i in range(1, g:totalLines)[10;33H[K[11;1H:    call setline(i, 'LINE ' . i)[11;34H[K[12;1H:endfor[12;8H[K[13;1H:exe string(middle)[13;20H[K[14;1H:normal zt[14;11H[K[15;1H:normal M[15;10H[K[16;1H:aboveleft vert new[16;20H[K[17;1H:for i in range(1, g:totalLines)[17;33H[K[18;1H:    call setline(i, 'line ' . i)[18;34H[K[19;1H:endfor[19;8H[K[20;1H:exe string(middle)[20;20H[K[21;1H:normal zt[21;11H[K[22;1H:normal M[22;10H[K[23;1H:" Execute the following two command at once to reproduce the problem.[23;71H[K[24;1H:setl scb | wincmd p[24;21H[K[25;1H:setl scb[25;10H[K[26;1H:wincmd w[26;10H[K[27;1H:let topLineLeft = line('w0')[27;30H[K[28;1H:wincmd p[28;10H[K[29;1H:let topLineRight = line('w0')[29;31H[K[30;1H:setl noscrollbind[30;19H[K[31;1H:wincmd p[31;10H[K[32;1H:setl noscrollbind[32;19H[K[33;1H:q![33;4H[K[34;1H:%del _[34;8H[K[35;1H:call setline(1, 'Difference between the top lines (left - right): ' . string(topLineLeft - topLinn[36;1HeRight))[36;9H[K[37;1H:w! test.out[37;13H[K[38;1H:brewind[38;9H[K[39;1HENDTEST[39;8H[K[40;1H[K[41;1HSTARTTEST[41;10H[K[42;1H:qa![42;5H[K[43;1HENDTEST[43;8H[K[44;1H[K[40;1H[?12l[?25h[?25l[60;1H[K[60;1H/^STARTTEST[41;1H[?12l[?25h
[?25l[60;1H[K[60;1H:set ff=unix cpo-=A[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [60;11H[K[60;11H1 line, 5 characters written[42;1H[?12l[?25h[?25l[60;1H[K[60;1H:set ff& cpo+=A[42;1H[?12l[?25h[?25l[60;1H/ENDTEST[60;10H[K[60;1H[43;1H[?12l[?25h
[?25l[60;1H[K[60;1H:so! Xdotest[44;1H[?12l[?25h[?25l[60;1H[K[60;1H:[?12l[?25hqa![?25l[60;1H[K[60;1H[?1l>[?12l[?25h[?1049l# For flaky tests retry one time.
# Check if the test.out file matches test.ok.
rm -rf X* test.ok viminfo

Test results:
ALL DONE
make[3]: Leaving directory '/sources/vim74/src/testdir'
make -f Makefile unittest
make[3]: Entering directory '/sources/vim74/src'
gcc -c -I. -Iproto -DHAVE_CONFIG_H   -I/usr/local/include  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       -o objects/memfile_test.o memfile_test.c
gcc -c -I. -Iproto -DHAVE_CONFIG_H   -I/usr/local/include  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       version.c -o objects/version.o
link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
  gcc   -L/usr/local/lib -Wl,--as-needed 	-o memfile_test objects/buffer.o objects/blowfish.o objects/charset.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o objects/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o  objects/if_cscope.o objects/if_xcmdsrv.o objects/mark.o objects/memline.o objects/menu.o objects/message.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/sha256.o objects/spell.o objects/syntax.o  objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/version.o objects/window.o           objects/netbeans.o  objects/memfile_test.o        -lm -lncurses -lnsl  -lacl -lattr -ldl          
link.sh: Linked fine
memfile_test passed
make[3]: Leaving directory '/sources/vim74/src'
make[2]: Leaving directory '/sources/vim74/src'
make[1]: Leaving directory '/sources/vim74'
