Mon Feb 20 03:34:54 CST 2012
make[1]: Entering directory `/sources/vim73'
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/vim73/src'
make -f Makefile vim
make[3]: Entering directory `/sources/vim73/src'
make[3]: `vim' is up to date.
make[3]: Leaving directory `/sources/vim73/src'
if test -n "yes" -a -f po/Makefile; then \
	cd po; make -f Makefile check VIM=../vim; \
fi
make[3]: Entering directory `/sources/vim73/src/po'
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq af.po
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[?25l[77;1H"af.po" "af.po" 5409 lines, 133809 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ca.po" "ca.po" 6221 lines, 162354 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"cs.po" "cs.po" 4664 lines, 111014 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"de.po" "de.po" 6135 lines, 157035 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"en_GB.po" "en_GB.po" 298 lines, 9123 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"eo.po" "eo.po" 6566 lines, 165381 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"es.po" "es.po" 8301 lines, 204406 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"fi.po" "fi.po" 6545 lines, 162369 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"fr.po" "fr.po" 6819 lines, 183272 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ga.po" "ga.po" 6521 lines, 164835 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"it.po" "it.po" 6534 lines, 164888 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ja.po" "ja.po" 6212 lines, 153993 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ko.po" "ko.po" 6296 lines, 150966 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ko.UTF-8.po" "ko.UTF-8.po" 6296 lines, 166320 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"nb.po" "nb.po" 6184 lines, 150986 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;1H
[?1l>[?12l[?25h[?1049ltouch nb.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq no.po
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[?25l[77;1H"no.po" "no.po" 6184 lines, 150986 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"pl.po" "pl.po" 6542 lines, 163162 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"pt_BR.po" "pt_BR.po" 6254 lines, 161262 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ru.po" "ru.po" 5237 lines, 166192 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"sk.po" "sk.po" 5837 lines, 147794 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"sv.po" "sv.po" 6166 lines, 149578 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"uk.po" "uk.po" 6762 lines, 204081 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"vi.po" "vi.po" 5214 lines, 144441 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"zh_CN.UTF-8.po" "zh_CN.UTF-8.po" 6158 lines, 147888 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"zh_CN.po" "zh_CN.po" 6158 lines, 136865 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"zh_TW.UTF-8.po" "zh_TW.UTF-8.po" 5300 lines, 127707 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"zh_TW.po" "zh_TW.po" 5293 lines, 117738 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"cs.cp1250.po" "cs.cp1250.po" 4664 lines, 111022 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ja.sjis.po" "ja.sjis.po" 6212 lines, 154089 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;1H
[?1l>[?12l[?25h[?1049ltouch ja.sjis.ck
../vim -u NONE -e -X -S check.vim -c "if error == 0 | q | endif" -c cq pl.cp1250.po
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[?25l[77;1H"pl.cp1250.po" "pl.cp1250.po" 6542 lines, 163158 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"pl.UTF-8.po" "pl.UTF-8.po" 6542 lines, 165660 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"ru.cp1251.po" "ru.cp1251.po" 5237 lines, 131483 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"sk.cp1250.po" "sk.cp1250.po" 5837 lines, 147790 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"uk.cp1251.po" "uk.cp1251.po" 6762 lines, 165690 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;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;77r[?12;25h[?12l[?25h[?25l[77;1H"zh_CN.cp936.po" "zh_CN.cp936.po" 6158 lines, 136877 characters
search hit BOTTOM, continuing at TOPOK[77;3H[K[77;1H
[?1l>[?12l[?25h[?1049ltouch zh_CN.cp936.ck
make[3]: Leaving directory `/sources/vim73/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/vim73/src/testdir'
rm -f test.log
rm -f test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo
../vim -u unix.vim -U NONE --noplugin -s dotest.in test1.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test1.in" 45 lines, 1676 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.

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
:" 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 +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~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[19;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 24 lines, 801 characters written[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[20;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[44;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[45;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Write a single line to test.out to check if testing works at all.[?25l[45;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [m[77;1H--No lines in buffer--[1;1H[?12l[?25h[?25lthis is a test[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 15 characters written[1;14H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hw! small.vim[?25l"small.vim" [77;13H[K[77;13H[New File] 1 line, 1 character written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! tiny.vim[?25l"tiny.vim" [77;12H[K[77;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[77;1H[K[77;1H:[?12l[?25hw! mbyte.vim[?25l"mbyte.vim" [77;13H[K[77;13H[New File] 4 lines, 28 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! mzscheme.vim[?25l"mzscheme.vim" [77;16H[K[77;16H[New File] 4 lines, 28 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" If +multi_byte feature supported, make mbyte.vim empty.[?25l[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hif has("multi_byte") | sp another | w! mbyte.vim | q | endif[?25l"another" [New File][77;21H[K[77;1H
"mbyte.vim" 0 lines, 0 characters written[1;1H[L[1;1He! test.ok[77;1H[K[4;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" If +mzscheme feature supported, make mzscheme.vim empty.[?25l[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hif has("mzscheme") | sp another | w! mzscheme.vim | q | endif[?25l[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.[?25l[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Otherwise write small.vim to skip the test.[?25l[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hif 1 | q! | endif[?25l[77;1H[K[77;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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test2.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 19 lines, 336 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[25;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[26;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[26;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^first[?25l[31msearch hit BOTTOM, continuing at TOP[26;1H[?12l[?25h[?25l[m[77;1H[K[77;1H/[?12l[?25htmp[?25l[26;35H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(0, expand("<cfile>"))[?25l[1;76r[1;1H[L[1;77r[1;1HURL://machine.name/tmp/vimtest2a[77;1H[K[27;35H[?12l[?25h[?25l[77;1H/[?12l[?25h^second[?25l[28;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hURL[?25l[28;17H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(1, expand("<cfile>"))[?25l[2;76r[2;1H[L[1;77r[2;1HURL://machine.name/tmp/vimtest2b[77;1H[K[29;17H[?12l[?25h[?25l[77;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[77;1H[K[29;17H[?12l[?25h[?25l[77;1H/[?12l[?25h^third[?25l[30;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hname[?25l[30;30H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(2, expand("<cfile>"))[?25l[3;76r[3;1H[L[1;77r[3;1HURL:\\machine.name\vimtest2c[77;1H[K[31;30H[?12l[?25h[?25l[77;1H/[?12l[?25h^fourth[?25l[32;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hURL[?25l[32;17H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(3, expand("<cfile>"))[?25l[4;76r[4;1H[L[1;77r[4;1HURL:\\machine.name\tmp\vimtest2d[77;1H[K[33;17H[?12l[?25h[5;1H[?25l[77;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[77;1H[K[77;1H:[?12l[?25hwq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 4 lines, 128 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test3.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test3.in" 1320 lines, 13743 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)[60;9H{[61;17Hcmd;[62;9H}[64;9Hif (test)[65;17Hcmd;
}

{[69;9Hif (test) {[70;17Hcmd;[71;9H}[73;9Hif (test) cmd;
}

{[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1H/* vim: set cin ts=4 sw=4 : */[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 5 lines, 125 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[11;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible viminfo+=nviminfo modeline[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hedit                " read modeline[?25l"test3.in"[77;22H[K[77;12H1320L, 13743C[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[60;5H{[60;9H[K[61;9Hcmd;[61;17H[K[62;5H}[62;9H[K[64;5Hif (test)[64;14H[K[65;9Hcmd;[65;17H[K[69;5Hif (test) {[69;16H[K[70;9Hcmd;[70;17H[K[71;5H}[71;9H[K[73;5Hif (test) cmd;[73;19H[K[12;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hstart of AUTO[?25l[13;4H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hend of AUTO[?25l789 lines to indent...750065055045035025015050 lines to indent... 790 lines indented [77;20H[K[13;1H[?12l[?25h[?25l[77;1H[K[77;1H/^STARTTEST[27m[m[H[2J[1;1H{
}
int main ()
{
    if (lala)[6;9Hdo[7;13H++(*lolo);[8;9Hwhile (lili[9;17H&& lele);
    lulu;
}

int main ()
{
    switch (c)
    {[17;9Hcase 'c': if (cond)[18;19H{[19;19H}
    }
}

main()
{
    (void) MyFancyFuasdfadsfnction([26;13Hargument);
}

main()
{
    char    foo[] = "/*";
    /* as[33;8Hdf */
    hello
}
/* 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

{
    /*[64;6H* Testing for comments, without 'cin' set[65;6H*/

/*
* what happens here?
*/[71;5H/*[72;8Hthe end of the comment, try inserting a line below */[74;9H/* how about[75;25Hthis one */
}[38;1H[?12l[?25h
[?25l[77;1H:set ff=unix cpo-=A[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 93C written[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[39;1H[?12l[?25h[?25l[77;1H/ENDTEST/+-1[77;13H[K[77;1H[41;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[42;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset tw=0 wm=60 columns=80 noai fo=croq[?25l[8;77;80t[27m[m[H[2J[?12l[?25h[27m[m[H[2J[?25l[1;1H{
}
int main ()
{
    if (lala)[6;9Hdo[7;13H++(*lolo);[8;9Hwhile (lili[9;17H&& lele);
    lulu;
}

int main ()
{
    switch (c)
    {[17;9Hcase 'c': if (cond)[18;19H{[19;19H}
    }
}

main()
{
    (void) MyFancyFuasdfadsfnction([26;13Hargument);
}

main()
{
    char    foo[] = "/*";
    /* as[33;8Hdf */
    hello
}
/* 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

{
    /*[64;6H* Testing for comments, without 'cin' set[65;6H*/

/*
* what happens here?
*/[71;5H/*[72;8Hthe end of the comment, try inserting a line below */[74;9H/* how about[75;25Hthis one */
}[42;1H[?12l[?25h[?25l[77;1H/[?12l[?25hserious/e[?25l[47;17H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;1H[K[48;76r[48;1H[3L[1;77r[47;19H[K[48;2H* about life, the
 * universe, and the
 * rest important big[50;7H[?12l[?25h[51;7H[?25l[77;1H/^STARTTEST[56;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H6L, 78C written[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[57;1H[?12l[?25h[?25l[77;1H/ENDTEST/+-1[77;13H[K[77;1H[62;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[63;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocin[?25l[63;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hcomments[?25l[67;20H[?12l[?25h[68;7H[?25l[77;1H[1m-- INSERT --[m[77;1H[K[69;76r[69;1H[L[1;77r[69;1Habout life[?12l[?25h[?25l[77;1H/[?12l[?25hhappens[?25l[72;8H[?12l[?25h
*[?25l[77;1H[1m-- INSERT --[m[77;1H[K[74;1Hthere[75;5H[K[76;5H/*[76;8H[K[74;5H[?12l[?25h[?25l


/[?12l[?25hbelow[?25l[1;76r[76;1H
[1;77r[76;8Hthe end of the comment, try inserting a line below */[77;1H[K[76;53H[?12l[?25h[?25l
[1m-- INSERT --[m[77;1H[K[1;76r[76;1H
[1;77r[76;1Hline[?12l[?25h[?25l
/[?12l[?25hthis[?25l[1;76r[1;1H[3M[1;77r[75;9H/* how about[76;25Hthis one */[77;1H[K[76;25H[?12l[?25h[?25l
[1m-- INSERT --[m[77;1H[K[76;1Hhello[76;25H[K[76;5H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;25Hthis one */[76;8H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[3M[1;77r[74;1H}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 18C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[2M[1;77r[75;1H/vec2
==[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cin[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hvec2[?25l[1;76r[1;1H[5M[1;77r[73;1H{
    var = this + that + vec[0] * vec[0][75;23H+ vec[1] * vec[1][76;23H+ vec2[2] * vec[2];[77;1H[K[76;25H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H5L, 51C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[4M[1;77r[73;1H:set cino=}4
/testing1
k2==/testing2
k2==[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cin[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=}4[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25htesting1[?25l[1;76r[1;1H[8M[1;77r[70;1H{[71;9Hasdf asdflkajds f;
    if (tes & ting) {[73;9Hasdf asdf asdf ;[74;9Hasdfa sdf asdf;[75;9H}
    testing1;[77;1H[K[76;5H[?12l[?25h[75;8H [?25l

/[?12l[?25htesting2[?25l[1;76r[1;1H[6M[1;77r[71;5Hif (tes & ting)
    {[73;9Hasdf asdf asdf ;[74;9Hasdfa sdf asdf;[75;9H}
    testing2;[77;1H[K[76;5H[?12l[?25h[75;8H [76;9H[?25l
/^STARTTEST[1;76r[1;1H[3M[1;77r[74;1H}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H4L, 36C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[3M[1;77r[74;1H:set cino=(0,)20
/main
=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cin[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(0,)20[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hmain[?25l[1;76r[1;1H[2M[1;77r[76;1Hmain ( int first_par, /*[77;1H[K[76;1H[?12l[?25h[?25l
19 lines to indent...20[7Cindented [77;19H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;24H* Comment for[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[21M[1;77r[56;24H* first par[57;24H*/[58;8Hint second_par /*[59;24H* Comment for[60;24H* second par[61;24H*/[62;6H)
{
    func( first_par, /*[65;23H* Comment for[66;23H* first par[67;23H*/[68;11Hsecond_par /*[69;23H* Comment for[70;23H* second par[71;23H*/[72;9H);

}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cin[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 26C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[2M[1;77r[75;1H:set cino=
]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cin[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=[?25l[76;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[76;1H{[77;1H[K[76;1H[?12l[?25h[?25l
11 lines to indent...12[7Cindented [77;19H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hdo[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[13M[1;77r[64;5H{[65;9Hif ()[66;9H{[67;13Hif ()[68;17Hasdf;[69;13Helse[70;17Hasdf;[71;9H}
    } while ();
    cmd;[8C/* this should go under the } */
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H]]=][[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H1L, 6C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[77;1H[K[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[1;76r[1;1H[3M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
8 lines to indent...9[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hif ( k() ) {[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[10M[1;77r[67;9Hl();[69;5H} else { /* Start (two words) end */[70;9Hm();
    }[73;5Hn();
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino={s,e-s[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino={s,e-s[?25l[76;1H[?12l[?25h[?25l[1;76r[1;1H[3M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
7 lines to indent...8[7Cindented [77;18H[K[76;1H    {[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hif ( k() )[77;1H[K[76;5H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[9M[1;77r[68;9H{[69;9Hl();[70;9H} else { /* Start (two words) end */[71;9Hm();[72;9H}
    n();    /* should be under the if () */
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino={s,fs[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 25C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H]]=/ foo[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino={s,fs[?25l[76;1H[?12l[?25h[?25l[1;76r[1;1H[3M[1;77r[75;1Hvoid bar(void)
{[77;1H[K[76;1H[?12l[?25h[?25l
/[?12l[?25h foo[?25l30 lines to indent...31[7Cindented [77;19H[K[76;1H    {[?12l[?25h[?25l[77;1H[K[77;1H/^STARTTEST[1;76r[1;1H[32M[1;77r[45;5Hstatic array[2][2] =[46;9H{[47;13H{ 1, 2 },[48;13H{ 3, 4 },[49;9H}[51;5Hwhile (a)[52;9H{[53;9Hfoo(&a);[54;9H}[56;9H{[57;9Hint a;[58;13H{[59;13Ha = a + 1;[60;13H}[61;9H}
    b = a;
    }

void func(void)
    {
    a = 1;[68;9H{[69;9Hb = 2;[70;9H}
    c = 3;
    d = 4;
    }
/* foo */

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 25C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[2M[1;77r[75;1H/while
ohere[34m^[[m[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hwhile[?25l[1;76r[1;1H[7M[1;77r[71;1Ha()
{
  do {
    a = a +[75;7Ha;
  } while ( a );[8C/* add text under this line */[77;1H[K[76;5H[?12l[?25h[?25l
[1m-- INSERT --[m[77;1H[K[1;76r[76;1H
[1;77r[76;3Hhere[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hif ( a )    i[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[4M[1;77r[73;7Ha;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino= com=[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 109C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[3M[1;77r[74;1H/comment
olabel2: b();[34m^M[mlabel3 /* post */:[34m^M[m/* pre */ label4:[34m^M[mf(/*com*/);[34m^M[mif (/*com*/)[34m^^[76;1HM[mcmd();[34m^[[m[77;1H[K[75;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino= com=[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hcomment[?25l[1;76r[1;1H[6M[1;77r[72;1Ha()
{
label1:[75;13H/* hmm */[76;13H// comment[77;1H[K[76;16H[?12l[?25h[?25l
[1m-- INSERT --[m[77;1H[K[1;76r[1;1H[6M[1;77r[71;1Hlabel2: b();
label3 /* post */:
/* pre */ label4:[74;9Hf(/*com*/);[75;9Hif (/*com*/)[76;13Hcmd();[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set comments& comments^=s:/*,m:**,ex:*/[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 53C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[2M[1;77r[75;1H/simple
=5j[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset comments& comments^=s:/*,m:**,ex:*/[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hsimple[?25l[1;76r[1;1H[3M[1;77r[75;1H/*
  * A simple comment[77;1H[K[76;7H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [77;18H[K[76;2H* A simple comment[76;20H[K[76;2H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;2H*/[77;1H[K[76;2H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[6M[1;77r[72;1H/*
** A different comment
*/

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=c0[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 70C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[2M[1;77r[75;1H:set comments& comments-=s1:/* comments^=s0:/*
2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=c0[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset comments& comments-=s1:/* comments^=s0:/*[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[77;1H[K[76;1H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[6M[1;77r[71;5H/*********[72;7HA comment.
    *********/
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=c0,C1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 73C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[2M[1;77r[75;1H:set comments& comments-=s1:/* comments^=s0:/*
2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=c0,C1[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset comments& comments-=s1:/* comments^=s0:/*[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[77;1H[K[76;1H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[6M[1;77r[71;5H/*********
    A comment.
    *********/
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 17C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=[?25l[76;1H[?12l[?25h[?25l[1;76r[1;1H[3M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hc = c1 &&[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[7M[1;77r[70;9H([71;10Hc2 ||[72;10Hc3[73;9H) && c4;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(s[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(s[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[3M[1;77r[74;1Hvoid f()
{
    c = c1 &&[77;1H[K[75;1H[?12l[?25h[?25l

5 lines to indent...6[7Cindented [77;18H[K[75;1H[?12l[?25h
   [?25l[77;1H[K[77;1H/^STARTTEST[1;76r[1;1H[7M[1;77r[70;9H([71;10Hc2 ||[72;10Hc3[73;9H) && c4;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(s,U1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 28C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(s,U1  [?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
5 lines to indent...6[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hc = c1 &&[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[7M[1;77r[70;9H([71;13Hc2 ||[72;13Hc3[73;9H) && c4;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(0[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(0[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hif (   c1[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[6M[1;77r[71;12H&& (   c2[72;19H|| c3))[73;9Hfoo;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(0,w1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 28C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(0,w1  [?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hif (   c1[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[6M[1;77r[71;9H&& (   c2[72;13H|| c3))[73;9Hfoo;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(s[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(s[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
8 lines to indent...9[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hc = c1 && ([77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[10M[1;77r[67;9Hc2 ||[68;9Hc3[69;9H) && c4;
    if ([71;9Hc1 && c2[72;8H)[73;9Hfoo;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(s,m1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 28C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(s,m1  [?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
8 lines to indent...9[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hc = c1 && ([77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[10M[1;77r[67;9Hc2 ||[68;9Hc3
    ) && c4;
    if ([71;9Hc1 && c2
    )[73;9Hfoo;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=b1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=b1[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
9 lines to indent...10 lines indented [77;19H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hswitch (x)[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[11M[1;77r[66;5H{[67;9Hcase 1:[68;13Ha = b;[69;9Hbreak;[70;9Hdefault:[71;13Ha = 0;[72;9Hbreak;
    }
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(0,W5[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 26C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(0,W5[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
10 lines to indent...11[7Cindented [77;19H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hinvokeme([77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[12M[1;77r[65;10Hargu,[66;10Hment);
    invokeme([68;10Hargu,[69;10Hment[70;10H);
    invokeme(argu,[72;14Hment[73;13H);
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=/6[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=/6[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
3 lines to indent...4[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hstatement;[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[5M[1;77r[72;11H// comment 1[73;11H// comment 2
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3L, 34C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[1;1H[2M[1;77r[75;1H2kdd]]/comment 1/+1
==[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=[?25l[76;1H[?12l[?25h[74;1H[?25l==[74;3H[K[75;1HENDTEST[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hvoid f()
{[77;1H[K[76;1H[?12l[?25h[?25l
/[?12l[?25hcomment 1/+1[?25l[1;76r[1;1H[3M[1;77r[74;5Hstatement;[75;8H// comment 1
    // comment 2[77;1H[K[76;4H[?12l[?25h[?25l    // comment 2[76;8H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=g0[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=g0[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hclass CAbc
{[77;1H[K[76;1H[?12l[?25h[?25l
6 lines to indent...7[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hint Test() { return FALSE; }[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[8M[1;77r[70;1Hpublic: // comment
    void testfall();
protected:
    void testfall();
};

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=+20[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 24C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=+20[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[3M[1;77r[74;5Hvoid
foo()
{[77;1H[K[76;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hif (a)[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[6M[1;77r[71;5H{
    } else[73;9Hasdf;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=(0,W2s[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 27C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=(0,W2s[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H{[77;1H[K[76;1H[?12l[?25h[?25l
34 lines to indent...35[7Cindented [77;19H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Haverylongfunctionnamelongfunctionnameaverylongfunctionname()->asd([77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[36M[1;77r[41;13Hasdasdf,[42;13Hfunc(asdf,[43;18Hasdfadsf),[44;13Hasdfasdf[45;13H);[47;5H/* those are ugly, but consequent */[49;5Hfunc()->asd(asdasdf,[50;17Haverylongfunctionname([51;25Habc,[52;25Hdec)->averylongfunctionname([53;33Hasdfadsf,[54;33Hasdfasdf,[55;33Hasdfasdf,[56;33H),[57;17Hfunc(asdfadf,[58;22Hasdfasdf[59;21H),[60;17Hasdasdf[61;16H);[63;5Haverylongfunctionnameaverylongfunctionnameavery()->asd(fasdf([64;21Habc,[65;21Hdec)->asdfasdfasdf([66;29Hasdfadsf,[67;29Hasdfasdf,[68;29Hasdfasdf,[69;29H),[70;13Hfunc(asdfadf,[71;18Hasdfasdf),[72;13Hasdasdf[73;13H);
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:set cino=M1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 23C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[1;76r[76;1H
[1;77r[76;1H2kdd]]=][[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1HENDTEST[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cino=M1[?25l[76;1H[?12l[?25h[74;1H[?25l2kdd]]=][[74;10H[K[75;1HENDTEST[75;8H[K[76;1H[K[74;1H[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hint main ()
{[77;1H[K[76;1H[?12l[?25h[?25l
4 lines to indent...5[7Cindented [77;18H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;5Hif (cond1 &&[77;1H[K[76;4H[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[6M[1;77r[71;13Hcond2[72;13H)[73;9Hfoo;
}

STARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:g/^STARTTEST/.,/^ENDTEST/d[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2L, 61C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST/+-1[77;13H[K[77;1H[75;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l128 fewer lines[77;16H[K[1;5H[K[2;1Hvoid f()
{[3;2H[K[4;5Hstatement;[4;15H[K[5;1H       // comment 1
       // comment 2[6;20H[K[7;2H[K[9;1H[K[10;1Hclass CAbc
{[11;2H[K[12;5Hint Test() { return FALSE; }[13;5H[K[14;1Hpublic: // comment
    void testfall();
protected:
    void testfall();
};[18;5H[K[19;9H[K[20;1H[K[21;5Hvoid
foo()[22;6H[K[23;1H{[23;2H[K[24;1H    if (a)
    {
    } else
        asdf;[27;14H[K[28;1H}[28;13H[K[29;13H[K[30;18H[K[31;1H{[31;13H[K[32;5Haverylongfunctionnamelongfunctionnameaverylongfunctionname()->asd([33;13Hasdasdf,
            func(asdf[34;24H[K[35;18Hasdfadsf),
            asdfasdf[36;21H[K[37;13H);[37;17H[K[38;25H[K[39;5H/* those are ugly, but consequent */[39;41H[K[40;33H[K[41;5Hfunc()->asd(asdasdf,[41;33H[K[42;17Haverylongfunctionname([42;39H[K[43;25Habc,[43;33H[K[44;17H        dec)->averylongfunctionname([45;22H           asdfadsf,[46;21H  [10Casdfasdf,[47;17H       [9Casdfasdf,[48;16H  [15C),[49;17Hfunc(asdfadf,
                     asdfasdf[50;30H[K[51;21H),[51;23H[K[52;17Hasdasdf[52;24H[K[53;16H);[53;29H[K[54;29H[K[55;5Haverylongfunctionnameaverylongfunctionnameavery()->asd(fasdf([56;21Habc,[56;29H[K[57;13H        dec)->asdfasdfasdf([58;18H           asdfadsf,[59;13H       [9Casdfasdf,[60;13H  [14Casdfasdf,
 [27C),[62;13Hfunc(asdfadf,
         [8Casdfasdf),
            asdasdf
            );
}[67;1H[K[68;1H[K[69;1Hint main ()[69;12H[K[70;1H{[70;13H[K[71;5Hif (cond1 &&[72;9H    cond2
 [11C)[74;9Hfoo;
}[75;2H[K[76;1H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h1;/start of AUTO/,$wq! test.out[?25l"test.out" [77;12H[K[77;12H[New] 1185L, 11362C written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test4.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that changes current buffer on BufEnter event.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 17 lines, 557 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[22;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufEnter Xxx brew[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hstart of[?25l[25;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx   " write test file Xxx[?25l"Xxx" [77;7H[K[77;7H[New] 7L, 124C written[25;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ai modeline modelines=3[?25l[25;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xxx             " split to Xxx, autocmd will do :brew[?25l"Xxx" [77;7H[K[77;7H7L, 124C[38;1H[1m[7mtest4.in                                                                                               [m[39;1H:                   " Append text with autoindent to this file[39;63H[K[40;1H:au! BufEnter Xxx[40;18H[K[41;1H:buf Xxx            " go to Xxx, no autocmd anymore[41;52H[K[42;1HG?this is a[42;12H[K[43;1Hothis should be in column 1[34m^[[m:wq " append text without autoindent to Xxx[43;73H[K[44;1HG:r Xxx             " include Xxx in the current file[44;54H[K[45;1H:?startstart?,$w! test.out[45;27H[K[46;1H:qa![46;5H[K[47;1HENDTEST[47;8H[K[48;1H[K[49;1Hstartstart[49;11H[K[50;1Hstart of test file Xxx[50;23H[K[51;1Hvim: set noai :[51;16H[K[52;1H        this is a test[52;23H[K[53;1H        this is a test[53;23H[K[54;1H        this is a test[54;23H[K[55;1H        this is a test[55;23H[K[56;1Hend of test file Xxx[56;21H[K[76;1H[7mtest4.in                                                                                               [m[77;2Htest4.in" line 1 of 31 --3%-- col 1[1;1H[?12l[?25h[31;1H[?25l[77;1H[K[77;1H?[?12l[?25hthis is a[?25l[30;9H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;1H[K[31;37r[31;1H[L[1;77r[31;9Hthis should be auto-indented[38;10H[1m[7m[+][56;75r[m[56;1H[L[1;77r[56;9Hthis should be auto-indented[76;10H[7m[+][31;36H[?12l[?25h[32;20H[?25l[77;1H[m:[?12l[?25h                   " Append text with autoindent to this file[?25l[32;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau! BufEnter Xxx[?25l[32;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbuf Xxx            " go to Xxx, no autocmd anymore[?25l"Xxx" [77;7H[K[77;7H7L, 124C[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[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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [m[38;1H[1m[7mXxxt          [1;1H[?12l[?25h[7;1H[?25l[m[77;1H[K[77;1H?[?12l[?25hthis is a[?25l[6;9H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;1H[K[7;37r[7;1H[L[1;77r[7;1Hthis should be in column 1[38;5H[1m[7m[+][7;26H[?12l[?25h[?25l[77;1H[m:[?12l[?25hwq " append text without autoindent to Xxx[?25l"Xxx[77;7H[K[77;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        this should be auto-indented[31;37H[K[32;1Hend of test file Xxx[32;21H[K[38;1H[1m[34m~                                                                                                      [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~                                                                                                      [76;1H~                                                                                                      [25;1H[?12l[?25h[32;1H[?25l[m[77;1H[K[77;1H:[?12l[?25hr Xxx             " include Xxx in the current file[?25l"Xxx" [77;20H[K[77;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[77;1H[K[77;1H:[?12l[?25h?startstart?,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New] 17L, 316C written[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test5.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that deletes the current buffer on BufLeave event.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 16 lines, 664 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[21;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[22;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[22;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufLeave Xxx bwipe[?25l[22;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hstart of[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx               " write test file Xxx[?25l"Xxx" [77;7H[K[77;7H[New File] 7 lines, 124 characters written[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xxx                         " split to Xxx[?25l"Xxx" [77;7H[K[77;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[38;1H[1m[7mXxx                                                                                                    [m[39;1H:                               " Append some text to this file[39;64H[K[40;1H:?start?,$w! test.out           " Write current file contents[40;62H[K[41;1H:bwipe test.out                 " delete alternate buffer[41;58H[K[42;1H:au bufleave test5.in bwipe[42;28H[K[43;1H:bwipe!                         " delete current buffer, get an empty one[43;74H[K[44;1Hithis is another test line[34m^[[m:w >>test.out[44;42H[K[45;1H:                               " append an extra line to the output file[45;74H[K[46;1H:qa![46;5H[K[47;1HENDTEST[47;8H[K[48;1H[K[49;1Hstart of test file Xxx[49;23H[K[50;1Hvim: set noai :[50;16H[K[51;1H        this is a test[51;23H[K[52;1H        this is a test[52;23H[K[53;1H        this is a test[53;23H[K[54;1H        this is a test[54;23H[K[55;1Hend of test file Xxx[55;21H[K[76;1H[7mtest5.in                                                                                               [1;1H[?12l[?25h[?25l[m[77;1H[K[77;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[38;1H[1m[34m~                                                                                                      [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~                                                                                                      [76;1H~                                                                                                      [23;1H[?12l[?25h[29;1H[?25l[m[77;1H[K[77;1H?[?12l[?25hthis is a[?25l[28;9H[?12l[?25h[?25l[29;76r[29;1H[L[1;77r[29;1Hthis is some more text[77;1H[K[29;22H[?12l[?25h[30;20H[?25l[77;1H:[?12l[?25h                               " Append some text to this file[?25l[30;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h?start?,$w! test.out           " Write current file contents[?25l"test.out" [77;12H[K[77;12H[New File] 8 lines, 147 characters written[30;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe test.out                 " delete alternate buffer[?25l[30;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau bufleave test5.in bwipe[?25l[30;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe!                         " delete current buffer, get an empty one[?25l[1m[37m[41mError detected while processing BufLeave Auto commands for "test5.in":[m[77;71H[K[77;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[77;1H[K[1;1H[?12l[?25h[?25lthis is another test line[?12l[?25h[?25l[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 26 characters appended[1;25H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h                               " append an extra line to the output file[?25l[1;25H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test6.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that redefines the argument list, when doing ":all".[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 13 lines, 537 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[17;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufReadPost Xxx2 next Xxx2 Xxx1[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^start of[?25l[19;1H[?12l[?25h[?25l[22C1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx1    " write test file Xxx1[?25l"Xxx1" [77;9H[K[77;8H[New File] 6 lines, 109 characters written[19;23H[?12l[?25h[?25l2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx2     " write test file Xxx2[?25l"Xxx2" [77;9H[K[77;8H[New File] 6 lines, 109 characters written[19;23H[?12l[?25h[?25l3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx3     " write test file Xxx3[?25l"Xxx3" [77;9H[K[77;8H[New File] 6 lines, 109 characters written[19;23H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hnext! Xxx1 Xxx2 Xxx3     " redefine arglist; go to Xxx1[?25l"Xxx1"[77;8H[K[77;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[77;1H[K[77;1H:[?12l[?25hall                      " open window for all args[?25l"Xxx2"[77;27H[K[77;8H6 lines, 109 characters
"Xxx2" 6 lines, 109 characters
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! test.out              " Write contents of Xxx1[?25l"test.out" [77;12H[K[77;12H[New File] 6 lines, 109 characters written
[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[3L[?25l[1;1Hstart of test file Xxx1[2;9Hthis is a test[3;9Hthis is a test[38;1H[1m[7mXxx1                                                                                                   [m[39;1Hstart of test file Xxx2[39;24H[K[40;1H        this is a test[40;23H[K[41;1H        this is a test[41;23H[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[76;1H[7mXxx2                                                                                                   [m[77;1H[K[1;1H[?12l[?25h[38;1H[7mXxx1[m[1m[7m [m[7m                                                                                                   [m[76;1H[1m[7mXxx2                                                                                                   [39;1H[38;1HXxx1                                                                                                   [m[76;1H[7mXxx2[m[1m[7m [m[7m                                                                                                   [1;1H[?25l[77;1H[m:[?12l[?25hw >>test.out     " Append contents of last window (Xxx1)[?25l"test.out" [77;12H[K[77;12H6 lines, 109 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hrew                      " should now be in Xxx2[?25l"Xxx2" line 1 of 6 --16%-- col 1 (file 1 of 2)[77;47H[K[1;23H2[38;4H[1m[7m2 [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out             " Append contents of Xxx2[?25l"test.out" [77;12H[K[77;12H6 lines, 109 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test7.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for autocommand that changes the buffer list, when doing ":ball".[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 17 lines, 508 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[21;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[22;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[22;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^start of[?25l[23;1H[?12l[?25h[?25l[22C1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx1   " write test file Xxx1[?25l"Xxx1" [77;9H[K[77;8H[New File] 4 lines, 77 characters written[23;23H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xxx1[?25l"Xxx1" [77;8H[K[77;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[38;1H[1m[7mXxx1                                                                                                   [m[39;1H:sp Xxx3[39;9H[K[40;1H:close[40;7H[K[41;1H:au BufReadPost Xxx2 bwipe[41;27H[K[42;1H$r4:ball                 " open window for all args, close Xxx2[42;64H[K[43;1H:.,$w! test.out          " Write contents of this file[43;55H[K[44;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[44;67H[K[45;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[45;78H[K[46;1H:qa![46;5H[K[47;1HENDTEST[47;8H[K[48;1H[K[49;1Hstart of test file Xxx1[49;24H[K[50;1H        this is a test[50;23H[K[51;1H        this is a test[51;23H[K[52;1Hend of test file Xxx[52;21H[K[76;1H[7mtest7.in [+]                                                                                           [1;1H[?12l[?25h[?25l[m[77;1H[K[77;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[38;1H[1m[34m~                                                                                                      [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~                                                                                                      [76;1H~                                                                                                      [23;23H[?12l[?25h[?25l[m2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx2    " write test file Xxx2[?25l"Xxx2" [77;9H[K[77;8H[New File] 4 lines, 77 characters written[23;23H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xxx2[?25l"Xxx2" [77;8H[K[77;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[38;1H[1m[7mXxx2                                                                                                   [m[39;1H:sp Xxx3[39;9H[K[40;1H:close[40;7H[K[41;1H:au BufReadPost Xxx2 bwipe[41;27H[K[42;1H$r4:ball                 " open window for all args, close Xxx2[42;64H[K[43;1H:.,$w! test.out          " Write contents of this file[43;55H[K[44;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[44;67H[K[45;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[45;78H[K[46;1H:qa![46;5H[K[47;1HENDTEST[47;8H[K[48;1H[K[49;1Hstart of test file Xxx2[49;24H[K[50;1H        this is a test[50;23H[K[51;1H        this is a test[51;23H[K[52;1Hend of test file Xxx[52;21H[K[76;1H[7mtest7.in [+]                                                                                           [1;1H[?12l[?25h[?25l[m[77;1H[K[77;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[38;1H[1m[34m~                                                                                                      [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~                                                                                                      [76;1H~                                                                                                      [23;23H[?12l[?25h[?25l[m3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx3    " write test file Xxx3[?25l"Xxx3" [77;9H[K[77;8H[New File] 4 lines, 77 characters written[23;23H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xxx3[?25l"Xxx3" [77;8H[K[77;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[38;1H[1m[7mXxx3                                                                                                   [m[39;1H:sp Xxx3[39;9H[K[40;1H:close[40;7H[K[41;1H:au BufReadPost Xxx2 bwipe[41;27H[K[42;1H$r4:ball                 " open window for all args, close Xxx2[42;64H[K[43;1H:.,$w! test.out          " Write contents of this file[43;55H[K[44;1H[34m^W^W[m:w >>test.out        " Append contents of second window (Xxx1)[44;67H[K[45;1H[34m^W^W[m:/^start of/,$w >>test.out   " Append contents of last window (this file)[45;78H[K[46;1H:qa![46;5H[K[47;1HENDTEST[47;8H[K[48;1H[K[49;1Hstart of test file Xxx3[49;24H[K[50;1H        this is a test[50;23H[K[51;1H        this is a test[51;23H[K[52;1Hend of test file Xxx[52;21H[K[76;1H[7mtest7.in [+]                                                                                           [1;1H[?12l[?25h[?25l[m[77;1H[K[77;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[38;1H[1m[34m~                                                                                                      [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~                                                                                                      [76;1H~                                                                                                      [23;23H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hau BufReadPost Xxx2 bwipe[?25l[23;23H[?12l[?25h[?25l4[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hball                 " open window for all args, close Xxx2[?25l"Xxx1"[77;23H[K[77;8H4 lines, 77 characters
"Xxx2" 4 lines, 77 characters
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h.,$w! test.out          " Write contents of this file[?25l"test.out" [77;12H[K[77;12H[New File] 4 lines, 77 characters written
[32mPress ENTER or type command to continue[?12l[?25h[27m[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~                                                                                                      [29;1H~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7mtest7.in [+]                                                                                           [m[39;1Hstart of test file Xxx1[40;9Hthis is a test[41;9Hthis is a test
end of test file Xxx
[1m[34m~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [m[76;1H[7mXxx1                                                                                                   [11;23H[?12l[?25h[38;1Htest7.in [+][m[1m[7m [m[7m                                                                                           [m[76;1H[1m[7mXxx1                                                                                                   [39;1H[?25l[77;1H[m:[?12l[?25hw >>test.out        " Append contents of second window (Xxx1)[?25l"test.out" [77;12H[K[77;12H4 lines, 77 characters appended[39;1H[?12l[?25h[38;1H[1m[7mtest7.in [+]                                                                                           [m[76;1H[7mXxx1[m[1m[7m [m[7m                                                                                                   [11;23H[?25l[m[77;1H[K[77;1H:[?12l[?25h/^start of/,$w >>test.out   " Append contents of last window (this file)[?25l[31msearch hit BOTTOM, continuing at TOP[m[77;37H[K[77;1H"test.out" [77;12H[K[77;12H4 lines, 77 characters appended[11;23H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test8.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test8.in" 24 lines, 797 characters[1;1HTest for BufWritePre autocommand that deletes or unloads the buffer.

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
:qa!
ENDTEST

start of Xxx[23;9Htest
end of 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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for BufWritePre autocommand that deletes or unloads the buffer.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 16 lines, 678 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[20;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[21;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[21;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufWritePre Xxx1 bunload[?25l[21;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufWritePre Xxx2 bwipe[?25l[21;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^start of[?25l[22;1H[?12l[?25h[?25l[12C1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx1  " write test file Xxx1[?25l"Xxx1" [77;9H[K[77;8H[New File] 3 lines, 31 characters written[22;13H[?12l[?25h[?25l2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.,/end of/w! Xxx2   " write test file Xxx2[?25l"Xxx2" [77;9H[K[77;8H[New File] 3 lines, 31 characters written[22;13H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xxx2                " edit Xxx2[?25l"Xxx2" [77;8H[K[77;8H3 lines, 31 characters[1;1Hstart of Xxx2[1;14H[K[2;9Htest
end 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~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hbdel test8.in[34m^I^I[m" delete this file from the buffer list[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xxx1                 " edit Xxx1[?25l"Xxx1" [77;25H[K[77;8H3 lines, 31 characters[1;13H1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw                      " write it, will unload it and give an error msg[?25l"Xxx2"[77;25H[K[77;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[77;1H[K[77;1H:[?12l[?25hw! test.out            " Write contents of this file[?25l"test.out" [77;12H[K[77;12H[New File] 3 lines, 31 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he! Xxx2                " start editing Xxx2[?25l"Xxx2" [77;8H[K[77;8H3 lines, 31 characters[1;1H[3L[1;1Hstart of Xxx2[2;9Htest
end of Xxx[77;1H[K[77;1H"Xxx2" 3 lines, 31 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe test.out         " remove test.out from the buffer list[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw                      " write it, will delete the buffer and give an error msg[?25l"Xxx1"[77;25H[K[77;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[77;1H[K[77;1H:[?12l[?25hw >>test.out           " Append contents of this file[?25l"test.out" [77;12H[K[77;12H3 lines, 31 characters appended
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test9.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for Bufleave autocommand that deletes the buffer we are about to edit.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 5 lines, 117 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[9;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufLeave test9.in bwipe yy[?25l[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he yy[?25l[1m[37m[41mE143: Autocommands unexpectedly deleted new buffer yy[10;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h/^start of/,$w! test.out      " Write contents of this file[?25l"test.out" [77;12H[K[77;12H[New File] 2 lines, 42 characters written[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test10.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test10.in" 57 lines, 1624 characters[1;1HTest for 'errorformat'.  This will fail if the quickfix feature was disabled.

STARTTEST
:so small.vim
:/start of errorfile/,/end of errorfile/w! Xerrorfile
:/start of testfile/,/end of testfile/w! Xtestfile
:cf Xerrorfile
rA
:cn
rB
:cn
rC
:cn
rD
:cn
rE
: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 7 col 19; this is an error
gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include  version.c
Xtestfile:13: parse error before `asd'
make: *** [vim] Error 1
in file "Xtestfile" linenr 16: there is an error

2 returned
"Xtestfile", linenr 19: yet another problem

Does anyone know what is the problem and how to correction it?
end of errorfile

start of testfile
line 2  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 6  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 8  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 12 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 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
end of testfile
[1m[34m~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for 'errorformat'.  This will fail if the quickfix feature was disabled.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 15 lines, 225 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[19;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/start of errorfile/,/end of errorfile/w! Xerrorfile[?25l"Xerrorfile" [77;14H[K[77;14H[New File] 13 lines, 447 characters written[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/start of testfile/,/end of testfile/w! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H[New File] 23 lines, 853 characters written[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcf Xerrorfile[?25l"Xtestfile" [77;13H[K[77;13H23 lines, 853 characters
(2 of 13): 1506-045 (S) Undeclared identifier fd_set.
[32mPress ENTER or type command to continue[?12l[?25h[m[1;1H[2L[?25l[1;1Hstart of testfile
line 2  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[5;39H[K[6;1Hline 6  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[6;39H[K[7;1Hline 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 8  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[17;39H[K[18;1Hline 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[22;39H[K[23;1Hend of testfile[23;16H[K[24;1H[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~                                                                                                      [m[77;1H[K[4;12H[?12l[?25h[?25lA[?12l[?25h[5;12H[?25l[77;1H:[?12l[?25hcn[?25l(3 of 13): this is an error[7;19H[?12l[?25h[?25lB[?12l[?25h[8;19H[?25l[77;1H[K[77;1H:[?12l[?25hcn[?25l(5 of 13): parse error before `asd'[13;1H[?12l[?25h[?25lC[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hcn[?25l(7 of 13): there is an error[16;1H[?12l[?25h[?25lD[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hcn[?25l(10 of 13): yet another problem[19;1H[?12l[?25h[?25lE[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hw! test.out             " Write contents of this file[?25l"test.out" [77;12H[K[77;12H[New File] 23 lines, 853 characters written[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test11.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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 >" . shellescape(ee[50;1Hxpand("<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
: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

startstart
start of testfile
line 2  Abcdefghijklmnopqrstuvwxyz
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  Abcdefghijklmnopqrstuvwxyz
line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 6  Abcdefghijklmnopqrstuvwxyz
line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 8  Abcdefghijklmnopqrstuvwxyz[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for autocommands:[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[16;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[17;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 48 lines, 2277 characters written[17;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[17;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[66;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[67;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[67;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" drop out when there is no gzip program[?25l[67;1H[?12l[?25h[?25l[77;1H[K[77;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;1HTests for autocommands:
- FileWritePre[10Cwriting a compressed file
- FileReadPost[10Creading a compressed file
- BufNewFile[12Creading a file template[77;1H[K[67;1H[?12l[?25h[?25l[77;1H:[?12l[?25hlet $GZIP = ""[?25l[67;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FileChangedShell * echo "caught FileChangedShell"[?25l[67;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset bin[?25l[67;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FileWritePre    *.gz   '[,']!gzip[?25l[67;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FileWritePost   *.gz   undo[?25l[67;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestfile.gz[?25l[?12l[?25h[?25l11 lines filtered[77;18H[K[77;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[77;1H[K[77;1H:[?12l[?25hau FileReadPost    *.gz   '[,']!gzip -d[?25l[1;1H[3L[1;1H- 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[5;54H[K[6;6HeReadPost [9Cdecompress the file[6;44H[K[7;1H[K[8;1HNote: 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).[11;46H[K[12;1H[K[13;1HSTARTTEST[13;10H[K[14;1H:so small.vim[14;14H[K[15;1H:" drop out when there is no gzip program
:if !executable("gzip")
: e! test.ok[17;13H[K[18;2H w! test.out[18;14H[K[19;2H qa[19;6H[K[20;2Hendif[20;7H[K[21;2Hlet $GZIP = ""
:au FileChangedShell * echo "caught FileChangedShell"
:set bin
:au FileWritePre    *.gz   '[,']!gzip[25;9HWritePost   *.gz   undo[25;32H[K[26;2H/^start of testfile/,/^end of testfile/w! Xtestfile.gz[27;9HReadPost[22C-d
:$r Xtestfile.gz                " Read and decompress the testfile
:?startstart?,$w! test.out      " Write contents of this file
:au BufNewFile      *.c    read Xtest.c[30;40H[K[31;2H/^start of test.c/+1,/^end of test.c/-1w! Xtest.c[31;51H[K[32;2He! foo.c                 [9Cill load Xtest.c[32;53H[K[33;5HFileAppendPre   *.out  '[,']s/new/NEW/
:au FileAppendPost  *.out  !cat Xtest.c >>test.out
:w>>test.out[22CAppend it to the output file
:au! FileAppendPre[36;21H[K[37;2H" 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"))[41;13Host[23C' . shellescape(expand("<afile>:r")[41;75H[K[42;2He! Xtestfile.gz                " Edit compressed file[42;55H[K[43;2Hw>>test.out                    " Append it to the output file[43;63H[K[44;2Hset shelltemp                  " need temp files here[44;55H[K[45;2Hau FilterReadPre   *.out  call rename(expand("<afile>"), expand("<afile>") . ".t")
:au FilterReadPre   *.out  exe '!sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shellescape(ee[47;1Hxpand("<afile>"))[47;33H[K[48;28Hexe '!rm ' . shellescape(expand("<afile>")) . '.t'[48;79H[K[49;16Host[9C'[,']s/x/X/g[49;40H[K[50;1H:e! test.out     [15C" Edit the output file
:23,$!cat[51;10H[K[52;2H23,$s/\r$//                 " 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/[55;39H[K[56;2H$r Xtestfile.gz             " Read compressed fi[56;52H[K[57;2Hw                           " write it, after filtering[57;57H[K[58;6H            " remove all autocommands
:e               " Edit test.out again[59;39H[K[60;2Hset nobin ff&   " use the default fileformat for writing
:w[61;3H[K[62;2Hqa![62;18H[K[63;1HENDTEST[63;8H[K[64;1H[K[65;1Hstartstart
start of testfile
line 2  Abcdefghijklmnopqrstuvwxyz
line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
line 4  Abcdefghijklmnopqrstuvwxyz[70;6H5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[71;6H6  Abcdefghijklmnopqrstuvwxyz[71;35H[K[72;6H7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[73;6H8  Abcdefghijklmnopqrstuvwxyz[73;35H[K[74;6H9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[75;6H10 Abcdefghijklmnopqrstuvwxyz[75;35H[K[76;1Hend of testfile[76;16H[K[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$r Xtestfile.gz                " Read and decompress the testfile[?25l"Xtestfile.gz" [77;16H[K[77;16H[Incomplete last line] 1 line, 111 characters[?12l[?25h[60C[?25l[1;76r[1;1H[7M[1;77r[71;1Hstart of test.c
/*
 * Here is a new .c file
 */
end of test.c
start of testfile[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h?startstart?,$w! test.out      " Write contents of this file[?25l"test.out" [77;12H[K[77;12H[New File] 29 lines, 788 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufNewFile      *.c    read Xtest.c[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of test.c/+1,/^end of test.c/-1w! Xtest.c[?25l[31msearch hit BOTTOM, continuing at TOP[m[77;37H[K[77;1H"Xtest.c" [77;11H[K[77;11H[New File] 3 lines, 32 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! foo.c                       " Will load Xtest.c[?25l"foo.c" [New File][77;33H[K[77;1H
"Xtest.c" 3 lines, 32 characters
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hau FileAppendPre   *.out  '[,']s/new/NEW/[?25l[1;1H[2L[2;1H/*
 * Here is a new .c file[3;25H[K[4;1H */[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25hau FileAppendPost  *.out  !cat Xtest.c >>test.out[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw>>test.out                    " Append it to the output file[?25l"test.out" [77;12H[K[77;12H4 lines, 33 characters appended
:!cat Xtest.c >>test.out
[?12l[?25h[m
[32mPress ENTER or type command to continue[?25l[m[77;1H[K[77;1H:[?12l[?25hau! FileAppendPre[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [3;2H[?12l[?25h[?25l[77;1H[m:[?12l[?25h" setup autocommands to decompress before reading and re-compress afterwards[?25l[3;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufReadPre      *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))[?25l[3;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufReadPre      *.gz   call rename(expand("<afile>:r"), expand("<afile>"))[?25l[3;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufReadPost     *.gz   call rename(expand("<afile>"), expand("<afile>:r"))[?25l[3;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufReadPost     *.gz   exe '!gzip ' . shellescape(expand("<afile>:r"))[?25l[3;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtestfile.gz                " Edit compressed file[?25l:!gzip -d 'Xtestfile.gz'[77;33H[K[77;25H
[?12l[?25h[?25l[m"Xtestfile.gz"[76;1H"Xtestfile.gz" 11 lines, 357 characters[77;1H[K[77;1H:!gzip 'Xtestfile'
[?12l[?25h[m
[32mPress ENTER or type command to continue[?25l[m[77;1H[K[77;1H:[?12l[?25hw>>test.out                    " Append it to the output file[?25l"test.out" [77;12H[K[77;12H11 lines, 357 characters appended
:!cat Xtest.c >>test.out
[?12l[?25h[m
[32mPress ENTER or type command to continue[?25l[m[77;1H[K[77;1H:[?12l[?25hset shelltemp                  " need temp files here[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hau FilterReadPre   *.out  call rename(expand("<afile>"), expand("<afile>") . ".t")[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FilterReadPre   *.out  exe '!sed s/e/E/ ' . shellescape(expand("<afile>")) . ".t >" . shellescape(
[76;103He[77;1Hxpand("<afile>"))[?25l[1;1H[L[1;1Hstart of testfile[77;1H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hau FilterReadPre   *.out  exe '!rm ' . shellescape(expand("<afile>")) . '.t'[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FilterReadPost  *.out  '[,']s/x/X/g[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! test.out                    " Edit the output file[?25l"test.out" [77;12H[K[77;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[77;1H[K[77;1H:[?12l[?25h23,$!cat[?25l[?12l[?25h[?25l:!sed s/e/E/ '/tmp/vRYMcSW/1'.t >'/tmp/vRYMcSW/1'
[?12l[?25h[?25l[m:!rm '/tmp/vRYMcSW/1'.t
[?12l[?25h[?25l[m218 substitutions on 15 lines
28 lines filtered
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h23,$s/\r$//                 " remove CR for when sed adds them[?25l[1m[37m[41mE486: Pattern not found: \r$[m[77;30H[K[77;1H
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hau! FileReadPre    *.gz   exe '!gzip -d ' . shellescape(expand("<afile>"))[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [23;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hau  FileReadPre    *.gz   call rename(expand("<afile>:r"), expand("<afile>"))[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau! FileReadPost   *.gz   '[,']s/l/L/[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r Xtestfile.gz             " Read compressed file[?25l:!gzip -d 'Xtestfile.gz'[77;30H[K[77;25H
[?12l[?25h[?25l[m"Xtestfile.gz"[76;1H"Xtestfile.gz" 11 lines, 357 characters[77;1H[K[77;1H11 substitutions on 11 lines
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw                           " write it, after filtering[?25l"test.out"[77;30H[K[77;12H61 lines, 1599 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25he               " Edit test.out again[?25l"test.out"[77;18H[K[77;12H61 lines, 1599 characters[27m[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
Line 10 Abcdefghijklmnopqrstuvwxyz
end of testfiLe
[1m[34m~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H"test.out" 61 lines, 1599 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nobin ff&   " use the default fileformat for writing[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"test.out" 61 lines, 1599 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test12.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for 'directory' option.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 40 lines, 965 characters written[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[47;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[48;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[48;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[48;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset dir=.,~[?25l[48;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/start of testfile/,/end of testfile/w! Xtest1[?25l"Xtest1" [77;10H[K[77;10H[New] 4L, 70C written[48;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;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=[77;1H
[?25l:  :[?12l[?25helse
[?25l:  [?12l[?25h:  r !ls X*.swp >test.out
[?25l:  [?12l[?25h:endif[?25l[77;1H[K[77;1H:[?12l[?25h!echo first line >>test.out[?25l[28C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25he Xtest1[?25l"Xtest1" 4L, 70C[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H"Xtest1" 4L, 70C[1;1H[?12l[?25h[?25l[77;1H[K[77;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" [77;12H[K[77;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[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[77;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[77;1H[K[77;1H:[?12l[?25h!mkdir Xtest2[?25l[14C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25hset dir=./Xtest2,.,~[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25he Xtest1[?25l"Xtest1" 4L, 70C[1;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h!echo under under >>test.out[?25l[29C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h!ls Xtest2 >>test.out[?25l[22C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h!mkdir Xtest.je[?25l[16C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h/start of testfile/,/end of testfile/w! Xtest2/Xtest3[?25l[31msearch hit BOTTOM, continuing at TOP[m[77;37H[K[77;1H"Xtest2/Xtest3" [77;17H[K[77;17H[New] 4L, 70C written[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H"Xtest2/Xtest3" [New] 4L, 70C written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset dir=Xtest.je,~[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtest2/Xtest3[?25l"Xtest2/Xtest3" 4L, 70C[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hswap[?25lXtest.je/Xtest3.swp[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h!ls Xtest2 >>test.out[?25l[22C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h!echo under Xtest3 >>test.out[?25l[30C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h!ls Xtest.je >>test.out[?25l[24C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test13.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for autocommands on :close command[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[13;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[14;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 38 lines, 631 characters written[14;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[14;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[52;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[53;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[53;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestje1[?25l"Xtestje1" [77;13H[K[77;12H[New File] 5 lines, 64 characters written[53;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestje2[?25l"Xtestje2" [77;13H[K[77;12H[New File] 5 lines, 64 characters written[53;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of testfile/,/^end of testfile/w! Xtestje3[?25l"Xtestje3" [77;13H[K[77;12H[New File] 5 lines, 64 characters written[53;1H[?12l[?25h[?25l[77;1H[K[77;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;76r[m[2;1H[L[1;77r[2;1Htestje1[77;1H[K[2;7H[?12l[?25h[3;8H[?25l[77;1H:[?12l[?25hw[?25l"Xtestje1" 6 lines, 72 characters written[3;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xtestje2[?25l"Xtestje2" [77;12H[K[77;12H5 lines, 64 characters[2;1H        contents


end of testfile[5;16H[K[6;1H[1m[34m~                                                                                                      [m[38;1H[1m[7mXtestje2                                                                                               [m[39;1Htestje1[39;8H[K[40;1H        contents[40;17H[K[41;1H        contents[41;17H[K[42;1H        contents[42;17H[K[43;1Hend of testfile[43;16H[K[76;1H[7mXtestje1                                                                                               [1;1H[?12l[?25h[?25l[2;37r[m[2;1H[L[1;77r[2;1Htestje2[38;10H[1m[7m[+][m[77;1H[K[2;7H[?12l[?25h[3;8H[?25l[77;1H:[?12l[?25hw[?25l"Xtestje2" 6 lines, 72 characters written[38;10H[1m[7m    [3;8H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hsp Xtestje3[?25l"Xtestje3" [77;12H[K[77;12H5 lines, 64 characters[27m[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~                                                                                                      [20;1H~                                                                                                      [21;1H~                                                                                                      [22;1H~                                                                                                      [23;1H~                                                                                                      [24;1H~                                                                                                      [25;1H~                                                                                                      [m[26;1H[1m[7mXtestje3                                                                                               [m[27;1Htestje2[28;9Hcontents[29;9Hcontents[30;9Hcontents
end of testfile
[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~                                                                                                      [m[51;1H[7mXtestje2                                                                                               [m[52;9Hcontents[53;9Hcontents[54;9Hcontents
end of testfile
[1m[34m~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [m[76;1H[7mXtestje1                                                                                               [1;1H[?12l[?25h[?25l[2;25r[m[2;1H[L[1;77r[2;1Htestje3[26;10H[1m[7m[+][2;7H[?12l[?25h[3;8H[?25l[77;1H[m:[?12l[?25hw[?25l"Xtestje3" 6 lines, 72 characters written[26;10H[1m[7m    [3;8H[?12l[?25h[m[26;1H[7mXtestje3[m[1m[7m [m[7m                                                                                               [m[51;1H[1m[7mXtestje2                                                                                               [28;8H[29;8H[?25l[m[77;1H[K[77;1H:[?12l[?25hau WinLeave Xtestje2 bwipe[?25l[29;8H[?12l[?25h[27m[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~                                                                                                      [29;1H~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[7mXtestje3                                                                                               [m[39;1Htestje1[40;9Hcontents[41;9Hcontents[42;9Hcontents
end of testfile
[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [m[76;1H[1m[7mXtestje1                                                                                               [40;8H[?12l[?25h[41;8H[?25l[77;1H[m:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 6 lines, 72 characters written[41;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau WinLeave Xtestje1 bwipe Xtestje3[?25l[41;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hclose[?25l[2;7H1[38;1H[1m[34m~                                                                                                      [39;1H~                                                                                                      [40;1H~                                                                                                      [41;1H~                                                                                                      [42;1H~                                                                                                      [43;1H~                                                                                                      [76;1H~                                                                                                      [4;8H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H6 lines, 72 characters appended[4;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestje1[?25l"Xtestje1" 6 lines, 72 characters[4;9H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hau![?25l[4;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau! BufUnload Xtestje1 bwipe[?25l[4;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestje3[?25l"Xtestje3" 6 lines, 72 characters[2;7H3[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H6 lines, 72 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestje2[?25l"Xtestje2" 6 lines, 72 characters[2;7H2[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xtestje1[?25l"Xtestje1" [77;12H[K[77;12H6 lines, 72 characters[2;7H1[38;1H[1m[7mXtestje1                                                                                               [m[39;1Hstart of testfile[39;18H[K[40;1Htestje2[40;8H[K[41;1H        contents[41;17H[K[42;1H        contents[42;17H[K[43;1H        contents[43;17H[K[44;1Hend of testfile[44;16H[K[76;1H[7mXtestje2                                                                                               [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he[?25l[1m[37m[41mE143: Autocommands unexpectedly deleted new buffer Xtestje1[m[2;7H2[38;1H[1m[34m~                                                                                                      [39;1H~                                                                                                      [40;1H~                                                                                                      [41;1H~                                                                                                      [42;1H~                                                                                                      [43;1H~                                                                                                      [44;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H6 lines, 72 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau![?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25honly[?25lAlready only one window[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestje1[?25l"Xtestje1" 6 lines, 72 characters[2;7H1[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe Xtestje2 Xtestje3 test.out test13.in[?25l4 buffers wiped out[77;20H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufWipeout Xtestje1 buf Xtestje1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe[?25l"Xtestje1" 6 lines, 72 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H6 lines, 72 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test14.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test14.in" 66 lines, 1022 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"

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
:qa!
ENDTEST

- Bug in "vPPPP" on this text (Webb):[41;9H{[42;17Hcmd;[43;17H{[44;25Hcmd;    /* <-- Start cursor here */[45;25H{[46;25H}[47;17H}[48;9H}

Piece of Java
{[52;9Htt m1 {[53;17Ht1;[54;9H} e1[56;9Htt m2 {[57;17Ht2;[58;9H} e2[60;9Htt m3 {[61;17Hif (x)[62;17H{[63;25Ht3;[64;17H}[65;9H} e3
}
[1m[34m~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for "vaBiB", end could be wrong.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 31 lines, 623 characters written[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[38;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hStart cursor here[?25l[44;40H[?12l[?25h[?25l[?12l[?25h[?25l[43;17H[7m{ 
                        cmd;    /* <-- Start cursor here */ 
                        { 
                        } 
                [?12l[?25h[?25l[42;1H                cmd; 
                [47;17H}[?12l[?25h[?25l[m[77;1H6 fewer lines[77;15H[K[42;76r[42;1H[6M[1;77r[71;1H[1m[34m~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[77;1H6 fewer lines[42;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h?Bug?,/Piece/-2w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 3 lines, 44 characters written[42;9H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^- Bug[?25l[31msearch hit BOTTOM, continuing at TOP[40;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hs/u/~u~/[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hs/i/~u~/[?25l[40;7Huuun "vPPPP" on this text (Webb):[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hs/o/~~~/[?25l[40;20Huuuuuuuuun this text (Webb):[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 48 characters appended[40;1H[?12l[?25h[?25l[77;1H[K[77;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;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"[77;1H[K[40;1H[?12l[?25h[?25l[77;1H:[?12l[?25hexe "normal " . tt[?25l[41;76r[41;1H[L[1;77r[41;1HABC !a[34m^O[mg[34m^G[m8[77;1H[K[41;12H[?12l[?25h[?25l[77;1H:[?12l[?25hunlet tt[?25l[41;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[41;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset vb[?25l[41;12H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^Piece[?25l[45;1H[?12l[?25h[47;15H[?25l{A[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[47;16H[?12l[?25h[48;16H[51;15H[?25l{B[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[51;16H[?12l[?25h[55;15H[?25l{C[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[55;16H[?12l[?25h[?25l{DC[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[55;16H[?12l[?25h[54;1H[47;15H[?25l{EA[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[47;16H[?12l[?25h[46;1H[?25l{F[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 3 characters appended[46;2H[?12l[?25h[49;9H[?25l}G e1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[49;10H[?12l[?25h
[60;9H[?25l}H e3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[60;10H[?12l[?25h
[?5h[?5l[?25l}I[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 3 characters appended[61;2H[?12l[?25h[60;9H[?25l}JH e3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 8 characters appended[60;10H[?12l[?25h[59;16H[53;9H[?25l}K e2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[53;10H[?12l[?25h[46;1H[?25l{LF[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 4 characters appended[46;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test15.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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[60;9Hasxa;ofa[16Cax[61;9Hasdfaqwer[15Cax[62;9Ha[15Caxx[63;9Hfa[14Caxx[64;9Hdfa[13Caxx[65;9Hsdfa[12Caxx[66;9Hasdfa[11Caxx[67;9Hxasdfa[10Caxx[68;9Hasxxdfa[9Caxx[69;9Hasxa;ofa[16Caxx[70;9Hasdfaqwer[15Caxx[71;9Ha[15Caxxx[72;9Hfa[14Caxxx[73;9Hdfa[13Caxxx[74;9Hsdfa[12Caxxx[75;9Hasdfa[11Caxxx[76;9Hxasdfa[10Caxxx[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for :right on text with embedded TAB.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 17 lines, 401 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[23;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset tw=65[?25l[24;1H[?12l[?25h[25;8H[?25l[77;1H[K[77;1H:[?12l[?25h/^\s*test for :left/,/^\s*test for :center/ left[?25l[31msearch hit BOTTOM, continuing at TOP[m[77;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[77;1H[K[77;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[77;1H[K[77;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[60;9H        [16C       asxa;ofa[9Cax[61;9H         [15C      asdfaqwer[9Cax[62;9H [15C   [19Ca[9Caxx[63;9H  [14C   [18Cfa[9Caxx[64;9H   [13C   [17Cdfa[9Caxx[65;9H    [12C   [16Csdfa[9Caxx[66;9H     [11C   [15Casdfa[9Caxx[67;9H      [10C   [14Cxasdfa[9Caxx[68;9H       [9C   [13Casxxdfa[9Caxx[69;9H        [16C       asxa;ofa[9Caxx[70;9H         [15C      asdfaqwer[9Caxx[71;9H [15C    [18Ca[9Caxxx[72;9H  [14C    [17Cfa[9Caxxx[73;9H   [13C    [16Cdfa[9Caxxx[74;9H    [12C    [15Csdfa[9Caxxx[75;9H     [11C    [14Casdfa[9Caxxx[76;9H      [10C    [13Cxasdfa[9Caxxx[25;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fo+=tcroql tw=72[?25l[25;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hxxxxxxxx$[?25l[1;76r[1;1H[56M[1;77r[21;41Hasxxdfa[9Caxxx[22;40Hasxa;ofa[9Caxxx[23;39Hasdfaqwer[9Caxxx[24;47Ha[9Caxxxo[25;46Hfa[9Caxxxo[26;45Hdfa[9Caxxxo[27;44Hsdfa[9Caxxxo[28;43Hasdfa[9Caxxxo[29;42Hxasdfa[9Caxxxo[30;41Hasxxdfa[9Caxxxo[31;40Hasxa;ofa[9Caxxxo[32;39Hasdfaqwer[9Caxxxo[33;47Ha[9Caxxxoi[34;46Hfa[9Caxxxoi[35;45Hdfa[9Caxxxoi[36;44Hsdfa[9Caxxxoi[37;43Hasdfa[9Caxxxoi[38;42Hxasdfa[9Caxxxoi[39;41Hasxxdfa[9Caxxxoi[40;40Hasxa;ofa[9Caxxxoi[41;39Hasdfaqwer[9Caxxxoi[42;47Ha[9Caxxxoik[43;46Hfa[9Caxxxoik[44;45Hdfa[9Caxxxoik[45;44Hsdfa[9Caxxxoik[46;43Hasdfa[9Caxxxoik[47;42Hxasdfa[9Caxxxoik[48;41Hasxxdfa[9Caxxxoik[49;40Hasxa;ofa[9Caxxxoik[50;39Hasdfaqwer[9Caxxxoik[51;47Ha[9Caxxxoike[52;46Hfa[9Caxxxoike[53;45Hdfa[9Caxxxoike[54;44Hsdfa[9Caxxxoike[55;43Hasdfa[9Caxxxoike[56;42Hxasdfa[9Caxxxoike[57;41Hasxxdfa[9Caxxxoike[58;40Hasxa;ofa[9Caxxxoike[59;39Hasdfaqwer[9Caxxxoike[60;47Ha[9Caxxxoikey[61;46Hfa[9Caxxxoikey[62;45Hdfa[9Caxxxoikey[63;44Hsdfa[9Caxxxoikey[64;43Hasdfa[9Caxxxoikey[65;42Hxasdfa[9Caxxxoikey[66;41Hasxxdfa[9Caxxxoikey[67;40Hasxa;ofa[9Caxxxoikey[68;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[77;1H[K[76;50H[?12l[?25h[?25l[70;17Hxxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx[71;8Hx[9Cx xxxxx xxxx, xxxx xxxx xxxx xxxx xxx xx xx xx xxxxxxx.
xxxx xxxx.[72;11H[K[73;1H[K[74;1H> xx xx, xxxx xxxx xxx xxxx xxx xxxxx xxx xxx xxxxxxx xxx xxxxx xxxxxx
> xxxxxxx: xxxx xxxxxxx, xx xxxxxx xxxx xxxxxx[75;51H[K[76;1H[K[75;1H[?12l[?25h[74;1H
[?25l

:[?12l[?25hset nocp viminfo+=nviminfo[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" undo/redo here to make the next undo only work on the following changes[?25l[75;1H[?12l[?25h[?25l

1 more line; before #1  0 seconds ago[77;38H[K[1;9Htest for :left[1;43H[K[2;11Ha[13Ca[2;42H[K[3;13Hfa[10Ca[3;41H[K[4;11Hdfa[11Ca[4;40H[K[5;17Hsdfa[12Ca[5;39H[K[6;11Hasdfa[9Ca[6;47H[K[7;17Hxasdfa[10Ca[7;46H[K[8;1Hasxxdfa[9Ca[8;45H[K[9;44H[K[10;9Htest for :center[10;43H[K[11;11Ha[13Ca[11;42H[K[12;13Hfa[10Cafd asdf[12;41H[K[13;11Hdfa[11Ca[13;40H[K[14;17Hsdfa[12Cafd asdf[14;41H[K[15;11Hasdfa[9Ca[15;47H[K[16;17Hxasdfa[10Casdfasdfasdfasdfasdf[16;57H[K[17;1Hasxxdfa[9Ca[17;45H[K[18;44H[K[19;9Htest for :right[19;43H[K[20;9Ha[15Ca[20;42H[K[21;9Hfa[14Ca[21;41H[K[22;9Hdfa[13Ca[22;40H[K[23;9Hsdfa[12Ca[23;39H[K[24;9Hasdfa[11Ca[24;47H[K[25;9Hxasdfa[10Ca[25;46H[K[26;9Hasxxdfa[9Ca[26;45H[K[27;9Hasxa;ofa[16Ca[27;44H[K[28;9Hasdfaqwer[15Ca[28;43H[K[29;9Ha[15Cax[29;42H[K[30;9Hfa[14Cax[30;41H[K[31;9Hdfa[13Cax[31;40H[K[32;9Hsdfa[12Cax[32;39H[K[33;9Hasdfa[11Cax[33;47H[K[34;9Hxasdfa[10Cax[34;46H[K[35;9Hasxxdfa[9Cax[35;45H[K[36;9Hasxa;ofa[16Cax[36;44H[K[37;9Hasdfaqwer[15Cax[37;43H[K[38;9Ha[15Caxx[38;42H[K[39;9Hfa[14Caxx[39;41H[K[40;9Hdfa[13Caxx[40;40H[K[41;9Hsdfa[12Caxx[41;39H[K[42;9Hasdfa[11Caxx[42;47H[K[43;9Hxasdfa[10Caxx[43;46H[K[44;9Hasxxdfa[9Caxx[44;45H[K[45;9Hasxa;ofa[16Caxx[45;44H[K[46;9Hasdfaqwer[15Caxx[46;43H[K[47;9Ha[15Caxxx[47;42H[K[48;9Hfa[14Caxxx[48;41H[K[49;9Hdfa[13Caxxx[49;40H[K[50;9Hsdfa[12Caxxx[50;39H[K[51;9Hasdfa[11Caxxx[51;47H[K[52;9Hxasdfa[10Caxxx[52;46H[K[53;9Hasxxdfa[9Caxxx[53;45H[K[54;9Hasxa;ofa[16Caxxx[54;44H[K[55;9Hasdfaqwer[15Caxxx[55;43H[K[56;9Ha[15Caxxxo[56;42H[K[57;9Hfa[14Caxxxo[57;41H[K[58;9Hdfa[13Caxxxo[58;40H[K[59;9Hsdfa[12Caxxxo[59;39H[K[60;9Hasdfa[11Caxxxo[60;47H[K[61;9Hxasdfa[10Caxxxo[61;46H[K[62;9Hasxxdfa[9Caxxxo[62;45H[K[63;9Hasxa;ofa[16Caxxxo[63;44H[K[64;9Hasdfaqwer[15Caxxxo[64;43H[K[65;9Ha[15Caxxxoi[65;42H[K[66;9Hfa[14Caxxxoi[66;41H[K[67;9Hdfa[13Caxxxoi[67;40H[K[68;9Hsdfa[12Caxxxoi[68;39H[K[69;9Hasdfa[11Caxxxoi
        xasdfa          axxxoi[70;31H[K[71;1H        asxxdfa         axxxoi[71;32H[K[72;1H        asxa;ofa[16Caxxxoi[73;9Hasdfaqwer[15Caxxxoi
        a               axxxoik[74;33H[K[75;1H        fa              axxxoik[75;32H[K[76;9Hdfa[13Caxxxoik[1;8H[?12l[?25h[?25l[77;3Hline less; after #1  0 seconds ago[77;37H[K[1;1Htest for :left[1;15H[K[2;1Ha[9C      a[2;25H[K[3;1Hfa[10C    a[3;25H[K[4;1Hdfa[7C      a[4;25H[K[5;1Hsdfa[12Ca[5;18H[K[6;1Hasdfa           a[6;25H[K[7;1Hxasdfa[10Ca[7;18H[K[10;9H                test for :center[11;11H [13C a[14Ca[12;13H  [8Cfa        [8Cafd asdf[13;11H   [11C dfa[12Ca[14;17H    sdfa[8C        afd asdf[15;11H     [9C asdfa[10Ca[16;15Hxasdfa  
       [9C [7Casxxdfa[9Ca[19;9H               [27Ctest for :right[20;9H [15C [29Ca[9Ca[21;9H  [14C [28Cfa[9Ca[22;9H   [13C [27Cdfa[9Ca[23;9H    [12C [26Csdfa[9Ca[24;9H     [11C [25Casdfa[9Ca[25;9H      [10C [24Cxasdfa[9Ca[26;9H       [9C [23Casxxdfa[9Ca[27;9H        [16C [14Casxa;ofa[9Ca[28;9H         [15C [13Casdfaqwer[9Ca[29;9H [15C  [20Ca[9Cax[30;9H  [14C  [19Cfa[9Cax[31;9H   [13C  [18Cdfa[9Cax[32;9H    [12C  [17Csdfa[9Cax[33;9H     [11C  [16Casdfa[9Cax[34;9H      [10C  [15Cxasdfa[9Cax[35;9H       [9C  [14Casxxdfa[9Cax[36;9H        [16C       asxa;ofa[9Cax[37;9H         [15C      asdfaqwer[9Cax[38;9H [15C   [19Ca[9Caxx[39;9H  [14C   [18Cfa[9Caxx[40;9H   [13C   [17Cdfa[9Caxx[41;9H    [12C   [16Csdfa[9Caxx[42;9H     [11C   [15Casdfa[9Caxx[43;9H      [10C   [14Cxasdfa[9Caxx[44;9H       [9C   [13Casxxdfa[9Caxx[45;9H        [16C       asxa;ofa[9Caxx[46;9H         [15C      asdfaqwer[9Caxx[47;9H [15C    [18Ca[9Caxxx[48;9H  [14C    [17Cfa[9Caxxx[49;9H   [13C    [16Cdfa[9Caxxx[50;9H    [12C    [15Csdfa[9Caxxx[51;9H     [11C    [14Casdfa[9Caxxx[52;9H      [10C    [13Cxasdfa[9Caxxx[53;9H       [9C    [12Casxxdfa[9Caxxx[54;9H        [16C       asxa;ofa[9Caxxx[55;9H         [15C      asdfaqwer[9Caxxx[56;9H [15C     [17Ca[9Caxxxo[57;9H  [14C     [16Cfa[9Caxxxo[58;9H   [13C     [15Cdfa[9Caxxxo[59;9H    [12C     [14Csdfa[9Caxxxo[60;9H     [11C     [13Casdfa[9Caxxxo[61;9H      [10C     [12Cxasdfa[9Caxxxo[62;9H       [9C     [11Casxxdfa[9Caxxxo[63;9H        [16C       asxa;ofa[9Caxxxo[64;9H         [15C      asdfaqwer[9Caxxxo[65;9H [15C      [16Ca[9Caxxxoi[66;9H  [14C      [15Cfa[9Caxxxoi[67;9H   [13C      [14Cdfa[9Caxxxoi[68;9H    [12C      [13Csdfa[9Caxxxoi[69;9H     [11C      [12Casdfa[9Caxxxoi[70;9H      [10C      [11Cxasdfa[9Caxxxoi[71;9H       [9C      [10Casxxdfa[9Caxxxoi[72;9H        [16C       asxa;ofa[9Caxxxoi[73;9H         [15C      asdfaqwer[9Caxxxoi[74;9H [15C       [15Ca[9Caxxxoik[75;9H  [14C       [14Cfa[9Caxxxoik[76;9H   [13C       [13Cdfa[9Caxxxoik[1;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hmap gg :.,.+2s/^/x/<CR>kk:set tw=3<CR>gqq[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^aa[?25l[1;76r[1;1H[33M[1;77r[44;44Hsdfa[9Caxxxoik[45;43Hasdfa[9Caxxxoik[46;42Hxasdfa[9Caxxxoik[47;41Hasxxdfa[9Caxxxoik[48;40Hasxa;ofa[9Caxxxoik[49;39Hasdfaqwer[9Caxxxoik[50;47Ha[9Caxxxoike[51;46Hfa[9Caxxxoike[52;45Hdfa[9Caxxxoike[53;44Hsdfa[9Caxxxoike[54;43Hasdfa[9Caxxxoike[55;42Hxasdfa[9Caxxxoike[56;41Hasxxdfa[9Caxxxoike[57;40Hasxa;ofa[9Caxxxoike[58;39Hasdfaqwer[9Caxxxoike[59;47Ha[9Caxxxoikey[60;46Hfa[9Caxxxoikey[61;45Hdfa[9Caxxxoikey[62;44Hsdfa[9Caxxxoikey[63;43Hasdfa[9Caxxxoikey[64;42Hxasdfa[9Caxxxoikey[65;41Hasxxdfa[9Caxxxoikey[66;40Hasxa;ofa[9Caxxxoikey[67;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[77;1H[K[76;1H[?12l[?25h[?25l
:.,.+2s/^/x/3 substitutions on 3 lines[1;76r[1;1H[2M[1;77r[74;1Hxaa aa aa aa
xbb bb bb bb
xcc cc cc cc[77;1H[K[77;1H3 substitutions on 3 lines[76;1H[?12l[?25h[75;1H[74;1H[?25l[77;1H[K[77;1H:set tw=3[74;1H[?12l[?25h[?25l


3 more lines[1;76r[76;1H
[1;77r[73;5H[K[74;1Haa[74;3H[K[75;1Haa[75;3H[K[76;1Haa[77;1H[K[77;1H3 more lines[76;1H[?12l[?25h[?25l
3 fewer lines; before #2  0 seconds ago[73;1Haa aa aa aa
bb bb bb bb
cc cc cc cc
[1m[34m~                                                                                                      [73;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25h?test for :left?,$w! test.out[?25l"test.out"[77;12H[K[77;12H[New] 111L, 2304C written[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test17.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test17.in" 27 lines, 368 characters[1;1HTests for "gf" on ${VAR}

STARTTEST
:so small.vim
:if has("ebcdic")
: set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
:else
: set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
:endif
:if has("unix")
:let $CDIR = "."
/CDIR
:else
:if has("amiga")
:let $TDIR = "/testdir"
:else
:let $TDIR = "."
:endif
/TDIR
:endif
gf
:w! test.out
:qa!
ENDTEST[26;9H${CDIR}/test17a.in[27;9H$TDIR/test17a.in
[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for "gf" on ${VAR}[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 20 lines, 285 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[24;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[25;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[25;1H[?12l[?25h[?25l[77;1H[K[77;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}

STARTTEST
:so small.vim[77;1H[K[25;1H[?12l[?25h[?25l[77;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}

STARTTEST
:so small.vim
:if has("ebcdic")
: set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,}
:else
: set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
:endif
:if has("unix")[77;1H[K[26;9H[?12l[?25h[?25l[77;1H"/sources/vim73/src/testdir/./test17a.in" 3 lines, 88 characters[1;2Hhis file is just to test "gf" in test 17.
The contents is not important.
Just testing!
[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~                                                                                                      [1;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 3 lines, 88 characters written[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test18.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for not doing smart indenting when it isn't set.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 6 lines, 76 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[10;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocin nosi ai[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hsome[?25l[13;17H[?12l[?25h[?25l[13;76r[76;1H
[1;77r[13;17H#test[13;22H[K[76;1H[1m[34m~                                                                                                      [m[77;1H[K[13;21H[?12l[?25h[14;9H[?25l[77;1H:[?12l[?25h?start?,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 4 lines, 41 characters written[14;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test19.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test19.in" 25 lines, 465 characters[1;1HTests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.

STARTTEST
: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
:?^start?,$w! test.out
:qa!
ENDTEST

start text[20;17Hsome test text
test text[22;17Hother test text
    a cde
    f ghi
test text
[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~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 13 lines, 295 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[17;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset smarttab expandtab ts=8 sw=4[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" make sure that backspace works, no matter what termcap is used[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset t_kD=^[34m^?[m t_kb=^[34m^H[?25l[27m[m[H[2J[1;1HTests for "r<Tab>" with 'smarttab' and 'expandtab' set/not set.

STARTTEST
: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
:?^start?,$w! test.out
:qa!
ENDTEST

start text[20;17Hsome test text
test text[22;17Hother test text
    a cde
    f ghi
test text
[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~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [18;1H[?12l[?25h[?25l[77;1H[m/[?12l[?25hsome[?25l[20;17H[?12l[?25h[?25l    ome test text[20;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noexpandtab[?25l[20;20H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hother[?25l[22;17H[?12l[?25h[?25l    ther test text[22;20H[?12l[?25h[23;9H[?25l[77;1H[K[77;1H:[?12l[?25h" Test replacing with Tabs and then backspacing to undo it[?25l[23;9H[?12l[?25h    [?25l[?12l[?25h
   [?25l[77;1H[K[77;1H:[?12l[?25h" Test replacing with Tabs[?25l[24;4H[?12l[?25h    [?25l     [7Chi[?12l[?25h[25;9H[?25l[77;1H[K[77;1H:[?12l[?25h?^start?,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 7 lines, 91 characters written[25;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test20.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests Blockwise Visual when there are TABs before the text.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 9 lines, 92 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[15;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[16;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso tiny.vim[?25l[16;1H[?12l[?25h[22;1H[21;1H[?25l[21;76r[21;1H[L[1;77r[21;1Hx[77;1H[K[21;1H[?12l[?25h
[?25ly[?12l[?25h[21;1H[?25l[21;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [21;1H[?12l[?25h[?25l[m[77;1H2 changes; before #1  0 seconds ago[21;1H[K[21;1H[?12l[?25h
[?25l[77;1H[K[77;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[38;1H[1m[7m[No Name]                                                                                              [m[39;1H[34m^V[mjjlld[39;8H[K[40;1H:/here$/,$-1w! test.out[40;24H[K[41;1H:qa![41;5H[K[42;1HENDTEST[42;8H[K[43;1H[K[44;1Htest text test tex start here[44;30H[K[45;1H                some text[45;26H[K[46;1H                test text[46;26H[K[47;1Htest text[47;10H[K[48;1H[K[49;1HOx[34m^[[mjAy[34m^[[mkdd[49;13H[K[76;1H[7mtest20.in                                                                                              [1;1H[?12l[?25h[?25l[1;37r[m[1;1H[L[1;77r[1;1Hx[38;11H[1m[7m[+][m[77;1H[K[1;1H[?12l[?25h
[?25ly[?12l[?25h[1;1H[?25l[1;37r[37;1H
[1;77r[37;1H[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H1 line less; before #1  0 seconds ago[1;1H[K[38;11H[1m[7m    [1;1H[?12l[?25h[?25l[m[77;1H[K[77;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[38;1H[1m[34m~                                                                                                      [39;1H~                                                                                                      [40;1H~                                                                                                      [41;1H~                                                                                                      [42;1H~                                                                                                      [43;1H~                                                                                                      [44;1H~                                                                                                      [45;1H~                                                                                                      [46;1H~                                                                                                      [47;1H~                                                                                                      [48;1H~                                                                                                      [49;1H~                                                                                                      [76;1H~                                                                                                      [22;1H[?12l[?25h[?25l[22;76r[m[22;1H[L[1;77r[77;1H[K[22;1H[?12l[?25h
[?25l[77;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[77;1H[K[77;1H:[?12l[?25h/here$/,$-1w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 6 lines, 57 characters written[18;20H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test21.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for [ CTRL-I with a count and CTRL-W CTRL-I with a count[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 6 lines, 73 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[10;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hstart[?25l[14;23H[?12l[?25h[17;17H[?25l[77;1H[K[77;1H:[?12l[?25h.w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 30 characters written[17;17H[?12l[?25h[?25l[77;1H[K[77;1H?[?12l[?25hstart here[?25l[14;23H[?12l[?25h[?25l[1;1H/* test text test tex start here[1;33H[K[2;17Hsome text
         [7Ctest text
                start OK if found this line
        start found wrong line
test text[6;10H[K[7;1H[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[38;1H[1m[7mtest21.in                                                                                              [m[39;1H6[34m^W[m     :.w >>test.out[39;23H[K[40;1H:qa![40;5H[K[41;1HENDTEST[41;8H[K[42;1H[K[43;1H#include test21.in[43;19H[K[44;1H[K[45;1H/* test text test tex start here[45;33H[K[46;1H                some text[46;26H[K[47;1H                test text[47;26H[K[48;1H                start OK if found this line[48;44H[K[49;1H        start found wrong line[49;31H[K[50;1Htest text[50;10H[K[76;1H[7mtest21.in                                                                                              [4;17H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 30 characters appended[4;17H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test22.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for file with some lines ending in CTRL-M, some not[34m^M[m[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 4 lines, 38 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[8;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ta tx[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he![?25l"test22.in" 13 lines, 197 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$-3,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 4 lines, 79 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test23.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for complicated + argument to :edit command[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 7 lines, 125 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[11;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$-1w! Xfile1[?25l"Xfile1" [77;10H[K[77;10H[New File] 1 line, 8 characters written[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$w! Xfile2[?25l"Xfile2" [77;10H[K[77;10H[New File] 1 line, 8 characters written[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hedit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w[?25l"Xfile1" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 12 characters written
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;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[77;1H[K[77;1H"Xfile1" 1 line, 11 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >> test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test24.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test24.in" 79 lines, 1240 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/
:?start?,$w! test.out
:qa!
ENDTEST

start
test \text test text
test    text test text
test text ]test text
test ]text test text
test text te^st text
test te$xt test text
test taext test text  x61
test tbext test text  x60-x64
test 5text test text  x78 5
testc text test text  o143
tesdt text test text  o140-o144
test7 text test text  o41 7
test text tBest text  \%x42
test text teCst text  \%o103
test text [34m^@[mtest text  [\x00]
test te[34m^@[mxt t[34m^D[mest t[34m^P[mext  [\x00-\x10]
test \xyztext test text  [\x-z]
test text tev\uyst text  [\u-z]
xx aaaaa xx a
xx aaaaa xx a
xx aaaaa xx a
xx aaaaa xx
xx aaaaa xx
xx aaa12aa xx
xx foobar xbar xx[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for regexp with backslash and other special characters inside [][77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 44 lines, 480 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[49;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[50;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[50;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\x][?25l[52;6H[?12l[?25h[?25ltext test text[52;20H[K[52;6H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\t\]][?25l[53;8H[?12l[?25h[?25ltext test tex[53;20H[K[53;6H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[]y][?25l[54;11H[?12l[?25h[?25ltest text[54;20H[K[54;11H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\]][?25l[55;6H[?12l[?25h[?25ltext test text[55;20H[K[55;6H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[y^][?25l[56;13H[?12l[?25h[?25lst text[56;20H[K[56;13H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[$y][?25l[57;8H[?12l[?25h[?25lxt test text[57;20H[K[57;8H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\x61][?25l[58;7H[?12l[?25h[?25lext test text  x61[58;25H[K[58;7H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\x60-\x64][?25l[59;7H[?12l[?25h[?25lext test text  x60-x64[59;29H[K[59;7H[?12l[?25h[60;7H[?25l[77;1H[K[77;1H/[?12l[?25h[\x785][?25l[60;6H[?12l[?25h[?25ltext test text  x78 5[60;27H[K[60;6H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\o143][?25l[61;5H[?12l[?25h[?25l text test text  o143[61;26H[K[61;5H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\o140-\o144][?25l[62;4H[?12l[?25h[?25lt text test text  o140-o14[62;31H[K[62;4H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\o417][?25l[63;5H[?12l[?25h[?25l text test text  o41 7[63;27H[K[63;5H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\%x42[?25l[64;12H[?12l[?25h[?25lest text  \%x42[64;27H[K[64;12H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\%o103[?25l[65;13H[?12l[?25h[?25lst text  \%o103[65;28H[K[65;13H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\x00][?25l[66;11H[?12l[?25h[?25ltest text  [\x00][66;28H[K[66;11H[?12l[?25h[67;11H[?25l[77;1H[K[77;1H:[?12l[?25hs/[\x00-\x10]//g[?25l3 substitutions on 1 line[67;8Hxt test text  [\x00-\x10][67;33H[K[67;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/[\x-z]\+//[?25l[68;6Htext test text  [\x-z][68;28H[K[68;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/[\u-z]\{2,}//[?25l[69;13Hst text  [\u-z][69;28H[K[69;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/\(a\)\+//[?25l[70;4H xx [70;10H[K[70;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/\(a*\)\+//[?25l[71;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/\(a*\)*//[?25l[72;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/\(a\)\{2,3}/A/[?25l[73;4HAaa xx[73;10H[K[73;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/\(a\)\{-2,3}/A/[?25l[74;4HAaaa x[74;11H[K[74;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/\(a\)*\(12\)\@>/A/[?25l[75;4HAaa xx[75;10H[K[75;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hs/\(foo\)\@<!bar/A/[?25l[76;12HA xx[76;16H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hxx an file xx[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hs/\(an\_s\+\)\@<=file/A/[?25l[76;7HA xx[76;12H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hx= 9;[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hs/^\(\h\w*\%(->\|\.\)\=\)\+=/XX/[?25l[76;1HXX[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hhh= 77;[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hs/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/[?25l[76;1HYY 77;[76;7H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h?start?,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New] 29L, 571C written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test25.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for jumping to a tag with 'hidden' set, with symbolic link in path of tag.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 17 lines, 540 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[22;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset hidden[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Create a link from test25.dir to the current directory.[?25l[23;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h!rm -f test25.dir[?25l[18C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h!ln -s . test25.dir[?25l[20C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h" Create tags.text, with the current directory name inserted.[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [23;1H[?12l[?25h[?25l[77;1H[m/[?12l[?25htags line[?25l[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hr !pwd[?25l[?12l[?25h[27m[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/vim73/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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [25;1H[?12l[?25h[?25l[m[25;1H[K[25;1H[?12l[?25h[?25l[77;1H/[?12l[?25htest[?25l[26;18H[?12l[?25h[?25l/sources/vim73/src/testdir/test25.dir/test25.in /^#define  SECTION_OFF  3$/[26;42H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w! tags.test[?25l"tags.test" [77;13H[K[77;13H[New File] 1 line, 88 characters written[26;42H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h" symbolic link.  When wrong, this will give the ATTENTION message.  The next[?25l[26;42H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" space will then be eaten by hit-return, instead of moving the cursor to 'd'.[?25l[26;42H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h.w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 23 characters written[29;2H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test26.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for :execute, :while and :if[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 39 lines, 696 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[43;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[44;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[44;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet i = 0[?25l[44;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[53;2H[?12l[?25h[?25l[77;1H:[?12l[?25hunlet i j[?25l[53;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h't,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 10 lines, 159 characters written[53;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test27.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for expanding file names[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 15 lines, 220 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[19;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h!mkdir Xdir1[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h!mkdir Xdir2[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25h!mkdir Xdir3[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25hcd Xdir3[?25l/sources/vim73/src/testdir/Xdir3[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [20;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h!mkdir Xdir4[?25l[13C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25hcd ..[?25l/sources/vim73/src/testdir[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [20;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw Xdir1/file[?25l"Xdir1/file" [New File] 20 lines, 270 characters written[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw Xdir3/Xdir4/file[?25l"Xdir3/Xdir4/file" [New File] 20 lines, 270 characters written[20;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h.w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 17 characters written[21;16H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 15 characters appended[2;14H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! xx[?25l"xx" [New File][2;1H[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h!rm -rf Xdir1 Xdir2 Xdir3[?25l[26C[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test28.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for sourcing a file with CTRL-V's at the end of the line[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 5 lines, 114 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[9;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/firstline/+1,/lastline/-1w! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H[New File] 10 lines, 148 characters written[10;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h'm,$s/[34m^@[m/0/g[?25l[24;26H0map __5 asd0fifth[24;44H[K[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h'm,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 2 lines, 45 characters written[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test29.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test29.in" 56 lines, 939 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
:set nocompatible viminfo+=nviminfo
:set nojoinspaces
:set cpoptions-=j
/firstline/
j"tdGpJjJjJjJjJjJjJjJjJjJjJjJjJjJj05lmx2j06lmy2k4Jy3l$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$pjdG:?firstline?+1,$w! test.out
:qa!
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

[1m[34m~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for joining lines and marks in them[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 10 lines, 470 characters written[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[17;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nojoinspaces[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cpoptions-=j[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hfirstline/[?25l[77;11H[K[77;1H[19;1H[?12l[?25h
[?25l[77;1H37 fewer lines[20;1H[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~                                                                                                      [19;1H[?12l[?25h[?25l[m[77;4Hmore lines[77;14H[K[20;1Hasdfasdf.[20;10H[K[21;1Hasdf[21;5H[K[22;1Hasdfasdf. [22;11H[K[23;1Hasdf[23;5H[K[24;1Hasdfasdf.  [24;12H[K[25;1Hasdf[25;5H[K[26;1Hasdfasdf.       [26;17H[K[27;1Hasdf[27;5H[K[28;1Hasdfasdf.       [28;17H[K[29;1Hasdf[29;5H[K[30;1Hasdfasdf.        [30;18H[K[31;1Hasdf[31;5H[K[32;1Hasdfasdf.               [32;25H[K[33;1Hasdf[33;5H[K[34;1Hasdfasdf[34;9H[K[35;1Hasdf[35;5H[K[36;1Hasdfasdf [36;10H[K[37;1Hasdf[37;5H[K[38;1Hasdfasdf  [38;11H[K[39;1Hasdf[39;5H[K[40;1Hasdfasdf        [40;17H[K[41;1Hasdf[41;5H[K[42;1Hasdfasdf         [42;18H[K[43;1Hasdf[43;5H[K[44;1Hasdfasdf        [44;17H[K[45;1Hasdf[45;5H[K[46;1Hasdfasdf                [46;25H[K[47;1Hasdf[47;5H[K[48;1Hzx cvn.[48;8H[K[49;1Has dfg?[49;8H[K[50;1Hhjkl iop![50;10H[K[51;1Hert[51;4H[K[52;1Hzx cvn.[52;8H[K[53;1Has dfg?[53;8H[K[54;1Hhjkl iop![54;10H[K[55;1Hert[55;4H[K[56;1H[K[20;1H[?12l[?25h[?25l[20;76r[76;1H
[1;77r[20;5Hasdf. asdf[76;1H[1m[34m~                                                                                                      [m[77;1H[K[20;10H[?12l[?25h[21;10H[?25l[21;76r[76;1H
[1;77r[21;5Hasdf. asdf[76;1H[1m[34m~                                                                                                      [21;11H[?12l[?25h[22;11H[?25l[22;76r[m[76;1H
[1;77r[22;5Hasdf.  asdf[76;1H[1m[34m~                                                                                                      [22;12H[?12l[?25h[23;16H[?25l[23;76r[m[76;1H
[1;77r[23;5Hasdf.[7Casdf[76;1H[1m[34m~                                                                                                      [23;17H[?12l[?25h[24;16H[?25l[24;76r[m[76;1H
[1;77r[24;5Hasdf.[7Casdf[76;1H[1m[34m~                                                                                                      [24;17H[?12l[?25h[25;17H[?25l[25;76r[m[76;1H
[1;77r[25;5Hasdf.[8Casdf[76;1H[1m[34m~                                                                                                      [25;18H[?12l[?25h[26;24H[?25l[26;76r[m[76;1H
[1;77r[26;5Hasdf.[15Casdf[76;1H[1m[34m~                                                                                                      [26;25H[?12l[?25h[27;8H[?25l[27;76r[m[76;1H
[1;77r[27;5Hasdf asdf[76;1H[1m[34m~                                                                                                      [27;9H[?12l[?25h[28;9H[?25l[28;76r[m[76;1H
[1;77r[28;5Hasdf asdf[76;1H[1m[34m~                                                                                                      [28;10H[?12l[?25h[29;10H[?25l[29;76r[m[76;1H
[1;77r[29;5Hasdf  asdf[76;1H[1m[34m~                                                                                                      [29;11H[?12l[?25h[30;16H[?25l[30;76r[m[76;1H
[1;77r[30;5Hasdf[8Casdf[76;1H[1m[34m~                                                                                                      [30;17H[?12l[?25h[31;17H[?25l[31;76r[m[76;1H
[1;77r[31;5Hasdf[9Casdf[76;1H[1m[34m~                                                                                                      [31;18H[?12l[?25h[32;16H[?25l[32;76r[m[76;1H
[1;77r[32;5Hasdf[8Casdf[76;1H[1m[34m~                                                                                                      [32;17H[?12l[?25h[33;24H[?25l[33;76r[m[76;1H
[1;77r[33;5Hasdf[16Casdf[76;1H[1m[34m~                                                                                                      [33;25H[?12l[?25h[34;7H[mzx cv[36;6Hhjkl i[34;7H[?25l[34;76r[34;1H[3M[1;77r[34;1Hzx cvn. as dfg? hjkl iop! ert[74;1H[1m[34m~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [34;26H[?12l[?25h[m er[?25lt er[?12l[?25hzx cv[26C[?25lrn[?12l[?25h[34;23H[10C[?25lnop[?12l[?25h[?25l[77;1H:[?12l[?25hset cpoptions+=j[?25l[34;35H[?12l[?25h[35;7Hzx cv[37;6Hhjkl i[35;7H[?25l[35;76r[35;1H[3M[1;77r[35;1Hzx cvn. as dfg? hjkl iop! ert[74;1H[1m[34m~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[35;26H[?12l[?25h er[?25lt er[?12l[?25hzx cv[26C[?25lrn[?12l[?25h[35;23H[10C[?25lnop[?12l[?25h[?25l[77;1H:[?12l[?25hset cpoptions-=j joinspaces[?25l[35;35H[?12l[?25h
[?25l[77;1H37 more lines[77;14H[K[37;1Hasdfasdf.[37;10H[K[38;1Hasdf[38;5H[K[39;1Hasdfasdf. [39;11H[K[40;1Hasdf[40;5H[K[41;1Hasdfasdf.  [41;12H[K[42;1Hasdf[42;5H[K[43;1Hasdfasdf.       [43;17H[K[44;1Hasdf[44;5H[K[45;1Hasdfasdf.       [45;17H[K[46;1Hasdf[46;5H[K[47;1Hasdfasdf.        [47;18H[K[48;1Hasdf[48;5H[K[49;1Hasdfasdf.               [49;25H[K[50;1Hasdf[50;5H[K[51;1Hasdfasdf[51;9H[K[52;1Hasdf[52;5H[K[53;1Hasdfasdf [53;10H[K[54;1Hasdf[54;5H[K[55;1Hasdfasdf  [55;11H[K[56;1Hasdf[56;5H[K[57;1Hasdfasdf        [57;17H[K[58;1Hasdf[58;5H[K[59;1Hasdfasdf         [59;18H[K[60;1Hasdf[60;5H[K[61;1Hasdfasdf        [61;17H[K[62;1Hasdf[62;5H[K[63;1Hasdfasdf                [63;25H[K[64;1Hasdf[64;5H[K[65;1Hzx cvn.[65;8H[K[66;1Has dfg?[66;8H[K[67;1Hhjkl iop![67;10H[K[68;1Hert[68;4H[K[69;1Hzx cvn.[69;8H[K[70;1Has dfg?[70;8H[K[71;1Hhjkl iop![71;10H[K[72;1Hert[72;4H[K[73;1H[K[37;1H[?12l[?25h[?25l[37;76r[76;1H
[1;77r[37;5Hasdf.  asdf[76;1H[1m[34m~                                                                                                      [m[77;1H[K[37;10H[?12l[?25h[38;10H[?25l[38;76r[76;1H
[1;77r[38;5Hasdf.  asdf[76;1H[1m[34m~                                                                                                      [38;11H[?12l[?25h[39;11H[?25l[39;76r[m[76;1H
[1;77r[39;5Hasdf.  asdf[76;1H[1m[34m~                                                                                                      [39;12H[?12l[?25h[40;16H[?25l[40;76r[m[76;1H
[1;77r[40;5Hasdf.[7Casdf[76;1H[1m[34m~                                                                                                      [40;17H[?12l[?25h[41;16H[?25l[41;76r[m[76;1H
[1;77r[41;5Hasdf.[7Casdf[76;1H[1m[34m~                                                                                                      [41;17H[?12l[?25h[42;17H[?25l[42;76r[m[76;1H
[1;77r[42;5Hasdf.[8Casdf[76;1H[1m[34m~                                                                                                      [42;18H[?12l[?25h[43;24H[?25l[43;76r[m[76;1H
[1;77r[43;5Hasdf.[15Casdf[76;1H[1m[34m~                                                                                                      [43;25H[?12l[?25h[44;8H[?25l[44;76r[m[76;1H
[1;77r[44;5Hasdf asdf[76;1H[1m[34m~                                                                                                      [44;9H[?12l[?25h[45;9H[?25l[45;76r[m[76;1H
[1;77r[45;5Hasdf asdf[76;1H[1m[34m~                                                                                                      [45;10H[?12l[?25h[46;10H[?25l[46;76r[m[76;1H
[1;77r[46;5Hasdf  asdf[76;1H[1m[34m~                                                                                                      [46;11H[?12l[?25h[47;16H[?25l[47;76r[m[76;1H
[1;77r[47;5Hasdf[8Casdf[76;1H[1m[34m~                                                                                                      [47;17H[?12l[?25h[48;17H[?25l[48;76r[m[76;1H
[1;77r[48;5Hasdf[9Casdf[76;1H[1m[34m~                                                                                                      [48;18H[?12l[?25h[49;16H[?25l[49;76r[m[76;1H
[1;77r[49;5Hasdf[8Casdf[76;1H[1m[34m~                                                                                                      [49;17H[?12l[?25h[50;24H[?25l[50;76r[m[76;1H
[1;77r[50;5Hasdf[16Casdf[76;1H[1m[34m~                                                                                                      [50;25H[?12l[?25h[51;7H[mzx cv[53;6Hhjkl i[51;7H[?25l[51;76r[51;1H[3M[1;77r[51;1Hzx cvn.  as dfg?  hjkl iop!  ert[74;1H[1m[34m~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [51;28H[?12l[?25h[m  er[?25lt  e[?12l[?25hzx cv[29C[?25len[?12l[?25h[51;25H[11C[?25lnop[?12l[?25h[?25l[77;1H:[?12l[?25hset cpoptions+=j[?25l[51;38H[?12l[?25h[52;7Hzx cv[54;6Hhjkl i[52;7H[?25l[52;76r[52;1H[3M[1;77r[52;1Hzx cvn.  as dfg? hjkl iop! ert[74;1H[1m[34m~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[52;27H[?12l[?25h er[?25lt er[?12l[?25hzx cv[27C[?25lrn[?12l[?25h[52;24H[10C[?25lnop[?12l[?25h[?25l[77;1H:[?12l[?25hset cpoptions-=j nojoinspaces compatible[?25l[52;36H[?12l[?25h
[?25l[77;1H37 more lines[77;14H[K[54;1Hasdfasdf.[54;10H[K[55;1Hasdf[55;5H[K[56;1Hasdfasdf. [56;11H[K[57;1Hasdf[57;5H[K[58;1Hasdfasdf.  [58;12H[K[59;1Hasdf[59;5H[K[60;1Hasdfasdf.       [60;17H[K[61;1Hasdf[61;5H[K[62;1Hasdfasdf.       [62;17H[K[63;1Hasdf[63;5H[K[64;1Hasdfasdf.        [64;18H[K[65;1Hasdf[65;5H[K[66;1Hasdfasdf.               [66;25H[K[67;1Hasdf[67;5H[K[68;1Hasdfasdf[68;9H[K[69;1Hasdf[69;5H[K[70;1Hasdfasdf [70;10H[K[71;1Hasdf[71;5H[K[72;1Hasdfasdf  [72;11H[K[73;1Hasdf[73;5H[K[74;1Hasdfasdf        [74;17H[K[75;1Hasdf[75;5H[K[76;1Hasdfasdf         [76;18H[K[54;1H[?12l[?25h[?25l[54;76r[76;1H
[1;77r[54;5Hasdf.  asdf[76;1Hasdf[77;1H[K[54;10H[?12l[?25h[55;10H[?25l[55;76r[76;1H
[1;77r[55;5Hasdf.  asdf[76;1Hasdfasdf[55;11H[?12l[?25h[56;11H[?25l[56;76r[76;1H
[1;77r[56;5Hasdf.  asdf[76;1Hasdf[56;12H[?12l[?25h[57;16H[?25l[57;76r[76;1H
[1;77r[57;5Hasdf.[7Casdf[76;1Hasdfasdf[57;17H[?12l[?25h[58;16H[?25l[58;76r[76;1H
[1;77r[58;5Hasdf.[7Casdf[76;1Hasdf[58;17H[?12l[?25h[59;17H[?25l[59;76r[76;1H
[1;77r[59;5Hasdf.[8Casdf[76;1Hzx cvn.[59;18H[?12l[?25h[60;24H[?25l[60;76r[76;1H
[1;77r[60;5Hasdf.[15Casdf[76;1Has dfg?[60;25H[?12l[?25h[61;8H[?25l[61;76r[76;1H
[1;77r[61;5Hasdf asdf[76;1Hhjkl iop![61;9H[?12l[?25h[62;9H[?25l[62;76r[76;1H
[1;77r[62;5Hasdf asdf[76;1Hert[62;10H[?12l[?25h[63;10H[?25l[63;76r[76;1H
[1;77r[63;5Hasdf  asdf[76;1Hzx cvn.[63;11H[?12l[?25h[64;16H[?25l[64;76r[76;1H
[1;77r[64;5Hasdf[8Casdf[76;1Has dfg?[64;17H[?12l[?25h[65;17H[?25l[65;76r[76;1H
[1;77r[65;5Hasdf[9Casdf[76;1Hhjkl iop![65;18H[?12l[?25h[66;16H[?25l[66;76r[76;1H
[1;77r[66;5Hasdf[8Casdf[76;1Hert[66;17H[?12l[?25h[67;24H[?25l[67;76r[76;1H
[1;77r[67;5Hasdf[16Casdf[?12l[?25h[68;7H[?25l[68;76r[68;1H[3M[1;77r[68;1Hzx cvn.  as dfg? hjkl iop! ert[74;1H[1m[34m~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [68;8H[?12l[?25h[22C[?25l[mt  a[?12l[?25h[69;7H[?25l[77;1H5 fewer lines[69;1H[1m[34m~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [68;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h?firstline?+1,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 49 lines, 821 characters written[68;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test30.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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
:bwipe XXUnix XXDos XXMac
:set fileformat=mac
:e! XXUnix
:w! XXtt21
:e! XXDos
:w! XXtt22
:e! XXMac
:w! XXtt23
:bwipe XXUnix XXDos XXMac
:"
:" try reading and writing with 'fileformats' set to one format
:set fileformats=unix
:e! XXUxDsMc
:w! XXtt31
:bwipe XXUxDsMc
:set fileformats=dos
:e! XXUxDsMc[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for a lot of variations of the 'fileformats' option[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 195 lines, 3271 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[27m[m[H[2J[1;1H:w >>XXtt22
:w >>XXtt23
:w >>XXtt31
:w >>XXtt32
:w >>XXtt33
:w >>XXtt41
:w >>XXtt42
:w >>XXtt43
:w >>XXtt51
:w >>XXtt52
:w >>XXtt53
:w >>XXtt61
:w >>XXtt62
:w >>XXtt63
:w >>XXtt71
:w >>XXtt81
:w >>XXtt91
: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[77;1H[m:so! Xdotest[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" first write three test files, one in each format[?25l[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformat=unix[?25l[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=[?25l[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^1/w! XX1[?25l"XX1" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^2/w! XX2[?25l"XX2" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^3/w! XX3[?25l"XX3" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^4/w! XX4[?25l"XX4" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^5/w! XX5[?25l"XX5" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^6/w! XX6[?25l"XX6" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^7/w! XX7[?25l"XX7" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^8/w! XX8[?25l"XX8" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^9/w! XX9[?25l"XX9" [77;7H[K[77;7H[New File] 1 line, 2 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^10/w! XX10[?25l"XX10" [77;8H[K[77;8H[New File] 1 line, 3 characters written[56;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^unix/;/eof/-1w! XXUnix[?25l"XXUnix" [77;10H[K[77;10H[New File] 2 lines, 10 characters written[68;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^dos/;/eof/-1w! XXDos[?25l"XXDos" [77;9H[K[77;9H[New File] 2 lines, 10 characters written[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset bin noeol[?25l[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$w! XXMac[?25l"XXMac" [77;9H[K[77;9H[New File][Incomplete last line] 1 line, 8 characters written[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nobin eol[?25l[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l3 buffers wiped out[77;21H[K[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" create mixed format files[?25l[72;1H[?12l[?25h[?25l[77;1H[K[77;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=[77;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=[77;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=[77;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=[77;1H
[?25l:  :[?12l[?25hendif[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[27m[m[H[2J[1;1H:w >>XXtt22
:w >>XXtt23
:w >>XXtt31
:w >>XXtt32
:w >>XXtt33
:w >>XXtt41
:w >>XXtt42
:w >>XXtt43
:w >>XXtt51
:w >>XXtt52
:w >>XXtt53
:w >>XXtt61
:w >>XXtt62
:w >>XXtt63
:w >>XXtt71
:w >>XXtt81
:w >>XXtt91
: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[72;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h" try reading and writing with 'fileformats' empty[?25l[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformat=unix[?25l[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUnix[?25l"XXUnix" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 2 lines, 10 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXDos[?25l"XXDos" [77;9H[K[77;9H2 lines, 10 characters[1;1Hdos[34m^M[m
dos[34m^M[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt01[?25l"XXtt01" [77;10H[K[77;10H[New File] 2 lines, 10 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXMac[?25l"XXMac" [77;9H[K[77;9H[Incomplete last line] 1 line, 8 characters[1;1Hmac[2Cmac[34m^M[m
[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt02[?25l"XXtt02" [77;10H[K[77;10H[New File] 1 line, 9 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l"test30.in" [77;13H[K[77;13H222 lines, 3463 characters
3 buffers wiped out
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset fileformat=dos[?25l[1;1H[2L[1;1H:w >>XXtt22
:w >>XXtt23
:w >>XXtt31[3;12H[K[4;1H:w >>XXtt32[4;12H[K[5;1H:w >>XXtt33[5;12H[K[6;1H:w >>XXtt41[6;12H[K[7;1H:w >>XXtt42[7;12H[K[8;1H:w >>XXtt43[8;12H[K[9;1H:w >>XXtt51[9;12H[K[10;1H:w >>XXtt52[10;12H[K[11;1H:w >>XXtt53[11;12H[K[12;1H:w >>XXtt61[12;12H[K[13;1H:w >>XXtt62[13;12H[K[14;1H:w >>XXtt63[14;12H[K[15;1H:w >>XXtt71[15;12H[K[16;1H:w >>XXtt81[16;12H[K[17;1H:w >>XXtt91[17;12H[K[18;1H:w >>XXtt92[18;12H[K[19;1H:w >>XXtt93[19;12H[K[20;1H:"[20;3H[K[21;1H:" Concatenate the results.[21;28H[K[22;1H:" Make fileformat of test.out the native fileformat.[22;54H[K[23;1H:" Add a newline at the end.[23;29H[K[24;1H:set binary[24;12H[K[25;1H:e! test.out[25;13H[K[26;1H:$r XXtt01[26;11H[K[27;1H:$r XXtt02[27;11H[K[28;1HGo1[34m^[[m:$r XXtt11[28;16H[K[29;1H:$r XXtt12[29;11H[K[30;1H:$r XXtt13[30;11H[K[31;1HGo2[34m^[[m:$r XXtt21[31;16H[K[32;1H:$r XXtt22[32;11H[K[33;1H:$r XXtt23[33;11H[K[34;1HGo3[34m^[[m:$r XXtt31[34;16H[K[35;1H:$r XXtt32[35;11H[K[36;1H:$r XXtt33[36;11H[K[37;1HGo4[34m^[[m:$r XXtt41[37;16H[K[38;1H:$r XXtt42[38;11H[K[39;1H:$r XXtt43[39;11H[K[40;1HGo5[34m^[[m:$r XXtt51[40;16H[K[41;1H:$r XXtt52[41;11H[K[42;1H:$r XXtt53[42;11H[K[43;1HGo6[34m^[[m:$r XXtt61[43;16H[K[44;1H:$r XXtt62[44;11H[K[45;1H:$r XXtt63[45;11H[K[46;1HGo7[34m^[[m:$r XXtt71[46;16H[K[47;1HGo8[34m^[[m:$r XXtt81[47;16H[K[48;1HGo9[34m^[[m:$r XXtt91[48;16H[K[49;1H:$r XXtt92[49;11H[K[50;1H:$r XXtt93[50;11H[K[51;1HGo10[34m^[[m:$r XXUnix[51;17H[K[52;1H:set nobinary ff&[52;18H[K[53;1H:w[53;3H[K[54;1H:qa![54;5H[K[55;1HENDTEST[55;8H[K[56;1H[K[57;1H1[57;2H[K[58;1H2[58;2H[K[59;1H3[59;2H[K[60;1H4[60;2H[K[61;1H5[61;2H[K[62;1H6[62;2H[K[63;1H7[63;2H[K[64;1H8[64;2H[K[65;1H9[65;2H[K[66;1H10[66;3H[K[67;1H[K[68;1Hunix[68;5H[K[69;1Hunix[69;5H[K[70;1Heof[70;4H[K[71;1H[K[72;1Hdos[34m^M[m[72;6H[K[73;1Hdos[34m^M[m[73;6H[K[74;1Heof[74;4H[K[75;1H[K[76;1Hmac[34m^M[mmac[34m^M[m[76;11H[K[77;1H[K[72;1H[?12l[?25h[?25l[77;1H:[?12l[?25he! XXUnix[?25l"XXUnix" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt11[?25l"XXtt11" [77;10H[K[77;10H[New File][dos format] 2 lines, 12 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXDos[?25l"XXDos" [77;9H[K[77;9H[dos format] 2 lines, 10 characters[1;1Hdos[1;4H[K[2;1Hdos[2;4H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! XXtt12[?25l"XXtt12" [77;10H[K[77;10H[New File][dos format] 2 lines, 10 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXMac[?25l"XXMac" [77;9H[K[77;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[77;1H[K[77;1H:[?12l[?25hw! XXtt13[?25l"XXtt13" [77;10H[K[77;10H[New File][dos format] 1 line, 10 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l"test30.in" [77;13H[K[77;13H[CR missing][dos format] 222 lines, 3463 characters
3 buffers wiped out
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset fileformat=mac[?25l[1;1H[2L[1;1H:w >>XXtt22
:w >>XXtt23
:w >>XXtt31[3;12H[K[4;1H:w >>XXtt32[4;12H[K[5;1H:w >>XXtt33[5;12H[K[6;1H:w >>XXtt41[6;12H[K[7;1H:w >>XXtt42[7;12H[K[8;1H:w >>XXtt43[8;12H[K[9;1H:w >>XXtt51[9;12H[K[10;1H:w >>XXtt52[10;12H[K[11;1H:w >>XXtt53[11;12H[K[12;1H:w >>XXtt61[12;12H[K[13;1H:w >>XXtt62[13;12H[K[14;1H:w >>XXtt63[14;12H[K[15;1H:w >>XXtt71[15;12H[K[16;1H:w >>XXtt81[16;12H[K[17;1H:w >>XXtt91[17;12H[K[18;1H:w >>XXtt92[18;12H[K[19;1H:w >>XXtt93[19;12H[K[20;1H:"[20;3H[K[21;1H:" Concatenate the results.[21;28H[K[22;1H:" Make fileformat of test.out the native fileformat.[22;54H[K[23;1H:" Add a newline at the end.[23;29H[K[24;1H:set binary[24;12H[K[25;1H:e! test.out[25;13H[K[26;1H:$r XXtt01[26;11H[K[27;1H:$r XXtt02[27;11H[K[28;1HGo1[34m^[[m:$r XXtt11[28;16H[K[29;1H:$r XXtt12[29;11H[K[30;1H:$r XXtt13[30;11H[K[31;1HGo2[34m^[[m:$r XXtt21[31;16H[K[32;1H:$r XXtt22[32;11H[K[33;1H:$r XXtt23[33;11H[K[34;1HGo3[34m^[[m:$r XXtt31[34;16H[K[35;1H:$r XXtt32[35;11H[K[36;1H:$r XXtt33[36;11H[K[37;1HGo4[34m^[[m:$r XXtt41[37;16H[K[38;1H:$r XXtt42[38;11H[K[39;1H:$r XXtt43[39;11H[K[40;1HGo5[34m^[[m:$r XXtt51[40;16H[K[41;1H:$r XXtt52[41;11H[K[42;1H:$r XXtt53[42;11H[K[43;1HGo6[34m^[[m:$r XXtt61[43;16H[K[44;1H:$r XXtt62[44;11H[K[45;1H:$r XXtt63[45;11H[K[46;1HGo7[34m^[[m:$r XXtt71[46;16H[K[47;1HGo8[34m^[[m:$r XXtt81[47;16H[K[48;1HGo9[34m^[[m:$r XXtt91[48;16H[K[49;1H:$r XXtt92[49;11H[K[50;1H:$r XXtt93[50;11H[K[51;1HGo10[34m^[[m:$r XXUnix[51;17H[K[52;1H:set nobinary ff&[52;18H[K[53;1H:w[53;3H[K[54;1H:qa![54;5H[K[55;1HENDTEST[55;8H[K[56;1H[K[57;1H1[57;2H[K[58;1H2[58;2H[K[59;1H3[59;2H[K[60;1H4[60;2H[K[61;1H5[61;2H[K[62;1H6[62;2H[K[63;1H7[63;2H[K[64;1H8[64;2H[K[65;1H9[65;2H[K[66;1H10[66;3H[K[67;1H[K[68;1Hunix[68;5H[K[69;1Hunix[69;5H[K[70;1Heof[70;4H[K[71;1H[K[72;1Hdos[72;4H[K[73;1Hdos[73;4H[K[74;1Heof[74;4H[K[75;1H[K[76;1Hmac[34m^J[mmac[76;9H[K[77;1H[K[72;1H[?12l[?25h[?25l[77;1H:[?12l[?25he! XXUnix[?25l"XXUnix" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt21[?25l"XXtt21" [77;10H[K[77;10H[New File][mac format] 1 line, 11 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXDos[?25l"XXDos" [77;9H[K[77;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[77;1H[K[77;1H:[?12l[?25hw! XXtt22[?25l"XXtt22" [77;10H[K[77;10H[New File][mac format] 3 lines, 11 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXMac[?25l"XXMac" [77;9H[K[77;9H[mac format] 2 lines, 8 characters[1;1Hmac
mac[2;4H[K[3;1H[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt23[?25l"XXtt23" [77;10H[K[77;10H[New File][mac format] 2 lines, 8 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUnix XXDos XXMac[?25l"test30.in" [77;13H[K[77;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[77;1H[K[77;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 not aa[2;1Hvailable.[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:set filefoo[3;1Hrmat=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/w! XX5[34m^J[m:/^6/w!  [4;1HXX6[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! XXUnix[34m^J[m:/^dos/;/eof/-1w!![5;1H 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^J[m:" create mixed format ff[6;1Hiles[34m^J[m:if has("vms")[34m^J[m: !copy XXUnix,XXDos XXUxDs.[34m^J[m: !copy XXUnix,XXMac XXUxMac.[34m^J[m: !copy XXDos,XXMac  [7;1H XXDosMac.[34m^J[m: !copy XXUnix,XXDos,XXMac XXUxDsMc.[34m^J[m:elseif has("win32")[34m^J[m: !copy /b XXUnix+XXDos XXUxDs[34m^^[8;1HJ[m: !copy /b XXUnix+XXMac XXUxMac[34m^J[m: !copy /b XXDos+XXMac XXDosMac[34m^J[m: !copy /b XXUnix+XXDos+XXMac XXUxDss[9;1HMc[34m^J[m:else[34m^J[m: !cat XXUnix XXDos >XXUxDs[34m^J[m: !cat XXUnix XXMac >XXUxMac[34m^J[m: !cat XXDos XXMac >XXDosMac[34m^J[m: !![10;1Hcat XXUnix XXDos XXMac >XXUxDsMc[34m^J[m:endif[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' empty[34m^J[m:sett[11;1H fileformat=unix[34m^J[m:e! XXUnix[34m^J[m:w! test.out[34m^J[m:e! XXDos[34m^J[m:w! XXtt01[34m^J[m:e! XXMac[34m^J[m:w! XXtt02[34m^J[m:bwipe XXUnixx[12;1H XXDos XXMac[34m^J[m:set fileformat=dos[34m^J[m:e! XXUnix[34m^J[m:w! XXtt11[34m^J[m:e! XXDos[34m^J[m:w! XXtt12[34m^J[m:e! XXMac[34m^J[m:w! XXtt133[13;1H[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:set fileformat=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! XXX[14;1HMac[34m^J[m:w! XXtt23[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to onn[15;1He format[34m^J[m:set fileformats=unix[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! XX[16;1HXUxDsMc[34m^J[m:w! XXtt32[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt33[34m^J[m:bwipe XXUxDsMc[34m^JJ[m[17;1H:"[34m^J[m:" try reading and writing with 'fileformats' set to two formats[34m^J[m:set fileformats=unix,dos[34m^J[m:e! XXX[18;1HUxDsMc[34m^J[m:w! XXtt41[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^^[19;1HJ[m:bwipe XXDosMac[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! XX[20;1HXtt52[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! XXUxDss[21;1H[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^J[m:bwipe  [22;1HXXUxDsMc[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to three formats[34m^J[m:set fileformats=unixx[23;1H,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:e! XXUxDsMc[34m^J[m:w! XX[24;1HXtt81[34m^J[m:bwipe XXUxDsMc[34m^J[m:" try with 'binary' set[34m^J[m:set fileformats=mac,unix,dos[34m^J[m:set binary[34m^J[m:e! XXUxDD[25;1HsMc[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! XXtt92[34m^J[m:bwipe XXUxDsMc[34m^J[m:sett[26;1H fileformats=dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt93[34m^J[m:"[34m^J[m:" Append "END" to each file so that we can see what thh[27;1He last written char was.[34m^J[m:set fileformat=unix nobin[34m^J[mggdGaEND[34m^[[m:w >>XXtt01[34m^J[m:w >>XXtt02[34m^J[m:w >>XXtt11[34m^JJ[m[28;1H:w >>XXtt12[34m^J[m:w >>XXtt13[34m^J[m:w >>XXtt21[34m^J[m:w >>XXtt22[34m^J[m:w >>XXtt23[34m^J[m:w >>XXtt31[34m^J[m:w >>XXtt32[34m^J[m:w >>XXtt33[34m^^[29;1HJ[m:w >>XXtt41[34m^J[m:w >>XXtt42[34m^J[m:w >>XXtt43[34m^J[m:w >>XXtt51[34m^J[m:w >>XXtt52[34m^J[m:w >>XXtt53[34m^J[m:w >>XXtt61[34m^J[m:w >>XXtt622[30;1H[34m^J[m:w >>XXtt63[34m^J[m:w >>XXtt71[34m^J[m:w >>XXtt81[34m^J[m:w >>XXtt91[34m^J[m:w >>XXtt92[34m^J[m:w >>XXtt93[34m^J[m:"[34m^J[m:" Concatenate the  [31;1Hresults.[34m^J[m:" Make fileformat of test.out the native fileformat.[34m^J[m:" Add a newline at the end.[34m^J[m:set binn[32;1Hary[34m^J[m:e! test.out[34m^J[m:$r XXtt01[34m^J[m:$r XXtt02[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:$$[33;1Hr XXtt22[34m^J[m:$r XXtt23[34m^J[mGo3[34m^[[m:$r XXtt31[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^^[34;1HJ[mGo5[34m^[[m:$r XXtt51[34m^J[m:$r XXtt52[34m^J[m:$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[mGo88[35;1H[34m^[[m:$r XXtt81[34m^J[mGo9[34m^[[m:$r XXtt91[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[mEE[36;1HNDTEST[34m^J^J[m1[34m^J[m2[34m^J[m3[34m^J[m4[34m^J[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[36;66H[K[37;1H[34m^J[mdos[37;6H[K[38;1H[34m^J[meof[34m^J^J[mmac[38;13H[K[39;1Hmac[39;4H[K[40;1H[34m^J[m[40;3H[K[77;1H[K[40;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" try reading and writing with 'fileformats' set to one format[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=unix[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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[1C[34mM[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~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt31[?25l"XXtt31" [77;10H[K[77;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=dos[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt32[?25l"XXtt32" [77;10H[K[77;10H[New File][dos format] 5 lines, 32 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=mac[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt33[?25l"XXtt33" [77;10H[K[77;10H[New File][mac format] 4 lines, 28 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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 not aa[2;1Hvailable.[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:set filefoo[3;1Hrmat=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/w! XX5[34m^J[m:/^6/w!  [4;1HXX6[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! XXUnix[34m^J[m:/^dos/;/eof/-1w!![5;1H 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^J[m:" create mixed format ff[6;1Hiles[34m^J[m:if has("vms")[34m^J[m: !copy XXUnix,XXDos XXUxDs.[34m^J[m: !copy XXUnix,XXMac XXUxMac.[34m^J[m: !copy XXDos,XXMac  [7;1H XXDosMac.[34m^J[m: !copy XXUnix,XXDos,XXMac XXUxDsMc.[34m^J[m:elseif has("win32")[34m^J[m: !copy /b XXUnix+XXDos XXUxDs[34m^^[8;1HJ[m: !copy /b XXUnix+XXMac XXUxMac[34m^J[m: !copy /b XXDos+XXMac XXDosMac[34m^J[m: !copy /b XXUnix+XXDos+XXMac XXUxDss[9;1HMc[34m^J[m:else[34m^J[m: !cat XXUnix XXDos >XXUxDs[34m^J[m: !cat XXUnix XXMac >XXUxMac[34m^J[m: !cat XXDos XXMac >XXDosMac[34m^J[m: !![10;1Hcat XXUnix XXDos XXMac >XXUxDsMc[34m^J[m:endif[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' empty[34m^J[m:sett[11;1H fileformat=unix[34m^J[m:e! XXUnix[34m^J[m:w! test.out[34m^J[m:e! XXDos[34m^J[m:w! XXtt01[34m^J[m:e! XXMac[34m^J[m:w! XXtt02[34m^J[m:bwipe XXUnixx[12;1H XXDos XXMac[34m^J[m:set fileformat=dos[34m^J[m:e! XXUnix[34m^J[m:w! XXtt11[34m^J[m:e! XXDos[34m^J[m:w! XXtt12[34m^J[m:e! XXMac[34m^J[m:w! XXtt133[13;1H[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:set fileformat=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! XXX[14;1HMac[34m^J[m:w! XXtt23[34m^J[m:bwipe XXUnix XXDos XXMac[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to onn[15;1He format[34m^J[m:set fileformats=unix[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! XX[16;1HXUxDsMc[34m^J[m:w! XXtt32[34m^J[m:bwipe XXUxDsMc[34m^J[m:set fileformats=mac[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt33[34m^J[m:bwipe XXUxDsMc[34m^JJ[m[17;1H:"[34m^J[m:" try reading and writing with 'fileformats' set to two formats[34m^J[m:set fileformats=unix,dos[34m^J[m:e! XXX[18;1HUxDsMc[34m^J[m:w! XXtt41[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^^[19;1HJ[m:bwipe XXDosMac[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! XX[20;1HXtt52[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! XXUxDss[21;1H[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^J[m:bwipe  [22;1HXXUxDsMc[34m^J[m:"[34m^J[m:" try reading and writing with 'fileformats' set to three formats[34m^J[m:set fileformats=unixx[23;1H,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:e! XXUxDsMc[34m^J[m:w! XX[24;1HXtt81[34m^J[m:bwipe XXUxDsMc[34m^J[m:" try with 'binary' set[34m^J[m:set fileformats=mac,unix,dos[34m^J[m:set binary[34m^J[m:e! XXUxDD[25;1HsMc[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! XXtt92[34m^J[m:bwipe XXUxDsMc[34m^J[m:sett[26;1H fileformats=dos[34m^J[m:e! XXUxDsMc[34m^J[m:w! XXtt93[34m^J[m:"[34m^J[m:" Append "END" to each file so that we can see what thh[27;1He last written char was.[34m^J[m:set fileformat=unix nobin[34m^J[mggdGaEND[34m^[[m:w >>XXtt01[34m^J[m:w >>XXtt02[34m^J[m:w >>XXtt11[34m^JJ[m[28;1H:w >>XXtt12[34m^J[m:w >>XXtt13[34m^J[m:w >>XXtt21[34m^J[m:w >>XXtt22[34m^J[m:w >>XXtt23[34m^J[m:w >>XXtt31[34m^J[m:w >>XXtt32[34m^J[m:w >>XXtt33[34m^^[29;1HJ[m:w >>XXtt41[34m^J[m:w >>XXtt42[34m^J[m:w >>XXtt43[34m^J[m:w >>XXtt51[34m^J[m:w >>XXtt52[34m^J[m:w >>XXtt53[34m^J[m:w >>XXtt61[34m^J[m:w >>XXtt622[30;1H[34m^J[m:w >>XXtt63[34m^J[m:w >>XXtt71[34m^J[m:w >>XXtt81[34m^J[m:w >>XXtt91[34m^J[m:w >>XXtt92[34m^J[m:w >>XXtt93[34m^J[m:"[34m^J[m:" Concatenate the  [31;1Hresults.[34m^J[m:" Make fileformat of test.out the native fileformat.[34m^J[m:" Add a newline at the end.[34m^J[m:set binn[32;1Hary[34m^J[m:e! test.out[34m^J[m:$r XXtt01[34m^J[m:$r XXtt02[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:$$[33;1Hr XXtt22[34m^J[m:$r XXtt23[34m^J[mGo3[34m^[[m:$r XXtt31[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^^[34;1HJ[mGo5[34m^[[m:$r XXtt51[34m^J[m:$r XXtt52[34m^J[m:$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[mGo88[35;1H[34m^[[m:$r XXtt81[34m^J[mGo9[34m^[[m:$r XXtt91[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[mEE[36;1HNDTEST[34m^J^J[m1[34m^J[m2[34m^J[m3[34m^J[m4[34m^J[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[36;66H[K[37;1H[34m^J[mdos[37;6H[K[38;1H[34m^J[meof[34m^J^J[mmac[38;13H[K[39;1Hmac[39;4H[K[40;1H[34m^J[m[40;3H[K[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" try reading and writing with 'fileformats' set to two formats[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=unix,dos[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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[1C[34mM[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~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt41[?25l"XXtt41" [77;10H[K[77;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxMac[?25l"XXUxMac" [77;11H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt42[?25l"XXtt42" [77;10H[K[77;10H[New File] 3 lines, 19 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxMac[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXDosMac[?25l"XXDosMac" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt43[?25l"XXtt43" [77;10H[K[77;10H[New File][dos format] 3 lines, 20 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXDosMac[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=unix,mac[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDs[?25l"XXUxDs" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt51[?25l"XXtt51" [77;10H[K[77;10H[New File] 4 lines, 20 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDs[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt52[?25l"XXtt52" [77;10H[K[77;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXDosMac[?25l"XXDosMac" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt53[?25l"XXtt53" [77;10H[K[77;10H[New File][mac format] 4 lines, 18 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXDosMac[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=dos,mac[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDs[?25l"XXUxDs" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt61[?25l"XXtt61" [77;10H[K[77;10H[New File][dos format] 4 lines, 22 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDs[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxMac[?25l"XXUxMac" [77;11H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt62[?25l"XXtt62" [77;10H[K[77;10H[New File][dos format] 3 lines, 22 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxMac[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt63[?25l"XXtt63" [77;10H[K[77;10H[New File][dos format] 5 lines, 32 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" try reading and writing with 'fileformats' set to three formats[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=unix,dos,mac[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt71[?25l"XXtt71" [77;10H[K[77;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=mac,dos,unix[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt81[?25l"XXtt81" [77;10H[K[77;10H[New File] 5 lines, 29 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" try with 'binary' set[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=mac,unix,dos[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset binary[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt91[?25l"XXtt91" [77;10H[K[77;10H[New File][Incomplete last line] 5 lines, 28 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=mac[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt92[?25l"XXtt92" [77;10H[K[77;10H[New File][Incomplete last line] 5 lines, 28 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe XXUxDsMc[?25l"test30.in" [77;13H[K[77;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[60;1H:bwipe XXUnix XXDos XXMac[60;26H[K[61;1H:set fileformat=mac[61;20H[K[62;1H:e! XXUnix[62;11H[K[63;1H:w! XXtt21[63;11H[K[64;1H:e! XXDos[64;10H[K[65;1H:w! XXtt22[65;11H[K[66;1H:e! XXMac[66;10H[K[67;1H:w! XXtt23[67;11H[K[68;1H:bwipe XXUnix XXDos XXMac[68;26H[K[69;1H:"[69;3H[K[70;1H:" try reading and writing with 'fileformats' set to one format[70;64H[K[71;1H:set fileformats=unix[71;22H[K[72;1H:e! XXUxDsMc[72;13H[K[73;1H:w! XXtt31[73;11H[K[74;1H:bwipe XXUxDsMc[74;16H[K[75;1H:set fileformats=dos[75;21H[K[76;1H:e! XXUxDsMc[76;13H[K[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileformats=dos[?25l[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! XXUxDsMc[?25l"XXUxDsMc" [77;12H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw! XXtt93[?25l"XXtt93" [77;10H[K[77;10H[New File][Incomplete last line] 5 lines, 28 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;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[77;1H--No lines in buffer--[77;23H[K[1;1H[?12l[?25h[?25lEND[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt01[?25l"XXtt01" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt02[?25l"XXtt02" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt11[?25l"XXtt11" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt12[?25l"XXtt12" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt13[?25l"XXtt13" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt21[?25l"XXtt21" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt22[?25l"XXtt22" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt23[?25l"XXtt23" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt31[?25l"XXtt31" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt32[?25l"XXtt32" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt33[?25l"XXtt33" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt41[?25l"XXtt41" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt42[?25l"XXtt42" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt43[?25l"XXtt43" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt51[?25l"XXtt51" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt52[?25l"XXtt52" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt53[?25l"XXtt53" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt61[?25l"XXtt61" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt62[?25l"XXtt62" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt63[?25l"XXtt63" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt71[?25l"XXtt71" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt81[?25l"XXtt81" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt91[?25l"XXtt91" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt92[?25l"XXtt92" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>XXtt93[?25l"XXtt93" [77;10H[K[77;10H1 line, 4 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Concatenate the results.[?25l[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Make fileformat of test.out the native fileformat.[?25l[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Add a newline at the end.[?25l[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset binary[?25l[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! test.out[?25l"test.out" [77;12H[K[77;12H2 lines, 10 characters[1;1Hunix
unix[2;5H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r XXtt01[?25l"XXtt01" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt02[?25l"XXtt02" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt11[?25l"XXtt11" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt12[?25l"XXtt12" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt13[?25l"XXtt13" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt21[?25l"XXtt21" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt22[?25l"XXtt22" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt23[?25l"XXtt23" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt31[?25l"XXtt31" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt32[?25l"XXtt32" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt33[?25l"XXtt33" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt41[?25l"XXtt41" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt42[?25l"XXtt42" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt43[?25l"XXtt43" [77;10H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r XXtt51[?25l"XXtt51" [77;10H[K[77;10H5 lines, 24 characters[59;1Hunix[59;5H[K[60;1Hunix[60;5H[K[61;1Hdos[34m^M[m[61;6H[K[62;1Hdos[34m^M[m[62;6H[K[63;1HEND[63;4H[K[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r XXtt52[?25l"XXtt52" [77;10H[K[77;10H6 lines, 33 characters[64;1Hunix[64;5H[K[65;1Hunix[65;5H[K[66;1Hdos[34m^M[m[66;6H[K[67;1Hdos[34m^M[m[67;6H[K[68;1Hmac[34m^M[mmac[34m^M[m[68;11H[K[69;1HEND[69;4H[K[64;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r XXtt53[?25l"XXtt53" [77;10H[K[77;10H3 lines, 22 characters[70;1Hdos[34m^M[m[70;6H[K[71;1Hdos[34m^M[m[71;6H[K[72;1Hmac[34m^M[mmac[34m^M[mEND[72;14H[K[70;1H[?12l[?25h

[?25l
6[73;2H[K[73;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r XXtt61[?25l"XXtt61" [77;10H[K[77;10H5 lines, 26 characters[74;1Hunix[34m^M[m[74;7H[K[75;1Hunix[34m^M[m[75;7H[K[76;1Hdos[34m^M[m[76;6H[K[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r XXtt62[?25l"XXtt62" [77;10H[K[77;10H4 lines, 26 characters[1;76r[1;1H[3M[1;77r[74;1Hdos[34m^M[m
END
unix[34m^M[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt63[?25l"XXtt63" [77;10H[K[77;10H6 lines, 36 characters[1;76r[1;1H[4M[1;77r[73;1Hunix[34m^M[m
mac[34m^M[mmac[34m^M^M[m
END
unix[34m^M[m[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[1;1H[5M[1;77r[72;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;76r[76;1H
[1;77r[76;1H7[?12l[?25h[?25l
:[?12l[?25h$r XXtt71[?25l"XXtt71" [77;10H[K[77;10H6 lines, 33 characters[1;76r[76;1H
[1;77r[76;1Hunix[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[1;1H[5M[1;77r[72;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[m
END[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H8[?12l[?25h[?25l
:[?12l[?25h$r XXtt81[?25l"XXtt81" [77;10H[K[77;10H6 lines, 33 characters[1;76r[76;1H
[1;77r[76;1Hunix[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[1;1H[5M[1;77r[72;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[m
END[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H9[?12l[?25h[?25l
:[?12l[?25h$r XXtt91[?25l"XXtt91" [77;10H[K[77;10H5 lines, 32 characters[1;76r[76;1H
[1;77r[76;1Hunix[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt92[?25l"XXtt92" [77;10H[K[77;10H5 lines, 32 characters[1;76r[1;1H[5M[1;77r[72;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[mEND
unix[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$r XXtt93[?25l"XXtt93" [77;10H[K[77;10H5 lines, 32 characters[1;76r[1;1H[5M[1;77r[72;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[mEND
unix[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[1;1H[4M[1;77r[73;1Hunix
dos[34m^M[m
dos[34m^M[m
mac[34m^M[mmac[34m^M[mEND[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H10[?12l[?25h[?25l
:[?12l[?25h$r XXUnix[?25l"XXUnix" [77;10H[K[77;10H2 lines, 10 characters[1;76r[76;1H
[1;77r[76;1Hunix[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hset nobinary ff&[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"test.out" 121 lines, 664 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test31.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test31.in" 69 lines, 1423 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
A 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
:qa!
ENDTEST

testtext
[1m[34m~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for commands that close windows and/or buffers:[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[12;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[13;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 54 lines, 1288 characters written[13;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[13;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[67;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[68;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso tiny.vim[?25l[68;1H[?12l[?25h
[?25l[9C1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$w! Xtest1[?25l"Xtest1" [77;10H[K[77;10H[New File] 1 line, 11 characters written[69;10H[?12l[?25h[?25l2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$w! Xtest2[?25l"Xtest2" [77;10H[K[77;10H[New File] 1 line, 11 characters written[69;10H[?12l[?25h[?25l3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$w! Xtest3[?25l"Xtest3" [77;10H[K[77;10H[New File] 1 line, 11 characters written[69;10H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hn! Xtest1 Xtest2[?25l"Xtest1" [77;10H[K[77;10H1 line, 11 characters[1;1Htesttext 1[1;11H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[11C1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset hidden[?25l[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test for working :n when hidden set; write "testtext 2"[?25l[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hn[?25l"Xtest2" 1 line, 11 characters[1;10H2[1;12H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 11 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test for failing :rew when hidden not set; write "testtext 2 2"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[11C2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hrew[?25l[1m[37m[41mE37: No write since last change (add ! to override)[1;12H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 13 characters appended[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test for working :rew when hidden set; write "testtext 1 1"[?25l[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset hidden[?25l[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hrew[?25l"Xtest1" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)[1;10H1 1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 13 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test for :all keeping a buffer when it's modified; write "testtext 1 1 1"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[13C1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp[?25l[38;1H[1m[7mXtest1 [+]                                                                                             [m[39;1Htesttext 1 1 1[39;15H[K[76;1H[7mXtest1 [+]                                                                                             [1;14H[?12l[?25h[?25l[m[77;1H[K[77;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[38;6H[1m[7m2 [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hall[?25l"Xtest3" 1 line, 11 characters[27m[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~                                                                                                      [20;1H~                                                                                                      [21;1H~                                                                                                      [22;1H~                                                                                                      [23;1H~                                                                                                      [24;1H~                                                                                                      [m[25;1H[7mXtest1 [+]                                                                                             [m[26;1Htesttext 2 2
[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~                                                                                                      [m[50;1H[1m[7mXtest2 [+]                                                                                             [m[51;1Htesttext 3
[1m[34m~                                                                                                      [53;1H~                                                                                                      [54;1H~                                                                                                      [55;1H~                                                                                                      [56;1H~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [m[76;1H[7mXtest3                                                                                                 [26;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h1wincmd w[?25l[25;1H[1m[7mXtest1 [+]                                                                                             [m[50;1H[7mXtest2 [+][m[1m[7m [m[7m                                                                                             [1;14H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 15 characters appended[1;14H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test abandoning changed buffer, should be unloaded even when 'hidden' set[?25l[1;14H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" write "testtext 2 2" twice[?25l[1;14H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset hidden[?25l[1;14H[?12l[?25h[?25l1 1[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hq![?25l[27m[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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7mXtest2 [+]                                                                                             [m[39;1Htesttext 3
[1m[34m~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [m[76;1H[7mXtest3                                                                                                 [1;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 13 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunhide[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 13 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test ":hide" hides anyway when 'hidden' not set; write "testtext 3"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[13C2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhide[?25l[1;10H3[1;12H[K[38;1H[1m[34m~                                                                                                      [39;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test ":edit" failing in modified buffer when 'hidden' not set[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" write "testtext 3 3"[?25l[1;1H[?12l[?25h[?25l[11C3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtest1[?25l[1m[37m[41mE37: No write since last change (add ! to override)[1;12H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 13 characters appended[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1"[?25l[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset hidden[?25l[1;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtest1[?25l"Xtest1" 1 line, 11 characters[1;10H1[1;12H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test ":close" not hiding when 'hidden' not set in modified buffer;[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" write "testtext 3 3 3"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp Xtest3[?25l"Xtest3" [Modified] line 1 of 1 --100%-- col 1 (file 2 of 2)[1;10H3 3[38;1H[1m[7mXtest3 [+]                                                                                             [m[39;1Htesttext 1[39;11H[K[76;1H[7mXtest1                                                                                                 [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset nohidden[?25l[1;1H[?12l[?25h[?25l[13C3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hclose[?25l[1m[37m[41mE37: No write since last change (add ! to override)[1;14H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 15 characters appended[1;14H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test ":close!" does hide when 'hidden' not set in modified buffer;[?25l[1;14H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" write "testtext 1"[?25l[1;14H[?12l[?25h[?25l3 3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hclose![?25l[1;10H1[1;12H[K[38;1H[1m[34m~                                                                                                      [39;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test32.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for insert expansion[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[23;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 24 lines, 384 characters written[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[24;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[48;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[49;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[49;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hse nocp viminfo+=nviminfo cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff&[?25l"Xtestfile" [77;13H[K[77;13H[New] 3L, 57C written[49;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7m[No Name]                                                                                              [m[39;6Ho[39;9H[K[40;1H[34m^W[mnO#include "Xtestfile"
ru[34m^N^N^X^N^[^A[m[41;15H[K[42;1HO[34m^P^X^N[m[42;8H[K[43;1H[34m^X^P^P^P^P^P[m[43;13H[K[44;1H[34m^X^P^P^X^X^N^X^N^N^[[m[44;21H[K[45;1H:se cpt=.,w,i[45;14H[K[46;1HkOM[1C[34mN^X^N^X^N^X^X^X^P
^X^L^X^L^P^P^[[m
:se cpt=kXtestfile
:w Xtest11.one
:w Xtest11.two[50;15H[K[51;1HO[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[55;9H[K[56;1Hunl[34m^N^X^X^P^[[m[56;14H[K[57;1H: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[58;32H[K[59;1Ha[34m^N^[[m[59;6H[K[60;1H:wq! test.out[60;14H[K[61;1HENDTEST[61;8H[K[62;1H[K[63;1Hstart of testfile[63;18H[K[64;1Hrun1[64;5H[K[65;1Hrun2[65;5H[K[66;1Hend of testfile[66;16H[K[67;1H[K[68;1Htest11  36Gepeto        /Tag/[68;30H[K[69;1Hasd     test11file      36G[69;28H[K[70;1HMakefile        to      run[70;28H[K[76;1H[7mtest32.in                                                                                              [1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 4[2;3H[m[77;29H[K[77;1Hmatch in file test32.in[1m^[m[77;24H[K[77;1H[1m-- Keyword completion (^N^P) [m[32mmatch 2 of 4[2;5H[m[77;29H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1Hmatch in file test32.in[1m-- Adding Keyword completion (^N^P) Word from other line[2;10H[1;37r[m[1;1H[2L[1;77r[1;1H#include "Xtestfile"
run1 run2[38;11H[1m[7m[+][2;10H[?12l[?25h[m[77;1H[K[?25l[77;1H[1m-- Adding Keyword completion (^N^P) Word from other line[m[77;1H[K[77;1H[1m-- INSERT --[m[77;1H[K[2;9H[?12l[?25h[?25l3[?12l[?25h
[?25l[77;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1H[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 103[3;5H[m[77;29H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1H[1m-- Adding Keyword completion (^N^P) Word from other line[3;10H[m[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mKeyword Local completion (^N^P) -- Searching...[m[77;36H[32mmatch 1 of 4[m[1m.[m[77;48H[K[4;5H[77;35H[K[77;35H[1m [m[32mmatch 2 of 4[4;5H[m[77;35H[K[77;35H[1m [m[32mmatch 3 of 4[4;10H[m[77;35H[K[77;35H[1m [m[32mmatch 4 of 4[4;8H[m[77;35H[K[77;35H[1m [m[31mBack at original[4;1H[m[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mKeyword Local completion (^N^P) -- Searching...[m[77;36H[32mmatch 1 of 4[m[1m.[m[77;48H[K[5;5H[77;35H[K[77;35H[1m [m[32mmatch 2 of 4[5;5H[m[77;35H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1H[1m-- Keyword completion (^N^P) The only match[5;5H[m[77;29H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1H[1m-- Adding Keyword completion (^N^P) [m[32mmatch 1 of 2[5;10H[m[77;36H[K[77;1Hmatch in file test32.in[1me[m[77;24H[K[77;1H[1m-- Adding Keyword completion (^N^P) Word from other line[5;10H[3;37r[m[3;1H[3L[1;77r[3;1Hrun3 run3

run1 run2[?12l[?25h[77;1H[K[?25l[77;1H[1m-- Adding Keyword completion (^N^P) Word from other line[m[77;1H[K[77;1H[1m-- INSERT --[m[77;1H[K[5;9H[?12l[?25h
[?25l[77;1H:[?12l[?25hse cpt=.,w,i[?25l[6;1H[?12l[?25h[5;1H[?25l[77;1H[1m-- INSERT --[m[77;13H[K[77;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;9H[32m included file: Xtestfile[mmatch in file test32.in[77;24H[K[77;1H[1m-- Keyword completion (^N^P) The only match[5;9H[m[77;29H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;9H[32m included file: Xtestfile[mmatch in file test32.in[77;24H[K[77;1H[1m-- Adding Keyword completion (^N^P) The only match[5;19H[m[77;36H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mAdding Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;9H[32m included file: Xtestfile[mmatch in file test32.in[77;24H[K[77;1H[1m-- Adding Keyword completion (^N^P) The only match[5;28H[m[77;36H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mKeyword Local completion (^N^P) -- Searching...[m[77;36H[32mmatch 1 of 3[m[1m.[m[77;48H[K[5;29H[77;1H[K[77;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[77;20H[K[77;1H[1m-- Whole line completion (^L^N^P) [m[32mmatch 1 of 54[6;29H[m[77;4H[1mINSERT --e[m[77;13H[K[77;1H[K[77;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) [m[32mmatch 1 of 54[m[77;4H[1mAddinge Whole line completion (^L^N^P) -- Searching...[m[32mScanning: test32.in[m[1me[m[77;20H[K[77;1H[1m-- Adding Whole line completion (^L^N^P) The only match[7;29H[m[77;41H[K[77;41H[1m [m[31mBack at original[7;1H[m[77;41H[K[77;41H[1m The only match[7;29H[5;37r[m[5;1H[3L[1;77r[5;1HMakefile[8Cto      run3
Makefile[8Cto      run3
Makefile[8Cto      run3[?12l[?25h[77;1H[K[?25l[77;1H[1m-- INSERT --[m[77;1H[K[7;28H[?12l[?25h[8;9H[?25l[77;1H:[?12l[?25hse cpt=kXtestfile[?25l[8;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw Xtest11.one[?25l"Xtest11.one" [New] 9L, 104C written[38;1H[1m[7mXtest11.one+   [8;9H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw Xtest11.two[?25l"Xtest11.two" [New] 9L, 104C written[8;9H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;13H[K[77;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning dictionary: Xtestfile[m[1m-[m[77;31H[K[77;1Hmatch in file Xtestfile[77;24H[K[77;1H[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 9[8;7H[8;37r[m[8;1H[L[1;77r[8;1Htest11[38;13H[1m[7m[+][8;7H[mI[?12l[?25h [77;1H[K[?25l[77;1H[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 9[m[77;1H[K[77;1H[1m-- INSERT --[m[77;1H[K[8;6H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;1H[K[8;1HXtest11[?12l[?25h[?25l[77;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[77;34H[32mmatch 1 of 2[m[1m.[m[77;46H[K[8;12H[77;33H[K[77;33H[1m [m[32mmatch 2 of 2[8;12H[m.two[?12l[?25h[77;1H[K[?25l[77;1H[1m-- INSERT --[m[77;1H[K[8;11H[?12l[?25h[9;9H[?25l[77;1H:[?12l[?25hse cpt=w[?25l[9;9H[?12l[?25h[?25l[77;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) The only match[9;10H[m[77;29H[K[77;29H[1m [m[31mBack at original[9;3H[m[77;29H[K[77;1Hmatch in file test32.in[1m^[m[77;24H[K[77;1H[1m-- Keyword completion (^N^P) The only match[9;10H[m[77;29H[K[77;29H[1m [m[31mBack at original[9;3H[m[77;29H[K[77;1Hmatch in file test32.in[1m^[m[77;24H[K[77;1H[1m-- Keyword completion (^N^P) The only match[9;10H[9;37r[m[9;1H[L[1;77r[9;1HSTARTTEST[?12l[?25h[77;1H[K[?25l[77;1H[1m-- Keyword completion (^N^P) The only match[m[77;1H[K[77;1H[1m-- INSERT --[m[77;1H[K[9;9H[?12l[?25h[10;9H[?25l[77;1H:[?12l[?25hse cpt=u nohid[?25l[10;9H[?12l[?25h[?25l[38;1H[1m[34m~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [76;1H~                                                                                                      [10;9H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) The only match[10;8H[m[77;1H[K[77;1H[1m-- INSERT ---- Keyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) [m[32mmatch 1 of 3[11;7H[m[77;29H[K[77;1H[K[77;1H[1m-- INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- INSERTe --^[m[77;13H[K[77;4H[1mKeyword completion (^N^P) -- Searching...[m[32mScanning: test32.in[m[1mo[m[77;20H[K[77;1Hmatch in file test32.in[1m-- Keyword completion (^N^P) The only match[11;7H[10;76r[m[10;1H[2L[1;77r[10;1HENDTEST
unless[?12l[?25h[77;1H[K[?25l[77;1H[1m-- Keyword completion (^N^P) The only match[m[77;1H[K[77;1H[1m-- INSERT --[m[77;1H[K[11;6H[?12l[?25h[12;6H[?25l[77;1H:[?12l[?25hse cpt=t,d def=^\\k* tags=Xtestfile notagbsearch[?25l[12;6H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;13H[K[77;4H[1m^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)-- Tag completion (^]^N^P)^ N-- Searching...[m[77;28H[32mmatch 1 of 3[m[1m.[m[77;40H[K[12;7H[77;4H[1mINSERTm --e[m[77;13H[K[77;1H[K[77;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) [m[32mmatch 1 of 3[m[77;4H[1mDefinition completion (^D^N^P)^ U-- Searching...[m[77;50H[K[77;1H[32mScanning included file: Xtestfile[m[1m [m[77;34H[K[77;1Hmatch in file Xtestfile[77;24H[K[77;1H[1m-- Definition completion (^D^N^P) The only match[12;11H[77;4HINSERTt --n[m[77;13H[K[77;1H[K[77;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[77;34H[K[77;1Hmatch in file Xtestfile[77;24H[K[77;1H[1m-- Adding Definition completion (^D^N^P) The only match[12;20H[77;4HINSERT --f[m[77;13H[K[77;1H[K[77;1H[1m-- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match-- INSERTe --^[m[77;13H[K[77;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[77;34H[K[77;1Hmatch in file Xtestfile[77;24H[K[77;1H[1m-- Definition completion (^D^N^P) The only match[12;25H[77;4HINSERTt --n[m[77;13H[K[77;1H[K[77;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[77;34H[K[77;1Hmatch in file Xtestfile[77;24H[K[77;1H[1m-- Adding Definition completion (^D^N^P) The only match[12;37H[77;4HINSERT --f[m[77;13H[K[77;1H[K[77;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[77;34H[K[77;1Hmatch in file Xtestfile[77;24H[K[77;1H[1m-- Adding Definition completion (^D^N^P) The only match[12;38H[77;4HINSERT --f[m[77;13H[K[77;1H[K[77;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[77;34H[K[77;1Hmatch in file Xtestfile[77;24H[K[77;1H[1m-- Adding Definition completion (^D^N^P) Word from other line[12;42H[77;4HINSERT --f[m[77;13H[K[77;1H[K[77;1H[1m-- Keyword completion (^N^P) -- Searching...[m[32mScanning tags.[m[1mp[m[77;15H[K[77;10H[32mincluded file: Xtestfile[m[1m-- Keyword completion (^N^P) The only match[13;4H[12;76r[m[12;1H[2L[1;77r[12;1Htest11file      36Gepeto[8C/Tag/ asd
asd[?12l[?25h[77;1H[K[?25l[77;1H[1m-- Keyword completion (^N^P) The only match[m[77;1H[K[77;1H[1m-- INSERT --[m[77;1H[K[13;3H[?12l[?25h
ru[?25l[77;1H:[?12l[?25hwq! test.out[?25l"test.out" [77;12H[K[77;12H[New] 15L, 175C written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test33.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for 'lisp'[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 5 lines, 63 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[10;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset lisp[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^(defun[?25l[12;1H[?12l[?25h[?25l[77;1H22 lines to indent...23[7Cindented [77;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[77;1H[K[77;1H:[?12l[?25h/^(defun/,$w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 23 lines, 544 characters written[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hq![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test34.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test34.in" 72 lines, 1258 characters[1;1HTest for user functions.
Also test an <expr> mapping calling a function.

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
---*---
(one
(two
[(one again[34m^[[m:$-5,$w! test.out
:delfunc Table
:delfunc Compute
:delfunc Expr1
:delfunc Expr2
:delfunc ListItem
:delfunc ListReset
:unlet retval counter
:q!
ENDTEST

here
[1m[34m~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for user functions.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 65 lines, 1160 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[70;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;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;1HTest for user functions.
Also test an <expr> mapping calling a function.

STARTTEST
:so small.vim
:function Table(title, ...)
:  let ret = a:title
:  let idx = 1[77;1H[K[71;1H[?12l[?25h[?25l[77;1H:[?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;1HTest for user functions.
Also test an <expr> mapping calling a function.

STARTTEST
:so small.vim
:function Table(title, ...)[77;1H[K[71;1H[?12l[?25h[?25l[77;1H:[?12l[?25hfunc Expr1()[?25l
:  [?12l[?25h:  normal! v
[?25l:  [?12l[?25h:  return "111"
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1HTest for user functions.
Also test an <expr> mapping calling a function.[77;1H[K[71;1H[?12l[?25h[?25l[77;1H:[?12l[?25hfunc Expr2()[?25l
:  [?12l[?25h:  call search('XX', 'b')
[?25l:  [?12l[?25h:  return "222"
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1HTest for user functions.
Also test an <expr> mapping calling a function.[77;1H[K[71;1H[?12l[?25h[?25l[77;1H:[?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;1HTest for user functions.
Also test an <expr> mapping calling a function.[77;1H[K[71;1H[?12l[?25h[?25l[77;1H:[?12l[?25hfunc ListReset()[?25l
:  [?12l[?25h:  let g:counter = 0
[?25l:  [?12l[?25h:  return ''
[?25l:  [?12l[?25h:endfunc[1;1H[3L[?25l[1;1HTest for user functions.
Also test an <expr> mapping calling a function.[77;1H[K[71;1H[?12l[?25h[?25l[77;1H:[?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;1HTest for user functions.
Also test an <expr> mapping calling a function.[77;1H[K[71;1H[?12l[?25h[?25l[77;1H:[?12l[?25hlet g:FuncRef=function("FuncWithRef")[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet counter = 0[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hinoremap <expr> ( ListItem()[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hinoremap <expr> [ ListReset()[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25himap <expr> + Expr1()[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25himap <expr> * Expr2()[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet retval = "nop"[?25l[71;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^here[?25l[72;1H[?12l[?25h[?25lher$[77;1H[K[77;1H=[?12l[?25hTable("xxx", 4, "asdf")[?25l[77;1H[K[77;1H=[?12l[?25hCompute(45, 0, "retval")[?25l[77;1H[K[77;1H=[?12l[?25hretval[?25l[77;1H[K[77;1H=[?12l[?25hCompute(45, 5, "retval")[?25l[77;1H[K[77;1H=[?12l[?25hretval[?25l[77;1H[K[77;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;1HAlso test an <expr> mapping calling a function.

STARTTEST
:so small.vim
:function Table(title, ...)
:  let ret = a:title[6;21H[K[7;8Hidx = 1[7;15H[K[8;4Hwhile idx <= a:0
:    exe "let ret = ret . a:" . idx[10;6Hlet idx = idx + 1[10;23H[K[11;4Hendwhile[11;12H[K[12;4Hreturn ret
:endfunction[13;13H[K[14;2Hfunction Compute(n1, n2, divname)
:  if a:n2 == 0[15;16H[K[16;4H  return "fail"
:  endif[17;9H[K[18;5Hxe "let g:" . a:divname . " = ". a:n1 / a:n2
:  return "ok"[19;15H[K[20;2Hendfunction[20;13H[K[21;2Hfunc Expr1()
:  normal! v[22;13H[K[23;4Hreturn "111"
:endfunc[24;9H[K[25;2Hfunc Expr2()
:  call search('XX', 'b')
:  return "222"[27;16H[K[28;2Hendfunc[28;9H[K[29;2Hfunc ListItem()
:  let g:counter += 1
:  return g:counter . '. '
:endfunc[32;9H[K[33;2Hfunc ListReset()
:  let g:counter = 0
:  return ''[35;13H[K[36;2Hendfunc[36;9H[K[37;2Hfunc FuncWithRef(a)
:  unlet g:FuncRef[38;19H[K[39;4Hreturn a:a[39;14H[K[40;2Hendfunc[40;9H[K[41;2Hlet g:FuncRef=function("FuncWithRef")[42;6Hcounter = 0[42;17H[K[43;2Hinoremap <expr> ( ListItem()[44;18H[ ListReset()
:imap <expr> + Expr1()[45;23H[K[46;14H* Expr2
:let retval = "nop"[47;20H[K[48;1H/^here[48;7H[K[49;1HC[34m^R[m=Table("xxx", 4, "asdf")
 [3CCompute(45, 0, "retval")[51;5Hretval[51;11H[K[52;5HCompute(45, 5, "retval")[53;5Hretval[53;11H[K[54;5Hg:FuncRef(333)[55;2H[K[56;1HXX+-XX
---*---
(one[58;5H[K[59;2Htwo
[(one again[34m^[[m:$-5,$w! test.out
:delfunc Table[61;15H[K[62;10HCompute[63;10HExpr1[63;15H[K[64;14H2[65;10HListItem[66;14HReset
:unlet retval counter
:q![68;4H[K[69;1HENDTEST[70;1H[K[71;1Hxxx4asdf fail nop ok 9 333
XX111XX
---222---[73;10H[K[74;1H1. one[74;7H[K[75;1H2. two[75;7H[K[76;1H[K[77;1H[K[76;1H[?12l[?25h[?25l1. one again[?12l[?25h[?25l
:[?12l[?25h$-5,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 6 lines, 72 characters written[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc Table[?25l[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc Compute[?25l[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc Expr1[?25l[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc Expr2[?25l[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc ListItem[?25l[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc ListReset[?25l[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet retval counter[?25l[76;12H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hq![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test35.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal,[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 10 lines, 200 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[15;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[16;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^start-here[?25l[17;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h$-3,$wq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 4 lines, 120 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test36.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test36.in" 40 lines, 1596 characters[1;1HTest character classes in regexp

STARTTEST
/^start-here
j:s/\d//g
j:s/\D//g
j:s/\o//g
j:s/\O//g
j:s/\x//g
j:s/\X//g
j:s/\w//g
j:s/\W//g
j:s/\h//g
j:s/\H//g
j:s/\a//g
j:s/\A//g
j:s/\l//g
j:s/\L//g
j:s/\u//g
j:s/\U//g
:/^start-here/+1,$wq! test.out
ENDTEST

start-here[25;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[26;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[27;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[28;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[29;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[30;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[31;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[32;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[33;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[34;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[35;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[36;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[37;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[38;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[39;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[40;9H[34m^L^M[m !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé
[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~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest character classes in regexp[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 18 lines, 204 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[22;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[23;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^start-here[?25l[24;1H[?12l[?25h[25;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\d//g[?25l10 substitutions on 1 line[25;29H:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[25;87H[K[25;9H[?12l[?25h[26;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\D//g[?25l72 substitutions on 1 line[26;1H0123456789[26;11H[K[26;1H[?12l[?25h[27;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\o//g[?25l8 substitutions on 1 line[27;29H89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[27;89H[K[27;9H[?12l[?25h[28;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\O//g[?25l74 substitutions on 1 line[28;1H01234567[28;9H[K[28;1H[?12l[?25h[29;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\x//g[?25l22 substitutions on 1 line[29;29H:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[29;75H[K[29;9H[?12l[?25h[30;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\X//g[?25l60 substitutions on 1 line[30;1H0123456789ABCDEFabcdef[30;23H[K[30;1H[?12l[?25h[31;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\w//g[?25l36 substitutions on 1 line[31;29H:;<=>?@[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[31;61H[K[31;9H[?12l[?25h[32;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\W//g[?25l46 substitutions on 1 line[32;1H0123456789ABCDEFGHIXYZ_abcdefghiwxyz[32;37H[K[32;1H[?12l[?25h[33;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\h//g[?25l26 substitutions on 1 line[33;46H[\]^`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[33;71H[K[33;9H[?12l[?25h[34;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\H//g[?25l56 substitutions on 1 line[34;1HABCDEFGHIXYZ_abcdefghiwxyz[34;27H[K[34;1H[?12l[?25h[35;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\a//g[?25l25 substitutions on 1 line[35;46H[\]^_`{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[35;72H[K[35;9H[?12l[?25h[36;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\A//g[?25l57 substitutions on 1 line[36;1HABCDEFGHIXYZabcdefghiwxyz[36;26H[K[36;1H[?12l[?25h[37;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\l//g[?25l13 substitutions on 1 line[37;64H{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[37;84H[K[37;9H[?12l[?25h[38;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\L//g[?25l69 substitutions on 1 line[38;1Habcdefghiwxyz[38;14H[K[38;1H[?12l[?25h[39;8H[?25l[77;1H[K[77;1H:[?12l[?25hs/\u//g[?25l12 substitutions on 1 line[39;46H[\]^_`abcdefghiwxyz{|}~[34m^?~@~B~P~[[m¦±¼ÇÓé[39;85H[K[39;9H[?12l[?25h[40;9H[?25l[77;1H[K[77;1H:[?12l[?25hs/\U//g[?25l70 substitutions on 1 line[40;1HABCDEFGHIXYZ[40;14H[K[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start-here/+1,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 16 lines, 672 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test37.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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
ggL[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[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for 'scrollbind'. <eralston@computer.org>   Do not add a line below![77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[2;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 72 lines, 1498 characters written[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[3;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[75;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noscrollbind[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset scrollopt=ver,jump[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset scrolloff=2[?25l[1;1H:so small.vim[1;14H[K[2;1H:set noscrollbind
:set scrollopt=ver,jump[4;6Hscrolloff=2[4;17H[K[5;6Hnowrap[5;12H[K[6;6Hnoequalalways[7;6Hsplitbelow
:" TEST using two windows open to one buffer, one extra empty window
:split[9;7H[K[10;2Hnew[10;5H[K[11;1H[34m^W[mt:[11;5H[K[12;2Hresize 8
/^start of window 1$/
zt:[14;4H[K[15;1H:set scrollb[15;16H[K[16;1H[34m^W[mj:
:resize 7[17;10H[K[18;1H/^start of window 2$/
zt:[19;4H[K[20;1H:set scrollb[20;16H[K[21;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:[24;19Hup[24;21H[K[25;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:[26;9Hhorizontal scrolling
:set scrollopt+=hor[27;20H[K[28;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[30;20H[K[31;1H:" ****** tests using two different buffers *****
[34m^W[mt[34m^W[mj:[32;8H[K[33;2Hclose[33;7H[K[34;4H:[34;5H[K[35;2Hset noscrollbind
:/^start of window 2$/,/^end of window 2$/y
:new[37;6H[K[38;1H[34m^W[mt[34m^W[mj4"zpGp:[38;14H[K[39;1H[34m^W[mt/^start of window 1$/
zt:[40;4H[K[41;1H:set scrollbind[41;16H[K[42;1H[34m^W[mj:
/^start of window 2$/
zt:[44;4H[K[45;1H:set scrollb[45;16H[K[46;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:[49;19Hup[49;21H[K[50;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:[51;9Hhorizontal scrolling
:set scrollopt+=hor[52;20H[K[53;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[55;20H[K[56;1H:" TEST syncbind[56;17H[K[57;1H[34m^W[mt:set noscb[57;14H[K[58;1HggL[34m^W[mj:set noscb
ggL:set scb[59;12H[K[60;1H[34m^W[mt:set scb[60;12H[K[61;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[63;14H[K[64;1HggL[34m^W[mj:set noscb[64;17H[K[65;1HggL:set scb[65;12H[K[66;1H[34m^W[mt:set scb[66;12H[K[67;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:[69;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![72;5H[K[73;1HENDTEST[73;8H[K[74;1H[K[75;1H[K[76;1Hstart of window 1[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nowrap[?25l[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noequalalways[?25l[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset splitbelow[?25l[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST using two windows open to one buffer, one extra empty window[?25l[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsplit[?25l[1;1H[34m^W[mt/^start of window 1$/
zt:[2;4H[K[3;12Hbind[3;16H[K[4;1H[34m^W[mj:[4;6H[K[5;1H/^start of window 2$/
zt:[6;4H[K[7;7Hcrollbind
:" -- start of tests --[8;24H[K[9;2H" 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:[16;3Hk10jH7zhg0y$[34m^W[mbp"zpG[34m^W[mtHg0y$[34m^W[mbp"zpG:
:set scrollopt-=hor
:" TEST syncbind[18;17H[K[19;1H[34m^W[mt:set noscb
ggL[34m^W[mj:set noscb
ggL:set scb[21;13H[K[22;1H[34m^W[mt:set scb[22;12H[K[23;1HG[34m^W[mjG:syncbind[23;15H[K[24;1HHk[34m^W[mtH[34m^W[mjHyy[34m^W[mbp[34m^W[mtyy[34m^W[mbp:[25;4H:set noscb[25;14H[K[26;1HggL[34m^W[mj:set noscb[26;17H[K[27;1HggL:set scb[27;12H[K[28;1H[34m^W[mt:set scb[28;12H[K[29;3HtG[34m^W[mjG[34m^W[mt:syncbind[29;21H[K[30;1HHk[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:[31;34H[K[32;1H:" ***** done with tests *****
:w! test.out[13C" Write contents of this file
:qa!
ENDTEST[35;8H[K[36;1H[K[37;1H[K[38;1H[7mtest37.in                                                                                              [m[39;1H:qa![39;5H[K[40;1HENDTEST[41;1H[K[42;1H[K[43;1Hstart of window 1[43;19H[K[44;1H. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03
. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04
. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[48;50H[K[49;1H. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
. line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07[50;50H[K[51;1H. line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08
. 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[60;1H[K[61;1H[K[62;1Hstart of window 2[62;18H[K[63;1H. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03
. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09[71;51H[K[72;1H. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13
[1m[7mtest37.in                                                                                              [41;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hnew[?25l[57;1H[7mtest37.in                                                                                              [m[58;1H[K[59;1H[1m[34m~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [m[76;1H[1m[7m[No Name] [58;1H[?12l[?25h[?25l[1;37r[m[37;1H
[1;77r[37;1Hstart of window 1
[1m[7mtest37.in                                                                                              [m[76;1H[7m[No Name][m[1m[7m [m[7m                                                                                              [m[77;1H[K[35;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[35;1H[?12l[?25h[?25l[77;1H[K[77;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 *****
:w! test.out[13C" Write contents of this file
:qa![4;5H[K[5;1HENDTEST[6;1H[K[7;1H[K[8;1Hstart of window 1[8;19H[K[9;1H[1m[7mtest37.in                                                                                              [m[10;2Hw! test.out             " Write contents of this file
:qa![11;5H[K[12;1HEND[12;9H[K[13;1H[K[14;1H[K[15;1Hstart of window 1[15;18H[K[16;1H. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03
. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04
. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05
. line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06
. line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07
. line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08
. line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09
. line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10
. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11
. line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12
. line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13
. line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14
. line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15
end of window 1[31;16H[K[32;1H[K[33;1H[K[34;1Hstart of window 2
. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02
. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03
. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04[38;50H[K[39;1H. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09[44;8H10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10[45;8H11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[46;8H12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12[47;8H13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13[48;8H14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[49;8H15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15[50;8H16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
end of window 2[51;16H[K[52;1H[K[53;1Hend of test37.in (please don't delete this line)[53;49H[K[54;1H[1m[34m~                                                                                                      [55;1H~                                                                                                      [56;1H~                                                                                                      [6;1H[?12l[?25h[?25l[m[77;1H[K[77;1H/[?12l[?25h^start of window 1$/[?25l[77;21H[K[77;1H[1;8r[1;1H[2M[1;77r[7;1H. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[77;1H[K[6;1H[?12l[?25h[?25l[1;8r[1;1H[3M[1;77r[6;1H. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03
. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04
. line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset scrollbind[?25l[3;1H[?12l[?25h[9;1H[7mtest37.in[m[1m[7m [m[7m                                                                                              [m[57;1H[1m[7mtest37.in                                                                                              [13;1H[?25l[m[77;1H[K[77;1H:[?12l[?25h[?25l[13;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hresize 7[?25l[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~                                                                                                      [46;1H~                                                                                                      [47;1H~                                                                                                      [48;1H~                                                                                                      [49;1H~                                                                                                      [50;1H~                                                                                                      [51;1H~                                                                                                      [52;1H~                                                                                                      [53;1H~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [13;1H[?12l[?25h[?25l[m[77;1H[K[77;1H/[?12l[?25h^start of window 2$/[?25l[77;21H[K[77;1H[10;1Hend of window 1[10;26H[K[11;1H[K[12;1H[K[13;1Hstart of window 2
. line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01
. line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02[16;9H3 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03[13;1H[?12l[?25h[?25l[10;16r[16;1H
[1;77r[16;1H. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04[77;1H[K[12;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset scrollbind[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" -- start of tests --[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST scrolling down[?25l[12;1H[?12l[?25h

[?25l[1;8r[1;1H[5M[1;77r[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;77r[12;1H. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09[77;1H[K[14;1H[?12l[?25h[12;1H[17;1H[7mtest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name]                                                                                              [18;1H[?25l[m
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[19;50H[K[76;11H[1m[7m[+][19;1H[?12l[?25h[?25l[m0[?12l[?25h[9;1H[1m[7mtest37.in                                                                                              [m[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[9;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H


[?25l[1;8r[m[1;1H[6M[1;77r[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;77r[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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [12;1H[17;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name] [+]                                                                                          [21;1H[?25l[m
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[22;50H[K[22;1H[?12l[?25h[?25l3[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[22;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST scrolling up[?25l[22;1H[?12l[?25h[9;1H[1m[7mtest37.in                                                                                              [m[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[?25l[1;8r[m[1;1H[5L[1;77r[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[77;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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [12;1H[17;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [12;1H[?25l[1;8r[m[1;1H[4L[1;77r[1;1Hstart of window 1
. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03[10;16r[10;1H[4L[1;77r[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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[9;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name] [+]                                                                                          [25;1H[?25l[m
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[26;50H[K[26;1H[?12l[?25h[?25l7[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[26;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST horizontal scrolling[?25l[26;1H[?12l[?25h[?25l[77;1H[K[77;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[76;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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [12;1H[17;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name] [+]                                                                                          [28;1H[?25l[mUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l[29;1H[K[29;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[?25l[29;1H[?12l[?25h[17;1H[1m[7mtest37.in                                                                                              [m[76;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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;16H[9;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name] [+]                                                                                          [30;1H[?25l[m. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h[?25l[31;1H[K[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset scrollopt-=hor[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" ****** tests using two different buffers *****[?25l[31;1H[?12l[?25h[9;1H[1m[7mtest37.in                                                                                              [m[76;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[77;1H[K[77;1H:[?12l[?25h[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noscrollbind[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of window 2$/,/^end of window 2$/y[?25l18 lines yanked[77;16H[K[3;1H[?12l[?25h[?25l[77;1H[K[77;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[77;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[77;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[77;1H[K[77;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[77;1H[K[77;1H/[?12l[?25h^start of window 1$/[?25l[77;21H[K[77;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;77r[7;1H. line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h[?25l[14;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^start of window 2$/[?25l[77;21H[K[77;1H[31msearch hit BOTTOM, continuing at TOP[14;1H[?12l[?25h[?25l[9;16r[m[9;1H[3M[1;77r[14;1H. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03
. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[77;1H[K[11;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset scrollbind[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" -- start of tests --[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST scrolling down[?25l[11;1H[?12l[?25h


[?25l[1;7r[1;1H[5M[1;77r[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;77r[12;1H. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08
. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09
. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10[77;1H[K[14;1H[?12l[?25h[11;1H[17;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [m[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H

[?25l[1;7r[m[1;1H[6M[1;77r[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;77r[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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [11;1H[17;1H[No Name] [+][m[1m[7m [m[7m                                                                                          [m[76;1H[1m[7m[No Name] [+]                                                                                          [34;1H[?25l[m
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[35;50H[K[35;1H[?12l[?25h[?25l3[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[35;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST scrolling up[?25l[35;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                              [m[76;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;77r[9;1H. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04
. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05
. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06
. line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07
. line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08[77;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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [11;1H[17;1H[No Name] [+][m[1m[7m [m[7m                                                                                          [m[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [11;1H[?25l[1;7r[m[1;1H[4L[1;77r[1;1Hstart of window 1
. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02
. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03[9;16r[9;1H[4L[1;77r[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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name] [+]                                                                                          [38;1H[?25l[m
. line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[39;50H[K[39;1H[?12l[?25h[?25l7[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST horizontal scrolling[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;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[76;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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [11;1H[17;1H[No Name] [+][m[1m[7m [m[7m                                                                                          [m[76;1H[1m[7m[No Name] [+]                                                                                          [41;1H[?25l[mUTSRQPONMLKJIHGREDCBA9876543210 02[?12l[?25h[?25l[42;1H[K[42;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[?25l[42;1H[?12l[?25h[17;1H[1m[7m[No Name] [+]                                                                                          [m[76;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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;16H[8;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name] [+]                                                                                          [43;1H[?25l[m. line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11[?12l[?25h[?25l[44;1H[K[44;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[?25l[44;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset scrollopt-=hor[?25l[44;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" TEST syncbind[?25l[44;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                              [m[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[?25l[m[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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;77r[9;1H. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[17;1H[1m[7m[No Name] [+]                                                                                          [m[77;1H[K[11;1H[?12l[?25h[?25l[77;1H:[?12l[?25hsyncbind[?25l[11;1H[?12l[?25h[?25l[1;7r[1;1H[L[1;77r[1;1H/^start of window 2$/[9;16r[9;1H[L[1;77r[9;1H. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[77;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[76;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[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[8;1Htest37.in[m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7m[No Name] [+]                                                                                          [45;1H[?25l[m
:set scrollbind[46;16H[K[46;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[46;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                              [m[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[?25l[m[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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;77r[9;1H. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[17;1H[1m[7m[No Name] [+]                                                                                          [m[77;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[77;1H[m:[?12l[?25hsyncbind[?25l[5;1H[?12l[?25h[3;1H[?25l[1;7r[1;1H[L[1;77r[1;1H/^start of window 2$/[9;16r[9;1H[2L[1;77r[9;1H. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13
. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14[77;1H[K[3;1H[?12l[?25h[?25l[1;7r[1;1H[L[1;77r[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[76;1H[1m[7m[No Name] [+]                                                                                          [46;1H[?25l[m
zt:[47;4H[K[47;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                              [m[76;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[76;1H[1m[7m[No Name] [+]                                                                                          [47;1H[?25l[m
. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15[48;50H[K[48;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[48;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                              [m[76;1H[7m[No Name] [+][m[1m[7m [m[7m                                                                                          [3;1H[?25l[1;7r[m[1;1H[4L[1;77r[1;1H/^start of window 1$/
zt:
:set scrollbind
[34m^W[mj:[9;16r[9;1H[4L[1;77r[9;1H. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09
. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12[77;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[76;1H[1m[7m[No Name] [+]                                                                                          [48;1H[?25l[m
:set scrollbind[49;16H[K[49;1H[?12l[?25h[8;1H[1m[7mtest37.in                                                                                              [m[76;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[76;1H[1m[7m[No Name] [+]                                                                                          [49;1H[?25l[m
. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11[50;50H[K[50;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[?25l[50;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" ***** done with tests *****[?25l[50;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! test.out             " Write contents of this file[?25l"test.out" [77;12H[K[77;12H[New File] 33 lines, 1329 characters written[76;1H[1m[7mtest.out]      [50;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test38.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 29 lines, 407 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[34;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[35;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[35;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" make sure that backspace works, no matter what termcap is used[?25l[35;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset t_kD=^[34m^?[m t_kb=^[34m^H[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;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[77;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[77;1H[K[77;1H:[?12l[?25hset ai[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h[?25l[13;1H[?12l[?25h[?25labcdefghijklmnopqrst[?12l[?25h[?25lAB      IJKLMNO QR[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hwq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 13 lines, 107 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test39.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 31 lines, 740 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[37;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[38;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[38;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso mbyte.vim[?25l[38;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" This only works when 'encoding' is "latin1", don't depend on the environment[?25l[38;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset enc=latin1[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [38;1H[?12l[?25h[?25l[77;1H[m/[?12l[?25h^abcde[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H3 lines >ed 1 time[77;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[77;1H[K[77;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[77;1H3 lines <ed 1 time[77;20H[K[41;9Hef    [42;9Hefghijklm[42;18H[K[43;9Hi[41;9H[?12l[?25h[42;9H[?25l[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h$-4,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 5 lines, 108 characters written[41;14H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h" gUfx must uppercase until x, inclusive.[?25l[45;5H[?12l[?25h[?25l[45;76r[45;1H[L[1;77r[45;1H- youßtußexu -[77;1H[K[45;14H[?12l[?25h- y[?25lOUSSTUSSEXu -- y[?12l[?25h
the[?25l[77;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[77;1H[K[77;1H:[?12l[?25h" same, when it's the last line in the buffer[?25l[47;1H[?12l[?25h[?25l[47;76r[47;1H[L[1;77r[47;1Hthe youtußeuu end[77;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;76r[m[47;1H[L[1;77r[47;1H111THE YOUTUSSEUU END[?12l[?25h
[?25l[77;1H:[?12l[?25h" Uppercase two lines[?25l[48;1H[?12l[?25h[?25l[48;76r[48;1H[2L[1;77r[48;1Hblah di
doh dut[77;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[77;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[77;1H[K[77;1H:[?12l[?25h/^the/,$w >> test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H8 lines, 136 characters appended[50;10H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test40.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test40.in" 63 lines, 1521 characters[1;1HTest for "*Cmd" autocommands

STARTTEST
:so small.vim
:/^start/,$w! Xxx[15C" write lines below to Xxx
:au BufReadCmd testA 0r Xxx|$del
:e testA[24C" will read text of Xxd instead
:au BufWriteCmd testA call append(line("$"), "write")
:w[30C" will append a line to the file
:r testA[24C" 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 testB '[r Xxx
:2r testB[23C" 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 testC '[,']copy $
4GA1[34m^[[m
:4,5w testC[21C" will copy lines 4 and 5 to the end
:r testC[24C" 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 testD '[,']w! test.out
:w >>testD[22C" will write all lines to test.out
:$r testD[23C" should not read anything
:$w >>test.out[18C" append "end of Xxx" to test.out
:au BufReadCmd testE 0r test.out|$del
:sp testE[23C" split window with test.out
5Goasdf[34m^[^W^W[m:"
:au BufWriteCmd testE 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

start of Xxx[62;9Htest40
end of Xxx
[1m[34m~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for "*Cmd" autocommands[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 55 lines, 1440 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[59;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[60;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[60;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start/,$w! Xxx[34m^I^I[m" write lines below to Xxx[?25l"Xxx" [77;7H[K[77;7H[New File] 3 lines, 32 characters written[60;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufReadCmd testA 0r Xxx|$del[?25l[60;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he testA[34m^I^I^I[m" will read text of Xxd instead[?25l"Xxx" [77;7H[K[77;7H3 lines, 32 characters[1;1Hstart of Xxx[1;13H[K[2;9Htest40
end 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~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [3;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hau BufWriteCmd testA call append(line("$"), "write")[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hr testA[34m^I^I^I[m" should not read anything[?25l[1m[37m[41mE484: Can't open file testA[m[77;28H[K[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" now we have:[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mend of Xxx[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I[mwrite[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FileReadCmd testB '[r Xxx[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h2r testB[34m^I^I^I[m" will read Xxx below line 2 instead[?25l"Xxx" [77;7H[K[77;7H3 lines, 32 characters[3;76r[3;1H[3L[1;77r[3;1Hstart of Xxx[4;9Htest40
end of Xxx[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mstart of Xxx[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I^I[mtest40[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 5[34m^I[mend of Xxx[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 6[34m^I[mend of Xxx[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 7[34m^I[mwrite[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FileWriteCmd testC '[,']copy $[?25l[3;1H[?12l[?25h[4;9H[?25ltest401[?12l[?25h[5;10H[?25l[77;1H[K[77;1H:[?12l[?25h4,5w testC[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[77;1H[K[77;1H:[?12l[?25hr testC[34m^I^I^I[m" should not read anything[?25l[1m[37m[41mE484: Can't open file testC[m[77;28H[K[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mstart of Xxx[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I^I[mtest401[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 5[34m^I[mend of Xxx[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 6[34m^I[mend of Xxx[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 7[34m^I[mwrite[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 8[34m^I^I[mtest401[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 9[34m^I[mend of Xxx[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau FILEAppendCmd testD '[,']w! test.out[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>testD[34m^I^I^I[m" will write all lines to test.out[?25l"test.out" [77;12H[K[77;12H[New File] 9 lines, 91 characters written[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r testD[34m^I^I^I[m" should not read anything[?25l[1m[37m[41mE484: Can't open file testD[m[77;29H[K[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$w >>test.out[34m^I^I^I[m" append "end of Xxx" to test.out[?25l"test.out" [77;12H[K[77;12H1 line, 11 characters appended[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufReadCmd testE 0r test.out|$del[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsp testE[34m^I^I^I[m" split window with test.out[?25l"test.out" [77;12H[K[77;12H10 lines, 102 characters[10;1Hend of Xxx[10;11H[K[38;1H[1m[7mtestE                                                                                                  [m[39;1Hend of Xxx[39;11H[K[40;1Hend of Xxx[40;11H[K[41;1Hwrite[41;6H[K[42;1H        test401[42;16H[K[43;1Hend of Xxx[43;11H[K[76;1H[7mtestA                                                                                                  [10;1H[?12l[?25h[5;1H[?25l[6;37r[m[6;1H[L[1;77r[6;1Hasdf[38;7H[1m[7m[+][m[77;1H[K[6;4H[?12l[?25h[38;1H[7mtestE [+][m[1m[7m [m[7m                                                                                              [m[76;1H[1m[7mtestA                                                                                                  [43;1H[?25l[77;1H[m:[?12l[?25h"[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufWriteCmd testE w! test.out[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hwall[34m^I^I^I^I[m" will write other window to test.out[?25l"test.out" [77;12H[K[77;12H11 lines, 107 characters written[38;7H[7m   [43;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 1[34m^I[mstart of Xxx[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 2[34m^I^I[mtest40[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 3[34m^I[mstart of Xxx[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 4[34m^I^I[mtest401[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 5[34m^I[mend of Xxx[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 6[34m^I[masdf[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 7[34m^I[mend of Xxx[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 8[34m^I[mwrite[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 9[34m^I^I[mtest401[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 10[34m^I[mend of Xxx[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h[34m^I^I^I^I[m" 11[34m^I[mend of Xxx[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test41.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for writing and reading a file of over 100 Kbyte[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[9;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 13 lines, 196 characters written[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[10;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[23;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[24;1H[?12l[?25h[?25l[77;1H[K[77;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[77;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[77;1H3000 more lines[77;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[60;1HThis is the trailer[60;20H[K[61;1HThis is the trailer[61;20H[K[62;1HThis is the trailer[62;20H[K[63;1HThis is the trailer[63;20H[K[64;1HThis is the trailer[64;20H[K[65;1HThis is the trailer[65;20H[K[66;1HThis is the trailer[66;20H[K[67;1HThis is the trailer[67;20H[K[68;1HThis is the trailer[68;20H[K[69;1HThis is the trailer[69;20H[K[70;1HThis is the trailer[70;20H[K[71;1HThis is the trailer[71;20H[K[72;1HThis is the trailer[72;20H[K[73;1HThis is the trailer[73;20H[K[74;1HThis is the trailer[74;20H[K[75;1HThis is the trailer[75;20H[K[76;1HThis is the trailer[76;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[60;13Hleader[60;19H[K[61;13Hleader[61;19H[K[62;13Hleader[62;19H[K[63;13Hleader[63;19H[K[64;13Hleader[64;19H[K[65;13Hleader[65;19H[K[66;13Hleader[66;19H[K[67;13Hleader[67;19H[K[68;13Hleader[68;19H[K[69;13Hleader[69;19H[K[70;13Hleader[70;19H[K[71;13Hleader[71;19H[K[72;13Hleader[72;19H[K[73;13Hleader[73;19H[K[74;13Hleader[74;19H[K[75;13Hleader[75;19H[K[76;13Hleader[76;19H[K[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest[?25l"Xtest" [77;9H[K[77;9H[New File] 6005 lines, 117092 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest[?25l"Xtest" [77;9H[K[77;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[60;1HThis is the leader[60;19H[K[61;1HThis is the leader[61;19H[K[62;1HThis is the leader[62;19H[K[63;1HThis is the leader[63;19H[K[64;1HThis is the leader[64;19H[K[65;1HThis is the leader[65;19H[K[66;1HThis is the leader[66;19H[K[67;1HThis is the leader[67;19H[K[68;1HThis is the leader[68;19H[K[69;1HThis is the leader[69;19H[K[70;1HThis is the leader[70;19H[K[71;1HThis is the leader[71;19H[K[72;1HThis is the leader[72;19H[K[73;1HThis is the leader[73;19H[K[74;1HThis is the leader[74;19H[K[75;1HThis is the leader[75;19H[K[76;1HThis is the leader[76;19H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 18 characters written[1;1H[?12l[?25h[?25l[27m[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 leader
This is the leader
This is the leader
This is the leader
This is the leader
This is the leader
This is the leader
This is the leader
This is the middle
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer
This is the trailer[38;1H[?12l[?25h[?25l[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 19 characters appended[38;1H[?12l[?25h[?25l[27m[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 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" [77;12H[K[77;12H1 line, 16 characters appended[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test42.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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
:w! Xtest2x
:"
:" --- Check ucs-2
:e! Xtest3
:redir >>test.out
:set fileencoding bomb?
:redir END
:set fenc=latin-1
:w >>test.out
:set fenc=ucs-2
:w! Xtest3x
:"
:" --- Check ucs-2le
:e! Xtest4
:redir >>test.out
:set fileencoding bomb?
:redir END[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for writing and reading a file starting with a BOM[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 111 lines, 2116 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[39M[1;77r[38;1H: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[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso mbyte.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset encoding=utf-8[?25l[27m[m[H[2J[1;1H:"
:" --- Check utf-8
:e! Xtest1
:redir >>test.out
:set fileencoding bomb?
:redir END
:set fenc=latin-1
:w >>test.out
:set fenc=utf-8
:w! Xtest1x
:"
:" --- Check utf-8 with an error (will fall back to latin-1)
:e! Xtest2
:redir >>test.out
:set fileencoding bomb?
:redir END
:set fenc=latin-1
:w >>test.out
:set fenc=utf-8
:w! Xtest2x
:"
:" --- Check ucs-2
:e! Xtest3
:redir >>test.out
:set fileencoding bomb?
:redir END
:set fenc=latin-1
:w >>test.out
:set fenc=ucs-2
:w! Xtest3x
:"
:" --- Check ucs-2le
:e! Xtest4
:redir >>test.out
:set fileencoding bomb?
:redir END
:set fenc=latin-1
:w >>test.out
:set fenc=ucs-2le
:w! Xtest4x
:"
:" --- Check ucs-4
:e! Xtest5
:redir >>test.out
:set fileencoding bomb?
:redir END
:set fenc=latin-1
:w >>test.out
:set fenc=ucs-4
:w! Xtest5x
:"
:" --- Check ucs-4le
:e! Xtest6
:redir >>test.out
:set fileencoding bomb?
:redir END
:set fenc=latin-1
:w >>test.out
:set fenc=ucs-4le
:w! Xtest6x
:"
:" --- Check the files written with BOM
:set bin
:e! test.out
:$r Xtest0x
:$r Xtest1x
:$r Xtest2x
:$r Xtest3x
:$r Xtest4x
:$r Xtest5x
:$r Xtest6x
:set nobin ff&[14C " Write the file in default format
:w! test.out
:qa!
ENDTEST
[?12l[?25h[?25l
:[?12l[?25hset fileencodings=ucs-bom,latin-1[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ff=unix ffs=unix           " This changes the file for DOS and MAC[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Write the test files[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^latin-1$/+1w! Xtest0[?25l"Xtest0" [77;10H[K[77;10H[New File] 1 line, 10 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^utf-8$/+1w! Xtest1[?25l"Xtest1" [77;10H[K[77;10H[New File] 1 line, 9 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^utf-8-err$/+1w! Xtest2[?25l"Xtest2" [77;10H[K[77;10H[New File] 1 line, 13 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^ucs-2$/+1w! Xtest3[?25l"Xtest3" [77;10H[K[77;10H[New File] 1 line, 14 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^ucs-2le$/+1w! Xtest4[?25l"Xtest4" [77;10H[K[77;10H[New File] 1 line, 17 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Need to add a NUL byte after the NL byte[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset bin[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest4                      " Ignore change from setting 'ff'[?25l"Xtest4" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h
[?25l[m[34m^@[m[2;3H[K[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noeol[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"Xtest4" [Incomplete last line] 2 lines, 18 characters written[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ffs& nobinary              " Allow default test42.in format[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he #[?25l"test42.in" [converted] 130 lines, 2385 characters[1;1H:set fileencoding bomb?[1;24H[K[2;1H:redir END
:set fenc=latin-1[3;18H[K[4;1H:w >>test.out[4;14H[K[5;1H:set fenc=utf-8[5;16H[K[6;1H:w! Xtest2x[6;12H[K[7;1H:"[7;3H[K[8;1H:" --- Check ucs-2[8;19H[K[9;1H:e! Xtest3[9;11H[K[10;1H:redir >>test.out[10;18H[K[11;1H:set fileencoding bomb?[11;24H[K[12;1H:redir END[12;11H[K[13;1H:set fenc=latin-1[13;18H[K[14;1H:w >>test.out[14;14H[K[15;1H:set fenc=ucs-2[15;16H[K[16;1H:w! Xtest3x[16;12H[K[17;1H:"[17;3H[K[18;1H:" --- Check ucs-2le[18;21H[K[19;1H:e! Xtest4[19;11H[K[20;1H:redir >>test.out[20;18H[K[21;1H:set fileencoding bomb?[21;24H[K[22;1H:redir END[22;11H[K[23;1H:set fenc=latin-1[23;18H[K[24;1H:w >>test.out[24;14H[K[25;1H:set fenc=ucs-2le[25;18H[K[26;1H:w! Xtest4x[26;12H[K[27;1H:"[27;3H[K[28;1H:" --- Check ucs-4[28;19H[K[29;1H:e! Xtest5[29;11H[K[30;1H:redir >>test.out[30;18H[K[31;1H:set fileencoding bomb?[31;24H[K[32;1H:redir END[32;11H[K[33;1H:set fenc=latin-1[33;18H[K[34;1H:w >>test.out[34;14H[K[35;1H:set fenc=ucs-4[35;16H[K[36;1H:w! Xtest5x[36;12H[K[37;1H:"[37;3H[K[38;1H:" --- Check ucs-4le[38;21H[K[39;1H:e! Xtest6[39;11H[K[40;1H:redir >>test.out[40;18H[K[41;1H:set fileencoding bomb?[41;24H[K[42;1H:redir END[42;11H[K[43;1H:set fenc=latin-1[43;18H[K[44;1H:w >>test.out[44;14H[K[45;1H:set fenc=ucs-4le[45;18H[K[46;1H:w! Xtest6x[46;12H[K[47;1H:"[47;3H[K[48;1H:" --- Check the files written with BOM[48;40H[K[49;1H:set bin[49;9H[K[50;1H:e! test.out[50;13H[K[51;1H:$r Xtest0x[51;12H[K[52;1H:$r Xtest1x[52;12H[K[53;1H:$r Xtest2x[53;12H[K[54;1H:$r Xtest3x[54;12H[K[55;1H:$r Xtest4x[55;12H[K[56;1H:$r Xtest5x[56;12H[K[57;1H:$r Xtest6x[57;12H[K[58;1H:set nobin ff&               " Write the file in default format[58;64H[K[59;1H:w! test.out[59;13H[K[60;1H:qa![60;5H[K[61;1HENDTEST[61;8H[K[62;1H[K[63;1Hlatin-1[63;8H[K[64;1HÃ¾Ã¾latin-1[64;10H[K[65;1Hutf-8[65;6H[K[66;1HÃ¯Â»Â¿utf-8[66;9H[K[67;1Hutf-8-err[67;10H[K[68;1HÃ¯Â»Â¿utf-8[34m<80>[merr[68;16H[K[69;1Hucs-2[69;6H[K[70;1HÃ¾Ã¿[34m^@[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[m[70;20H[K[71;1Hucs-2le[71;8H[K[72;1HÃ¿Ã¾u[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m[72;24H[K[73;1Hucs-4[73;6H[K[74;1H[34m^@^@[mÃ¾Ã¿[34m^@^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[m[74;48H[K[75;1Hucs-4le[75;8H[K[76;1HÃ¿Ã¾[34m^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[m[76;56H[K[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ff=unix                    " Format for files to write[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^ucs-4$/+1w! Xtest5[?25l"Xtest5" [77;10H[K[77;10H[converted][New File] 1 line, 30 characters written[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^ucs-4le$/+1w! Xtest6[?25l"Xtest6" [77;10H[K[77;10H[converted][New File] 1 line, 35 characters written[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Need to add three NUL bytes after the NL byte[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset bin[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest6                      " ! for when setting 'ff' is a change[?25l"Xtest6" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h
~   [?25l[m[34m^@^@^@[m[2;7H[K[2;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noeol[?25l[2;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"Xtest6" [Incomplete last line] 2 lines, 36 characters written[2;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nobin[?25l[2;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he #[?25l"test42.in" [converted] 130 lines, 2385 characters[1;1H:set fileencoding bomb?[1;24H[K[2;1H:redir END
:set fenc=latin-1[3;18H[K[4;1H:w >>test.out[4;14H[K[5;1H:set fenc=utf-8[5;16H[K[6;1H:w! Xtest2x[6;12H[K[7;1H:"[7;3H[K[8;1H:" --- Check ucs-2[8;19H[K[9;1H:e! Xtest3[9;11H[K[10;1H:redir >>test.out[10;18H[K[11;1H:set fileencoding bomb?[11;24H[K[12;1H:redir END[12;11H[K[13;1H:set fenc=latin-1[13;18H[K[14;1H:w >>test.out[14;14H[K[15;1H:set fenc=ucs-2[15;16H[K[16;1H:w! Xtest3x[16;12H[K[17;1H:"[17;3H[K[18;1H:" --- Check ucs-2le[18;21H[K[19;1H:e! Xtest4[19;11H[K[20;1H:redir >>test.out[20;18H[K[21;1H:set fileencoding bomb?[21;24H[K[22;1H:redir END[22;11H[K[23;1H:set fenc=latin-1[23;18H[K[24;1H:w >>test.out[24;14H[K[25;1H:set fenc=ucs-2le[25;18H[K[26;1H:w! Xtest4x[26;12H[K[27;1H:"[27;3H[K[28;1H:" --- Check ucs-4[28;19H[K[29;1H:e! Xtest5[29;11H[K[30;1H:redir >>test.out[30;18H[K[31;1H:set fileencoding bomb?[31;24H[K[32;1H:redir END[32;11H[K[33;1H:set fenc=latin-1[33;18H[K[34;1H:w >>test.out[34;14H[K[35;1H:set fenc=ucs-4[35;16H[K[36;1H:w! Xtest5x[36;12H[K[37;1H:"[37;3H[K[38;1H:" --- Check ucs-4le[38;21H[K[39;1H:e! Xtest6[39;11H[K[40;1H:redir >>test.out[40;18H[K[41;1H:set fileencoding bomb?[41;24H[K[42;1H:redir END[42;11H[K[43;1H:set fenc=latin-1[43;18H[K[44;1H:w >>test.out[44;14H[K[45;1H:set fenc=ucs-4le[45;18H[K[46;1H:w! Xtest6x[46;12H[K[47;1H:"[47;3H[K[48;1H:" --- Check the files written with BOM[48;40H[K[49;1H:set bin[49;9H[K[50;1H:e! test.out[50;13H[K[51;1H:$r Xtest0x[51;12H[K[52;1H:$r Xtest1x[52;12H[K[53;1H:$r Xtest2x[53;12H[K[54;1H:$r Xtest3x[54;12H[K[55;1H:$r Xtest4x[55;12H[K[56;1H:$r Xtest5x[56;12H[K[57;1H:$r Xtest6x[57;12H[K[58;1H:set nobin ff&               " Write the file in default format[58;64H[K[59;1H:w! test.out[59;13H[K[60;1H:qa![60;5H[K[61;1HENDTEST[61;8H[K[62;1H[K[63;1Hlatin-1[63;8H[K[64;1HÃ¾Ã¾latin-1[64;10H[K[65;1Hutf-8[65;6H[K[66;1HÃ¯Â»Â¿utf-8[66;9H[K[67;1Hutf-8-err[67;10H[K[68;1HÃ¯Â»Â¿utf-8[34m<80>[merr[68;16H[K[69;1Hucs-2[69;6H[K[70;1HÃ¾Ã¿[34m^@[mu[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[m[70;20H[K[71;1Hucs-2le[71;8H[K[72;1HÃ¿Ã¾u[34m^@[mc[34m^@[ms[34m^@[m-[34m^@[m2[34m^@[ml[34m^@[me[34m^@[m[72;24H[K[73;1Hucs-4[73;6H[K[74;1H[34m^@^@[mÃ¾Ã¿[34m^@^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[m[74;48H[K[75;1Hucs-4le[75;8H[K[76;1HÃ¿Ã¾[34m^@^@[mu[34m^@^@^@[mc[34m^@^@^@[ms[34m^@^@^@[m-[34m^@^@^@[m4[34m^@^@^@[ml[34m^@^@^@[me[34m^@^@^@[m[76;56H[K[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check that editing a latin-1 file doesn't see a BOM[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest0[?25l"Xtest0" [77;10H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir! >test.out[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileencoding bomb?[?25l[77;1H[K[77;1H  fileencoding=latin1
nobomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1HÃ¾Ã¾latin-1
[1m[34m~                                                                                                      [m[77;3H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H[converted] 1 line, 12 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset bomb fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest0x[?25l"Xtest0x" [77;11H[K[77;11H[converted][New File] 1 line, 12 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check utf-8[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest1[?25l"Xtest1" [77;10H[K[77;10H1 line, 9 characters[1;1Hutf-8[1;6H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileencoding bomb?[?25l[77;1H[K[77;1H  fileencoding=utf-8
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hutf-8
[1m[34m~                                                                                                      [m[77;3H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H[converted] 1 line, 6 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fenc=utf-8[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest1x[?25l"Xtest1x" [77;11H[K[77;11H[New File] 1 line, 9 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check utf-8 with an error (will fall back to latin-1)[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest2[?25l"Xtest2" [77;10H[K[77;10H[converted] 1 line, 17 characters[1;1HÃ¯Â»Â¿utf-8[34m<80>[merr[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileencoding bomb?[?25l[77;1H[K[77;1H  fileencoding=latin1
nobomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1HÃ¯Â»Â¿utf-8[34m<80>[merr
[1m[34m~                                                                                                      [m[77;3H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H[converted] 1 line, 17 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fenc=utf-8[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest2x[?25l"Xtest2x" [77;11H[K[77;11H[New File] 1 line, 17 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check ucs-2[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest3[?25l"Xtest3" [77;10H[K[77;10H[converted] 1 line, 8 characters[1;1Hucs-2[1;6H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileencoding bomb?[?25l[77;1H[K[77;1H  fileencoding=utf-16
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-2
[1m[34m~                                                                                                      [m[77;3H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H[converted] 1 line, 6 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fenc=ucs-2[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest3x[?25l"Xtest3x" [77;11H[K[77;11H[converted][New File] 1 line, 8 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check ucs-2le[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest4[?25l"Xtest4" [77;10H[K[77;10H[converted] 1 line, 10 characters[1;5H2le[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileencoding bomb?[?25l[77;1H[K[77;1H  fileencoding=utf-16le
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-2le
[1m[34m~                                                                                                      [m[77;3H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H[converted] 1 line, 8 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fenc=ucs-2le[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest4x[?25l"Xtest4x" [77;11H[K[77;11H[converted][New File] 1 line, 10 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check ucs-4[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest5[?25l"Xtest5" [77;10H[K[77;10H[converted] 1 line, 10 characters[1;4H-4[1;6H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileencoding bomb?[?25l[77;1H[K[77;1H  fileencoding=ucs-4
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-4
[1m[34m~                                                                                                      [m[77;3H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H[converted] 1 line, 6 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fenc=ucs-4[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest5x[?25l"Xtest5x" [77;11H[K[77;11H[converted][New File] 1 line, 10 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check ucs-4le[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtest6[?25l"Xtest6" [77;10H[K[77;10H[converted] 1 line, 12 characters[1;5H4le[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir >>test.out[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fileencoding bomb?[?25l[77;1H[K[77;1H  fileencoding=ucs-4le
  bomb
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[2L[1;1Hucs-4le
[1m[34m~                                                                                                      [m[77;3H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=latin-1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H[converted] 1 line, 8 characters appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fenc=ucs-4le[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtest6x[?25l"Xtest6x" [77;11H[K[77;11H[converted][New File] 1 line, 12 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check the files written with BOM[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset bin[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! test.out[?25l"test.out" [77;12H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r Xtest0x[?25l"Xtest0x" [77;11H[K[77;11H1 line, 10 characters[36;1H[34m<fe><fe>[mlatin-1[36;16H[K[36;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r Xtest1x[?25l"Xtest1x" [77;11H[K[77;11H1 line, 9 characters[37;1H[34m<feff>[mutf-8[37;12H[K[37;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r Xtest2x[?25l"Xtest2x" [77;11H[K[77;11H1 line, 17 characters[38;1HÃ¯Â»Â¿utf-8[34m<80>[merr[38;16H[K[38;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$r Xtest3x[?25l"Xtest3x" [77;11H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r Xtest4x[?25l"Xtest4x" [77;11H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r Xtest5x[?25l"Xtest5x" [77;11H[K[77;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[77;1H[K[77;1H:[?12l[?25h$r Xtest6x[?25l"Xtest6x" [77;11H[K[77;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[77;1H[K[77;1H:[?12l[?25hset nobin ff&               " Write the file in default format[?25l[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H44 lines, 409 characters written[43;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test43.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test43.in" 27 lines, 412 characters[1;1HTests for regexp with various magic settings.

STARTTEST
: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:?^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
[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for regexp with various magic settings.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 14 lines, 217 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[18;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[19;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible viminfo+=nviminfo[?25l[19;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^1[?25l[20;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25ha*b\{2}c\+/e[?25l[20;17H[?12l[?25h[?25l[20;17H[K[20;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\Md\*e\{2}f\+/e[?25l[21;17H[?12l[?25h[?25l[21;17H[K[21;16H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nomagic[?25l[21;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hg\*h\{2}i\+/e[?25l[22;17H[?12l[?25h[?25l[22;17H[K[22;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\mj*k\{2}l\+/e[?25l[23;17H[?12l[?25h[?25l[23;17H[K[23;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\vm*n{2}o+/e[?25l[24;17H[?12l[?25h[?25l[24;17H[K[24;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\V^aa$[?25l[25;5H[?12l[?25h[?25laa$ x[25;10H[K[25;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset magic[?25l[25;5H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\v(a)(b)\2\1\1/e[?25l[26;14H[?12l[?25h[?25l[26;14H[K[26;13H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\V[ab]\(\[xy]\)\1[?25l[27;7H[?12l[?25h[?25lab]x[27;12H[K[27;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h?^1?,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New] 8L, 121C written[27;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test44.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test44.in" 55 lines, 1137 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:?^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
a à¸­à¸¡x à¸«à¸¡à¹[34m~H[mx
b ã[34m~A[m¡ã[34m~B[m«ã[34m~C[m¨ã[34m~A[m¯
c x Â¬â[34m~B[m¬x
d å¤©ä½¿x
e ü[34m~R~M~E~Y[m¸y
f ü[34m~R~M~J[m¯[34m~M[mz
g aå[34m~U[m·bb
[1m[34m~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for regexp with multi-byte encoding and various magic settings.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 33 lines, 760 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[38;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso mbyte.vim[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo[?25l[27m[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:?^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
a ¿¿x ¿¿x
b ¿?¿?¿?¿?
c x ¬¿x
d ¿?¿?x
e ¿y
f ¿z
g a¿?bb
[1m[34m~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [39;1H[?12l[?25h[?25l[77;1H[m/[?12l[?25h^1[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25ha*b\{2}c\+/e[?25l[40;17H[?12l[?25h[?25l[40;17H[K[40;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\Md\*e\{2}f\+/e[?25l[41;17H[?12l[?25h[?25l[41;17H[K[41;16H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nomagic[?25l[41;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hg\*h\{2}i\+/e[?25l[42;17H[?12l[?25h[?25l[42;17H[K[42;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\mj*k\{2}l\+/e[?25l[43;17H[?12l[?25h[?25l[43;17H[K[43;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\vm*n{2}o+/e[?25l[44;17H[?12l[?25h[?25l[44;17H[K[44;16H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\V^aa$[?25l[45;5H[?12l[?25h[?25l aa$ x[45;10H[K[45;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset magic[?25l[45;5H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\v(a)(b)\2\1\1/e[?25l[46;14H[?12l[?25h[?25l[46;14H[K[46;13H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\V[ab]\(\[xy]\)\1[?25l[47;7H[?12l[?25h[?25l ab]x[47;12H[K[47;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Now search for multi-byte without composing char[?25l[47;7H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h¿[?25l[48;8H[?12l[?25h[?25l¿x[48;9H[K[48;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Now search for multi-byte with composing char[?25l[48;8H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h¿¿[?25l[49;8H[?12l[?25h[?25l¿x[49;9H[K[49;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" find word by change of word class[?25l[49;8H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h¿?\<¿?¿?\>¿?[?25l[50;3H[?12l[?25h[?25l¿?¿?¿?[50;9H[K[50;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test \%u, [\u] and friends[?25l[50;3H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\%u20ac[?25l[51;6H[?12l[?25h[?25l¬x[51;7H[K[51;6H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\u4f7f\u5929]\+[?25l[52;3H[?12l[?25h[?25l ¿?x [52;7H[K[52;3H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\%U12345678[?25l[53;3H[?12l[?25h[?25l y[53;4H[K[53;3H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h[\U1234abcd\u1234\uabcd][?25l[54;3H[?12l[?25h[?25l z[54;4H[K[54;3H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h\%d21879b[?25l[55;4H[?12l[?25h[?25labb[55;6H[K[55;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h?^1?,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New] 16L, 195C written[55;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! test.out[?25l"test.out" [77;12H[K[77;12H16L, 195C[1;1H1 a aa abb abbcc[1;18H[K[2;1H2 d dd dee deeff[2;17H[K[3;1H3 g gg ghh ghhii
4 j jj jkk jkkll
5 m mm mnn mnnoo
6 x aa$ x[6;10H[K[7;1H7 (a)(b) abba
8 axx ab]xx[8;12H[K[9;1H9 ¿¿x ¿x[9;9H[K[10;1Ha ¿¿x ¿x[10;9H[K[11;1Hb ¿?¿?¿?[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;1H[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~                                                                                                      [1;1H[?12l[?25h[16;1H[?25l[m[77;1H[K[77;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿[?25l[17;1H¿[17;2H[K[17;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿[?25l[18;1H¿¿[18;3H[K[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿[?25l[19;1H¿[19;2H[K[19;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hput =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿[?25l[20;1H¿[20;2H[K[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw![?25l"test.out" 20L, 209C written[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test45.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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("."))
/ii$
:call append("$", foldlevel("."))
/kk$
:call append("$", foldlevel("."))
:/^last/+1,$w! test.out
:delfun Flvl
:qa!
ENDTEST

1 aa
2 bb
3 cc
4 dd {{{
5 ee {{{ }}}
6 ff }}}
7 gg
8 hh[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for folding. vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 63 lines, 1691 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[67;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[68;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[68;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" We also need the +syntax feature here.[?25l[68;1H[?12l[?25h[?25l[77;1H[K[77;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;1HTests for folding. vim: set ft=vim :

STARTTEST
:so small.vim[77;1H[K[68;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" basic test if a fold can be created, opened, moving to the end and closed[?25l[68;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^1[?25l[69;1H[?12l[?25h[?25l[34m[47m+--  3 lines: 1 aa-------------------------------------------------------------------------------------[m[70;1H4 dd {{{
5 ee {{{ }}}
6 ff }}}
7 gg[73;6H[K[74;1H8 hh[74;6H[K[75;1H9 ii
a jj[69;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", "manual " . getline(foldclosed(".")))[?25l[69;1H[?12l[?25h[?25l1 aa[69;5H[K[70;1H2 bb[70;6H[K[71;1H3 cc[71;6H[K[72;1H4 dd {{{
5 ee {{{ }}}
6 ff }}}
7 gg
8 hh[69;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", foldclosed("."))[?25l[69;1H[?12l[?25h

[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", getline("."))[?25l[71;1H[?12l[?25h[?25l[69;1H[34m[47m+--  3 lines: 1 aa-------------------------------------------------------------------------------------[m[70;1H4 dd {{{
5 ee {{{ }}}
6 ff }}}
7 gg[73;6H[K[74;1H8 hh[74;6H[K[75;1H9 ii
a jj[69;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", getline(foldclosed(".")))[?25l[69;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test folding with markers.[?25l[69;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fdm=marker fdl=1 fdc=3[?25l[1;1H[34m[47m   [mTests for folding. vim: set ft=vim :
[34m[47m   
   [mSTARTTEST
[34m[47m   [m:so small.vim
[34m[47m   [m:" We also need the +syntax feature here.
[34m[47m   [m:if !has("syntax")
[34m[47m   [m   e! test.ok
[34m[47m   [m   w! test.out
[34m[47m   [m   qa!
[34m[47m   [m:endif
[34m[47m   [m:" basic test if a fold can be created, opened, moving to the end and closed
[34m[47m   [m/^1
[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[69;8H[K[70;1H[34m[47m   [m2 bb[70;8H[K[71;1H[34m[47m   [m3 cc[71;8H[K[72;1H[34m[47m-  [m4 dd {{{
[34m[47m|- [m5 ee {{{ }}}
[34m[47m|  [m6 ff }}}
[34m[47m   [m7 gg
[34m[47m   [m8 hh[71;4H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^5[?25l[73;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", "marker " . foldlevel("."))[?25l[73;4H[?12l[?25h[72;4H[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[72;4H[?12l[?25h[73;4H[?25l[74;4H{{ [74;7H[K[75;1H[34m[47m|[m[2C6 ff }}}[76;4H7 gg[74;6H[?12l[?25h[?25l[74;2H[34m[47m-[m[3C{[75;2H[34m[47m|
|[74;6H[?12l[?25h[75;6H[76;6H[?25l[m[77;1H[K[77;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[76;6H[?12l[?25h[75;6H[?25l[76;4H6 ff }}}[76;4H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[34m[47m   [m7 gg[77;1H[K[76;4H[?12l[?25h[?25l
:[?12l[?25hcall append("$", foldlevel("."))[?25l[76;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test folding with indent[?25l[76;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fdm=indent sw=2[?25l[6;1H[34m[47m-
|
|[42;1H-
|
|-
|
|-
|
|-
|
|-
|
|[71;1H 
  
  
  
 
   [?12l[?25h[?25l[m[77;1H[K[77;1H/[?12l[?25h^2 b[?25l[31msearch hit BOTTOM, continuing at TOP[69;4H[?12l[?25h[?25l[m[34m[47m-[m[2C  2 bb[?12l[?25h[70;5H[?25l[34m[47m|-[m[1C    3 cc[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", "indent " . foldlevel("."))[?25l[70;7H[?12l[?25h[69;7H[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[69;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test syntax folding[?25l[69;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fdm=syntax fdl=0[?25l[6;1H[34m[47m 
 
 [42;1H 
 
  
 
  
 
  
 
  
 
 [69;1H 
  [69;7H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hsyn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3[?25l[71;1H[34m[47m+  +--  8 lines: 4 dd ---------------------------------------------------------------------------------[m[72;4Ha jj[72;9H[K[73;4Hb kk[74;4Hlast[74;9H[K[75;4Hmanual 1 aa[76;4H-1[76;6H[K[69;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsyn region Fd1 start="ee" end="ff" fold contained[?25l[69;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsyn region Fd2 start="gg" end="hh" fold contained[?25l[69;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsyn region Fd3 start="commentstart" end="commentend" fold contained[?25l[69;7H[?12l[?25h[?25l[1;76r[1;1H[8M[1;77r[69;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[77;1H[K[76;4H[?12l[?25h[63;4H[?25l[77;1H:[?12l[?25hcall append("$", "folding " . getline("."))[?25l[63;4H[?12l[?25h[62;4H[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", getline("."))[?25l[62;4H[?12l[?25h[63;4H[?25l[34m[47m--[m[1C4 dd {{{commentstart  [63;26H[K[64;1H[34m[47m||[m[1C5 ee {{{ }}}
[34m[47m||[m[1C{{{[65;7H[K[66;1H[34m[47m||[m[1C6 ff }}}
[34m[47m||[m[1C6 ff }}}[67;13H[K[68;1H[34m[47m||[m[1C7 gg
[34m[47m||[m[1C8 hh
[34m[47m||[m[1C9 ii
[34m[47m||[m[1Ca jj[71;8H[K[72;1H[34m[47m||[m[1Cb kk
[34m[47m||[m[1Clast
[34m[47m||[m[1Cmanual 1 aa
[34m[47m||[m[1C-1[75;6H[K[76;1H[34m[47m||[m[1C3 cc[63;25H[?12l[?25h[?25l[63;2H[34m[47m [m[23Ccommentend[64;2H[34m[47m-[67;2H 
|-

| 
  
  
  
  
  
  [63;35H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset fdl=1[?25l[64;2H[34m[47m+ +---  3 lines: 5 ee --------------------------------------------------------------------------------[65;2H [m[1C6 ff }}}[66;2H[34m[47m+ +---  2 lines: 7 gg---------------------------------------------------------------------------------[m[67;4H9 ii[67;9H[K[68;1H[34m[47m  [m[1Ca jj
[34m[47m  [m[1Cb kk
[34m[47m [m[2Clast[71;4Hmanual 1 aa[72;4H-1[72;6H[K[73;4H3 cc[74;4H1 aa[74;8H[K[75;4Hmarker 2[76;4H1[76;6H[K[63;35H[?12l[?25h[66;4H[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", getline("."))[?25l[66;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset fdl=0[?25l[63;1H[34m[47m+  +--  8 lines: 4 dd commentstart  commentend---------------------------------------------------------[64;1H  [m[1Ca jj[64;8H[K[65;1H[34m[47m [m[2Cb kk[65;9H[K[66;1H[34m[47m  [m[1Clast[66;8H[K[67;1H[34m[47m [m[2Cmanual 1 aa[68;4H-1[68;6H[K[69;4H3 cc[70;4H1 aa[71;6Hrker 2[71;13H[K[72;4H1[72;5H[K[73;4H1[73;6H[K[74;4H0[74;6H[K[75;4Hindent[63;4H[?12l[?25h[?25l[34m[47m-[m[2C4 dd {{{commentstart  commentend[63;36H[K[64;1H[34m[47m|-[m[1C5 ee {{{ }}}
[34m[47m||[m[1C{{{[65;7H[K[66;1H[34m[47m||[m[1C6 ff }}}
[34m[47m|[m[2C6 ff }}}[67;13H[K[68;1H[34m[47m|-[m[1C7 gg
[34m[47m||[m[1C8 hh
[34m[47m|[m[2C9 ii[71;4Ha jj[71;8H[K[72;4Hb kk[73;4Hlast[74;4Hmanual 1 aa[75;4H-1[75;6H[K[76;4H3 cc[68;7H[?12l[?25h[27m[m[H[2J[?25l[1;1H[34m[47m   [m:endif
[34m[47m   [m:" basic test if a fold can be created, opened, moving to the end and closed
[34m[47m   [m/^1
[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
[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[68;7H[?12l[?25h[69;4H[?25l[77;1H:[?12l[?25hcall append("$", getline("."))[?25l[69;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test expression folding[?25l[69;4H[?12l[?25h[?25l[77;1H[K[77;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   [m:endif
[34m[47m   [m:" basic test if a fold can be created, opened, moving to the end and closed
[34m[47m   [m/^1
[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("."))[77;1H[K[69;4H[?12l[?25h[?25l[77;1H:[?12l[?25hset fdm=expr fde=Flvl()[?25l[61;1H[34m[47m+  +-- 11 lines: 2 bb----------------------------------------------------------------------------------[m[62;4Hb kk[62;8H[K[63;1H[34m[47m [m[2Clast[63;9H[K[64;1H[34m[47m  [m[1Cmanual 1 aa[64;15H[K[65;1H[34m[47m  [m[1C-1[65;6H[K[66;1H[34m[47m  [m[1C3 cc[66;9H[K[67;1H[34m[47m [m[2C1 aa[67;9H[K[68;1H[34m[47m  [m[1Cmarker 2
[34m[47m  [m[1C1[69;6H[K[70;1H[34m[47m [m[2C1[70;6H[K[71;4H0[71;6H[K[72;4Hindent 2[73;4H1[73;5H[K[74;1H[34m[47m+  +--  4 lines: folding 9 ii--------------------------------------------------------------------------[m[75;4H[1m[34m~                                                                                                   [76;4H~                                                                                                   [61;4H[?12l[?25h[?25l[m[77;1H[K[77;1H/[?12l[?25hbb$[?25l[31msearch hit BOTTOM, continuing at TOP[m[61;1H[34m[47m--[m[1C  2 bb[61;10H[K[62;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[68;8H[K[69;1H[34m[47m|[m[2C8 hh
[34m[47m|+ +---  2 lines: 9 ii---------------------------------------------------------------------------------[m[71;4Hb kk[72;4Hlast[72;8H[K[73;4Hmanual 1 aa
[34m[47m [m[2C-1[74;6H[K[75;4H3 cc[75;8H[K[76;4H1 aa[76;8H[K[61;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", "expr " . foldlevel("."))[?25l[61;8H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hhh$[?25l[69;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[69;6H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hii$[?25l[70;2H[34m[47m-[m[1C9 ii[70;8H[K[71;1H[34m[47m||[m[1Ca jj[72;4Hb kk[73;4Hlast[73;8H[K[74;4Hmanual 1 aa[75;4H-1[75;6H[K[76;4H3 cc[70;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[70;6H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hkk$[?25l[72;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", foldlevel("."))[?25l[72;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^last/+1,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 18 lines, 96 characters written[72;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfun Flvl[?25l[72;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test46.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for multi-line regexps with ":s". vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 8 lines, 292 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[12;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[13;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test if replacing a line break works with a back reference[?25l[13;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^1/,/^2/s/\n\(.\)/ \1/[?25l4 substitutions on 1 line[14;76r[14;1H[4M[1;77r[14;1H1 aa bb cc 2 dd ee[73;1H[1m[34m~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[77;1H4 substitutions on 1 line[14;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test if inserting a line break works with a back reference[?25l[14;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^3/,/^4/s/\(.\)$/\r\1/[?25l3 substitutions on 3 lines[18;76r[18;1H[3L[1;77r[15;4H[K[16;1Hf[16;2H[K[17;1Hg[17;3H[K[18;1Hh
4 i
j[77;1H[K[77;1H3 substitutions on 3 lines[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test if replacing a line break with another line break works[?25l[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^5/,/^6/s/\(\_d\{3}\)/x\1x/[?25l3 substitutions on 2 lines[77;27H[K[21;4Hx8
8xb cx9
9xd
6 ex7
7x7f[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^1/,$w! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 13 lines, 70 characters written[25;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test47.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test47.in" 47 lines, 1140 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
:unlet one two three
:qa!
ENDTEST

1 aa
2 bb
3 cc
4 dd
5 ee
[1m[34m~                                                                                                      [49;1H~                                                                                                      [50;1H~                                                                                                      [51;1H~                                                                                                      [52;1H~                                                                                                      [53;1H~                                                                                                      [54;1H~                                                                                                      [55;1H~                                                                                                      [56;1H~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for vertical splits and filler lines in diff mode[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 37 lines, 1039 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[41;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[42;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[42;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Disable the title to avoid xterm keeping the wrong one.[?25l[42;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset notitle noicon[?25l[42;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^1[?25l[43;1H[?12l[?25h[?25l[77;1H5 lines yanked[43;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7m[No Name]                                                                                              [m[39;1H[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()[48;38H[K[49;1Hj:let three = three . "-" . winline()[49;38H[K[50;1Hj:let three = three . "-" . winline()[50;38H[K[51;1H[34m^W^W[m:call append("$", one)[51;27H[K[52;1H:call append("$", two)[52;23H[K[53;1H:call append("$", three)[53;25H[K[54;1H:$-2,$w! test.out[54;18H[K[55;1H:unlet one two three[55;21H[K[56;1H:qa![56;5H[K[57;1HENDTEST[57;8H[K[58;1H[K[59;1H1 aa[59;5H[K[60;1H2 bb[60;5H[K[61;1H3 cc[61;5H[K[62;1H4 dd[62;5H[K[63;1H5 ee[63;5H[K[76;1H[7mtest47.in                                                                                              [1;1H[?12l[?25h[?25l[m[77;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[38;11H[1m[7m[+][2;1H[?12l[?25h[1;1H[?25l[1;37r[m[37;1H
[1;77r[37;1H[1m[34m~                                                                                                      [m[77;1H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hw! Xtest[?25l"Xtest" [77;9H[K[77;9H[New File] 5 lines, 25 characters written[38;1H[1m[7mXtesta         [1;1H[?12l[?25h[?25l[1;37r[m[37;1H
[1;77r[37;1H[1m[34m~                                                                                                      [m[38;7H[1m[7m[+][m[77;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;37r[4;1H[L[1;77r[4;1Hxxx[?12l[?25h[?25l[77;1H:[?12l[?25hw! Xtest2[?25l"Xtest2" [77;10H[K[77;10H[New File] 6 lines, 29 characters written[38;7H[1m[7m    [4;3H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hfile Nop[?25l"Nop" [Not edited] line 4 of 6 --66%-- col 3[38;1H[1m[7mNops   [4;3H[?12l[?25h[1;1H[?25l[2;37r[m[2;1H[L[1;77r[2;1Hyyy[38;5H[1m[7m[+][m[77;1H[K[2;3H[?12l[?25h
3 
X 
xx[?25l[6;37r[6;1H[L[1;77r[6;1Hzzzz[?12l[?25h
5 e[?25l[77;1H:[?12l[?25hvert diffsplit Xtest[?25l"Xtest" [77;9H[K[77;9H5 lines, 25 characters[1;1H[34m[47m  [m[44m1 aa                                             [m[7m|[m
[34m[47m  [m2 bb[45C[7m|[m
[34m[47m  [m[1m[34m[46m-------------------------------------------------[m[7m|[m
[34m[47m  [m3 cc[45C[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[45C[7m|[9;52H|[10;52H|[11;52H|[12;52H|[13;52H|[14;52H|[15;52H|[16;52H|[17;52H|[18;52H|[19;52H|[20;52H|[21;52H|[22;52H|[23;52H|[24;52H|[25;52H|[26;52H|[27;52H|[28;52H|[29;52H|[30;52H|[31;52H|[32;52H|[33;52H|[34;52H|[35;52H|[36;52H|[37;52H|[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~[30;3H~[31;3H~[32;3H~[33;3H~[34;3H~[35;3H~[36;3H~[37;3H~[m
[1m[7mXtest+   [m[1;53H[34m[47m  [m[1m[34m[46m-------------------------------------------------[m[2;53H[34m[47m  [m2 bb[3;53H[34m[47m  [m[44myyy                                              [m[4;53H[34m[47m  [m3 cc[5;53H[34m[47m  [m[1m[41mX[m[45m dd                                             [m[6;53H[34m[47m  [m[44mxxx                                              [m[7;53H[34m[47m  [m[44mzzzz                                             [m[8;53H[34m[47m  [m5 ee[9;53H[34m[47m  [m[44m1 aa                                             [m[10;53H[34m[47m  [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  [30;53H  [31;53H  [32;53H  [33;53H  [34;53H  [35;53H  [36;53H  [37;53H  [m[10;55H[1m[34m~[11;55H~[12;55H~[13;55H~[14;55H~[15;55H~[16;55H~[17;55H~[18;55H~[19;55H~[20;55H~[21;55H~[22;55H~[23;55H~[24;55H~[25;55H~[26;55H~[27;55H~[28;55H~[29;55H~[30;55H~[31;55H~[32;55H~[33;55H~[34;55H~[35;55H~[36;55H~[37;55H~[m[38;53H[7mNop [+]                                            [1;3H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hvert diffsplit Xtest2[?25l"Xtest2" [77;10H[K[77;10H6 lines, 29 characters[27m[m[H[2J[1;1H[34m[47m  [m2 bb[28C[7m|[m
[34m[47m  [m[1m[34m[46m--------------------------------[m[7m|[m
[34m[47m  [m3 cc[28C[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[28C[7m|[m
[34m[47m  [m[44m1 aa                            [m[7m|[9;35H|[10;35H|[11;35H|[12;35H|[13;35H|[14;35H|[15;35H|[16;35H|[17;35H|[18;35H|[19;35H|[20;35H|[21;35H|[22;35H|[23;35H|[24;35H|[25;35H|[26;35H|[27;35H|[28;35H|[29;35H|[30;35H|[31;35H|[32;35H|[33;35H|[34;35H|[35;35H|[36;35H|[37;35H|[m[9;1H[34m[47m  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  [m[9;3H[1m[34m~                               [10;3H~                               [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~                               [30;3H~                               [31;3H~                               [32;3H~                               [33;3H~                               [34;3H~                               [35;3H~                               [36;3H~                               [37;3H~                               [m
[1m[7mXtest2                             [m[1;36H[34m[47m  [m2 bb[28C[7m|[m[2;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[7m|[m[3;36H[34m[47m  [m3 cc[28C[7m|[m[4;36H[34m[47m  [m[1m[41m4[m[45m dd                            [m[7m|[m[5;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[7m|[m[6;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[7m|[m[7;36H[34m[47m  [m5 ee[28C[7m|[8;70H|[9;70H|[10;70H|[11;70H|[12;70H|[13;70H|[14;70H|[15;70H|[16;70H|[17;70H|[18;70H|[19;70H|[20;70H|[21;70H|[22;70H|[23;70H|[24;70H|[25;70H|[26;70H|[27;70H|[28;70H|[29;70H|[30;70H|[31;70H|[32;70H|[33;70H|[34;70H|[35;70H|[36;70H|[37;70H|[m[8;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[9;36H[34m[47m  [10;36H  [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  [30;36H  [31;36H  [32;36H  [33;36H  [34;36H  [35;36H  [36;36H  [37;36H  [m[9;38H[1m[34m~                               [10;38H~                               [11;38H~                               [12;38H~                               [13;38H~                               [14;38H~                               [15;38H~                               [16;38H~                               [17;38H~                               [18;38H~                               [19;38H~                               [20;38H~                               [21;38H~                               [22;38H~                               [23;38H~                               [24;38H~                               [25;38H~                               [26;38H~                               [27;38H~                               [28;38H~                               [29;38H~                               [30;38H~                               [31;38H~                               [32;38H~                               [33;38H~                               [34;38H~                               [35;38H~                               [36;38H~                               [37;38H~                               [m[38;36H[7mXtest                              [m[1;71H[34m[47m  [m2 bb[2;71H[34m[47m  [m[44myyy                            [m[3;71H[34m[47m  [m3 cc[4;71H[34m[47m  [m[1m[41mX[m[45m dd                           [m[5;71H[34m[47m  [m[45mxxx                            [m[6;71H[34m[47m  [m[44mzzzz                           [m[7;71H[34m[47m  [m5 ee[8;71H[34m[47m  [m[44m1 aa                           [m[9;71H[34m[47m  [10;71H  [11;71H  [12;71H  [13;71H  [14;71H  [15;71H  [16;71H  [17;71H  [18;71H  [19;71H  [20;71H  [21;71H  [22;71H  [23;71H  [24;71H  [25;71H  [26;71H  [27;71H  [28;71H  [29;71H  [30;71H  [31;71H  [32;71H  [33;71H  [34;71H  [35;71H  [36;71H  [37;71H  [m[9;73H[1m[34m~                              [10;73H~                              [11;73H~                              [12;73H~                              [13;73H~                              [14;73H~                              [15;73H~                              [16;73H~                              [17;73H~                              [18;73H~                              [19;73H~                              [20;73H~                              [21;73H~                              [22;73H~                              [23;73H~                              [24;73H~                              [25;73H~                              [26;73H~                              [27;73H~                              [28;73H~                              [29;73H~                              [30;73H~                              [31;73H~                              [32;73H~                              [33;73H~                              [34;73H~                              [35;73H~                              [36;73H~                              [37;73H~                              [m[38;71H[7mNop [+]                          [m[39;1H[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
:unlet one two three
:qa!
ENDTEST

1 aa
2 bb
3 cc
4 dd
5 ee
[1m[34m~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [m[76;1H[7mtest47.in                                                                                              [1;3H[?12l[?25h[?25l[77;1H[m:[?12l[?25h" jump to second window for a moment to have filler line appear at start of[?25l[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" first window[?25l[1;3H[?12l[?25h[?25l[38;1H[7mXtest2[m[1m[7m [m[7m                             [m[1m[7mXtest                              [1;38H[?12l[?25h[?25l[m[1;3H[1m[34m[46m--------------------------------[m[2;3H2 bb                            [3;3H[1m[34m[46m--------------------------------[m[4;3H3 cc                            [5;3H[1m[41mX[m[45m dd[6;3Hxxx                             [m[7;3H[1m[34m[46m--------------------------------[m[8;3H5 ee                            [9;3H[44m1 aa                            [m[1;1H[35C                                  [2;36H[34m[47m  [m2 bb                            [3;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[4;36H[34m[47m  [m3 cc                            [5;36H[34m[47m  [m[1m[41m4[m[45m dd                            [m[6;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[7;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[8;36H[34m[47m  [m5 ee                            [9;36H[34m[47m  [m[1m[34m[46m--------------------------------[m[10;36H[34m[47m  [m[1m[34m~                               [m[11;36H[34m[47m  [m[1m[34m~                               [m[12;36H[34m[47m  [m[1m[34m~                               [m[13;36H[34m[47m  [m[1m[34m~                               [m[14;36H[34m[47m  [m[1m[34m~                               [m[15;36H[34m[47m  [m[1m[34m~                               [m[16;36H[34m[47m  [m[1m[34m~                               [m[17;36H[34m[47m  [m[1m[34m~                               [m[18;36H[34m[47m  [m[1m[34m~                               [m[19;36H[34m[47m  [m[1m[34m~                               [m[20;36H[34m[47m  [m[1m[34m~                               [m[21;36H[34m[47m  [m[1m[34m~                               [m[22;36H[34m[47m  [m[1m[34m~                               [m[23;36H[34m[47m  [m[1m[34m~                               [m[24;36H[34m[47m  [m[1m[34m~                               [m[25;36H[34m[47m  [m[1m[34m~                               [m[26;36H[34m[47m  [m[1m[34m~                               [m[27;36H[34m[47m  [m[1m[34m~                               [m[28;36H[34m[47m  [m[1m[34m~                               [m[29;36H[34m[47m  [m[1m[34m~                               [m[30;36H[34m[47m  [m[1m[34m~                               [m[31;36H[34m[47m  [m[1m[34m~                               [m[32;36H[34m[47m  [m[1m[34m~                               [m[33;36H[34m[47m  [m[1m[34m~                               [m[34;36H[34m[47m  [m[1m[34m~                               [m[35;36H[34m[47m  [m[1m[34m~                               [m[36;36H[34m[47m  [m[1m[34m~                               [m[37;36H[34m[47m  [m[1m[34m~                               [m[1;36H[34m[47m  [m[44m1 aa                            [m[3C[1m[34m[46m-------------------------------[m[2;73H2 bb[2;77H[K[3;73H[44myyy                            [m[4;73H3 cc[4;77H[K[5;73H[1m[41mX[m[45m dd[6;73Hxxx                            [m[7;73H[44mzzzz                           [m[8;73H5 ee[8;77H[K[9;73H[44m1 aa                           [m[77;1H[K[1;38H[?12l[?25h[?25l[38;1H[1m[7mXtest2                             [m[7mXtest[m[1m[7m [m[7m                              [2;3H[?12l[?25h[?25l[?12l[?25h[?25l[77;1H[m:[?12l[?25hlet one = winline()[?25l[2;3H[?12l[?25h[?25l[4;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[4;3H[?12l[?25h[?25l[5;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[5;3H[?12l[?25h[?25l[6;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[6;3H[?12l[?25h[?25l[8;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[8;3H[?12l[?25h[?25l[9;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet one = one . "-" . winline()[?25l[9;3H[?12l[?25h[?25l[38;1H[7mXtest2[m[1m[7m [m[7m                             [m[1m[7mXtest                              [8;38H[?12l[?25h[?25l[1;38H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet two = winline()[?25l[1;38H[?12l[?25h[?25l[2;38H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[2;38H[?12l[?25h[?25l[4;38H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[4;38H[?12l[?25h[?25l[5;38H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[5;38H[?12l[?25h[?25l[8;38H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet two = two . "-" . winline()[?25l[8;38H[?12l[?25h[?25l[38;36H[7mXtest[m[1m[7m [m[7m                              [m[1m[7mNop [+]                          [8;73H[?12l[?25h[?25l[2;73H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet three = winline()[?25l[2;73H[?12l[?25h[?25l[3;73H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[3;73H[?12l[?25h[?25l[4;73H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[4;73H[?12l[?25h[?25l[5;73H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[5;73H[?12l[?25h[?25l[6;73H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[6;73H[?12l[?25h[?25l[7;73H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[7;73H[?12l[?25h[?25l[8;73H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet three = three . "-" . winline()[?25l[8;73H[?12l[?25h[38;71H[7mNop [+][m[1m[7m [m[7m                          [m[76;1H[1m[7mtest47.in                                                                                              [59;1H[?25l[m[77;1H[K[77;1H:[?12l[?25hcall append("$", one)[?25l[64;1H2-4-5-6-8-9[64;12H[K[76;11H[1m[7m[+][59;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcall append("$", two)[?25l[65;1H1-2-4-5-8[65;10H[K[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append("$", three)[?25l[66;1H2-3-4-5-6-7-8[66;14H[K[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$-2,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 3 lines, 36 characters written[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet one two three[?25l[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test48.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test48.in" 74 lines, 1452 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
:"
:wq! test.out
ENDTEST
keyword keyw
all your base are belong to us
1 2 3 4 5 6
'i'
'C'
'a'
'A'
'D'
this is a test
this is a test
this is a test
"r"
a[34m^V[mb[34m^M[msd
abcv6efi.him0kl


[1m[34m~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HThis is a test of 'virtualedit'.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 54 lines, 1250 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[58;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noswf[?25l[59;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ve=all[?25l[59;1H[?12l[?25h[58;1H[?25l[77;1H58 fewer lines[1;76r[1;1H[58M[1;77r[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~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[77;1H58 fewer lines[1;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword".[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    Repeating CTRL-N fixes it. (Mary Ellen Foster)[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hw[?25l[31msearch hit BOTTOM, continuing at TOP[1;12H[?12l[?25h[?25l[m$[77;1H[32mScanning tags.[m[77;15H[K[77;1HThe only match[1;16H[77;1H[K[1;12Hword[?12l[?25h[2;15H[?25l[77;1H:[?12l[?25h"[?25l[2;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Using "C" then then <CR> moves the last remaining character to the next[?25l[2;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    line.  (Mary Ellen Foster)[?25l[2;15H[?12l[?25h[3;15H[?25l[77;1H[K[77;1H/[?12l[?25hare[?25l[31msearch hit BOTTOM, continuing at TOP[2;15H[?12l[?25h[?25l[m[15C$[2;15H[K[3;1Hare belong to vim
1 2 3 4 5 6
'i
'C
'a
'A
'D'[9;4H[K[12;1Hthis is a test
"r"[13;4H[K[14;2H[34m^V[mb[34m^M[msd[14;9H[K[15;1Habcv6efi.him0kl[17;1H[K[3;17H[?12l[?25h[4;17H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[4;17H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   When past the end of a line that ends in a single character "b" skips[?25l[4;17H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    that word.[?25l[4;17H[?12l[?25h[10C[15C[4;11H[?25l$7[?12l[?25h[5;11H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[5;11H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Make sure 'i' works[?25l[5;11H[?12l[?25h'i'   [?25l<-- should be 3 ' '[?12l[?25h[6;25H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[6;25H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Make sure 'C' works[?25l[6;25H[?12l[?25h'C'   [?25l$<-- should be 3 ' '[?12l[?25h[7;25H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[7;25H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Make sure 'a' works[?25l[7;25H[?12l[?25h'a'   [?25l <-- should be 4 ' '[?12l[?25h[8;26H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[8;26H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Make sure 'A' works[?25l[8;26H[?12l[?25h'A'   [?25l<-- should be 0 ' '[?12l[?25h[9;22H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[9;22H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Make sure 'D' works[?25l[9;22H[?12l[?25h'D'   [?25l<-- 'D' should be intact[?12l[?25h[10;30H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[10;30H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Test for yank bug reported by Mark Waggoner.[?25l[10;30H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ve=block[?25l[10;14H[?12l[?25h[8C[?25l[?12l[?25h[?25l[7ma[11;9Ha[12;9Ha[13;9H[?12l[?25h[?25l[m[10;9Ha[11;9Ha[12;9Ha[77;1Hblock of 4 lines yanked[10;9H[?12l[?25h[17;1H[?25l[77;1H3 more lines[77;13H[K[17;1Ha
a[18;2H[K[19;1Ha[19;2H[K[20;1H [20;2H[K[17;1H[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test "r" beyond the end of the line[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ve=all[?25l[18;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^"r"[?25l[31msearch hit BOTTOM, continuing at TOP[13;1H[?12l[?25h[m"r"    [?25lx[?12l[?25h[?25lx<-- should be 'x'[?12l[?25h[14;25H[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[14;25H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Test to make sure 'x' can delete control characters[?25l[14;25H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset display=uhex[?25l[14;2H[34m<16>[mb[34m<0d>[msd[16C[?12l[?25h[?25l[34m<16>[mb[34m<0d>[msd[14;12H[K[14;1H[?12l[?25h[?25lb[34m<0d>[msd[14;8H[K[14;1H[?12l[?25h[?25l[34m<0d>[msd[14;7H[K[14;1H[?12l[?25h[?25lsd[14;3H[K[14;1H[?12l[?25h[?25ld[14;2H[K[14;1H[?12l[?25h[?25l[14;1H[K[14;1H[?12l[?25h[?25l[This line should contain only the text between the brackets.][?12l[?25h[15;62H[?25l[77;1H[K[77;1H:[?12l[?25hset display=[?25l[15;62H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[15;62H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Test for ^Y/^E due to bad w_virtcol value, reported by[?25l[15;62H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"   Roy <royl@netropolis.net>.[?25l[15;62H[?12l[?25h[?25l[15;76r[15;1H[L[1;77r[77;1H[K[15;1H[?12l[?25h   [?25lv[?12l[?25hv   [?25li[?12l[?25hi   [?25lm   <-- should show the name of a noted text editor[?12l[?25h[16;62H[?25l[17;76r[17;1H[L[1;77r[17;1H[?12l[?25h    [?25l6[?12l[?25h6   [?25l.[?12l[?25h.   [?25l0   <-- and its version number[?12l[?25h[16;1H[?25l[16;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [16;5H[?12l[?25h
[m    [?25l[77;1H:[?12l[?25h"[?25l[17;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hwq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 21 lines, 443 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test49.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HThis is a test of the script language.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 21 lines, 401 characters written[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[28;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[29;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[29;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hse nocp nomore viminfo+=nviminfo[?25l[29;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlang mess C[?25l[29;1H[?12l[?25h[?25l[77;1H[K[77;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[61;1H"/tmp/vyA8hU5/0"[62;1H[K[63;1H[K[64;1H[K[65;1H[K[66;1H[K[67;1H[K[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[61;18H[noeol] 18L, 528C
15 substitutions on 15 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/0" [63;19H[K[63;18H15L, 476C written"test49.in" [63;13H[K[63;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[60;1H"/tmp/vyA8hU5/1"[61;1H[K[62;1H[K[63;1H[K[64;1H[K[65;1H[K[66;1H[K[67;1H[K[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[60;18H[noeol] 19L, 588C
16 substitutions on 16 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/1" [62;19H[K[62;18H16L, 534C written"test49.in" [62;13H[K[62;13H30L, 632C
[1m[37m[41mError detected while processing /tmp/vyA8hU5/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[57;1H"/tmp/vyA8hU5/2"[58;1H[K[59;1H[K[60;1H[K[61;1H[K[62;1H[K[63;1H[K[64;1H[K[65;1H[K[66;1H[K[67;1H[K[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[57;18H[noeol] 22L, 784C
19 substitutions on 19 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/2" [59;19H[K[59;18H19L, 724C written"test49.in" [59;13H[K[59;13H30L, 632C
*** Test   5: OK (32883)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"/tmp/vyA8hU5/3" [60;18H[K[60;18H[New] 53L, 1582C written[60;18H[K[60;18H14L, 358C appended[60;18H[K[60;18H26L, 824C appended[60;18H[K[60;18H34L, 986C appended
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/4[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[61;1H[K[61;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/4" [61;18H[K[61;18H130L, 2431C appended[61;18H[K[61;18H131L, 2453C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/5[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[63;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -[64;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/5"' -S /tmp/vyA8hU5/4[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[63;1H"/tmp/vyA8hU5/5" [63;18H[K[64;1H[K[63;18H21L, 130C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [63;13H[K[63;13H30L, 632C
*** Test   6: OK (603978947)
[1m[37m[41mError detected while processing /sources/vim73/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/vim73/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/vim73/src/testdir/test49.vim:[m
[33mline 1626:[m
[1m[37m[41mE171: Missing :endif: endwhile [m
*** Test  17: OK (285127993)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/6[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/6" [77;18H[K[77;18H16L, 304C appended[77;18H[K[77;18H17L, 326C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/7[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/7"' -c 'breakadd file 8 /tmp/vyA8hU5/6' -S /tmp/vyA8hU5/6[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/7" [76;18H[K[77;1H[K[76;18H3L, 6C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/8[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/8" [77;18H[K[77;18H6L, 127C appended[77;18H[K[77;18H7L, 149C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/9[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/9"' -c 'breakadd file 4 /tmp/vyA8hU5/8' -S /tmp/vyA8hU5/8[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/9" [76;18H[K[77;1H[K[76;18H1L, 5C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/10[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/10" [77;19H[K[77;19H21L, 486C appended[77;19H[K[77;19H22L, 508C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/11[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/11"' -c 'breakadd func 7 F' -S /tmp/vyA8hU5/10[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/11" [76;19H[K[77;1H[K[76;19H3L, 18C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/12[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/12" [77;19H[K[77;19H13L, 364C appended[77;19H[K[77;19H14L, 386C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/13[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/13"' -c 'breakadd func 3 G' -S /tmp/vyA8hU5/12[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/13" [76;19H[K[77;1H[K[76;19H1L, 9C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  18: OK (67224583)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/14[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/14" [77;19H[K[77;19H12L, 201C appended[77;19H[K[77;19H13L, 223C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/15[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/15"' -S /tmp/vyA8hU5/14[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/15" [76;19H[K[77;1H[K[76;19H2L, 4C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/16[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/16" [77;19H[K[77;19H12L, 205C appended[77;19H[K[77;19H13L, 227C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/17[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/17"' -S /tmp/vyA8hU5/16[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/17" [76;19H[K[77;1H[K[76;19H2L, 7C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/18[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/18" [77;19H[K[77;19H6L, 122C appended[77;19H[K[77;19H7L, 144C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/19[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/19"' -S /tmp/vyA8hU5/18[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/19" [76;19H[K[77;1H[K[76;19H1L, 5C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/20[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/20" [77;19H[K[77;19H8L, 176C appended[77;19H[K[77;19H9L, 198C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/21[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/21"' -S /tmp/vyA8hU5/20[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/21" [76;19H[K[77;1H[K[76;19H1L, 6C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/22[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/22" [77;19H[K[77;19H10L, 215C appended[77;19H[K[77;19H11L, 237C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/23[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/23"' -S /tmp/vyA8hU5/22[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/23" [76;19H[K[77;1H[K[76;19H1L, 8C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/24[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/24" [77;19H[K[77;19H7L, 149C appended[77;19H[K[77;19H8L, 171C[77;19H[K[77;19H8L, 170C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/25[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/25"' -S /tmp/vyA8hU5/24[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/25" [76;19H[K[77;1H[K[76;19H1L, 9C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  19: OK (69275973)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/26[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/26" [77;19H[K[77;19H9L, 135C appended[77;19H[K[77;19H10L, 157C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/27[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/27"' -S /tmp/vyA8hU5/26[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/27" [76;19H[K[77;1H[K[76;19H2L, 4C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/28[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/28" [77;19H[K[77;19H10L, 155C appended[77;19H[K[77;19H11L, 177C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/29[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/29"' -S /tmp/vyA8hU5/28[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/29" [76;19H[K[77;1H[K[76;19H3L, 8C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/30[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/30" [77;19H[K[77;19H12L, 204C appended[77;19H[K[77;19H13L, 226C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/31[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/31"' -S /tmp/vyA8hU5/30[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/31" [76;19H[K[77;1H[K[76;19H4L, 18C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/32[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/32" [77;19H[K[77;19H12L, 214C appended[77;19H[K[77;19H13L, 236C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/33[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/33"' -S /tmp/vyA8hU5/32[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/33" [76;19H[K[77;1H[K[76;19H4L, 22C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/34[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/34" [77;19H[K[77;19H12L, 211C appended[77;19H[K[77;19H13L, 233C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/35[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/35"' -S /tmp/vyA8hU5/34[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/35" [76;19H[K[77;1H[K[76;19H3L, 22C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/36[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/36" [77;19H[K[77;19H14L, 263C appended[77;19H[K[77;19H15L, 285C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/37[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/37"' -S /tmp/vyA8hU5/36[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/37" [76;19H[K[77;1H[K[76;19H4L, 34C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/38[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/38" [77;19H[K[77;19H14L, 277C appended[77;19H[K[77;19H15L, 299C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/39[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/39"' -S /tmp/vyA8hU5/38[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/39" [76;19H[K[77;1H[K[76;19H4L, 40C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  20: OK (1874575085)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/40[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/40" [77;19H[K[77;19H58L, 1022C appended[77;19H[K[77;19H59L, 1044C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/41[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/41"' -S /tmp/vyA8hU5/40[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/41" [76;19H[K[77;1H[K[76;19H9L, 56C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  21: OK (147932225)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/42[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/42" [77;19H[K[77;19H23L, 418C appended[77;19H[K[77;19H24L, 440C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/43[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/43"' -S /tmp/vyA8hU5/42[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/43" [76;19H[K[77;1H[K[76;19H1L, 2C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/44[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/44" [77;19H[K[77;19H23L, 437C appended[77;19H[K[77;19H24L, 459C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/45[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/45"' -c 'breakadd func 2 Interrupt' -S /tmp/vyA8hU5/44[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/45" [76;19H[K[77;1H[K[76;19H1L, 3C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/46[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/46" [77;19H[K[77;19H21L, 386C appended[77;19H[K[77;19H22L, 408C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/47[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/47"' -S /tmp/vyA8hU5/46[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/47" [76;19H[K[77;1H[K[76;19H1L, 5C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  22: OK (4161)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/48[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/48" [77;19H[K[77;19H25L, 432C appended[77;19H[K[77;19H26L, 454C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/49[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/49"' -S /tmp/vyA8hU5/48[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/49" [76;19H[K[77;1H[K[76;19H3L, 8C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  23: OK (49)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/50[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/50" [77;19H[K[77;19H16L, 392C appended[77;19H[K[77;19H17L, 414C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/51[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/51"' -S /tmp/vyA8hU5/50[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/51" [76;19H[K[77;1H[K[76;19H3L, 7C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;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[62;1H"/tmp/vyA8hU5/52"[63;1H[K[64;1H[K[65;1H[K[66;1H[K[67;1H[K[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[62;19H[noeol] 17L, 552C
14 substitutions on 14 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/52"[64;19H[K[64;19H14L, 502C written"test49.in" [64;13H[K[64;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[65;1H"/tmp/vyA8hU5/53"[66;1H[K[67;1H[K[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;4H[K[65;19H[noeol] 13L, 406C
10 substitutions on 10 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/53"[67;19H[K[67;19H10L, 378C written"test49.in" [67;13H[K[67;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[66;1H"/tmp/vyA8hU5/54"[67;1H[K[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[66;19H[noeol] 13L, 409C
10 substitutions on 10 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/54"[68;19H[K[68;19H10L, 381C written"test49.in" [68;13H[K[68;13H30L, 632C
*** Test  28: OK (1996459)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/55[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[70;1H[K[70;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/55" [70;19H[K[70;19H39L, 721C appended[70;19H[K[70;19H40L, 743C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/56[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[72;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -[73;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/56"' -S /tmp/vyA8hU5/55[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[72;1H"/tmp/vyA8hU5/56" [72;19H[K[73;1H[K[72;19H6L, 21C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [72;13H[K[72;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/57[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[73;1H[K[73;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/57" [73;19H[K[73;19H23L, 509C appended[73;19H[K[73;19H24L, 531C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/58[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -[76;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/58"' -S /tmp/vyA8hU5/57[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/58" [75;19H[K[76;1H[K[75;19H4L, 34C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  29: OK (170428555)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/59[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/59" [77;19H[K[77;19H60L, 1101C appended[77;19H[K[77;19H61L, 1123C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/60[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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 ExtraVi
[76;103Hm[77;1HBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/60"' -c 'breakadd func 3 F' -c 'breakadd file 19 /tm
[76;103Hp[77;1H/vyA8hU5/59' -c 'breakadd file 31 /tmp/vyA8hU5/59' -S /tmp/vyA8hU5/59[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/60" [75;19H[K[76;1H[K[77;1H[K[75;19H16L, 89C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  30: OK (190905173)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/61[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/61" [77;19H[K[77;19H60L, 1122C appended[77;19H[K[77;19H61L, 1144C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/62[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/62"' -S /tmp/vyA8hU5/61[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/62" [76;19H[K[77;1H[K[76;19H16L, 89C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  31: OK (190905173)
*** Test  32: OK (354833067)
*** Test  33: OK (1216907538)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/63[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/63" [77;19H[K[77;19H63L, 1288C appended[77;19H[K[77;19H64L, 1310C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/64[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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' -c 'le
[76;103Ht[77;2HExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/64"' -c 'breakadd func 16 C' -S /tmp/vyA8hU
[76;103H5[77;1H/63[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/64" [75;19H[K[76;2H[K[77;1H[K[75;19H17L, 127C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  34: OK (2146584868)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/65[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/65" [77;19H[K[77;19H63L, 1285C appended[77;19H[K[77;19H64L, 1307C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/66[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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' -c 'le
[76;103Ht[77;2HExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/66"' -c 'breakadd func 16 B' -S /tmp/vyA8hU
[76;103H5[77;1H/65[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/66" [75;19H[K[76;2H[K[77;1H[K[75;19H17L, 127C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  35: OK (2146584868)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/67[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/67" [77;19H[K[77;19H66L, 1430C appended[77;19H[K[77;19H67L, 1452C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/68[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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 'let E
[76;103Hx[77;1HtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/68"' -c 'breakadd func 16 R' -S /tmp/vyA8hU5/6
[76;103H7[77;1H[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/68" [75;19H[K[76;1H[K[75;19H9L, 81C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  36: OK (1071644672)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/69[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/69" [77;19H[K[77;19H73L, 1488C appended[77;19H[K[77;19H74L, 1510C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/70[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/70"' -c 'breakadd func 16 F' -S /tmp/vyA8hU5/69[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/70" [76;19H[K[77;1H[K[76;19H9L, 81C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  37: OK (1071644672)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/71[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/71" [77;19H[K[77;19H82L, 1519C appended[77;19H[K[77;19H83L, 1541C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/72[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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' -c 'le
[76;103Ht[77;2HExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/72"' -c 'breakadd func 16 E' -S /tmp/vyA8hU
[76;103H5[77;1H/71[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/72" [75;19H[K[76;2H[K[77;1H[K[75;19H8L, 63C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  38: OK (357908480)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/73[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/73" [77;19H[K[77;19H83L, 1538C appended[77;19H[K[77;19H84L, 1560C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/74[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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 vimi
[76;103Hn[77;1Hfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/74"' -c 'breakadd func
16 I' -c 'breakadd func 22 I' -S /tmp/vyA8hU5/73[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/74" [75;19H[K[76;1H[K[77;1H[K[75;19H8L, 63C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  39: OK (357908480)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/75[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/75" [77;19H[K[77;19H82L, 1519C appended[77;19H[K[77;19H83L, 1541C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/76[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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' -c 'le
[76;103Ht[77;2HExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/76"' -c 'breakadd func 16 T' -S /tmp/vyA8hU
[76;103H5[77;1H/75[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/76" [75;19H[K[76;2H[K[77;1H[K[75;19H8L, 63C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;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[68;1H"/tmp/vyA8hU5/77"[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[68;19H[noeol] 11L, 334C
8 substitutions on 8 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/77"[70;19H[K[70;19H8L, 295C written"test49.in" [70;13H[K[70;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[67;1H"/tmp/vyA8hU5/78"[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[67;19H[noeol] 12L, 364C
9 substitutions on 9 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/78"[69;19H[K[69;19H9L, 323C written"test49.in" [69;13H[K[69;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[68;1H"/tmp/vyA8hU5/79"[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[68;19H[noeol] 11L, 332C
8 substitutions on 8 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/79"[70;19H[K[70;19H8L, 305C written"test49.in" [70;13H[K[70;13H30L, 632C
*** Test  50: OK (363550045)
*** Test  51: OK (40744667)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/81[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[73;1H[K[73;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/81" [73;19H[K[73;19H2L, 41C appended[73;19H[K[73;19H3L, 63C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/82[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/80' -c 'debug[76;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/82"' -S[77;2H/tmp/vyA8hU5/81[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/82" [75;19H[K[76;1H[K[77;2H[K[75;19H1L, 2C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/80" [75;19H[K[75;19H8L, 182C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/83[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/83" [76;19H[K[76;19H7L, 115C appended[76;19H[K[76;19H8L, 137C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/84[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/80' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/84"' -
[76;103HS[77;2H/tmp/vyA8hU5/83[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/84" [75;19H[K[76;1H[K[77;2H[K[75;19H1L, 2C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/80" [75;19H[K[75;19H8L, 181C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/85[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/85" [76;19H[K[76;19H12L, 180C appended[76;19H[K[76;19H13L, 202C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/86[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/80' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/86"' -
[76;103HS[77;2H/tmp/vyA8hU5/85[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/86" [75;19H[K[76;1H[K[77;2H[K[75;19H2L, 8C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/80" [75;19H[K[75;19H10L, 209C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/87[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/87" [76;19H[K[76;19H8L, 139C appended[76;19H[K[76;19H9L, 161C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/88[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/80' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/88"' -
[76;103HS[77;2H/tmp/vyA8hU5/87[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/88" [75;19H[K[76;1H[K[77;2H[K[75;19H2L, 11C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/80" [75;19H[K[75;19H10L, 217C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/89[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/89" [76;19H[K[76;19H5L, 87C appended[76;19H[K[76;19H6L, 109C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/90[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/80' -c 'd
[76;103He[77;1Hbuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/90"
[76;103H'[77;2H-c 'breakadd file 4 /tmp/vyA8hU5/89' -S /tmp/vyA8hU5/89[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/90" [75;19H[K[76;1H[K[77;2H[K[75;19H1L, 7C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/80" [75;19H[K[75;19H[noeol] 9L, 202C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/91[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/91" [76;19H[K[76;19H7L, 189C appended[76;19H[K[76;19H8L, 211C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/92[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/80' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/92"' -
[76;103HS[77;2H/tmp/vyA8hU5/91[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/92" [75;19H[K[76;1H[K[77;2H[K[75;19H1L, 8C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/80" [75;19H[K[75;19H9L, 252C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/93[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/93" [76;19H[K[76;19H7L, 199C appended[76;19H[K[76;19H8L, 221C[76;19H[K[76;19H8L, 220C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/94[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/80' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/94"' -
[76;103HS[77;2H/tmp/vyA8hU5/93[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/94" [75;19H[K[76;1H[K[77;2H[K[75;19H1L, 10C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/80" [75;19H[K[75;19H9L, 214C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  52: OK (1247112011)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/96[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/96" [77;19H[K[77;19H1L, 10C appended[77;19H[K[77;19H2L, 32C[77;19H[K[77;19H2L, 31C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/97[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/97"' -
[76;103HS[77;2H/tmp/vyA8hU5/96[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/97" [75;19H[K[76;1H[K[77;2H[K[75;19H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 154C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/98[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/98" [76;19H[K[76;19H3L, 39C appended[76;19H[K[76;19H4L, 61C
3 substitutions on 3 lines"/tmp/vyA8hU5/98" [77;20H[K[77;19H4L, 58C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/99[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/99"' -
[76;103HS[77;2H/tmp/vyA8hU5/98[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/99" [75;19H[K[76;1H[K[77;2H[K[75;19H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 158C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/100[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/100" [76;20H[K[76;20H4L, 45C appended[76;20H[K[76;20H5L, 67C
4 substitutions on 4 lines"/tmp/vyA8hU5/100"[77;20H[K[77;20H5L, 63C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/101[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/101"'
[76;103H-[77;1HS /tmp/vyA8hU5/100[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/101" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 159C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/102[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/102" [76;20H[K[76;20H3L, 33C appended[76;20H[K[76;20H4L, 55C
3 substitutions on 3 lines"/tmp/vyA8hU5/102"[77;20H[K[77;20H4L, 52C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/103[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/103"'
[76;103H-[77;1HS /tmp/vyA8hU5/102[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/103" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 159C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/104[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/104" [76;20H[K[76;20H5L, 65C appended[76;20H[K[76;20H6L, 87C
5 substitutions on 5 lines"/tmp/vyA8hU5/104"[77;20H[K[77;20H6L, 82C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/105[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/105"'
[76;103H-[77;1HS /tmp/vyA8hU5/104[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/105" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 159C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/106[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/106" [76;20H[K[76;20H1L, 9C appended[76;20H[K[76;20H2L, 31C[76;20H[K[76;20H2L, 30C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/107[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/107"'
[76;103H-[77;1HS /tmp/vyA8hU5/106[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/107" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 153C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/108[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/108" [76;20H[K[76;20H3L, 38C appended[76;20H[K[76;20H4L, 60C
3 substitutions on 3 lines"/tmp/vyA8hU5/108"[77;20H[K[77;20H4L, 57C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/109[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/109"'
[76;103H-[77;1HS /tmp/vyA8hU5/108[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/109" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 157C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/110[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/110" [76;20H[K[76;20H4L, 44C appended[76;20H[K[76;20H5L, 66C
4 substitutions on 4 lines"/tmp/vyA8hU5/110"[77;20H[K[77;20H5L, 62C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/111[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/111"'
[76;103H-[77;1HS /tmp/vyA8hU5/110[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/111" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 157C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/112[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/112" [76;20H[K[76;20H3L, 32C appended[76;20H[K[76;20H4L, 54C
3 substitutions on 3 lines"/tmp/vyA8hU5/112"[77;20H[K[77;20H4L, 51C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/113[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/113"'
[76;103H-[77;1HS /tmp/vyA8hU5/112[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/113" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 157C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/114[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/114" [76;20H[K[76;20H5L, 64C appended[76;20H[K[76;20H6L, 86C
5 substitutions on 5 lines"/tmp/vyA8hU5/114"[77;20H[K[77;20H6L, 81C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/115[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/115"'
[76;103H-[77;1HS /tmp/vyA8hU5/114[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/115" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 157C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/116[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/116" [76;20H[K[76;20H1L, 11C appended[76;20H[K[76;20H2L, 33C[76;20H[K[76;20H2L, 32C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/117[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/117"'
[76;103H-[77;1HS /tmp/vyA8hU5/116[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/117" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 157C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/118[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/118" [76;20H[K[76;20H3L, 40C appended[76;20H[K[76;20H4L, 62C
3 substitutions on 3 lines"/tmp/vyA8hU5/118"[77;20H[K[77;20H4L, 59C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/119[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/119"'
[76;103H-[77;1HS /tmp/vyA8hU5/118[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/119" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 161C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/120[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/120" [76;20H[K[76;20H4L, 46C appended[76;20H[K[76;20H5L, 68C
4 substitutions on 4 lines"/tmp/vyA8hU5/120"[77;20H[K[77;20H5L, 64C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/121[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/121"'
[76;103H-[77;1HS /tmp/vyA8hU5/120[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/121" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 161C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/122[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/122" [76;20H[K[76;20H3L, 34C appended[76;20H[K[76;20H4L, 56C
3 substitutions on 3 lines"/tmp/vyA8hU5/122"[77;20H[K[77;20H4L, 53C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/123[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/123"'
[76;103H-[77;1HS /tmp/vyA8hU5/122[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/123" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 161C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/124[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/124" [76;20H[K[76;20H5L, 66C appended[76;20H[K[76;20H6L, 88C
5 substitutions on 5 lines"/tmp/vyA8hU5/124"[77;20H[K[77;20H6L, 83C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/125[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/125"'
[76;103H-[77;1HS /tmp/vyA8hU5/124[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/125" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 161C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/126[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/126" [76;20H[K[76;20H4L, 37C appended[76;20H[K[76;20H5L, 59C
4 substitutions on 4 lines"/tmp/vyA8hU5/126"[77;20H[K[77;20H5L, 55C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/127[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/127"'
[76;103H-[77;1HS /tmp/vyA8hU5/126[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/127" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 150C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/128[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/128" [76;20H[K[76;20H4L, 41C appended[76;20H[K[76;20H5L, 63C
4 substitutions on 4 lines"/tmp/vyA8hU5/128"[77;20H[K[77;20H5L, 59C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/129[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/95' -c 'debu
[76;103Hg[77;1Hgreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/129"'
[76;103H-[77;1HS /tmp/vyA8hU5/128[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/129" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/95" [75;19H[K[75;19H6L, 159C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  53: OK (131071)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/131[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/131" [77;20H[K[77;20H1L, 13C appended[77;20H[K[77;20H2L, 35C[77;20H[K[77;20H2L, 34C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/132[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/132"'
-S /tmp/vyA8hU5/131[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/132" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 164C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/133[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/133" [76;20H[K[76;20H3L, 36C appended[76;20H[K[76;20H4L, 58C
3 substitutions on 3 lines"/tmp/vyA8hU5/133"[77;20H[K[77;20H4L, 55C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/134[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/134"'
-S /tmp/vyA8hU5/133[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/134" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 168C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/135[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/135" [76;20H[K[76;20H3L, 38C appended[76;20H[K[76;20H4L, 60C
3 substitutions on 3 lines"/tmp/vyA8hU5/135"[77;20H[K[77;20H4L, 57C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/136[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/136"'
-S /tmp/vyA8hU5/135[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/136" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 154C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/137[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/137" [76;20H[K[76;20H4L, 48C appended[76;20H[K[76;20H5L, 70C
4 substitutions on 4 lines"/tmp/vyA8hU5/137"[77;20H[K[77;20H5L, 66C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/138[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/138"'
-S /tmp/vyA8hU5/137[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/138" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 168C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/139[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/139" [76;20H[K[76;20H4L, 53C appended[76;20H[K[76;20H5L, 75C
4 substitutions on 4 lines"/tmp/vyA8hU5/139"[77;20H[K[77;20H5L, 71C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/140[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/140"'
-S /tmp/vyA8hU5/139[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/140" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 155C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/141[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/141" [76;20H[K[76;20H5L, 62C appended[76;20H[K[76;20H6L, 84C
5 substitutions on 5 lines"/tmp/vyA8hU5/141"[77;20H[K[77;20H6L, 79C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/142[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/142"'
-S /tmp/vyA8hU5/141[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/142" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 155C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/143[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/143" [76;20H[K[76;20H5L, 64C appended[76;20H[K[76;20H6L, 86C
5 substitutions on 5 lines"/tmp/vyA8hU5/143"[77;20H[K[77;20H6L, 81C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/144[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/144"'
-S /tmp/vyA8hU5/143[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/144" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 154C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/145[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/145" [76;20H[K[76;20H3L, 36C appended[76;20H[K[76;20H4L, 58C
3 substitutions on 3 lines"/tmp/vyA8hU5/145"[77;20H[K[77;20H4L, 55C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/146[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/146"'
-S /tmp/vyA8hU5/145[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/146" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 168C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/147[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/147" [76;20H[K[76;20H5L, 67C appended[76;20H[K[76;20H6L, 89C
5 substitutions on 5 lines"/tmp/vyA8hU5/147"[77;20H[K[77;20H6L, 84C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/148[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/148"'
-S /tmp/vyA8hU5/147[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/148" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 167C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/149[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/149" [76;20H[K[76;20H5L, 68C appended[76;20H[K[76;20H6L, 90C
5 substitutions on 5 lines"/tmp/vyA8hU5/149"[77;20H[K[77;20H6L, 85C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/150[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/150"'
-S /tmp/vyA8hU5/149[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/150" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 168C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/151[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/151" [76;20H[K[76;20H7L, 95C appended[76;20H[K[76;20H8L, 117C
7 substitutions on 7 lines"/tmp/vyA8hU5/151"[77;20H[K[77;20H8L, 110C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/152[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/130' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/152"'
-S /tmp/vyA8hU5/151[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/152" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/130" [75;20H[K[75;20H6L, 167C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  54: OK (2047)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/154[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/154" [77;20H[K[77;20H1L, 13C appended[77;20H[K[77;20H2L, 35C[77;20H[K[77;20H2L, 34C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/155[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/155"'
-S /tmp/vyA8hU5/154[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/155" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 172C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/156[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/156" [76;20H[K[76;20H3L, 36C appended[76;20H[K[76;20H4L, 58C
3 substitutions on 3 lines"/tmp/vyA8hU5/156"[77;20H[K[77;20H4L, 55C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/157[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/157"'
-S /tmp/vyA8hU5/156[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/157" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 176C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/158[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/158" [76;20H[K[76;20H4L, 48C appended[76;20H[K[76;20H5L, 70C
4 substitutions on 4 lines"/tmp/vyA8hU5/158"[77;20H[K[77;20H5L, 66C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/159[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/159"'
-S /tmp/vyA8hU5/158[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/159" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 176C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/160[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/160" [76;20H[K[76;20H3L, 36C appended[76;20H[K[76;20H4L, 58C
3 substitutions on 3 lines"/tmp/vyA8hU5/160"[77;20H[K[77;20H4L, 55C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/161[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/161"'
-S /tmp/vyA8hU5/160[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/161" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 176C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/162[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/162" [76;20H[K[76;20H5L, 68C appended[76;20H[K[76;20H6L, 90C
5 substitutions on 5 lines"/tmp/vyA8hU5/162"[77;20H[K[77;20H6L, 85C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/163[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/163"'
-S /tmp/vyA8hU5/162[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/163" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 176C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/164[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/164" [76;20H[K[76;20H1L, 10C appended[76;20H[K[76;20H2L, 32C[76;20H[K[76;20H2L, 31C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/165[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/165"'
-S /tmp/vyA8hU5/164[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/165" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 166C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/166[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/166" [76;20H[K[76;20H3L, 33C appended[76;20H[K[76;20H4L, 55C
3 substitutions on 3 lines"/tmp/vyA8hU5/166"[77;20H[K[77;20H4L, 52C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/167[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/167"'
-S /tmp/vyA8hU5/166[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/167" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 170C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/168[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/168" [76;20H[K[76;20H4L, 45C appended[76;20H[K[76;20H5L, 67C
4 substitutions on 4 lines"/tmp/vyA8hU5/168"[77;20H[K[77;20H5L, 63C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/169[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/169"'
-S /tmp/vyA8hU5/168[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/169" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 170C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/170[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/170" [76;20H[K[76;20H3L, 33C appended[76;20H[K[76;20H4L, 55C
3 substitutions on 3 lines"/tmp/vyA8hU5/170"[77;20H[K[77;20H4L, 52C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/171[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/171"'
-S /tmp/vyA8hU5/170[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/171" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 170C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/172[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/172" [76;20H[K[76;20H5L, 65C appended[76;20H[K[76;20H6L, 87C
5 substitutions on 5 lines"/tmp/vyA8hU5/172"[77;20H[K[77;20H6L, 82C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/173[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/153' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/173"'
-S /tmp/vyA8hU5/172[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/173" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/153" [75;20H[K[75;20H6L, 170C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  55: OK (1023)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/175[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/175" [77;20H[K[77;20H1L, 11C appended[77;20H[K[77;20H2L, 33C[77;20H[K[77;20H2L, 32C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/176[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/176"'
-S /tmp/vyA8hU5/175[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/176" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 158C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/177[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/177" [76;20H[K[76;20H3L, 34C appended[76;20H[K[76;20H4L, 56C
3 substitutions on 3 lines"/tmp/vyA8hU5/177"[77;20H[K[77;20H4L, 53C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/178[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/178"'
-S /tmp/vyA8hU5/177[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/178" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 162C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/179[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/179" [76;20H[K[76;20H3L, 40C appended[76;20H[K[76;20H4L, 62C
3 substitutions on 3 lines"/tmp/vyA8hU5/179"[77;20H[K[77;20H4L, 59C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/180[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/180"'
-S /tmp/vyA8hU5/179[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/180" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 162C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/181[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/181" [76;20H[K[76;20H3L, 32C appended[76;20H[K[76;20H4L, 54C
3 substitutions on 3 lines"/tmp/vyA8hU5/181"[77;20H[K[77;20H4L, 51C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/182[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/182"'
-S /tmp/vyA8hU5/181[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/182" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 152C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/183[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/183" [76;20H[K[76;20H3L, 35C appended[76;20H[K[76;20H4L, 57C
3 substitutions on 3 lines"/tmp/vyA8hU5/183"[77;20H[K[77;20H4L, 54C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/184[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/184"'
-S /tmp/vyA8hU5/183[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/184" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 155C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/185[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/185" [76;20H[K[76;20H4L, 44C appended[76;20H[K[76;20H5L, 66C
4 substitutions on 4 lines"/tmp/vyA8hU5/185"[77;20H[K[77;20H5L, 62C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/186[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/186"'
-S /tmp/vyA8hU5/185[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/186" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 152C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/187[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/187" [76;20H[K[76;20H4L, 47C appended[76;20H[K[76;20H5L, 69C
4 substitutions on 4 lines"/tmp/vyA8hU5/187"[77;20H[K[77;20H5L, 65C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/188[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/188"'
-S /tmp/vyA8hU5/187[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/188" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 155C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/189[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/189" [76;20H[K[76;20H5L, 64C appended[76;20H[K[76;20H6L, 86C
5 substitutions on 5 lines"/tmp/vyA8hU5/189"[77;20H[K[77;20H6L, 81C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/190[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/190"'
-S /tmp/vyA8hU5/189[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/190" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 152C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/191[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/191" [76;20H[K[76;20H5L, 67C appended[76;20H[K[76;20H6L, 89C
5 substitutions on 5 lines"/tmp/vyA8hU5/191"[77;20H[K[77;20H6L, 84C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/192[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/vyA8hU5/174' -c 'deb
[76;103Hu[77;1Hggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/192"'
-S /tmp/vyA8hU5/191[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/192" [75;21H[K[76;1H[K[77;1H[K[75;20H0L, 0C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/tmp/vyA8hU5/174" [75;20H[K[75;20H6L, 155C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  56: OK (511)
   function FuncException()
1      let g:exception = v:exception
   endfunction[75;1H"/tmp/vyA8hU5/193" [75;20H[K[76;1H[K[77;4H[K[75;20H[noeol] 4L, 80C
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/193" [76;20H[K[76;20H1L, 36C written"test49.in" [76;13H[K[76;13H30L, 632C
   function FuncThrowpoint()
1      let g:throwpoint = v:throwpoint
   endfunction[75;1H"/tmp/vyA8hU5/194" [75;20H[K[76;1H[K[77;4H[K[75;20H[noeol] 4L, 83C
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/194" [76;20H[K[76;20H1L, 38C written"test49.in" [76;13H[K[76;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[67;1H"/tmp/vyA8hU5/195"[67;20H[K[68;1H[K[69;1H[K[70;1H[K[71;1H[K[72;1H[K[73;1H[K[74;1H[K[75;1H[K[76;1H[K[77;4H[K[67;20H[noeol] 12L, 341C
9 substitutions on 9 lines
8 substitutions on 8 lines
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/195" [70;20H[K[70;20H9L, 292C written"test49.in" [70;13H[K[70;13H30L, 632C
   function G(arg, line)
1      call T(a:arg, a:line)
   endfunction[71;1H"/tmp/vyA8hU5/196"[71;20H[K[72;1H[K[73;4H[K[71;20H[noeol] 4L, 69C
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/196" [72;20H[K[72;20H1L, 30C written"test49.in" [72;13H[K[72;13H30L, 632C
   function F(arg, line)
1      call G(a:arg, a:line)
   endfunction[73;1H"/tmp/vyA8hU5/197"[73;20H[K[74;1H[K[75;4H[K[73;20H[noeol] 4L, 69C
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/197" [74;20H[K[74;20H1L, 30C written"test49.in" [74;13H[K[74;13H30L, 632C
*** Test  57: OK (2147450880)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/198[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/198" [76;20H[K[76;20H87L, 1700C appended[76;20H[K[76;20H88L, 1722C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/199[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/199"' -c 'breakadd func 4 T' -S /tmp/vyA8hU5/198[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/199" [76;20H[K[77;1H[K[76;20H8L, 36C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  58: OK (624945)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/200[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/200" [77;20H[K[77;20H293L, 5789C appended[77;20H[K[77;20H294L, 5811C
3 substitutions on 3 lines"/tmp/vyA8hU5/200"[77;20H[K[77;20H294L, 5808C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/201[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
= 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/201"' -c 'breakadd file 115 /tmp/vyA8hU5/200' -c 'breakadd
file 225 /tmp/vyA8hU5/200' -S /tmp/vyA8hU5/200[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/201"[75;20H[K[76;1H[K[77;1H[K[75;20H28L, 162C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  59: OK (2038431743)"/n/o/n/w/r/i/t/a/b/l/e/_/f/i/l/e""/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/202[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/202" [77;20H[K[77;20H33L, 765C appended[77;20H[K[77;20H34L, 787C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/203[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/203"' -c 'breakadd file 7 /tmp/vyA8hU5/202' -S /tmp/vyA8hU5/2
[76;103H0[77;1H2[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/203" [75;20H[K[76;1H[K[77;1H[K[75;20H3L, 27C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  60: OK (311511339)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/204[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/204" [77;20H[K[77;20H115L, 2272C appended[77;20H[K[77;20H116L, 2294C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/205[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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 'let E
[76;103Hx[77;1HtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/205"' -c 'breakadd file 8 /tmp/vyA8hU5/204' -c
'breakadd file 36 /tmp/vyA8hU5/204' -c 'breakadd file 40 /tmp/vyA8hU5/204' -c 'breakadd file 69 /tmp/v
[76;103Hy[77;1HA8hU5/204' -c 'breakadd file 95 /tmp/vyA8hU5/204' -c 'breakadd file 97 /tmp/vyA8hU5/204' -S /tmp/vyA8h
[76;103HU[77;1H5/204[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[73;1H"/tmp/vyA8hU5/205" [73;20H[K[74;1H[K[75;1H[K[76;1H[K[77;1H[K[73;20H14L, 81C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [73;13H[K[73;13H30L, 632C
*** Test  61: OK (374889517)
   function F()
1      while 1
2      " Missing :endwhile
   endfunction[74;1H"/tmp/vyA8hU5/206"[75;1H[K[76;1H[K[77;4H[K[74;20H[noeol] 5L, 73C
E486: Pattern not found: ^\s*$"/tmp/vyA8hU5/206" [75;20H[K[75;20H2L, 40C written"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  62: OK (286331153)"/i/m/p/o/s/s/i/b/l/e" [76;24H[K[77;1H[1m[37m[41mError detected while processing /sources/vim73/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/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/207[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/207" [77;20H[K[77;20H149L, 2828C appended[77;20H[K[77;20H150L, 2850C
6 substitutions on 6 lines"/tmp/vyA8hU5/207"[77;20H[K[77;20H150L, 2844C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/208[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/208"' -c 'breakadd file 63 /tmp/vyA8hU5/207' -S /tmp/vyA8hU5/
[76;103H2[77;1H07[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/208" [75;20H[K[76;1H[K[77;1H[K[75;20H16L, 97C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  64: OK (1499645335)
*** Test  65: OK (70187)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/209[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/209" [77;20H[K[77;20H78L, 1520C appended[77;20H[K[77;20H79L, 1542C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/210[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/210"' -c 'breakadd func 8 F' -S /tmp/vyA8hU5/209[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/210" [76;20H[K[77;1H[K[76;20H6L, 22C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;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/vyA8hU5/211" [New File]"test49.in" [77;13H[K[77;13H30L, 632C"/tmp/vyA8hU5/212" [New File]"test49.in" [77;13H[K[77;13H30L, 632C
*** Test  74: OK (224907669)
*** Test  75: OK (2000403408)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/213[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/213" [77;20H[K[77;20H253L, 6369C appended[77;20H[K[77;20H254L, 6391C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/214[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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+=nviminfo'
[76;103H-[77;1Hc 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/214"' -c 'breakadd func 2 INT' -S /tm
[76;103Hp[77;1H/vyA8hU5/213[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/214" [75;20H[K[76;1H[K[77;1H[K[75;20H28L, 167C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;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/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/215[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/215" [77;20H[K[77;20H161L, 4543C appended[77;20H[K[77;20H162L, 4565C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/216[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/216"' -S /tmp/vyA8hU5/215[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/216" [76;21H[K[77;1H[K[76;20H1L, 10C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;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/vim73/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/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/217[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/217" [77;20H[K[77;20H15L, 272C appended[77;20H[K[77;20H16L, 294C[77;20H[K[77;20H16L, 293C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/218[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/218"' -S /tmp/vyA8hU5/217[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/218" [76;21H[K[77;1H[K[76;20H2L, 4C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/219[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/219" [77;20H[K[77;20H12L, 227C appended[77;20H[K[77;20H13L, 249C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/220[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/220"' -c 'breakadd file 8 /tmp/vyA8hU5/219' -S /tmp/vyA8hU5/2
[76;103H1[77;1H9[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/220" [75;20H[K[76;1H[K[77;1H[K[75;20H2L, 8C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  81: OK (387)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/221[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/221" [77;20H[K[77;20H20L, 417C appended[77;20H[K[77;20H21L, 439C[77;20H[K[77;20H21L, 438C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/222[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/222"' -S /tmp/vyA8hU5/221[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/222" [76;21H[K[77;1H[K[76;20H1L, 2C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/223[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/223" [77;20H[K[77;20H24L, 480C appended[77;20H[K[77;20H25L, 502C[77;20H[K[77;20H25L, 501C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/224[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/224"' -S /tmp/vyA8hU5/223[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/224" [76;21H[K[77;1H[K[76;20H1L, 4C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/225[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/225" [77;20H[K[77;20H17L, 390C appended[77;20H[K[77;20H18L, 412C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/226[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/226"' -c 'breakadd file 7 /tmp/vyA8hU5/225' -S /tmp/vyA8hU5/2
[76;103H2[77;1H5[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/226" [75;20H[K[76;1H[K[77;1H[K[75;20H1L, 6C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/227[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H[K[76;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/227" [76;20H[K[76;20H21L, 444C appended[76;20H[K[76;20H22L, 466C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/228[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/228"' -c 'breakadd func 6 I' -S /tmp/vyA8hU5/227[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/228" [76;20H[K[77;1H[K[76;20H1L, 8C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  82: OK (8454401)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/229[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/229" [77;20H[K[77;20H17L, 307C appended[77;20H[K[77;20H18L, 329C[77;20H[K[77;20H18L, 328C written"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/230[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1'
[76;103H-[77;1Hc 'let ExtraVimResult = "/tmp/vyA8hU5/230"' -S /tmp/vyA8hU5/229[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/230" [76;21H[K[77;1H[K[76;20H3L, 7C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/231[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/231" [77;20H[K[77;20H14L, 266C appended[77;20H[K[77;20H15L, 288C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/232[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin =
[76;103H1[77;1H' -c 'let ExtraVimResult = "/tmp/vyA8hU5/232"' -c 'breakadd file 8 /tmp/vyA8hU5/231' -S /tmp/vyA8hU5/2
[76;103H3[77;1H1[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/232" [75;20H[K[76;1H[K[77;1H[K[75;20H3L, 13C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  83: OK (2835)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/233[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/233" [77;20H[K[77;20H154L, 3580C appended[77;20H[K[77;20H155L, 3602C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/234[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;1H
[?25l:!echo 'q[34m^M[mq[34m^M[mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin
= 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/234"' -c 'breakadd func 1 INT' -S /tmp/vyA8hU5/233[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[76;1H"/tmp/vyA8hU5/234"[76;20H[K[77;1H[K[76;20H18L, 118C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [76;13H[K[76;13H30L, 632C
*** Test  84: OK (934782101)
TMP"/tmp/vyA8hU5/235" [noeol] 2L, 6C[77;1H[K[77;1H/  "test49.in" 30L, 632C"/n/o/n/e/x/i/s/t/e/n/t"
"/tmp/vyA8hU5/237" 1L, 1C"test49.in" [77;13H[K[77;13H30L, 632C
:!echo XYZ >/tmp/vyA8hU5/238[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H"/tmp/vyA8hU5/239" [New File]"test49.in" [77;13H[K[77;13H30L, 632C
*** Test  85: OK (198689)"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!echo 'source /tmp/vyA8hU5/3' >/tmp/vyA8hU5/240[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[?25l[77;1H[K[77;1H/^\s*if\s\+ExtraVim(.*)/+[25C1"/tmp/vyA8hU5/240" [77;20H[K[77;20H151L, 3929C appended[77;20H[K[77;20H152L, 3951C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C
:!>/tmp/vyA8hU5/241[?1l>[?12l[?25h[?1049l

Press ENTER or type command to continue[?1049h[?1h=[77;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 ExtraVimBe
[76;103Hg[77;1Hin = 1' -c 'let ExtraVimResult = "/tmp/vyA8hU5/241"' -c 'breakadd func 5 ThrowOnInterrupt' -S /tmp/vyA
[76;103H8[77;1HhU5/240[?1l>[?12l[?25h[?1049l

shell returned 1

Press ENTER or type command to continue[?1049h[?1h=[?25l[75;1H"/tmp/vyA8hU5/241" [75;21H[K[76;1H[K[77;1H[K[75;20H16L, 281C"/sources/vim73/src/testdir/test49.vim" [readonly] 9802L, 224141C"test49.in" [75;13H[K[75;13H30L, 632C
*** Test  86: OK (50443995)
[32mPress ENTER or type command to continue[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [29;1H[?12l[?25h
[?25l[m[77;1H91 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[60;1H*** Test  30: OK (190905173)[60;29H[K[61;1H*** Test  31: OK (190905173)[61;29H[K[62;1H*** Test  32: OK (354833067)[62;29H[K[63;1H--- Test  33: sum = 178275600 (ok)[63;35H[K[64;1H*** Test  33: OK (1216907538)[64;30H[K[65;1H*** Test  34: OK (2146584868)[65;30H[K[66;1H*** Test  35: OK (2146584868)[66;30H[K[67;1H*** Test  36: OK (1071644672)[67;30H[K[68;1H*** Test  37: OK (1071644672)[68;30H[K[69;1H*** Test  38: OK (357908480)[69;29H[K[70;1H*** Test  39: OK (357908480)[70;29H[K[71;1H*** Test  40: OK (357908480)[71;29H[K[72;1H*** Test  41: OK (3076095)[72;27H[K[73;1H*** Test  42: OK (1505155949)[73;30H[K[74;1H*** Test  43: OK (1157763329)[74;30H[K[75;1H*** Test  44: OK (1031761407)[75;30H[K[76;1H*** Test  45: OK (1157763329)[76;30H[K[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.-,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New] 92L, 2672C written[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" make valgrind happy[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir => funclist[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsilent func[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir END[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;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"[77;1H[K[31;1H[?12l[?25h[?25l[77;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.[77;1H[K[31;1H[?12l[?25h[?25l[77;1H:[?12l[?25hunlet v[?25l[31;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test51.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for ":highlight". vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 31 lines, 746 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[35;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[36;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[36;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" basic test if ":highlight" doesn't crash[?25l[36;1H[?12l[?25h[?25l[77;1H[K[77;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
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[45mxxx[m [34mctermbg=[m5 [34mguibg=[mLightMagenta
PmenuSel[7C[47mxxx[m [34mctermbg=[m7 [34mguibg=[mGrey
PmenuSbar      [47mxxx[m [34mctermbg=[m7 [34mguibg=[mGrey
PmenuThumb     [7mxxx[m [34mcterm=[mreverse [34mgui=[mreverse
TabLine[8C[4m[30m[47mxxx[m [34mterm=[munderline [34mcterm=[munderline [34mctermfg=[m0 [34mctermbg=[m7 [34mgui=[munderline [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[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h" test setting colors.[?25l[1;1H[44L[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~                                                                                                      [m[77;1H[K[36;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" test clearing one color and all doesn't generate error or warning[?25l[36;1H[?12l[?25h[?25l[77;1H[K[77;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[77;35H[K[36;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhi Group2 term= cterm=[?25l[1m[37m[41mE418: Illegal value: cterm=[36;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hhi Group3 term=underline cterm=bold[?25l[36;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hredir! >test.out[?25l[36;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhi NewGroup[?25l
NewGroup[7C[7m[34m[47mxxx[m [34mterm=[mbold [34mcterm=[mitalic [34mctermfg=[m4 [34mctermbg=[m7
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hhi Group2[?25l
Group2[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hhi Group3[?25l
Group3[9C[1mxxx[m [34mterm=[munderline [34mcterm=[mbold
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;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[77;1H[K[36;1H[?12l[?25h[?25l[77;1H:[?12l[?25hhi NewGroup[?25l
NewGroup[7Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hhi Group2[?25l
Group2[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hhi Group2 NONE[?25l[1;1H[4L[1;1HTests for ":highlight". vim: set ft=vim :

STARTTEST
:so small.vim[77;1H[K[36;1H[?12l[?25h[?25l[77;1H:[?12l[?25hhi Group2[?25l
Group2[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hhi clear[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [36;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hhi Group3[?25l
Group3[9Cxxx cleared
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hredir END[?25l[1;1H[3L[1;1HTests for ":highlight". vim: set ft=vim :

STARTTEST[77;1H[K[36;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" filter ctermfg and ctermbg, the numbers depend on the terminal[?25l[36;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h%s/ctermfg=\d*/ctermfg=2/[?25l[3;51H2[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%s/ctermbg=\d*/ctermbg=3/[?25l[3;61H3[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" filter out possibly translated error message[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%s/E475: [^:]*:/E475:/[?25l[20;7Hterm='asdf[20;17H[K[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" fix the fileformat[?25l[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ff&[?25l[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hwq![?25l"test.out" 20 lines, 271 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test52.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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
:"
:qa!
ENDTEST

1 utf-8 text: Ð[34m~T[mÐ»Ñ[34m~O[m Vim version 6.2.  Ð[34m~_[mÐ¾Ñ[34m~A[mÐ»ÐµÐ´Ð½ÐµÐµ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ðµ: 1970 Jan 01
2 cp1251 text: Äëÿ Vim version 6.2.  Ïîñëåäíåå èçìåíåíèå: 1970 Jan 01
3 cp866 text: [34m~D[m«ï Vim version 6.2.  [34m~O[m®á«¥¤­¥¥ ¨§¬¥­¥­¨¥: 1970 Jan 01
[1m[34m~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for reading and writing files with conversion for Win32.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 57 lines, 1333 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[61;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso mbyte.vim[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" make this a dummy test for non-Win32 systems[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hif !has("win32") | e! test.ok | wq! test.out | endif[?25l"test.ok" [77;11H[K[77;11H18 lines, 1374 characters
"test.out" [New File] 18 lines, 1374 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test53.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test53.in" 48 lines, 952 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
:/^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

<begin>
-<b>asdf<i>Xasdf</i>asdf</b>-
-<b>asdX<i>a<i />sdf</i>asdf</b>-
-<b>asdf<i>Xasdf</i>asdf</b>-
-<b>asdX<i>as<b />df</i>asdf</b>-
</begin>
end:
[1m[34m~                                                                                                      [50;1H~                                                                                                      [51;1H~                                                                                                      [52;1H~                                                                                                      [53;1H~                                                                                                      [54;1H~                                                                                                      [55;1H~                                                                                                      [56;1H~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for string and html text objects. vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[7;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[8;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 24 lines, 461 characters written[8;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[8;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[32;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^start:/[?25l[77;9H[K[77;1H[34;1H[?12l[?25h[?25l[7Cfo[34;11H[K[34;8H[?12l[?25h[35;8H[?25l[?12l[?25h[?25l[7m'foo'[?12l[?25h[?25l 'bar'[?12l[?25h[?25l[mxxxxxxxxxxxx[?12l[?25h
[14C[?25lblah[36;13H[K[36;9H[?12l[?25h[37;9H[12C[?25l"[37;12H[K[37;11H[?12l[?25h[38;11H[9C[?25l[?12l[?25h[?25l'[7m rep[?12l[?25h[?25l[myyyyy[?12l[?25h[39;11H[?25l[77;1H[K[77;1H:[?12l[?25hset quoteescape=+*-[?25l[39;11H[?12l[?25h[?25l` b`la[39;12H[K[39;6H[?12l[?25h[40;6H[29C[?25l[?12l[?25h[?25l[7m" sdf"[?12l[?25h[?25l[m"[5C[7m [40;27H[?12l[?25h[?25l"[?12l[?25h[?25l[40;16H asdf" sdf [40;15H[?12l[?25h[?25l[40;7Hah" sdf "[mvoo "[?12l[?25h[?25lzzzzzzzzzzzzzzzzzzzzzzzzzzzzvoo "[?12l[?25h
[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[41;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^<begin[?25l[42;1H[?12l[?25h
[11C[?25l</i>asdf</b>-[43;25H[K[43;12H[?12l[?25h[44;12H[7C[?25l</b>-[44;10H[K[44;5H[?12l[?25h
-<b>[7C[?25lasdf</b>-[45;18H[K[45;9H[?12l[?25h[46;9H[7C[?25l--[46;3H[K[46;2H[?12l[?25h
<[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[47;2H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hput =matchstr(\"abcd\", \".\", 0, 2) " b[?25l[48;76r[48;1H[L[1;77r[48;1Hb[77;1H[K[48;1H[?12l[?25h[?25l[77;1H:[?12l[?25hput =matchstr(\"abcd\", \"..\", 0, 2) " bc[?25l[49;76r[49;1H[L[1;77r[49;1Hbc[77;1H[K[49;1H[?12l[?25h[?25l[77;1H:[?12l[?25hput =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)[?25l[50;76r[50;1H[L[1;77r[50;1Hc[77;1H[K[50;1H[?12l[?25h[?25l[77;1H:[?12l[?25hput =matchstr(\"abcd\", \".\", 0, -1) " a[?25l[51;76r[51;1H[L[1;77r[51;1Ha[77;1H[K[51;1H[?12l[?25h[?25l[77;1H:[?12l[?25hput =match(\"abcd\", \".\", 0, 5) " -1[?25l[52;76r[52;1H[L[1;77r[52;1H-1[77;1H[K[52;1H[?12l[?25h[?25l[77;1H:[?12l[?25hput =match(\"abcd\", \".\", 0, -1) " 0[?25l[53;76r[53;1H[L[1;77r[53;1H0[77;1H[K[53;1H[?12l[?25h[?25l[77;1H:[?12l[?25h/^start:/,/^end:/wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 21 lines, 217 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test54.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HSome tests for buffer-local autocommands[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 15 lines, 555 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[19;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[20;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;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=[77;1H
[?25l:  :[?12l[?25h au BufLeave <buffer> :!echo buffer-local autommand in %>> test.out
[?25l:  [?12l[?25h:endif[?25l[77;1H[K[77;1H:[?12l[?25he somefile           " here, autocommand for xx shall write test.out [?25l:!echo buffer-local autommand in xx>> test.out[77;47H[K[77;47H
[?12l[?25h[?25l[m"somefile" [New File]
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h                     " but autocommand shall not apply to buffer named <buffer>[?25l[27m[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hbwipe xx             " here, autocommand shall be auto-deleted[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he xx                 " nothing shall be written[?25l"xx" [New File][77;23H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he somefile           " nothing shall be written[?25l"somefile" [New File][77;23H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[?1l>[?12l[?25h[?1049l
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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test55.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test55.in" 355 lines, 7272 characters[1;1HTests for List and Dictionary types.     vim: set ft=vim :

STARTTEST
:so small.vim
:fun Test(...)
:" Creating List directly with different types
:let l = [1, 'as''d', [1, 2, function("strlen")], {'a': 1},]
:$put =string(l)
:$put =string(l[-1])
:$put =string(l[-4])
:try
:  $put =string(l[-5])
:catch
:  $put =v:exception[:14]
:endtry
:" List slices
:$put =string(l[:])
:$put =string(l[1:])
:$put =string(l[:-2])
:$put =string(l[0:8])
:$put =string(l[8:-1])
:"
:" List identity
:let ll = l
:let lx = copy(l)
:try
:  $put =(l == ll) . (l isnot ll) . (l is ll) . (l == lx) . (l is lx) . (l isnot lx)
:catch
:  $put =v:exception
:endtry
:"
:" Creating Dictionary directly with different types
:let d = {001: 'asd', 'b': [1, 2, function('strlen')], -1: {'a': 1},}
:$put =string(d) . d.1
:$put =string(sort(keys(d)))
:$put =string (values(d))
:for [key, val] in items(d)
:  $put =key . ':' . string(val)
:  unlet key val
:endfor
:call extend  (d, {3:33, 1:99})
:call extend(d, {'b':'bbb', 'c':'ccc'}, "keep")
:try
:  call extend(d, {3:333,4:444}, "error")
:catch
:  $put =v:exception[:15] . v:exception[-1:-1]
:endtry
:$put =string(d)
:call filter(d, 'v:key =~ ''[ac391]''')
:$put =string(d)
:"
:" Dictionary identity
:let dd = d
:let dx = copy(d)
:try
:  $put =(d == dd) . (d isnot dd) . (d is dd) . (d == dx) . (d is dx) . (d isnot dx)
:catch
:  $put =v:exception
:endtry
:"
:" Changing var type should fail
:try
:  let d = []
:catch
:  $put =v:exception[:14] . v:exception[-1:-1]
:endtry
:try
:  let l = {}
:catch
:  $put =v:exception[:14] . v:exception[-1:-1]
:endtry
:"
:" removing items with :unlet
:unlet l[2]
:$put =string(l)
:let l = range(8)[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for List and Dictionary types.     vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 349 lines, 7186 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[27m[m[H[2J[1;1H:    endtry
:    $put =ps
:  endfor
:endfor
:"
:" a:000 function argument
:" first the tests that should fail
:try
:  let a:000 = [1, 2]
:catch
:  $put ='caught a:000'
:endtry
:try
:  let a:000[0] = 9
:catch
:  $put ='caught a:000[0]'
:endtry
:try
:  let a:000[2] = [9, 10]
:catch
:  $put ='caught a:000[2]'
:endtry
:try
:  let a:000[3] = {9: 10}
:catch
:  $put ='caught a:000[3]'
:endtry
:" now the tests that should pass
:try
:  let a:000[2][1] = 9
:  call extend(a:000[2], [5, 6])
:  let a:000[3][5] = 8
:  let a:000[3]['a'] = 12
:  $put =string(a:000)
:catch
:  $put ='caught ' . v:exception
:endtry
:"
:" reverse() and sort()
:let l = ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', [0, 1, 2], 'x8']
:$put =string(reverse(l))
:$put =string(reverse(reverse(l)))
:$put =string(sort(l))
:$put =string(reverse(sort(l)))
:$put =string(sort(reverse(sort(l))))
:"
:" splitting a string to a List
:$put =string(split('  aa  bb '))
:$put =string(split('  aa  bb  ', '\W\+', 0))
:$put =string(split('  aa  bb  ', '\W\+', 1))
:$put =string(split('  aa  bb  ', '\W', 1))
:$put =string(split(':aa::bb:', ':', 0))
:$put =string(split(':aa::bb:', ':', 1))
:$put =string(split('aa,,bb, cc,', ',\s*', 1))
:$put =string(split('abc', '\zs'))
:$put =string(split('abc', '\zs', 1))
:"
:" 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))
:endfun
:call Test(1, 2, [3, 4], {5: 6})  " This may take a while
:"
:delfunc Test
:unlet dict
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
ENDTEST

start:[74;1H[?12l[?25h
[?25l

:so! Xdotest[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfun Test(...)[?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]").'
[76;103H-[77;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:endfun[27m[m[H[2J[?25l[1;1H:    endtry
:    $put =ps
:  endfor
:endfor
:"
:" a:000 function argument
:" first the tests that should fail
:try
:  let a:000 = [1, 2]
:catch
:  $put ='caught a:000'
:endtry
:try
:  let a:000[0] = 9
:catch
:  $put ='caught a:000[0]'
:endtry
:try
:  let a:000[2] = [9, 10]
:catch
:  $put ='caught a:000[2]'
:endtry
:try
:  let a:000[3] = {9: 10}
:catch
:  $put ='caught a:000[3]'
:endtry
:" now the tests that should pass
:try
:  let a:000[2][1] = 9
:  call extend(a:000[2], [5, 6])
:  let a:000[3][5] = 8
:  let a:000[3]['a'] = 12
:  $put =string(a:000)
:catch
:  $put ='caught ' . v:exception
:endtry
:"
:" reverse() and sort()
:let l = ['-0', 'A11', 2, 'xaaa', 4, 'foo', 'foo6', [0, 1, 2], 'x8']
:$put =string(reverse(l))
:$put =string(reverse(reverse(l)))
:$put =string(sort(l))
:$put =string(reverse(sort(l)))
:$put =string(sort(reverse(sort(l))))
:"
:" splitting a string to a List
:$put =string(split('  aa  bb '))
:$put =string(split('  aa  bb  ', '\W\+', 0))
:$put =string(split('  aa  bb  ', '\W\+', 1))
:$put =string(split('  aa  bb  ', '\W', 1))
:$put =string(split(':aa::bb:', ':', 0))
:$put =string(split(':aa::bb:', ':', 1))
:$put =string(split('aa,,bb, cc,', ',\s*', 1))
:$put =string(split('abc', '\zs'))
:$put =string(split('abc', '\zs', 1))
:"
:" 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))
:endfun
:call Test(1, 2, [3, 4], {5: 6})  " This may take a while
:"
:delfunc Test
:unlet dict
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
ENDTEST

start:[75;1H[?12l[?25h[?25l

:[?12l[?25hcall Test(1, 2, [3, 4], {5: 6})  " This may take a while[?25l[1;1H[3][1;6H[K[2;1H[3][2;6H[K[3;1H2[3;4H[K[4;1H3[4;2H[K[5;1HVim(let):E687:
Vim(let):E688: [6;16H[K[7;1H3000 2900 2001 1600 1501[7;25H[K[8;1HVim(let):E716: 1500
NONE 2999[9;10H[K[10;1H33=999
{'33': 999}[11;12H[K[12;1Hlen: 3[12;7H[K[13;1Hagain: 3
Vim(call):E725:[14;17H[K[15;1Hg:dict.func-4
a:function('3')[16;16H[K[17;1HVim(let):E698:
same list: 1
depth is [19;11H[K[20;1H0000-000
ppppppp[21;9H[K[22;1H0000-000
ppppppp
0000-000[24;9H[K[25;1Hppppppp
depth is 1[26;11H[K[27;1H1000-000
ppppppF[28;8H[K[29;1H0000-000
ppppppp[30;8H[K[31;1H0000-000[31;9H[K[32;1Hppppppp[32;8H[K[33;1Hdepth is 2[33;11H[K[34;1H1100-100[34;9H[K[35;1HppFppFF
0000-000[36;9H[K[37;1Hppppppp
0000-000
ppppppp[39;8H[K[40;1Hdepth is 3[40;11H[K[41;1H1110-110[41;9H[K[42;1HpFFpFFF[42;8H[K[43;1H0010-010[43;9H[K[44;1HpFppFpp[44;8H[K[45;1H0000-000[45;9H[K[46;1Hppppppp
depth is 4[47;11H[K[48;1H1111-111[48;9H[K[49;1HFFFFFFF[49;8H[K[50;1H0011-011[50;9H[K[51;1HFFpFFpp[51;8H[K[52;1H0000-000[52;9H[K[53;1Hppppppp[53;8H[K[54;1Hcaught a:000[54;13H[K[55;1Hcaught a:000[0][55;16H[K[56;1Hcaught a:000[2][56;16H[K[57;1Hcaught a:000[3]
[1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}][58;40H[K[59;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'][64;14H[K[65;1H['aa', 'bb'][65;14H[K[66;1H['', 'aa', 'bb', '']
['', '', 'aa', '', 'bb', '', ''][67;35H[K[68;1H['aa', '', 'bb']
['', 'aa', '', 'bb', '']
['aa', '', 'bb', 'cc', '']
['a', 'b', 'c'][71;16H[K[72;1H['', 'a', '', 'b', '', 'c', '']
1[73;2H[K[74;1H1[74;2H[K[75;1H0
0[76;2H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc Test[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet dict[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall garbagecollect(1)[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start:/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 111 lines, 1899 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test56.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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<bar>dee[21;1Hlfunc <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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for script-local function.     vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 7 lines, 120 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[11;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocp viminfo+=nviminfo[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start:/+1,/^end:/-1w! Xtest.vim[?25l"Xtest.vim" [77;13H[K[77;13H[New] 7L, 251C written[12;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsource Xtest.vim[?25l[12;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h$-1,$wq! test.out[?25l"test.out" [77;12H[K[77;12H[New] 2L, 23C written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test57.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test57.in" 496 lines, 3654 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
a
a321
a123
a122
b321
b123
c123d
 123b
c321d
b322b
b321
b321b


t03: hexadecimal
abc
ab
a
a321
a123
a122[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for :sort command.     vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 30 lines, 842 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[34;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[35;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[35;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[35;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h/^t02:/+1,/^t03/-1sort n[?25l[57;1H[K[58;1H[K[60;1Ha123[64;1Ha[64;5H[K[65;4H1[65;5H[K[66;1Hc321d[67;5H[K[68;1Hb321b
b322b[54;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^t03:/+1,/^t04/-1sort x[?25l[71;1H[K[72;1H[K[74;2Hb[74;3H[K[75;2Hbc[75;4H[K[76;1H 123b[71;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^t04:/+1,/^t05/-1sort u[?25l[1;76r[1;1H[12M[1;77r[65;1Ha122
a123
a321
b123
b321
b321
b321b
b322b
c123d
c321d
t04: alpha, unique[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t05:/+1,/^t06/-1sort![?25l[1;76r[1;1H[15M[1;77r[62;2H123b
a
a122
a123
a321
ab
abc
b123
b321
b321b
b322b
c123d
c321d
t05: alpha, reverse
c321d[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t06:/+1,/^t07/-1sort! n        [?25l[1;76r[1;1H[17M[1;77r[60;1Hc123d
b322b
b321b
b321
b321
b123
abc
ab
a321
a123
a122
a
 123b


t06: numeric, reverse
b322b[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t07:/+1,/^t08/-1sort! u[?25l[1;76r[1;1H[17M[1;77r[60;1Hb321b
b321
c321d
b321
a321
 123b
c123d
b123
a123
a122


a
ab
abc
t07: unique, reverse
c321d[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t08:/+1,/^t09/-1sort o         [?25l[1;76r[1;1H[15M[1;77r[62;1Hc123d
b322b
b321b
b321
b123
abc
ab
a321
a123
a122
a
 123b

t08: octal
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t09:/+1,/^t10/-1sort! x        [?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a122
a123
b123
c123d
 123b
a321
b321
c321d
b321
b321b
b322b
t09: reverse, hexadecimal
c321d[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t10:/+1,/^t11/-1sort/./        [?25l[1;76r[1;1H[17M[1;77r[60;1Hc123d
b322b
b321b
b321
b321
b123
a321
a123
a122
 123b
abc
ab
a


t10: alpha, skip first character
a[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t11:/+1,/^t12/-1sort/../       [?25l[1;76r[1;1H[17M[1;77r[62;1Ha122
a123
b123
 123b
c123d
a321
b321
b321
b321b
c321d
b322b
ab
abc
t11: alpha, skip first 2 characters
ab[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t12:/+1,/^t13/-1sort/../u[?25l[1;76r[1;1H[17M[1;77r[60;1Ha


a321
b321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
abc
t12: alpha, unique, skip first 2 characters
ab[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t13:/+1,/^t14/-1sort/./n[?25l[1;76r[1;1H[15M[1;77r[62;1Ha

a321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
abc
t13: numeric, skip first character
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t14:/+1,/^t15/-1sort/./r[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a122
a123
b123
c123d
 123b
a321
b321
c321d
b321
b321b
b322b
t14: alpha, sort on first character[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t15:/+1,/^t16/-1sort/../r[?25l[1;76r[1;1H[17M[1;77r[61;2H123b
abc
ab
a
a321
a123
a122
b321
b123
b322b
b321
b321b
c123d
c321d
t15: alpha, sort on first 2 characters
a[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t16:/+1,/^t17/-1sort/./rn[?25l[1;76r[1;1H[17M[1;77r[62;2H123b
a123
a122
a321
abc
ab
b123
b321
b322b
b321
b321b
c123d
c321d
t16: numeric, sort on first character
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t17:/+1,/^t18/-1sort/\d/[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a
a321
a123
a122
b321
b123
c123d
 123b
c321d
b322b
b321
b321b


t17: alpha, skip past first digit
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t18:/+1,/^t19/-1sort/\d/r[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a321
b321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
t18: alpha, sort on first digit
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t19:/+1,/^t20/-1sort/\d/n[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t19: numeric, skip past first digit
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t20:/+1,/^t21/-1sort/\d/rn[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a321
b321
c321d
b321
b321b
a122
b322b
a123
b123
c123d
 123b
t20: numeric, sort on first digit
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t21:/+1,/^t22/-1sort/\d\d/[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t21: alpha, skip past first 2 digits
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t22:/+1,/^t23/-1sort/\d\d/n[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a321
b321
b321
b321b
c321d
a122
b322b
a123
b123
 123b
c123d
t22: numeric, skip past first 2 digits
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t23:/+1,/^t24/-1sort/\d\d/x[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a321
b321
c321d
b321
b321b
a122
b322b
a123
b123
c123d
 123b
t23: hexadecimal, skip past first 2 digits
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t24:/+1,/^t25/-1sort/\d\d/r[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a321
b321
b321
a122
a123
b123
b321b
c321d
b322b
 123b
c123d
t24: alpha, sort on first 2 digits
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t25:/+1,/^t26/-1sort/\d\d/rn[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t25: numeric, sort on first 2 digits
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t26:/+1,/^t27/-1sort/\d\d/rx[?25l[1;76r[1;1H[17M[1;77r[60;1Hab
a


a123
a122
b123
c123d
 123b
a321
b321
c321d
b322b
b321
b321b
t26: hexadecimal, sort on first 2 digits
abc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^t27:/+1,/^t28/-1sort no[?25l[1m[37m[41mE474: Invalid argument[m[77;23H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^t01:/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 455 lines, 2727 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test58.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test58.in" 635 lines, 10784 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!
:"
:" 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'[34;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')
:$put =soundfold('oeverloos gezwets edale')
:"
:" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add
:mkspell! Xtest.latin1.add.spl Xtest.latin1.add
:set spellfile=Xtest.latin1.add
/^test2:
]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_us.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_gb.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for spell checking.     vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 105 lines, 2456 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[33M[1;77r[44;1H:set spl=Xtest_nz.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$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[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Don't want to depend on the locale from the environment[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset enc=latin1[?25l[27m[m[H[2J[1;5Hendif
    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')
:$put =soundfold('oeverloos gezwets edale')
:"
:" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add
:mkspell! Xtest.latin1.add.spl Xtest.latin1.add
:set spellfile=Xtest.latin1.add
/^test2:
]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_us.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_gb.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_nz.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$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
[?12l[?25h[?25l
:[?12l[?25he![?25l"test58.in" 635 lines, 10784 characters[1;1HTests for spell checking.     vim: set ft=vim :[2;5H[K[3;1HSTARTTEST[3;10H[K[4;1H:so small.vi
:"[5;5H[K[6;1H:" Don't want to depend on the locale from the environment
:set enc=latin1
:e![8;4H[K[9;1H:"[9;3H[K[10;4HFunction to test .aff/.dic with list of good and bad words.
:func[9Caff, dic
  set spellfile=[12;17H[K[13;1H  $put =''[13;11H[K[14;1H  $put ='test '. a:aff . '-' . a:dic[14;37H[K[15;1H  " 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[18;23H[K[19;1H  " use that spell file
  set spl=Xtest.latin1.spl spell[20;33H[K[21;1H  " list all valid words[21;25H[K[22;1H  spelldump[22;12H[K[23;1H  %yank
  quit[24;7H[K[25;1H  $put[25;7H[K[26;1H  $put ='-------'[26;18H[K[27;1H  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'
  normal 0f:]s[29;15H[K[30;1H  let prevbad = ''
  while 1[31;10H[K[32;1H    let [bad, a] = spellbadword()
    if bad == '' || bad == prevbad || bad == 'badend'
      break
    endif[35;10H[K[36;1H    let prevbad = bad
    let lst = spellsuggest(bad, 3)
    normal mm
    $put =bad[39;14H[K[40;1H    $put =string(lst)
    normal `m]s[41;16H[K[42;1H  endwhile
endfunc[43;8H[K[44;1H:"[44;3H[K[45;1H:call TestOne('1', '1')[45;24H[K[46;9Houndfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')[47;33H[K[48;9Houndfold('oeverloos gezwets edale')
:"[49;3H[K[50;1H:"[50;3H[K[51;1H:" and now with SAL instead of SOFO items; test automatic reloading
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
:mkspell! Xtest Xtest[53;22H[K[54;9Houndfold('goobledygoook')
:$put =soundfold('kóopërÿnôven')
:$put =soundfold('oeverloos gezwets edale')[57;4H[K[58;2H" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add
:mkspell! Xtest.latin1.add.spl Xtest.latin1.add
:set spellfile=Xtest.latin1.add
/^test2:[62;9H[K[63;1H]s:let [str, a] = spellbadword()
:$put =str[64;11H[K[65;2Hset spl=Xtest_us.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str[68;11H[K[69;1H`m]s:let [str, a] = spellbadword()
:$put =str[70;11H[K[71;2Hset spl=Xtest_gb.latin1.spl
/^test2:[72;9H[K[73;1H]smm:let [str, a] = spellbadword()
:$put =str[74;11H[K[75;1H`m]s:let [str, a] = spellbadword()
:$put =str[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Function to test .aff/.dic with list of good and bad words.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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;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!
:"
:" 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()[77;1H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall TestOne('1', '1')[?25l"Xtest.aff" [77;13H[K[77;13H[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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[19L[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

Test [41mNOSLITSUGS[m

8[41maffstart
SET[m [41mISO8859-1[m[20;14H[K[21;3H[K[22;1H[41mNOSPLITSUGS[m
8[41maffend[m[24;3H[K[25;1H8[41mdicstart[m
1234[26;5H[K[27;1H[41mfoo[m[27;5H[K[28;1H[41mbar[m[28;4H[K[29;1H[41mfaabar[m[29;7H[K[30;1H8[41mdicend[m[30;8H[K[31;3H[K[32;1H8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar[m[32;22H[K[33;1H[41mbad[m: [41mfoobar[m [41mbarfoo[m[33;19H[K[34;1H[41mbadend[m[34;7H[K[35;5H[K[36;5H[K[37;1H[44mtest[m output:[37;13H[K[38;5H[K[39;1H[44mtest[m 1-1[39;10H[K[40;1H# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl[m
Comment[41;8H[K[42;1Hdeol[42;5H[K[43;1Hdéôr[43;5H[K[44;1Hinput
OK[45;3H[K[46;1Houtput[46;7H[K[47;1Houtputs[47;8H[K[48;1Houttest[48;8H[K[49;1Hput
puts
test[51;5H[K[52;1Htesten[52;7H[K[53;1Htestn[53;6H[K[54;1Hthe end[54;8H[K[55;1Huk[55;3H[K[56;1Hwrong[56;7H[K[57;1H-------
[41mbad[m[58;4H[K[59;1H['put', 'uk', 'OK'][59;20H[K[60;1H[41minputs[m[60;7H[K[61;1H['input', 'puts', 'outputs'][61;29H[K[62;1H[41mcomment[m[62;8H[K[63;1H['Comment', 'outtest', 'the end']
[41mok[m[64;3H[K[65;1H['OK', 'uk', 'put'][65;20H[K[66;1H[41mOk[m[66;3H[K[67;1H['OK', 'Uk', 'Put'][67;21H[K[68;1Htest[68;5H[K[69;1H['Test', 'testn', 'testen'][69;28H[K[70;1H[41mdéôl[m[70;5H[K[71;1H['deol', 'déôr', 'test'][71;25H[K[72;1H[41mend[m[72;4H[K[73;1H['put', 'uk', 'test'][73;22H[K[74;1H[41mthe[m[74;4H[K[75;1H['put', 'uk', 'test'][75;22H[K[76;1H[41mgebletegek[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kóopërÿnôven')[?25l[1;76r[76;1H
[1;77r[76;1H[41mkepereneven[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;76r[76;1H
[1;77r[76;1H[41meverles[m [41mgesvets[m [41metele[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" and now with SAL instead of SOFO items; test automatic reloading[?25l[76;1H[?12l[?25h[?25l[27m[m[H[2J[1;1H[41mTests[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!
:"
:" [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'[34;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')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:" [41malso[m [41muse[m [41man[m [41maddition[m [41mfile
gg[m:/^[41maddstart[m/+1,/^[41maddend[m/-1[41mw[m! [41mXtest[m.[41mlatin1[m.[41madd[m
:[41mmkspell[m! [41mXtest[m.[41mlatin1[m.[41madd[m.[41mspl[m [41mXtest[m.[41mlatin1[m.[41madd[m
:[41mset[m [41mspellfile[m=[41mXtest[m.[41mlatin1[m.[41madd[m
/^[41mtest2[m:
][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mus[m.[41mlatin1[m.[41mspl[m
/^[41mtest2[m:
][41msmm[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
`[41mm[m][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mgb[m.[41mlatin1[m.[41mspl[m
/^[41mtest2[m:
][41msmm[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
`[41mm[m][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[1;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff[?25l"Xtest.aff" [77;13H[K[77;13H151 lines, 3412 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hmkspell! Xtest Xtest[?25lReading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[14L[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

Test [41mNOSLITSUGS[m[15;3H[K[16;1H8[41maffstart[m[16;10H[K[17;1H[41mSET[m [41mISO8859-1[m[17;14H[K[18;3H[K[19;1H[41mNOSPLITSUGS[m[19;12H[K[20;1H8[41maffend[m[20;8H[K[21;3H[K[22;1H8[41mdicstart[m[22;10H[K[23;1H1234[23;5H[K[24;1H[41mfoo[m[24;4H[K[25;1H[41mbar[m[25;4H[K[26;1H[41mfaabar[m[26;8H[K[27;1H8[41mdicend[m[27;8H[K[28;3H[K[29;1H8[41mgood[m: [41mfoo[m [41mbar[m [41mfaabar
bad[m: [41mfoobar[m [41mbarfoo
badend[m[31;7H[K[32;5H[K[33;5H[K[34;1H[44mtest[m output:[35;5H[K[36;1H[44mtest[m 1-1[36;9H[K[37;1H# [41mfi[m[2C: [41mXtest[m.[41mlatin1[m.[41mspl[m[37;25H[K[38;1HComment[38;8H[K[39;1Hdeol[39;5H[K[40;1Hdéôr[40;5H[K[41;1Hinput[41;6H[K[42;1HOK[42;3H[K[43;1Houtput[43;7H[K[44;1Houtputs
outtest[45;8H[K[46;1Hput[46;4H[K[47;1Hputs[47;5H[K[48;1Htest[48;5H[K[49;1Htesten
testn
the end[51;8H[K[52;1Huk[52;3H[K[53;1Hwrong[53;6H[K[54;1H-------[54;8H[K[55;1H[41mbad[m[55;4H[K[56;1H['put', 'uk', 'OK'][56;20H[K[57;1H[41minputs[m
['input', 'puts', 'outputs']
[41mcomment[m[59;8H[K[60;1H['Comment', 'outtest', 'the end'][60;34H[K[61;1H[41mok[m[61;3H[K[62;1H['OK', 'uk', 'put']
[41mOk[m[63;3H[K[64;1H['OK', 'Uk', 'Put']
test[65;6H[K[66;1H['Test', 'testn', 'testen']
[41mdéôl[m[67;5H[K[68;1H['deol', 'déôr', 'test']
[41mend[m[69;4H[K[70;1H['put', 'uk', 'test']
[41mth[m[71;4H[K[72;1H['put', 'uk', 'test']
[41mgebletegek[m[73;11H[K[74;1H[41mkepereneven
everles[m [41mgesvets[m [41metele[m[75;22H[K[76;1H[41mkbltykk[m[76;8H[K[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kóopërÿnôven')[?25l[1;76r[76;1H
[1;77r[76;1H[41mkprnfn[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;76r[76;1H
[1;77r[76;1H*[41mfls[m [41mkswts[m [41mtl[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" also use an addition file[?25l[76;1H[?12l[?25h[?25l[27m[m[H[2J[1;1H[41mTests[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!
:"
:" [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'[34;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')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:" [41malso[m [41muse[m [41man[m [41maddition[m [41mfile
gg[m:/^[41maddstart[m/+1,/^[41maddend[m/-1[41mw[m! [41mXtest[m.[41mlatin1[m.[41madd[m
:[41mmkspell[m! [41mXtest[m.[41mlatin1[m.[41madd[m.[41mspl[m [41mXtest[m.[41mlatin1[m.[41madd[m
:[41mset[m [41mspellfile[m=[41mXtest[m.[41mlatin1[m.[41madd[m
/^[41mtest2[m:
][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mus[m.[41mlatin1[m.[41mspl[m
/^[41mtest2[m:
][41msmm[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
`[41mm[m][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mgb[m.[41mlatin1[m.[41mspl[m
/^[41mtest2[m:
][41msmm[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
`[41mm[m][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[1;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h/^addstart/+1,/^addend/-1w! Xtest.latin1.add[?25l"Xtest.latin1.add" [77;20H[K[77;20H[New File] 3 lines, 38 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hmkspell! Xtest.latin1.add.spl Xtest.latin1.add[?25lReading word file Xtest.latin1.add ...[77;39H[K[77;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[77;1H[K[77;1H:[?12l[?25hset spellfile=Xtest.latin1.add[?25l[1;1H[6L[1;1H[41mTests[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[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/[?12l[?25h^test2:[?25l[27m[m[H[2J[2;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3[38;1H[?12l[?25h[39;29H[?25l[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;29H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[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

Test [41mNOSLITSUGS[m

8[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:

[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[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[2;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[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

Test [41mNOSLITSUGS[m

8[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:

[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[m[H[2J[1;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[41mCOMPOUNDWORDMAX[m 3[38;1H[?12l[?25h[14C[?25l[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[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

Test [41mNOSLITSUGS[m

8[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:

[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[75;1Helequint
[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[2;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h[39;15H[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[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

Test [41mNOSLITSUGS[m

8[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:

[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[m[H[2J[1;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[41mCOMPOUNDWORDMAX[m 3[38;15H[?12l[?25h[14C[?25l[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;29H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[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

Test [41mNOSLITSUGS[m

8[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:

[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[73;1H[46melequint[m
elekwint
elekwint
[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[2;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[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

Test [41mNOSLITSUGS[m

8[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:

[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[m[H[2J[1;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[41mCOMPOUNDWORDMAX[m 3[38;1H[?12l[?25h[28C[?25l[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;29H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[41mbad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[2;9Hleadprobar
badend[m

Test [41mNOSLITSUGS[m

8[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:

[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[71;1H[41melequint
elekwint
elekwint

elequint
[?12l[?25h[?25l[m[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[2;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;9H[41mleadprobar
badend[m

Test [41mNOSLITSUGS[m

8[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:

[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[m[H[2J[1;1H[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.

[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

FOL[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
LOW[m  [41màáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP[m  [41mÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

COMPOUNDRULE[m [41mm[m+
[41mCOMPOUNDRULE[m [41msm[m*[41me
COMPOUNDRULE[m [41msm[m+
[41mCOMPOUNDMIN[m 3
[41mCOMPOUNDWORDMAX[m 3[38;1H[?12l[?25h[14C[?25l[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[41mbadend[m

Test [41mNOSLITSUGS[m

8[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:

[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[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Postponed prefixes[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall TestOne('2', '1')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[12L[1;1H[41mKEP[m =
[41mRAR[m ?
[41mBAD[m !

[41mPFX[m [41mI[m [41mN[m 1
[41mPFX[m [41mI[m 0 [41min[m .

[41mPFX[m [41mO[m [41mY[m 1
[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[m[14;1H[K[15;1H[41mSFX[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 .[18;12H[K[19;1H[K[20;1H[41mREP[m 3[20;6H[K[21;1H[41mREP[m [41mg[m [41mch
REP[m [41mch[m [41mg
REP[m [41msvp[m [41ms[m.[41mv[m.[41mp[m.

[41mMAP[m 9[25;6H[K[26;1H[41mMAP[m [41maàáâãäå[m[26;12H[K[27;1H[41mMAP[m [41meèéêë
MAP[m [41miìíîï
MAP[m [41moòóôõö
MAP[m [41muùúûü
MAP[m [41mnñ
MAP[m [41mcç
MAP[m [41myÿý
MAP[m [41msß[m[34;7H[K[35;1H2[41maffend[m[36;1H[K[37;1H2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdéôl
badend[m[40;1H[K[41;1H[41maddstart[m
/[41mregions[m=[41musgbnz
elequint[m/2
[41melekwint[m/3
[41maddend[m[45;7H[K[46;1H[K[47;1H[41mtest2[m:[47;7H[K[48;1H[41melequint[m test [41melekwint[m test [41melekwent[m [41masdf[m[49;1H[K[50;1HTest [41mrules[m [41mfor[m [41mcompounding[m.[51;1H[K[52;1H3[41maffstart
SET[m [41mISO8859-1[m[53;14H[K[54;1H[K[55;1H[41mCOMPOUNDMIN[m 3[55;14H[K[56;1H[41mCOMPOUNDRULE[m [41mm[m*
[41mNEEDCOMPOUND[m [41mx[m[57;15H[K[58;1H3[41maffend[m[59;1H[K[60;1H3[41mdicstart[m
1234[61;5H[K[62;1H[41mfoo[m/[41mm[m[62;6H[K[63;1H[41mbar[m/[41mmx[m[63;7H[K[64;1H[41mmï[m/[41mm[m[64;5H[K[65;1H[41mla[m/[41mmx[m[65;6H[K[66;1H3[41mdicend[m[67;1H[K[68;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[70;7H[K[71;1H[K[72;1H[K[73;1H[41mTests[m [41mfor[m [41mcompounding[m.[74;1H[K[75;1H4[41maffstart
SET[m [41mISO8859-1[m[77;1H[K[39;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" Compound words[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall TestOne('3', '3')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('4', '4')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('5', '5')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('6', '6')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('7', '7')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[56L[1;1H7[41maffstart
SET[m [41mISO8859[m-1

[41mFLAG[m [41mnum

NEEDAFFIX[m 9999

[41mCOMPOUNDRULE[m 2,77*123

[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[36;7Hlead tail leadtail  leadmiddletail
[41mbad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[38;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[m[58;7H[K[60;1H[K[61;1H[41mtest[m [41moutput[m:[62;1H[K[63;1H[41mtest[m 1-1
# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl
Comment
deol[m[66;5H[K[67;1H[41mdéôr
input[m[68;6H[K[69;1H[41mOK[m[69;3H[K[70;1H[41moutput
outputs
outtest
put[m[73;4H[K[74;1H[41mputs
test[m[75;5H[K[76;1H[41mtesten[m[76;7H[K[77;1H[K[39;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" NOSLITSUGS[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall TestOne('8', '8')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[11L[1;1H[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
[41mlead[m/2
[41mtail[m/123
[41mmiddle[m/77,1[13;13H[K[14;1H7[41mdicend[m[14;8H[K[16;1H7[41mgood[m: [41mmeea1[m [41mmeeaé[m bar [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[m
      [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m
        [41mleadprobar
badend[m[20;7H[K[22;1H[41mTest[m [41mNOSLITSUGS[m[23;1H[K[24;1H8[3C[41mstart
SET[m [41mISO8859[m-1[26;1H[K[27;1H[41mNOSPLITSUGS[m
8[41maffend[m[28;8H[K[29;1H[K[30;1H8[41mdicstart[m
1234[31;5H[K[32;1Hfoo[32;4H[K[33;1Hbar[33;4H[K[34;1Hfaabar
8[41mdicend[m[35;8H[K[36;7H[K[37;1H8[41mgood[m: foo bar faabar[37;23H[K[38;1H[41mbad[m: [41mfoobar[m [41mbarfoo[m[41;1H[K[42;1H[41mtest[m [41moutput[m:[43;1H[K[44;1H[41mtest[m 1-1[44;9H[K[45;1H# [41mfile[m: [41mXtest[m.[41mlatin1[m.[41mspl
Comment[m[46;8H[K[47;1H[41mdeol[m[47;5H[K[48;1H[41mdéôr
input[m[49;6H[K[50;1H[41mOK[m[50;3H[K[51;1H[41moutput
outputs
outtest
put[m[54;4H[K[55;1H[41mputs
test[m[56;5H[K[57;1H[41mtesten[m[57;7H[K[58;1H[41mtest[m[58;6H[K[59;1H[41mthe[m [41mend
uk
wrong[m[61;6H[K[62;1H-------
[41mbad[m[63;4H[K[64;1H['[41mput[m', '[41muk[m', '[41mOK[m'][64;20H[K[65;1H[41minputs[m[65;7H[K[66;1H['[41minput[m', '[41mputs[m', '[41moutputs[m']
[41mcomment[m
['[41mComment[m', '[41mouttest[m', '[41mthe[m [41mend[m']
[41mok[m
['[41mOK[m', '[41muk[m', '[41mput[m']
[41mOk[m[71;3H[K[72;1H['[41mOK[m', '[41mUk[m', '[41mPut[m']
[41mtest[m
['[41mTest[m', '[41mtestn[m', '[41mtesten[m']
[41mdéôl[m
['[41mdeol[m', '[41mdéôr[m', '[41mtest[m'][77;1H[K[39;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" clean up for valgrind[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc TestOne[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset spl= enc=latin1[?25l[27m[m[H[2J[1;1HSFX 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[17;7Hlead tail leadtail  leadmiddletail
bad: mee meea2 prabar probarmaat middle leadmiddle middletail taillead[19;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
['Comment', 'outtest', 'the end']
ok
['OK', 'uk', 'put']
Ok
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
déôl
['deol', 'déôr', 'test'][39;1H[?12l[?25h[?25l[77;1H:[?12l[?25h"[?25l[39;1H[?12l[?25h[?25l[27m[m[H[2J[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!
:"
:" 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'[34;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')
:$put =soundfold('oeverloos gezwets edale')
:"
:" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add
:mkspell! Xtest.latin1.add.spl Xtest.latin1.add
:set spellfile=Xtest.latin1.add
/^test2:
]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_us.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_gb.latin1.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25h/^test output:/,$wq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 283 lines, 3793 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test59.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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')
:$put =soundfold('oeverloos gezwets edale')
:"
:" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add
:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
:set spellfile=Xtest.utf-8.add
/^test2:
]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_us.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_gb.utf-8.spl
/^test2:[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for spell checking with 'encoding' set to "utf-8".  vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 106 lines, 2520 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[34M[1;77r[43;1H]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
: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[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso mbyte.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Don't want to depend on the locale from the environment.  The .aff and .dic[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" text is in latin1, the test text is utf-8.[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset enc=latin1[?25l[27m[m[H[2J[1;5Hlet [bad, a] = spellbadword()
    if bad == '' || bad == prevbad || bad == 'badend'[3;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')
:$put =soundfold('oeverloos gezwets edale')
:"
:" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add
:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
:set spellfile=Xtest.utf-8.add
/^test2:
]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_us.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_gb.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
: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
[?12l[?25h[?25l
:[?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;5H[K[3;1HSTARTTEST[3;10H[K[4;1H:so small.vim
:so mbyte.vim[5;14H[K[6;1H:"[6;5H[K[7;1H:" 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;1H:e![10;5H[K[11;1H:set enc=utf-8
:set fenc=

:" Function to test .aff/.dic with list of good and bad words.
:func TestOne(aff, dic)[15;24H[K[16;1H  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[23;24H[K[24;1H  set spl=Xtest.utf-8.spl spell[24;32H[K[25;1H  " list all valid words[25;25H[K[26;1H  spelldump
  %yank[27;9H[K[28;1H  quit[28;7H[K[29;1H  $put[29;7H[K[30;1H  $put ='-------'[30;18H[K[31;1H  " find all bad words and suggestions for them
  exe '1;/^' . a:aff . 'good:'[32;31H[K[33;1H  normal 0f:]s
  let prevbad = ''[34;19H[K[35;1H  while 1
    let [bad, a] = spellbadword()[36;34H[K[37;1H    if bad == '' || bad == prevbad || bad == 'badend'
      break[38;12H[K[39;1H    endif[39;10H[K[40;1H    let prevbad = bad[40;22H[K[41;1H    let lst = spellsuggest(bad, 3)
    normal mm[42;14H[K[43;1H    $put =bad
    $put =string(lst)[44;22H[K[45;1H    normal `m]s
  endwhile[46;11H[K[47;1Hendfunc[47;8H[K[48;1H:"[48;3H[K[49;2Hcall TestOne('1', '1')
:$put =soundfold('goobledygoook')[50;34H[K[51;9Houndfold('kÃ³opÃ«rÃ¿nÃ´ven')
:$put =soundfold('oeverloos gezwets edale')
:"[53;3H[K[54;1H:"[54;3H[K[55;2H" 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')
:$put =soundfold('oeverloos gezwets edale')
:"[61;3H[K[62;4Halso use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add
:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
:set spellfile=Xtest.utf-8.add
/^test2:[66;9H[K[67;1H]s:let [str, a] = spellbadword()
:$put =str[68;11H[K[69;2Hset spl=Xtest_us.utf-8.spl
/^test2:[70;10H[K[71;1H]smm:let [str, a] = spellbadword()
:$put =str[72;11H[K[73;1H`m]s:let [str, a] = spellbadword()
:$put =str[74;11H[K[75;1H:set spl=Xtest_gb.utf-8.spl
/^test2:[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset enc=utf-8[?25l[27m[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;6H break
    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')
:$put =soundfold('oeverloos gezwets edale')
:"
:" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add
:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
:set spellfile=Xtest.utf-8.add
/^test2:
]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_us.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_gb.utf-8.spl
/^test2:[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset fenc=[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Function to test .aff/.dic with list of good and bad words.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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:'[77;1H[K[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall TestOne('1', '1')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[19L[2;1H[41mNEEDAFFIX[m 9999

[41mCOMPOUNDRULE[m 2,77*123

[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[20;8H[K[21;3H[K[22;1H7[41mdicstart[m[22;10H[K[23;1H1234[23;5H[K[24;1H[41mmee[m/391,111,9999[24;17H[K[25;1H[41mbar[m/17,61003,123[25;17H[K[26;1H[41mlead[m/2[26;7H[K[27;1H[41mtail[m/123
[41mmiddle[m/77,1
7[41mdicend[m[30;3H[K[31;1H7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[m
      [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m
        [41mleadprobar
badend[m[35;7H[K[36;5H[K[37;1H[44mtest[m output:[37;13H[K[38;7H[K[39;1H[44mtest[m 1-1[39;9H[K[40;1H# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m
Commen[41;9H[K[42;1Hdeol[42;5H[K[43;1HdÃ©Ã´r[43;5H[K[44;1Hinput[44;6H[K[45;1HOK[45;5H[K[46;1Houtput[46;7H[K[47;1Houtputs
outtest
put[49;4H[K[50;1Hputs[50;5H[K[51;1Htest[51;5H[K[52;1Htesten[52;7H[K[53;1Htestn
the end
uk[55;4H[K[56;1Hwrong[56;6H[K[57;1H-------[57;8H[K[58;1H[41mbad[m[58;4H[K[59;1H['put', 'uk', 'OK'][59;20H[K[60;1H[41minputs[m[60;7H[K[61;1H['input', 'puts', 'outputs']
[41mcomment[m[62;9H[K[63;1H['Comment', 'outtest', 'the end'][63;34H[K[64;1H[41mok[m[64;3H[K[65;1H['OK', 'uk', 'put'][65;20H[K[66;1H[41mOk[m[66;3H[K[67;1H['OK', 'Uk', 'Put'][67;20H[K[68;1Htest[68;5H[K[69;1H['Test', 'testn', 'testen']
[41mdÃ©Ã´l[m[70;5H[K[71;1H['deol', 'dÃ©Ã´r', 'test'][71;25H[K[72;1H[41mend[m[72;4H[K[73;1H['put', 'uk', 'test'][73;22H[K[74;1H[41mthe[m[74;4H[K[75;1H['put', 'uk', 'test'][75;22H[K[76;1H[41mgebletegek[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[?25l[1;76r[76;1H
[1;77r[76;1H[41mkepereneven[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;76r[76;1H
[1;77r[76;1H[41meverles[m [41mgesvets[m [41metele[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" and now with SAL instead of SOFO items; test automatic reloading[?25l[76;1H[?12l[?25h[?25l[27m[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;6H [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')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:" [41malso[m [41muse[m [41man[m [41maddition[m [41mfile
gg[m:/^[41maddstart[m/+1,/^[41maddend[m/-1[41mw[m! [41mXtest[m.[41mutf-8[m.[41madd[m
:[41mmkspell[m! [41mXtest[m.[41mutf-8[m.[41madd[m.[41mspl[m [41mXtest[m.[41mutf-8[m.[41madd[m
:[41mset[m [41mspellfile[m=[41mXtest[m.[41mutf-8[m.[41madd[m
/^[41mtest2[m:
][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mus[m.[41mutf-8[m.[41mspl[m
/^[41mtest2[m:
][41msmm[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
`[41mm[m][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mgb[m.[41mutf-8[m.[41mspl[m
/^[41mtest2[m:[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25h/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff[?25l"Xtest.aff" [77;13H[K[77;13H153 lines, 3426 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hmkspell! Xtest Xtest[?25lReading affix file Xtest.aff ...
Reading dictionary file Xtest.dic ...
line      2, word      0 - testCompressing word tree...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h$put =soundfold('goobledygoook')[?25l[1;1H[14L[1;1H[41mCOMPOUNDRULE[m 2,77*123

[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[15;11H[K[16;1H[41mPFX[m 17 0 [41mpre[m/432 .
7[41maffend[m[17;8H[K[18;3H[K[19;1H7[41mdicstart[m[19;10H[K[20;1H1234[20;5H[K[21;1H[41mmee[m/391,111,9999[21;17H[K[22;1H[41mbar[m/17,61003,123[22;18H[K[23;1H[41mlead[m/2[23;7H[K[24;1H[41mtail[m/123[24;9H[K[25;1H[41mmiddle[m/77,1[25;12H[K[26;1H7[41mdicend[m[26;8H[K[27;3H[K[28;1H7[41mgood[m: [41mmeea1[m [41mmeeaÃ©[m [41mbar[m [41mprebar[m [41mbarmeat[m [41mprebarmeat[m  [41mleadprebar[m
      [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m
        [41mleadprobar[m[31;19H[K[32;1H[41mbadend[m[32;7H[K[33;3H[K[34;1H[44mtest[m output:[34;13H[K[35;3H[K[36;1H[44mtest[m 1-1[36;9H[K[37;1H# [41mfile[m: [41mXtest[m.[41mutf-8[m.[41mspl[m[37;25H[K[38;1HComment[38;8H[K[39;1Hdeol[39;5H[K[40;1HdÃ©Ã´r[40;5H[K[41;1Hinput[41;6H[K[42;1HOK[42;5H[K[43;1Houtput[43;7H[K[44;1Houtputs[44;8H[K[45;1Houttest[45;8H[K[46;1Hput[46;4H[K[47;1Hputs[47;5H[K[48;1Htest
testen[49;7H[K[50;1Htestn[50;7H[K[51;1Hthe end[51;8H[K[52;1Huk[52;3H[K[53;1Hwrong
-------
[41mbad[m[55;4H[K[56;1H['put', 'uk', 'OK'][56;20H[K[57;1H[41minputs[m[57;7H[K[58;1H['input', 'puts', 'outputs'][58;29H[K[59;1H[41mcomment[m[59;8H[K[60;1H['Comment', 'outtest', 'the end'][60;34H[K[61;1H[41mok[m
['OK', 'uk', 'put'][62;20H[K[63;1H[41mOk[m[63;3H[K[64;1H['OK', 'Uk', 'Put'][64;20H[K[65;1Htest[65;6H[K[66;1H['Test', 'testn', 'testen']
[41mdÃ©Ã´[m[67;5H[K[68;1H['deol', 'dÃ©Ã´r', 'test']
[41mend[m[69;4H[K[70;1H['put', 'uk', 'test']
[41mthe[m[71;4H[K[72;1H['put', 'uk', 'test']
[41mgebletegek[m[73;11H[K[74;1H[41mkepereneven
everles[m [41mgesvets[m [41metele[m[75;22H[K[76;1H[41mkbltykk[m[76;8H[K[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('kÃ³opÃ«rÃ¿nÃ´ven')[?25l[1;76r[76;1H
[1;77r[76;1H[41mkprnfn[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =soundfold('oeverloos gezwets edale')[?25l[1;76r[76;1H
[1;77r[76;1H*[41mfls[m [41mkswts[m [41mtl[m[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" also use an addition file[?25l[76;1H[?12l[?25h[?25l[27m[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;6H [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')
:$put =[41msoundfold[m('[41moeverloos[m [41mgezwets[m [41medale[m')
:"
:" [41malso[m [41muse[m [41man[m [41maddition[m [41mfile
gg[m:/^[41maddstart[m/+1,/^[41maddend[m/-1[41mw[m! [41mXtest[m.[41mutf-8[m.[41madd[m
:[41mmkspell[m! [41mXtest[m.[41mutf-8[m.[41madd[m.[41mspl[m [41mXtest[m.[41mutf-8[m.[41madd[m
:[41mset[m [41mspellfile[m=[41mXtest[m.[41mutf-8[m.[41madd[m
/^[41mtest2[m:
][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mus[m.[41mutf-8[m.[41mspl[m
/^[41mtest2[m:
][41msmm[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
`[41mm[m][41ms[m:[41mlet[m [[41mstr[m, [41ma[m] = [41mspellbadword[m()
:$put =[41mstr[m
:[41mset[m [41mspl[m=[41mXtest[m_[41mgb[m.[41mutf-8[m.[41mspl[m
/^[41mtest2[m:[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25h/^addstart/+1,/^addend/-1w! Xtest.utf-8.add[?25l"Xtest.utf-8.add" [77;19H[K[77;19H[New File] 3 lines, 38 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hmkspell! Xtest.utf-8.add.spl Xtest.utf-8.add[?25lReading word file Xtest.utf-8.add ...[77;38H[K[77;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[77;1H[K[77;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
:"[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/[?12l[?25h^test2:[?25l[27m[m[H[2J[1;1H[41mSFX[m [41mq[m   0    -[41mok[m .

[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[26;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[27;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[28;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[29;8H [41mpreborkborkbork[m[30;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[32;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[33;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[34;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[35;8H [41mutilsbork[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
[41mPFX[m [41myy[m 0 [41mnou[m .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy[38;1H[?12l[?25h[39;29H[?25l[77;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;29H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[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
[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[m[26;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[28;8H [41mleadprobar
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[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[1;1H[41mSFX[m [41mq[m   0    -[41mok[m .

[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[26;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[27;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[28;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[29;8H [41mpreborkborkbork[m[30;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[32;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[33;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[34;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[35;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy[m
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[2;1H[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
[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[m[25;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[27;8H [41mleadprobar
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[m[H[2J[2;1H[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[25;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[26;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[27;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[28;8H [41mpreborkborkbork[m[29;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[31;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[32;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[33;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[34;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy
middle[m/[41mmmxx[38;1H[?12l[?25h[14C[?25l[77;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[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
[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[m[24;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[26;8H [41mleadprobar
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[75;1Helequint
[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[1;1H[41mSFX[m [41mq[m   0    -[41mok[m .

[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[26;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[27;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[28;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[29;8H [41mpreborkborkbork[m[30;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[32;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[33;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[34;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[35;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy[m
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h[39;15H[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[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
[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[m[23;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[25;8H [41mleadprobar
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[m[H[2J[2;1H[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[25;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[26;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[27;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[28;8H [41mpreborkborkbork[m[29;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[31;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[32;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[33;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[34;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy
middle[m/[41mmmxx[38;15H[?12l[?25h[14C[?25l[77;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;29H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[2;1H[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
[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[m[22;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[24;8H [41mleadprobar
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[73;1H[46melequint[m
elekwint
elekwint
[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[1;1H[41mSFX[m [41mq[m   0    -[41mok[m .

[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[26;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[27;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[28;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[29;8H [41mpreborkborkbork[m[30;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[32;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[33;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[34;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[35;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy[m
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[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
[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[m[21;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[23;8H [41mleadprobar
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[m[H[2J[2;1H[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[25;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[26;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[27;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[28;8H [41mpreborkborkbork[m[29;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[31;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[32;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[33;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[34;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy
middle[m/[41mmmxx[38;1H[?12l[?25h[28C[?25l[77;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;29H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[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
[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[m[20;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[22;8H [41mleadprobar
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[71;1H[41melequint
elekwint
elekwint

elequint
[?12l[?25h[?25l[m[77;1H[K[77;1H/[?12l[?25h^test2:[?25l[31msearch hit BOTTOM, continuing at TOP[27m[m[H[2J[1;1H[41mSFX[m [41mq[m   0    -[41mok[m .

[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[26;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[27;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[28;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[29;8H [41mpreborkborkbork[m[30;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[32;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[33;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[34;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[35;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy[m
[31msearch hit BOTTOM, continuing at TOP[38;1H[?12l[?25h
[?25l[m[77;1H[K[77;1H:[?12l[?25hlet [str, a] = spellbadword()[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[2;1H[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
[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[m[19;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[21;8H [41mleadprobar
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[m[H[2J[2;1H[41mSFX[m [41ma[m [41mY[m 2
[41mSFX[m [41ma[m 0 [41ms[m .
[41mSFX[m [41ma[m 0 [41mize[m/[41mt[m .

[41mPFX[m [41mp[m [41mN[m 1
[41mPFX[m [41mp[m 0 [41mpre[m .

[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[m[25;8H [41mbork[m [41mborkbork[m [41mborkborkbork[m [41mborkborkborkbork[m [41mborkborkborkborkbork[m[26;8H [41mtomato[m [41mtomatotomato[m [41mstartend[m [41mstartword[m [41mstartwordword[m [41mstartwordend[m[27;8H [41mstartwordwordend[m [41mstartwordwordwordend[m [41mprebork[m [41mpreborkbork[m[28;8H [41mpreborkborkbork[m[29;8H [41mnouword
bad[m: [41mwordutilize[m [41mpro[m [41mborkborkborkborkborkbork[m [41mtomatotomatotomato[m[31;8H [41mendstart[m [41mendend[m [41mstartstart[m [41mwordend[m [41mwordstart[m[32;8H [41mpreborkprebork[m  [41mpreborkpreborkbork[m[33;8H [41mstartwordwordwordwordend[m [41mborkpreborkpreborkbork[m[34;8H [41mutilsbork[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 .
5[41maffend[m

5[41mdicstart[m
1234
[41mfoo[m/[41ma1a[m[34m<e9>[m!!
[41mbar[m/[41mzz13ee
start[m/[41mss
end[m/[41meeyy
middle[m/[41mmmxx[38;1H[?12l[?25h[14C[?25l[77;1H[m:[?12l[?25hlet [str, a] = spellbadword()[?25l[38;15H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =str[?25l[27m[m[H[2J[1;1H[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
[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[m[18;6H [41mlead[m [41mtail[m [41mleadtail[m  [41mleadmiddletail
bad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[20;8H [41mleadprobar
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[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Postponed prefixes[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall TestOne('2', '1')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[12L[1;1H[41mMAP[m 9
[41mMAP[m [41ma[m[34m<e0><e1><e2><e3><e4><e5>[m
[41mMAP[m [41me[m[34m<e8><e9><ea><eb>[m
[41mMAP[m [41mi[m[34m<ec><ed><ee><ef>[m
[41mMAP[m [41mo[m[34m<f2><f3><f4><f5><f6>[m
[41mMAP[m [41mu[m[34m<f9><fa><fb><fc>[m
[41mMAP[m [41mn[m[34m<f1>[m
[41mMAP[m [41mc[m[34m<e7>[m
[41mMAP[m [41my[m[34m<ff><fd>[m
[41mMAP[m [41ms[m[34m<df>[m
2[41maffend[m

1[41mdicstart[m
123456[14;7H[K[15;1Htest/[41mNO[m
# [41mcomment[m
wrong[17;6H[K[18;1HComment[18;8H[K[19;1HOK[19;3H[K[20;1Huk[20;9H[K[21;1Hput/[41mISO[m
the end
deol[23;6H[K[24;1Hd[34m<e9><f4>[mr
1[41mdicend[m[25;8H[K[26;1H[K[27;1H[41maddstart[m
/[41mregions[m=[41musgbnz
elequint[m/2
[41melekwint[m/3
[41maddend[m[32;1H[K[33;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[36;1H[K[37;1H2[41mgood[m: puts
[41mbad[m: [41minputs[m [41mcomment[m [41mok[m [41mOk[m [41mend[m [41mthe[m. [44mtest[m [41mdÃ©Ã´l
badend[m[40;1H[K[41;1HTest [41mrules[m [41mfor[m [41mcompounding[m.[42;1H[K[43;1H3[41maffstart
SET[m [41mISO8859-1[m[45;1H[K[46;1H[41mCOMPOUNDMIN[m 3
[41mCOMPOUNDRULE[m [41mm[m*[47;16H[K[48;1H[41mNEEDCOMPOUND[m [41mx[m
3[41maffend[m[49;8H[K[50;1H[K[51;1H3[41mdicstart[m[51;10H[K[52;1H1234
[41mfoo[m/[41mm[m[53;6H[K[54;1H[41mbar[m/[41mmx
m[m[34m<ef>[m/[41mm[m[55;8H[K[56;1H[41mla[m/[41mmx[m
3[41mdicend[m[57;8H[K[58;1H[K[59;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[61;7H[K[62;1H[K[63;1H[K[64;1H[41mTests[m [41mfor[m [41mcompounding[m.[65;1H[K[66;1H4[41maffstart
SET[m [41mISO8859-1[m[68;1H[K[69;1H[41mFOL[m  [34m<e0><e1><e2><e3><e4><e5><e6><e7><e8><e9><ea><eb><ec><ed><ee><ef><f0><f1><f2><f3><f4><f5><f6><f8><ff[70;1H9><fa><fb><fc><fd><fe><df><ff>[m
[41mLOW[m  [34m<e0><e1><e2><e3><e4><e5><e6><e7><e8><e9><ea><eb><ec><ed><ee><ef><f0><f1><f2><f3><f4><f5><f6><f8><ff[72;1H9><fa><fb><fc><fd><fe><df><ff>[m
[41mUPP[m  [34m<c0><c1><c2><c3><c4><c5><c6><c7><c8><c9><ca><cb><cc><cd><ce><cf><d0><d1><d2><d3><d4><d5><d6><d8><dd[74;1H9><da><db><dc><dd><de><df><ff>[m[75;1H[K[76;1H[41mCOMPOUNDRULE[m [41mm[m+[77;1H[K[39;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" Compound words[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall TestOne('3', '3')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('4', '4')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('5', '5')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('6', '6')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall TestOne('7', '7')[?25l"Xtest.aff" [77;13H[K[77;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...[77;26H[K[77;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[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[56L[1;1H[41mUPP[m  [34m<c0><c1><c2><c3><c4><c5><c6><c7><c8><c9><ca><cb><cc><cd><ce><cf><d0><d1><d2><d3><d4><d5><d6><d8><dd[2;1H9><da><db><dc><dd><de><df><ff>[m

[41mFLAG[m [41mnum

NEEDAFFIX[m 9999

[41mCOMPOUNDRULE[m 2,77*123

[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[36;6H lead tail leadtail  leadmiddletail
[41mbad[m: [41mmee[m [41mmeea2[m [41mprabar[m [41mprobarmaat[m [41mmiddle[m [41mleadmiddle[m [41mmiddletail[m [41mtaillead[m[38;8H [41mleadprobar
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[m[57;6H[K[58;1H[41mthe[m [41mend
uk[m[59;3H[K[60;1H[41mwrong[m[60;6H[K[61;1H-------
[41mbad[m
['[41mput[m', '[41muk[m', '[41mOK[m']
[41minputs[m[64;7H[K[65;1H['[41minput[m', '[41mputs[m', '[41moutputs[m']
[41mcomment[m[66;8H[K[67;1H['[41mComment[m', '[41mouttest[m', '[41mthe[m [41mend[m']
[41mok[m
['[41mOK[m', '[41muk[m', '[41mput[m'][69;20H[K[70;1H[41mOk[m[70;3H[K[71;1H['[41mOK[m', '[41mUk[m', '[41mPut[m'][71;20H[K[72;1H[41mtest[m[72;5H[K[73;1H['[41mTest[m', '[41mtestn[m', '[41mtesten[m'][73;28H[K[74;1H[41mdÃ©Ã´l[m[74;5H[K[75;1H['[41mdeol[m', '[41mdÃ©Ã´r[m', '[41mtest[m']
[41mend[m[76;4H[K[77;1H[K[39;1H[?12l[?25h[?25l[77;1H:[?12l[?25h" clean up for valgrind[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc TestOne[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset spl= enc=latin1[?25l[27m[m[H[2J[1;1HUPP  ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ

FLAG num

NEEDAFFIX 9999

COMPOUNDRULE 2,77*123

NEEDCOMPOUND 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[35;7Hlead tail leadtail  leadmiddletail
bad: mee meea2 prabar probarmaat middle leadmiddle middletail taillead[37;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']
ok
['OK', 'uk', 'put']
Ok
['OK', 'Uk', 'Put']
test
['Test', 'testn', 'testen']
dÃ©Ã´l
['deol', 'dÃ©Ã´r', 'test']
end
['put', 'uk', 'test'][38;1H[?12l[?25h[?25l[77;1H:[?12l[?25h"[?25l[38;1H[?12l[?25h[?25l[27m[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')
:$put =soundfold('oeverloos gezwets edale')
:"
:" also use an addition file
gg:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add
:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add
:set spellfile=Xtest.utf-8.add
/^test2:
]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_us.utf-8.spl
/^test2:
]smm:let [str, a] = spellbadword()
:$put =str
`m]s:let [str, a] = spellbadword()
:$put =str
:set spl=Xtest_gb.utf-8.spl
/^test2:[1;1H[?12l[?25h[?25l[77;1H:[?12l[?25h/^test output:/,$wq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 270 lines, 3685 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test60.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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]]
    " Local option
    let test_cases += [['&l:errorformat', 1]]
    " Negative form of existing and working option (long form)
    let test_cases += [['&nojoinspaces', 0]]
    " Negative form of existing and working option (short form)
    let test_cases += [['&nojs', 0]]
    " Non-existing option
    let test_cases += [['&myxyzoption', 0]][69;5H" Existing and working option (long form)
    let test_cases += [['+incsearch', 1]]
    " Existing and working option with garbage
    let test_cases += [['+incsearch!1', 0]]
    " Existing and working option (short form)
    let test_cases += [['+is', 1]]
    " Existing option that is hidden.
    let test_cases += [['+autoprint', 0]][1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for the exists() function.  vim: set ft=vim :[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 575 lines, 12411 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[27m[m[H[2J[1;9Hecho "FAILED"
    endif[4;5H" Non-existing buffer curly-brace variable
    unlet b:curly_{str}_var
    echo 'b:curly_' . str . '_var: 0'
    if !exists('b:curly_{str}_var')[8;9Hecho "OK"
    else[10;9Hecho "FAILED"
    endif[13;5H" Script-local tests
    source test60.vim[16;5H" Existing Vim internal variable
    echo 'v:version: 1'
    if exists('v:version')[19;9Hecho "OK"
    else[21;9Hecho "FAILED"
    endif[24;5H" Non-existing Vim internal variable
    echo 'v:non_exists_var: 0'
    if !exists('v:non_exists_var')[27;9Hecho "OK"
    else[29;9Hecho "FAILED"
    endif[32;5H" Function arguments
    function TestFuncArg(func_arg, ...)[34;9Hecho 'a:func_arg: 1'[35;9Hif exists('a:func_arg')[36;13Hecho "OK"[37;9Helse[38;13Hecho "FAILED"[39;9Hendif[41;9Hecho 'a:non_exists_arg: 0'[42;9Hif !exists('a:non_exists_arg')[43;13Hecho "OK"[44;9Helse[45;13Hecho "FAILED"[46;9Hendif[48;9Hecho 'a:1: 1'[49;9Hif exists('a:1')[50;13Hecho "OK"[51;9Helse[52;13Hecho "FAILED"[53;9Hendif[55;9Hecho 'a:2: 0'[56;9Hif !exists('a:2')[57;13Hecho "OK"[58;9Helse[59;13Hecho "FAILED"[60;9Hendif
    endfunction[63;5Hcall TestFuncArg("arg1", "arg2")[65;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[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;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;9Hecho "FAILED"
    endif[4;5H" Non-existing buffer curly-brace variable
    unlet b:curly_{str}_var
    echo 'b:curly_' . str . '_var: 0'[77;1H[K[76;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[m[H[2J[?25l[1;9Hecho "FAILED"
    endif[4;5H" Non-existing buffer curly-brace variable
    unlet b:curly_{str}_var
    echo 'b:curly_' . str . '_var: 0'
    if !exists('b:curly_{str}_var')[8;9Hecho "OK"
    else[10;9Hecho "FAILED"
    endif[13;5H" Script-local tests
    source test60.vim[16;5H" Existing Vim internal variable
    echo 'v:version: 1'
    if exists('v:version')[19;9Hecho "OK"
    else[21;9Hecho "FAILED"
    endif[24;5H" Non-existing Vim internal variable
    echo 'v:non_exists_var: 0'
    if !exists('v:non_exists_var')[27;9Hecho "OK"
    else[29;9Hecho "FAILED"
    endif[32;5H" Function arguments
    function TestFuncArg(func_arg, ...)[34;9Hecho 'a:func_arg: 1'[35;9Hif exists('a:func_arg')[36;13Hecho "OK"[37;9Helse[38;13Hecho "FAILED"[39;9Hendif[41;9Hecho 'a:non_exists_arg: 0'[42;9Hif !exists('a:non_exists_arg')[43;13Hecho "OK"[44;9Helse[45;13Hecho "FAILED"[46;9Hendif[48;9Hecho 'a:1: 1'[49;9Hif exists('a:1')[50;13Hecho "OK"[51;9Helse[52;13Hecho "FAILED"[53;9Hendif[55;9Hecho 'a:2: 0'[56;9Hif !exists('a:2')[57;13Hecho "OK"[58;9Helse[59;13Hecho "FAILED"[60;9Hendif
    endfunction[63;5Hcall TestFuncArg("arg1", "arg2")[65;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[77;13H[K[77;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[77;1H[K[77;1H:[?12l[?25hdelfunc TestExists[?25l[27m[m[H[2J[1;9Hecho "FAILED"
    endif[4;5H" Non-existing buffer curly-brace variable
    unlet b:curly_{str}_var
    echo 'b:curly_' . str . '_var: 0'
    if !exists('b:curly_{str}_var')[8;9Hecho "OK"
    else[10;9Hecho "FAILED"
    endif[13;5H" Script-local tests
    source test60.vim[16;5H" Existing Vim internal variable
    echo 'v:version: 1'
    if exists('v:version')[19;9Hecho "OK"
    else[21;9Hecho "FAILED"
    endif[24;5H" Non-existing Vim internal variable
    echo 'v:non_exists_var: 0'
    if !exists('v:non_exists_var')[27;9Hecho "OK"
    else[29;9Hecho "FAILED"
    endif[32;5H" Function arguments
    function TestFuncArg(func_arg, ...)[34;9Hecho 'a:func_arg: 1'[35;9Hif exists('a:func_arg')[36;13Hecho "OK"[37;9Helse[38;13Hecho "FAILED"[39;9Hendif[41;9Hecho 'a:non_exists_arg: 0'[42;9Hif !exists('a:non_exists_arg')[43;13Hecho "OK"[44;9Helse[45;13Hecho "FAILED"[46;9Hendif[48;9Hecho 'a:1: 1'[49;9Hif exists('a:1')[50;13Hecho "OK"[51;9Helse[52;13Hecho "FAILED"[53;9Hendif[55;9Hecho 'a:2: 0'[56;9Hif !exists('a:2')[57;13Hecho "OK"[58;9Helse[59;13Hecho "FAILED"[60;9Hendif
    endfunction[63;5Hcall TestFuncArg("arg1", "arg2")[65;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[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hdelfunc TestFuncArg[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hedit! test.out[?25l"test.out" [77;12H[K[77;12H[Incomplete last line] 197 lines, 1844 characters[1;9H[K[2;1H#myagroup: 1
OK
#myagroup+b: 0[4;15H[K[5;1HOK[5;5H[K[6;1H#myagroup#BufEnter: 1[6;23H[K[7;1HOK[7;5H[K[8;1H#myagroup#BufEnter#*.my: 1
OK[9;5H[K[10;1H#BufEnter: 1[10;14H[K[11;1HOK[11;5H[K[12;1H#BufEnter#*.my: 1
OK[13;5H[K[14;1H#xyzagroup: 0[14;14H[K[15;1HOK
#xyzagroup#BufEnter: 0[16;23H[K[17;1HOK[17;5H[K[18;1H#myagroup#CmdwinEnter: 0[18;25H[K[19;1HOK[19;9H[K[20;1H#myagroup#xyzacmd: 0
OK[21;9H[K[22;1H#myagroup#BufEnter#xyzpat: 0
OK
#BufEnter#xyzpat: 0[24;20H[K[25;1HOK[25;5H[K[26;1H###: 0[26;8H[K[27;1HOK[27;9H[K[28;1H##: 0[28;6H[K[29;1HOK[29;9H[K[30;1H##FileReadCmd: 1
OK
##MySpecialCmd: 0[32;18H[K[33;1HOK[33;5H[K[34;1H&textwidth: 1[34;14H[K[35;1HOK[35;9H[K[36;1H&tw: 1[36;13H[K[37;1HOK[37;9H[K[38;1H&tw-: 0[38;13H[K[39;1HOK[39;9H[K[40;1H&g:errorformat: 1
OK[41;9H[K[42;1H&l:errorformat: 1[42;18H[K[43;1HOK[43;13H[K[44;1H&nojoinspaces: 0
OK[45;13H[K[46;1H&nojs: 0[46;9H[K[47;1HOK
&myxyzoption: 0[48;16H[K[49;1HOK[49;9H[K[50;1H+incsearch: 1[50;14H[K[51;1HOK[51;9H[K[52;1H+incsearch!1: 0[52;16H[K[53;1HOK[53;9H[K[54;1H+is: 1
OK[55;9H[K[56;1H+autoprint: 0[56;14H[K[57;1HOK[57;13H[K[58;1H$EDITOR_NAME: 1
OK[59;13H[K[60;1H$NON_ENV_VAR: 0
OK[61;5H[K[62;1H*bufnr: 1
OK[63;5H[K[64;1H*bufnr(): 1
OK[65;5H[K[66;1H*myxyzfunc: 0
OK[67;3H[K[68;1H*bufnr&6: 0[68;12H[K[69;1HOK[69;3H[K[70;1H*TestExists: 1[70;15H[K[71;1HOK[71;3H[K[72;1H*MyxyzFunc: 0
OK
:edit: 2
OK[75;3H[K[76;1H:edit/a: 0[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ff=unix[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"test.out" 197 lines, 1845 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test61.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test61.in" 89 lines, 1511 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
:" 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
: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"[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for undo tree.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 77 lines, 1282 characters written[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[8M[1;77r[69;1HggO---[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
:qa!
ENDTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Delete three characters and undo[?25l[76;1H[?12l[?25h[?25l[1;76r[1;1H[4M[1;77r[73;1H1111 -----
2222 -----

123456789[77;1H[K[76;1H[?12l[?25h[?25l23456789[76;9H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hset ul=100[?25l[76;1H[?12l[?25h[?25l3456789[76;8H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[76;1H[?12l[?25h[?25l456789[76;7H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 1 line, 7 characters written[76;1H[?12l[?25h[?25l
1 change; before #3  0 seconds ago[77;35H[K[76;1H3456789[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 8 characters appended[76;1H[?12l[?25h[?25l
1 change; before #2  0 seconds ago[77;35H[K[76;1H23456789[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 9 characters appended[76;1H[?12l[?25h[?25l
1 change; before #1  0 seconds ago[77;35H[K[76;1H123456789[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;1H[?12l[?25h[?25l
Already at oldest change[77;25H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^111/w >>test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H1 line, 11 characters appended[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Delete three other characters and go back in time step by step[?25l[76;1H[?12l[?25h[8C[?25l[76;9H[K[76;8H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[76;8H[?12l[?25h[?25l[76;8H[K[76;7H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[76;7H[?12l[?25h[?25l[76;7H[K[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsleep 1[?25l[76;6H[?12l[?25h[?25l
1 change; before #6  1 seconds ago[76;7H7[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 8 characters appended[76;7H[?12l[?25h[?25l
1 change; before #5  1 seconds ago[77;35H[K[76;8H8[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 9 characters appended[76;8H[?12l[?25h[?25l
4 changes; after #3  1 seconds ago[77;35H[K[76;1H456789[76;7H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[76;1H[?12l[?25h[?25l
1 change; before #3  1 seconds ago[77;35H[K[76;1H3456789[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 8 characters appended[76;1H[?12l[?25h[?25l
1 change; before #2  1 seconds ago[77;35H[K[76;1H23456789[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 9 characters appended[76;1H[?12l[?25h[?25l
1 change; before #1  1 seconds ago[77;35H[K[76;1H123456789[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;1H[?12l[?25h[?25l
Already at oldest change[77;25H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;1H[?12l[?25h[?25l
Already at oldest change[77;25H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;1H[?12l[?25h[?25l
3 changes; after #6  1 seconds ago[77;35H[K[76;7H[K[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^222/w >>test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H1 line, 11 characters appended[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Delay for three seconds and go some seconds forward and backward[?25l[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hsleep 2[?25l[76;6H[?12l[?25h[?25l6a[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[76;7H[?12l[?25h[?25lab[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[76;8H[?12l[?25h[?25lbc[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[76;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hear 1s[?25l3 changes; before #7  0 seconds ago[76;7H[K[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hear 3s[?25l3 changes; before #1  3 seconds ago[76;7H789[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlater 1s[?25l3 changes; after #6  3 seconds ago[76;7H[K[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 7 characters appended[76;6H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlater 1h[?25l3 changes; after #9  0 seconds ago[76;7Habc[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 10 characters appended[76;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" test undojoin[?25l[76;9H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Haaaa[77;1H[K[76;4H[?12l[?25h[?25l
:[?12l[?25hset ul=100[?25l[76;4H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hbbbb[77;1H[K[76;4H[?12l[?25h[?25l
1 line less; before #11  0 seconds ago[76;1H[1m[34m~                                                                                                      [75;4H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 5 characters appended[75;4H[?12l[?25h[?25l
bbbb[76;5H[K[76;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[76;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hundojoin[?25l[76;4H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hcccc[77;1H[K[76;4H[?12l[?25h[?25l
2 fewer lines; before #12  0 seconds ago[75;1H[1m[34m~                                                                                                      [76;1H~                                                                                                      [74;4H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1 line, 5 characters appended[74;4H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [1;1H[?12l[?25h[?25l[mone one one[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[1;11H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[2;3H[?12l[?25h[?25l
two[3;4H[K[3;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[3;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"Xtest" 3 lines, 20 characters written[3;3H[?12l[?25h[?25l
three[4;6H[K[4;5H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hearlier 1f[?25l1 line less; before #4  0 seconds ago[4;1H[1m[34m~                                                                                                      [3;3H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h" expect "one one one\ntwo\ntwo"[?25l[3;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%yank a[?25l3 lines yanked[3;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hearlier 1f[?25l2 fewer lines; before #2  0 seconds ago[2;1H[1m[34m~                                                                                                      [3;1H~                                                                                                      [1;11H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h" expect "one one one"[?25l[1;11H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%yank b[?25l[1;11H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hearlier 1f[?25l1 line less; before #1  0 seconds ago[1;1H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" expect empty line[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%yank c[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlater 1f[?25l1 more line; after #1  0 seconds ago[1;1Hone one one[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" expect "one one one"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%yank d[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25h" expect "one one one\ntwo\ntwo"[?25l[2;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%yank e[?25l3 lines yanked[2;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlater 1f[?25l1 more line; after #4  0 seconds ago[4;1Hthree[4;6H[K[3;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" expect "one one one\ntwo\ntwo\nthree"[?25l[3;3H[?12l[?25h[1;1H[?25l[1;76r[1;1H[L[1;77r[1;1H---[77;1H[K[1;3H[?12l[?25h[?25l[77;1H:[?12l[?25h0put e[?25l3 more lines[1;76r[1;1H[3L[1;77r[1;1Hone one one
two
two[77;1H[K[77;1H3 more lines[3;1H[?12l[?25h[1;1H[?25l[1;76r[1;1H[L[1;77r[1;1H---[77;1H[K[1;3H[?12l[?25h[?25l[77;1H:[?12l[?25h0put d[?25l[1;76r[1;1H[L[1;77r[1;1Hone one one[77;1H[K[1;1H[?12l[?25h[?25l[1;76r[1;1H[L[1;77r[1;1H---[?12l[?25h[?25l[77;1H:[?12l[?25h0put c[?25l[1;76r[1;1H[L[1;77r[77;1H[K[1;1H[?12l[?25h[?25l[1;76r[1;1H[L[1;77r[1;1H---[?12l[?25h[?25l[77;1H:[?12l[?25h0put b[?25l[1;76r[1;1H[L[1;77r[1;1Hone one one[77;1H[K[1;1H[?12l[?25h[?25l[1;76r[1;1H[L[1;77r[1;1H---[?12l[?25h[?25l[77;1H:[?12l[?25h0put a[?25l3 more lines[1;76r[1;1H[3L[1;77r[1;1Hone one one
two
two[77;1H[K[77;1H3 more lines[3;1H[?12l[?25h[1;1H[?25l[1;76r[1;1H[L[1;77r[1;1H---[77;1H[K[1;3H[?12l[?25h[?25l[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H19 lines, 115 characters appended[1;3H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test62.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test62.in" 57 lines, 1394 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, 'vall[40;1H_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)
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:
[1m[34m~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for tab pages[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 51 lines, 1345 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[56;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Simple test for opening and closing a tab page[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25htabnew[?25l[27m[m[H[2J[1;1H[4m[30m[47m test62.in [m[1m [No Name] [m[7m                                                                                 [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hlet nr = tabpagenr()[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hq[?25l[27m[m[H[2J[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, 'vall[40;1H_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)
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:
[1m[34m~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hcall append(line('$'), 'tab page ' . nr)[?25l[59;1Htab page 2[59;11H[K[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet nr[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Open three tab pages and use ":tabdo"[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h0tabnew[?25l[27m[m[H[2J[1;1H[1m [No Name] [m[4m[30m[47m + test62.in [m[7m                                                                               [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h1tabnew[?25l[27m[m[H[2J[1;1H[4m[30m[47m [No Name] [m[1m [No Name] [m[4m[30m[47m + test62.in [m[7m                                                                    [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h888tabnew[?25l[27m[m[H[2J[1;1H[4m[30m[47m [No Name]  [No Name]  + test62.in [m[1m [No Name] [m[7m                                                         [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25htabdo call append(line('$'), 'this is tab page ' . tabpagenr())[?25l[27m[m[H[2J[1;1H[4m[30m[47m + [No Name]  + [No Name]  + test62.in [m[1m + [No Name] [m[7m                                                   [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25htabclose! 2[?25l[1;17H[4m[30m[47mtest62.in[m[1C[1m + [No Name] [m[7m             [50C [m[1;103H[4m[30m[47mX[2;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25htabrewind[?25l[27m[m[H[2J[1;1H[1m + [No Name] [m[4m[30m[47m + test62.in  + [No Name] [m[7m                                                                [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hlet line1 = getline('$')[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;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  [63C [m[1;103H[4m[30m[47mX[m[3;1H[1m[34m~                                                                                                      [2;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hq[?25l[27m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m + [No Name] [m[7m                                                                             [m[1;103H[4m[30m[47mX[m[3;1HSTARTTEST
: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, 'vall[40;1H_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)
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:
tab page 2
this is tab page 3
[1m[34m~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25htablast[?25l[27m[m[H[2J[1;1H[4m[30m[47m + test62.in [m[1m + [No Name] [m[7m                                                                             [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hlet line2 = getline('$')[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hq![?25l[27m[m[H[2J[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, 'vall[40;1H_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)
:"
:"
:/^Results/,$w! test.out
:qa!
ENDTEST

Results:
tab page 2
this is tab page 3
[1m[34m~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hcall append(line('$'), line1)[?25l[61;1Hthis is tab page 1[61;19H[K[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(line('$'), line2)[?25l[62;1Hthis is tab page 4[62;19H[K[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet line1 line2[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test for settabvar() and gettabvar() functions. Open a new tab page and [?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" set 3 variables to a number, string and a list. Verify that the variables[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" are correctly set.[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25htabnew[?25l[27m[m[H[2J[1;1H[4m[30m[47m + test62.in [m[1m [No Name] [m[7m                                                                               [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25htabfirst[?25l[27m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                               [m[1;103H[4m[30m[47mX[m[3;1HSTARTTEST
: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, 'vall[40;1H_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)
:"
:"
:/^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
[1m[34m~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hcall settabvar(2, 'val_num', 100)[?25l[27m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                               [m[1;103H[4m[30m[47mX[m[3;1HSTARTTEST
: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, 'vall[40;1H_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)
:"
:"
:/^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
[1m[34m~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hcall settabvar(2, 'val_str', 'SetTabVar test')[?25l[27m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                               [m[1;103H[4m[30m[47mX[m[3;1HSTARTTEST
: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, 'vall[40;1H_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)
:"
:"
:/^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
[1m[34m~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hcall settabvar(2, 'val_list', ['red', 'blue', 'green'])[?25l[27m[m[H[2J[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                               [m[1;103H[4m[30m[47mX[m[3;1HSTARTTEST
: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, 'vall[40;1H_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)
:"
:"
:/^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
[1m[34m~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25h"[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet test_status = 'gettabvar: fail'[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hif gettabvar(2, 'val_num') == 100 && gettabvar(2, 'val_str') == 'SetTabVar test') && gettabvar(2, 'va
[76;103Hl[77;1H_list') == ['red', 'blue', 'green'])[?25l[76;1H[1m[37m[41mE15: Invalid expression: gettabvar(2, 'val_num') == 100 && gettabvar(2, 'val_str') == 'SetTabVar test')[77;1H && gettabvar(2, 'val_list') == ['red', 'blue', 'green'])[m
[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h    let test_status = 'gettabvar: pass'[?25l[1;1H[2L[1;1H[1m + test62.in [m[4m[30m[47m [No Name] [m[7m                                                                               [m[1;103H[4m[30m[47mX[m[77;1H[K[57;1H[?12l[?25h[?25l[77;1H:[?12l[?25hendif[?25l[1m[37m[41mE580: :endif without :if[57;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcall append(line('$'), test_status)[?25l[63;1Hgettabvar: pass[63;16H[K[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25htabnext 2[?25l[27m[m[H[2J[1;1H[4m[30m[47m + test62.in [m[1m [No Name] [m[7m                                                                               [m[1;103H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [2;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hlet test_status = 'settabvar: fail'[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;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;103H[4m[30m[47mX[?25l[m[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25htabclose[?25l[27m[m[H[2J[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, 'vall[40;1H_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)
:"
:"
:/^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
[1m[34m~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [57;1H[?12l[?25h[?25l[77;1H[m:[?12l[?25hcall append(line('$'), test_status)[?25l[64;1Hsettabvar: pass[64;16H[K[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^Results/,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 7 lines, 109 characters written[57;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test63.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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) == ['MyGG[16;1Hroup3', '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': 'MyGrr[46;1Houp2', 'pattern': 'FIXME', 'priority': 42, 'id': 5}, {'group': 'MyGroup3', 'pattern': 'XXX', 'priority''[47;1H: 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
:unlet m3
:if getmatches() == []
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:" --- Check that "matchdelete()" returns 0 if successful and otherwise -1.
:let @r .= "*** Test 6: "
:let m = matchadd("MyGroup1", "TODO")
:let r1 = matchdelete(m)
:let r2 = matchdelete(42)
:if r1 == 0 && r2 == -1
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:unlet m[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for ":match", ":2match", ":3match", "clearmatches()", "getmatches()",[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 150 lines, 4605 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[27m[m[H[2J[1;1H:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == []
:  let @r .= "OK\n"
:else
:  let @r .= "FAILED\n"
:endif
:unlet m1
:unlet m2
:unlet m3
:" --- Check that "setmatches()" restores a list of matches saved by
:" --- "getmatches()" without changes. (Matches with equal priority must also
:" --- remain in the same order.)
:let @r .= "*** Test 8: "
:let m1 = matchadd("MyGroup1", "TODO")
:let m2 = matchadd("MyGroup2", "FIXME", 42)
: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': 'MyGG[41;1Hroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 1}])
:if getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}] && r1 == 0
:  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:[74;1H[?12l[?25h
[?25l

:so! Xdotest[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check that "matcharg()" returns the correct group and pattern if a match[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- is defined.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r = "*** Test 1: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhighlight MyGroup1 ctermbg=red[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhighlight MyGroup2 ctermbg=green[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhighlight MyGroup3 ctermbg=blue[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hmatch MyGroup1 /TODO/[?25l[16;33H[41mTODO[40;57HTODO[m[42CGG[41;1Hr[42;56H[41mTODO[54;58HTODO[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h2match MyGroup2 /FIXME/[?25l[17;33H[42mFIXME[41;21HFIXME[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h3match MyGroup3 /XXX/[?25l[18;33H[44mXXX[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hif matcharg(1) == ['MyGroup1', 'TODO'] && matcharg(2) == ['MyGroup2', 'FIXME'] && matcharg(3) == ['My
[76;103HG[77;1Hroup3', 'XXX'][?25l[77;1H[K[77;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matcharg()" returns an empty list if the argument is not 1,[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- 2 or 3 (only 0 and 4 are tested).[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 2: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matcharg()" returns ['', ''] if a match is not defined.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 3: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hmatch[?25l[16;33HTODO[40;57HTODO[42CGG[41;1Hr[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h2match[?25l[17;33HFIXME[41;21HFIXME[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h3match[?25l[18;33HXXX[75;1H[?12l[?25h[?25l[77;1H[K[77;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matchadd()" and "getmatches()" agree on added matches and[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- that default values apply.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 4: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet m1 = matchadd("MyGroup1", "TODO")[?25l[16;33H[41mTODO[40;57HTODO[m[42CGG[41;1Hr[42;56H[41mTODO[54;58HTODO[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet m2 = matchadd("MyGroup2", "FIXME", 42)[?25l[17;33H[42mFIXME[41;21HFIXME[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet m3 = matchadd("MyGroup3", "XXX", 60, 17)[?25l[18;33H[44mXXX[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hif getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 4}, {'group': 'MyG
[76;103Hr[77;1Houp2', 'pattern': 'FIXME', 'priority': 42, 'id': 5}, {'group': 'MyGroup3', 'pattern': 'XXX', 'priority
[76;103H'[77;1H: 60, 'id': 17}][?25l[76;1H[K[77;1H[K[76;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matchdelete()" deletes the matches defined in the previous[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- test correctly.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 5: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall matchdelete(m1)[?25l[16;33HTODO[40;57HTODO[42CGG[41;1Hr[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall matchdelete(m2)[?25l[17;33HFIXME[41;21HFIXME[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall matchdelete(m3)[?25l[18;33HXXX[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m2[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m3[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25h" --- Check that "matchdelete()" returns 0 if successful and otherwise -1.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 6: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet m = matchadd("MyGroup1", "TODO")[?25l[16;33H[41mTODO[40;57HTODO[m[42CGG[41;1Hr[42;56H[41mTODO[54;58HTODO[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet r1 = matchdelete(m)[?25l[16;33HTODO[40;57HTODO[42CGG[41;1Hr[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet r2 = matchdelete(42)[?25l[1m[37m[41mE803: ID not found: 42[m[77;23H[K[75;1H[?12l[?25h[?25l[77;1H[K[77;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25hunlet m[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet r1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet r2[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check that "clearmatches()" clears all matches defined by ":match" and[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- "matchadd()".[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 7: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet m1 = matchadd("MyGroup1", "TODO")[?25l[16;33H[41mTODO[40;57HTODO[m[42CGG[41;1Hr[42;56H[41mTODO[54;58HTODO[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet m2 = matchadd("MyGroup2", "FIXME", 42)[?25l[17;33H[42mFIXME[41;21HFIXME[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet m3 = matchadd("MyGroup3", "XXX", 60, 17)[?25l[18;33H[44mXXX[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hmatch MyGroup1 /COFFEE/[?25l[19;18H[41mCOFFEE[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h2match MyGroup2 /HUMPPA/[?25l[1;19H[42mHUMPPA[20;19HHUMPPA[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h3match MyGroup3 /VIM/[?25l[2;19H[44mVIM[21;19HVIM[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcall clearmatches()[?25l[1;19HHUMPPA[2;19HVIM[16;33HTODO[17;33HFIXME[18;33HXXX[19;18HCOFFEE[20;19HHUMPPA[21;19HVIM[40;57HTODO[42CGG[41;1Hr[19CFIXME[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25hunlet m1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m2[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m3[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check that "setmatches()" restores a list of matches saved by[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- "getmatches()" without changes. (Matches with equal priority must also[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- remain in the same order.)[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 8: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet m1 = matchadd("MyGroup1", "TODO")[?25l[16;33H[41mTODO[40;57HTODO[m[42CGG[41;1Hr[42;56H[41mTODO[54;58HTODO[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet m2 = matchadd("MyGroup2", "FIXME", 42)[?25l[17;33H[42mFIXME[41;21HFIXME[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet m3 = matchadd("MyGroup3", "XXX", 60, 17)[?25l[18;33H[44mXXX[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hmatch MyGroup1 /COFFEE/[?25l[19;18H[41mCOFFEE[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h2match MyGroup2 /HUMPPA/[?25l[1;19H[42mHUMPPA[20;19HHUMPPA[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h3match MyGroup3 /VIM/[?25l[2;19H[44mVIM[21;19HVIM[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet ml = getmatches()[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall clearmatches()[?25l[1;19HHUMPPA[2;19HVIM[16;33HTODO[17;33HFIXME[18;33HXXX[19;18HCOFFEE[20;19HHUMPPA[21;19HVIM[40;57HTODO[42CGG[41;1Hr[19CFIXME[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall setmatches(ml)[?25l[1;19H[42mHUMPPA[m[2;19H[44mVIM[m[16;33H[41mTODO[m[17;33H[42mFIXME[m[18;33H[44mXXX[m[19;18H[41mCOFFEE[m[20;19H[42mHUMPPA[m[21;19H[44mVIM[m[40;57H[41mTODO[m[42CGG[41;1Hr[19C[42mFIXME[m[42;56H[41mTODO[54;58HTODO[75;1H[?12l[?25h[?25l[m[77;1H[K[77;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:2match MyGroup2 /[42mHUMPPA[m/
:3match MyGroup3 /[44mVIM[m/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25hcall clearmatches()[?25l[1;19HHUMPPA[2;19HVIM[16;33HTODO[17;33HFIXME[18;33HXXX[19;18HCOFFEE[20;19HHUMPPA[21;19HVIM[40;57HTODO[42CGG[41;1Hr[19CFIXME[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m2[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet m3[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet ml[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check that "setmatches()" will not add two matches with the same ID. The[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- expected behaviour (for now) is to add the first match but not the[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- second and to return 0 (even though it is a matter of debate whether[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- this can be considered successful behaviour).[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 9: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet r1 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}, {'group': 'My
[76;103HG[77;1Hroup2', 'pattern': 'FIXME', 'priority': 10, 'id': 1}])[?25l[76;1H[1m[37m[41mE801: ID already taken: 1[m[76;26H[K[77;1H[K[77;1H[32mPress ENTER or type command to continue[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hif getmatches() == [{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}] && r1 == 0[?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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == []
:  let @r .= "OK\n"[16;33H[41mTODO[40;57HTODO[m[42CGG[41;1Hr[42;56H[41mTODO[54;58HTODO[m[77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25hcall clearmatches()[?25l[16;33HTODO[40;57HTODO[42CGG[41;1Hr[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet r1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- Check that "setmatches()" returns 0 if successful and otherwise -1.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- (A range of valid and invalid input values are tried out to generate the[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" --- return values.)[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet @r .= "*** Test 10: "[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet rs1 = setmatches([])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet rs2 = setmatches([{'group': 'MyGroup1', 'pattern': 'TODO', 'priority': 10, 'id': 1}])[?25l[16;33H[41mTODO[40;57HTODO[m[42CGG[41;1Hr[42;56H[41mTODO[54;58HTODO[75;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcall clearmatches()[?25l[16;33HTODO[40;57HTODO[42CGG[41;1Hr[42;56HTODO[54;58HTODO[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet rf1 = setmatches(0)[?25l[1m[37m[41mE714: List required[m[77;20H[K[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet rf2 = setmatches([0])[?25l[1m[37m[41mE474: Invalid argument[m[77;23H[K[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet rf3 = setmatches([{'wrong key': 'wrong value'}])[?25l[1m[37m[41mE474: Invalid argument[m[77;23H[K[75;1H[?12l[?25h[?25l[77;1H[K[77;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:2match MyGroup2 /HUMPPA/
:3match MyGroup3 /VIM/
:call clearmatches()
:if getmatches() == [][77;1H[K[75;1H[?12l[?25h[?25l

:[?12l[?25hunlet rs1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet rs2[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet rf1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet rf2[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hunlet rf3[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhighlight clear MyGroup1[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhighlight clear MyGroup2[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hhighlight clear MyGroup3[?25l[75;1H[?12l[?25h
[?25l
10 more lines[77;14H[K[1;76r[76;1H
[1;77r[76;1H*** Test 1: OK[77;1H[K[77;1H10 more lines[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H*** Test 2: OK[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^Results/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 11 lines, 170 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test64.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test64.in" 167 lines, 6276 characters[1;1HTest for regexp patterns.

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 = []
:call add(tl, ['ab', 'aab', 'ab'])
:call add(tl, ['b', 'abcdef', 'b'])
:call add(tl, ['bc*', 'abccccdef', 'bcccc'])
:call add(tl, ['bc\{-}', 'abccccdef', 'b'])
:call add(tl, ['bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd'])
:call add(tl, ['bc*', 'abbdef', 'b'])
:call add(tl, ['c*', 'ccc', 'ccc'])
:call add(tl, ['bc*', 'abdef', 'b'])
:call add(tl, ['c*', 'abdef', ''])
:call add(tl, ['bc\+', 'abccccdef', 'bcccc'])
:call add(tl, ['bc\+', 'abdef']) "no match
:"
:"operator \|
:call add(tl, ['a\|ab', 'cabd', 'a']) "alternation is ordered
:"
:call add(tl, ['c\?', 'ccb', 'c'])
:call add(tl, ['bc\?', 'abd', 'b'])
:call add(tl, ['bc\?', 'abccd', 'bc'])
:"
:call add(tl, ['\va{1}', 'ab', 'a'])
:"
:call add(tl, ['\va{2}', 'aa', 'aa'])
:call add(tl, ['\va{2}', 'caad', 'aa'])
:call add(tl, ['\va{2}', 'aba'])
:call add(tl, ['\va{2}', 'ab'])
:call add(tl, ['\va{2}', 'abaa', 'aa'])
:call add(tl, ['\va{2}', 'aaa', 'aa'])
:"
:call add(tl, ['\vb{1}', 'abca', 'b'])
:call add(tl, ['\vba{2}', 'abaa', 'baa'])
:call add(tl, ['\vba{3}', 'aabaac'])
:"
:call add(tl, ['\v(ab){1}', 'ab', 'ab', 'ab'])
:call add(tl, ['\v(ab){1}', 'dabc', 'ab', 'ab'])
:call add(tl, ['\v(ab){1}', 'acb'])
:"
:call add(tl, ['\v(ab){0,2}', 'acb', "", ""])
:call add(tl, ['\v(ab){0,2}', 'ab', 'ab', 'ab'])
:call add(tl, ['\v(ab){1,2}', 'ab', 'ab', 'ab'])
:call add(tl, ['\v(ab){1,2}', 'ababc', 'abab', 'ab'])
:call add(tl, ['\v(ab){2,4}', 'ababcab', 'abab', 'ab'])
:call add(tl, ['\v(ab){2,4}', 'abcababa', 'abab', 'ab'])
:"
:call add(tl, ['\v(ab){2}', 'abab', 'abab', 'ab'])
:call add(tl, ['\v(ab){2}', 'cdababe', 'abab', 'ab'])
:call add(tl, ['\v(ab){2}', 'abac'])
:call add(tl, ['\v(ab){2}', 'abacabab', 'abab', 'ab'])
:call add(tl, ['\v((ab){2}){2}', 'abababab', 'abababab', 'abab', 'ab'])
:call add(tl, ['\v((ab){2}){2}', 'abacabababab', 'abababab', 'abab', 'ab'])
:"
:call add(tl, ['\v(a{1}){1}', 'a', 'a', 'a'])
:call add(tl, ['\v(a{2}){1}', 'aa', 'aa', 'aa'])
:call add(tl, ['\v(a{2}){1}', 'aaac', 'aa', 'aa'])
:call add(tl, ['\v(a{2}){1}', 'daaac', 'aa', 'aa'])
:call add(tl, ['\v(a{1}){2}', 'daaac', 'aa', 'a'])
:call add(tl, ['\v(a{1}){2}', 'aaa', 'aa', 'a'])
:call add(tl, ['\v(a{2})+', 'adaac', 'aa', 'aa'])
:call add(tl, ['\v(a{2})+', 'aa', 'aa', 'aa'])
:call add(tl, ['\v(a{2}){1}', 'aa', 'aa', 'aa'])
:call add(tl, ['\v(a{1}){2}', 'aa', 'aa', 'a'])[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for regexp patterns.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[6;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 158 lines, 6117 characters written[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[7;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[27m[m[H[2J[1;1H:call add(tl, ['\v(abc){2}', 'abcabd', ])
:call add(tl, ['\v(abc){2}', 'abdabcabc','abcabc', 'abc'])
:"
:call add(tl, ['a*', 'cc', ''])
:call add(tl, ['\v(a*)+', 'cc', ''])
:call add(tl, ['\v((ab)+)+', 'ab', 'ab', 'ab', 'ab'])
:call add(tl, ['\v(((ab)+)+)+', 'ab', 'ab', 'ab', 'ab', 'ab'])
:call add(tl, ['\v(((ab)+)+)+', 'dababc', 'abab', 'abab', 'abab', 'ab'])
:call add(tl, ['\v(a{0,2})+', 'cc', ''])
:call add(tl, ['\v(a*)+', '', ''])
:call add(tl, ['\v((a*)+)+', '', ''])
:call add(tl, ['\v((ab)*)+', '', ''])
:call add(tl, ['\va{1,3}', 'aab', 'aa'])
:call add(tl, ['\va{2,3}', 'abaa', 'aa'])
:"
:call add(tl, ['\v((ab)+|c*)+', 'abcccaba', 'abcccab', '', 'ab'])
:call add(tl, ['\v(a{2})|(b{3})', 'bbabbbb', 'bbb', '', 'bbb'])
:call add(tl, ['\va{2}|b{2}', 'abab'])
:call add(tl, ['\v(a)+|(c)+', 'bbacbaacbbb', 'a', 'a'])
:call add(tl, ['\vab{2,3}c', 'aabbccccccccccccc', 'abbc'])
:call add(tl, ['\vab{2,3}c', 'aabbbccccccccccccc', 'abbbc'])
:call add(tl, ['\vab{2,3}cd{2,3}e', 'aabbbcddee', 'abbbcdde'])
:call add(tl, ['\va(bc){2}d', 'aabcbfbc' ])
:call add(tl, ['\va*a{2}', 'a', ])
:call add(tl, ['\va*a{2}', 'aa', 'aa' ])
:call add(tl, ['\va*a{2}', 'aaa', 'aaa' ])
:call add(tl, ['\va*a{2}', 'bbbabcc', ])
:call add(tl, ['\va*b*|a*c*', 'a', 'a'])
:call add(tl, ['\va{1}b{1}|a{1}b{1}', ''])
:"
:"submatches
:call add(tl, ['\v(a)', 'ab', 'a', 'a'])
:call add(tl, ['\v(a)(b)', 'ab', 'ab', 'a', 'b'])
:call add(tl, ['\v(ab)(b)(c)', 'abbc', 'abbc', 'ab', 'b', 'c'])
:call add(tl, ['\v((a)(b))', 'ab', 'ab', 'ab', 'a', 'b'])
:call add(tl, ['\v(a)|(b)', 'ab', 'a', 'a'])
:"
:call add(tl, ['\v(a*)+', 'aaaa', 'aaaa', ''])
:call add(tl, ['x', 'abcdef'])
:"
:for t in tl
:  let l = matchlist(t[1], t[0])
:" check the match itself
:  if len(l) == 0 && len(t) > 2
:    $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", did not match, expected: \"' . t[2] ..[46;1H '\"'
:  elseif len(l) > 0 && len(t) == 2
:    $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", match: \"' . l[0] . '\", expected no  [49;1Hmatch'
:  elseif len(t) > 2 && l[0] != t[2]
:    $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", match: \"' . l[0] . '\", expected: \""[52;1H' . t[2] . '\"'
:  else
:    $put ='OK'
:  endif
:  if len(l) > 0
:"   check all the nine submatches
:    for i in range(1, 9)
:      if len(t) <= i + 2
:[8Clet e = ''
:      else
:[8Clet e = t[i + 2]
:      endif
:      if l[i] != e
:[8C$put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", submatch ' . i . ': \"' . l[i] .  [66;1H'\", expected: \"' . e . '\"'
:      endif
:    endfor
:    unlet i
:  endif
:endfor
:unlet t tl e l
:/^Results/,$wq! test.out
ENDTEST

Results of test64:[74;1H[?12l[?25h
[?25l

:so! Xdotest[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" tl is a List of Lists with:[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    regexp pattern[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    text to test the pattern on[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    expected match (optional)[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    expected submatch 1 (optional)[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    expected submatch 2 (optional)[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    etc.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"  When there is no match use only the first two items.[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet tl = [][?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['ab', 'aab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['b', 'abcdef', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc*', 'abccccdef', 'bcccc'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc\{-}', 'abccccdef', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc\{-}\(d\)', 'abccccdef', 'bccccd', 'd'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc*', 'abbdef', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['c*', 'ccc', 'ccc'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc*', 'abdef', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['c*', 'abdef', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc\+', 'abccccdef', 'bcccc'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc\+', 'abdef']) "no match[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"operator \|[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['a\|ab', 'cabd', 'a']) "alternation is ordered[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['c\?', 'ccb', 'c'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc\?', 'abd', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['bc\?', 'abccd', 'bc'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{1}', 'ab', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2}', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2}', 'caad', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2}', 'aba'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2}', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2}', 'abaa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2}', 'aaa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\vb{1}', 'abca', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\vba{2}', 'abaa', 'baa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\vba{3}', 'aabaac'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){1}', 'ab', 'ab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){1}', 'dabc', 'ab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){1}', 'acb'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){0,2}', 'acb', "", ""])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){0,2}', 'ab', 'ab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){1,2}', 'ab', 'ab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){1,2}', 'ababc', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){2,4}', 'ababcab', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){2,4}', 'abcababa', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){2}', 'abab', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){2}', 'cdababe', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){2}', 'abac'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab){2}', 'abacabab', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v((ab){2}){2}', 'abababab', 'abababab', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v((ab){2}){2}', 'abacabababab', 'abababab', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1}){1}', 'a', 'a', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2}){1}', 'aa', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2}){1}', 'aaac', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2}){1}', 'daaac', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1}){2}', 'daaac', 'aa', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1}){2}', 'aaa', 'aa', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2})+', 'adaac', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2})+', 'aa', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2}){1}', 'aa', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1}){2}', 'aa', 'aa', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1}){1}', 'a', 'a', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2}){2}', 'aaaa', 'aaaa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2}){2}', 'aaabaaaa', 'aaaa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a+){2}', 'dadaac', 'aa', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{3}){2}', 'aaaaaaa', 'aaaaaa', 'aaa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1,2}){2}', 'daaac', 'aaa', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1,3}){2}', 'daaaac', 'aaaa', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1,3}){2}', 'daaaaac', 'aaaaa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1,3}){3}', 'daac'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{1,2}){2}', 'dac'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a+)+', 'daac', 'aa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a+)+', 'aaa', 'aaa', 'aaa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a+){1,2}', 'aaa', 'aaa', 'aaa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a+)(a+)', 'aaa', 'aaa', 'aa', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{3})+', 'daaaac', 'aaa', 'aaa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a|b|c)+', 'aacb', 'aacb', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a|b|c){2}', 'abcb', 'ab', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(abc){2}', 'abcabd', ])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(abc){2}', 'abdabcabc','abcabc', 'abc'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['a*', 'cc', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a*)+', 'cc', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v((ab)+)+', 'ab', 'ab', 'ab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(((ab)+)+)+', 'ab', 'ab', 'ab', 'ab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(((ab)+)+)+', 'dababc', 'abab', 'abab', 'abab', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{0,2})+', 'cc', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a*)+', '', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v((a*)+)+', '', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v((ab)*)+', '', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{1,3}', 'aab', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2,3}', 'abaa', 'aa'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v((ab)+|c*)+', 'abcccaba', 'abcccab', '', 'ab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a{2})|(b{3})', 'bbabbbb', 'bbb', '', 'bbb'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{2}|b{2}', 'abab'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a)+|(c)+', 'bbacbaacbbb', 'a', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\vab{2,3}c', 'aabbccccccccccccc', 'abbc'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\vab{2,3}c', 'aabbbccccccccccccc', 'abbbc'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\vab{2,3}cd{2,3}e', 'aabbbcddee', 'abbbcdde'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va(bc){2}d', 'aabcbfbc' ])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va*a{2}', 'a', ])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va*a{2}', 'aa', 'aa' ])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va*a{2}', 'aaa', 'aaa' ])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va*a{2}', 'bbbabcc', ])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va*b*|a*c*', 'a', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\va{1}b{1}|a{1}b{1}', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"submatches[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a)', 'ab', 'a', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a)(b)', 'ab', 'ab', 'a', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(ab)(b)(c)', 'abbc', 'abbc', 'ab', 'b', 'c'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v((a)(b))', 'ab', 'ab', 'ab', 'a', 'b'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a)|(b)', 'ab', 'a', 'a'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['\v(a*)+', 'aaaa', 'aaaa', ''])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(tl, ['x', 'abcdef'])[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[75;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfor t in tl[?25l
:  [?12l[?25h:  let l = matchlist(t[1], t[0])
[?25l:  [?12l[?25h:" check the match itself
[?25l:  [?12l[?25h:  if len(l) == 0 && len(t) > 2
[?25l:    [?12l[?25h:    $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", did not match, expected: \"' . 
[76;103Ht[77;1H[2] . '\"'
[?25l:    [?12l[?25h:  elseif len(l) > 0 && len(t) == 2
[?25l:    [?12l[?25h:    $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", match: \"' . l[0] . '\", expect
[76;103He[77;1Hd no match'
[?25l:    [?12l[?25h:  elseif len(t) > 2 && l[0] != t[2]
[?25l:    [?12l[?25h:    $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", match: \"' . l[0] . '\", expect
[76;103He[77;1Hd: \"' . t[2] . '\"'
[?25l:    [?12l[?25h:  else
[?25l:    [?12l[?25h:    $put ='OK'
[?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:      [?12l[?25h:      if len(t) <= i + 2
[?25l:[8C[?12l[?25h:        let e = ''
[?25l:[8C[?12l[?25h:      else
[?25l:[8C[?12l[?25h:        let e = t[i + 2]
[?25l:[8C[?12l[?25h:      endif
[?25l:      [?12l[?25h:      if l[i] != e
[?25l:[8C[?12l[?25h:        $put ='ERROR: pat: \"' . t[0] . '\", text: \"' . t[1] . '\", submatch ' . i . ': \"'
. l[i] . '\", expected: \"' . e . '\"'
[?25l:[8C[?12l[?25h:      endif
[?25l:      [?12l[?25h:    endfor
[?25l:    [?12l[?25h:    unlet i
[?25l:    [?12l[?25h:  endif
[?25l:  [?12l[?25h:endfor[1;1H[30L[?25l[1;1HOK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK[31;3H[K[32;1HOK[32;3H[K[33;1HOK[33;3H[K[34;1HOK[34;3H[K[35;1HOK[35;3H[K[36;1HOK[36;3H[K[37;1HOK
OK[38;3H[K[39;1HOK[39;3H[K[40;1HOK
OK[41;3H[K[42;1HOK[42;4H[K[43;1HOK[43;4H[K[44;1HOK[44;4H[K[45;1HOK[45;6H[K[46;1HOK[46;3H[K[47;1HOK[47;4H[K[48;1HOK[48;6H[K[49;1HOK[49;3H[K[50;1HOK[50;4H[K[51;1HOK[51;6H[K[52;1HOK[52;3H[K[53;1HOK[53;4H[K[54;1HOK[54;6H[K[55;1HOK[55;4H[K[56;1HOK[56;4H[K[57;1HOK[57;6H[K[58;1HOK[58;6H[K[59;1HOK[59;8H[K[60;1HOK[60;10H[K[61;1HOK[61;8H[K[62;1HOK[62;10H[K[63;1HOK[63;8H[K[64;1HOK[64;8H[K[65;1HOK[65;10H[K[66;1HOK[66;3H[K[67;1HOK[67;8H[K[68;1HOK[68;6H[K[69;1HOK[69;6H[K[70;1HOK[70;4H[K[71;1HOK[71;3H[K[72;1HOK[72;3H[K[73;1HOK[73;3H[K[74;1HOK[74;3H[K[75;1HOK
OK[76;3H[K[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hunlet t tl e l[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^Results/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 102 lines, 322 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test65.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test65.in" 78 lines, 1791 characters[1;1HTest for floating point.

STARTTEST
:so small.vim
:if !has("float")
:  e! test.ok
:  wq! test.out
:endif
:"
:$put =printf('%f', 123.456)
:$put =printf('%e', 123.456)
:$put =printf('%g', 123.456)
:" check we don't crash on division by zero
:echo 1.0 / 0.0
:$put ='+='
:let v = 1.234
:let v += 6.543
:$put =printf('%g', v)
:let v = 1.234
:let v += 5
:$put =printf('%g', v)
:let a = 5
:let a += 3.333
:$put =string(a)
:$put ='=='
:let v = 1.234
:$put =v == 1.234
:$put =v == 1.2341
:$put ='add-subtract'
:$put =printf('%g', 4 + 1.234)
:$put =printf('%g', 1.234 - 8)
:$put ='mult-div'
:$put =printf('%g', 4 * 1.234)
:$put =printf('%g', 4.0 / 1234)
:$put ='dict'
:$put =string({'x': 1.234, 'y': -2.0e20})
:$put ='list'
:$put =string([-123.4, 2.0e-20])
:$put ='abs'
:$put =printf('%d', abs(1456))
:$put =printf('%d', abs(-4))
:$put =printf('%d', abs([1, 2, 3]))
:$put =printf('%g', abs(14.56))
:$put =printf('%g', abs(-54.32))
:$put ='ceil'
:$put =printf('%g', ceil(1.456))
:$put =printf('%g', ceil(-5.456))
:$put =printf('%g', ceil(-4.000))
:$put ='floor'
:$put =printf('%g', floor(1.856))
:$put =printf('%g', floor(-5.456))
:$put =printf('%g', floor(4.0))
:$put ='log10'
:$put =printf('%g', log10(1000))
:$put =printf('%g', log10(0.01000))
:$put ='pow'
:$put =printf('%g', pow(3, 3.0))
:$put =printf('%g', pow(2, 16))
:$put ='round'
:$put =printf('%g', round(0.456))
:$put =printf('%g', round(4.5))
:$put =printf('%g', round(-4.50))
:$put ='sqrt'
:$put =printf('%g', sqrt(100))
: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)
:/^Results/,$wq! test.out
ENDTEST[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for floating point.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 72 lines, 1727 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[77;1H[K[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;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[2;1HSTARTTEST
:so small.vim[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =printf('%f', 123.456)[?25l[1;76r[1;1H[2M[1;77r[75;1HResults of test65:
123.456000[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%e', 123.456)[?25l[1;76r[76;1H
[1;77r[76;1H1.234560e+02[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 123.456)[?25l[1;76r[76;1H
[1;77r[76;1H123.456[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h" check we don't crash on division by zero[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hecho 1.0 / 0.0[?25linf[77;4H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put ='+='[?25l[1;76r[76;1H
[1;77r[76;1H+=[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hlet v = 1.234[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet v += 6.543[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =printf('%g', v)[?25l[1;76r[76;1H
[1;77r[76;1H7.777[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hlet v = 1.234[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet v += 5[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =printf('%g', v)[?25l[1;76r[76;1H
[1;77r[76;1H6.234[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hlet a = 5[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet a += 3.333[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =string(a)[?25l[1;76r[76;1H
[1;77r[76;1H8.333[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='=='[?25l[1;76r[76;1H
[1;77r[76;1H==[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hlet v = 1.234[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put =v == 1.234[?25l[1;76r[76;1H
[1;77r[76;1H1[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =v == 1.2341[?25l[1;76r[76;1H
[1;77r[76;1H0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='add-subtract'[?25l[1;76r[76;1H
[1;77r[76;1Hadd-subtract[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 4 + 1.234)[?25l[1;76r[76;1H
[1;77r[76;1H5.234[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 1.234 - 8)[?25l[1;76r[76;1H
[1;77r[76;1H-6.766[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='mult-div'[?25l[1;76r[76;1H
[1;77r[76;1Hmult-div[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 4 * 1.234)[?25l[1;76r[76;1H
[1;77r[76;1H4.936[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', 4.0 / 1234)[?25l[1;76r[76;1H
[1;77r[76;1H0.003241[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='dict'[?25l[1;76r[76;1H
[1;77r[76;1Hdict[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =string({'x': 1.234, 'y': -2.0e20})[?25l[1;76r[76;1H
[1;77r[76;1H{'x': 1.234, 'y': -2.0e20}[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='list'[?25l[1;76r[76;1H
[1;77r[76;1Hlist[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =string([-123.4, 2.0e-20])[?25l[1;76r[76;1H
[1;77r[76;1H[-123.4, 2.0e-20][77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='abs'[?25l[1;76r[76;1H
[1;77r[76;1Habs[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%d', abs(1456))[?25l[1;76r[76;1H
[1;77r[76;1H1456[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%d', abs(-4))[?25l[1;76r[76;1H
[1;77r[76;1H4[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%d', abs([1, 2, 3]))[?25l[1m[37m[41mE745: Using a List as a Number[m[77;32H[K[1;76r[76;1H
[1;77r[76;1H-1[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', abs(14.56))[?25l[1;76r[76;1H
[1;77r[76;1H14.56[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', abs(-54.32))[?25l[1;76r[76;1H
[1;77r[76;1H54.32[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='ceil'[?25l[1;76r[76;1H
[1;77r[76;1Hceil[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', ceil(1.456))[?25l[1;76r[76;1H
[1;77r[76;1H2.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', ceil(-5.456))[?25l[1;76r[76;1H
[1;77r[76;1H-5.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', ceil(-4.000))[?25l[1;76r[76;1H
[1;77r[76;1H-4.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='floor'[?25l[1;76r[76;1H
[1;77r[76;1Hfloor[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', floor(1.856))[?25l[1;76r[76;1H
[1;77r[76;1H1.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', floor(-5.456))[?25l[1;76r[76;1H
[1;77r[76;1H-6.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', floor(4.0))[?25l[1;76r[76;1H
[1;77r[76;1H4.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='log10'[?25l[1;76r[76;1H
[1;77r[76;1Hlog10[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', log10(1000))[?25l[1;76r[76;1H
[1;77r[76;1H3.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', log10(0.01000))[?25l[1;76r[76;1H
[1;77r[76;1H-2.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='pow'[?25l[1;76r[76;1H
[1;77r[76;1Hpow[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', pow(3, 3.0))[?25l[1;76r[76;1H
[1;77r[76;1H27.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', pow(2, 16))[?25l[1;76r[76;1H
[1;77r[76;1H65536.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='round'[?25l[1;76r[76;1H
[1;77r[76;1Hround[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', round(0.456))[?25l[1;76r[76;1H
[1;77r[76;1H0.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', round(4.5))[?25l[1;76r[76;1H
[1;77r[76;1H5.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', round(-4.50))[?25l[1;76r[76;1H
[1;77r[76;1H-5.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='sqrt'[?25l[1;76r[76;1H
[1;77r[76;1Hsqrt[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', sqrt(100))[?25l[1;76r[76;1H
[1;77r[76;1H10.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hecho sqrt(-4.01)[?25l-nan[77;5H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$put ='str2float'[?25l[1;76r[76;1H
[1;77r[76;1Hstr2float[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', str2float('1e40'))[?25l[1;76r[76;1H
[1;77r[76;1H1.0e40[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='trunc'[?25l[1;76r[76;1H
[1;77r[76;1Htrunc[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', trunc(1.456))[?25l[1;76r[76;1H
[1;77r[76;1H1.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', trunc(-5.456))[?25l[1;76r[76;1H
[1;77r[76;1H-5.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =printf('%g', trunc(4.000))[?25l[1;76r[76;1H
[1;77r[76;1H4.0[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put ='float2nr'[?25l[1;76r[76;1H
[1;77r[76;1Hfloat2nr[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =float2nr(123.456)[?25l[1;76r[76;1H
[1;77r[76;1H123[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h$put =float2nr(-123.456)[?25l[1;76r[76;1H
[1;77r[76;1H-123[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h/^Results/,$wq! test.out[?25l[31msearch hit BOTTOM, continuing at TOP[m"test.out" [77;12H[K[77;12H[New File] 56 lines, 363 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test66.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test66.in" 25 lines, 400 characters[2;1HTest for visual block shift and tab characters.

STARTTEST
:so small.vim
/^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<
:$-4,$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

abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
[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~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 14 lines, 196 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[19;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[20;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[20;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^abcdefgh[?25l[21;1H[?12l[?25h[?25l[?12l[?25h[?25l[7ma
a
a
a
[?12l[?25h[?25l[m[21;1Ha
a
a
a[21;1H    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz[21;1H[?12l[?25h
[?25labcdefghijklmnopqrstuvwxyz[22;27H[K[22;1H[?12l[?25h[10C[?25l[22;11H[K[22;10H[?12l[?25h[23;10H[?25lc         defghijklmnopqrstuvwxyz[23;16H[?12l[?25h[24;16H[24;7H[?25lc            defghijklmnopqrstuvwxyz[24;19H[?12l[?25h[25;19H[25;7H[?25lc         defghijklmnopqrstuvwxyz[25;16H[?12l[?25h[21;16H[?25l[?12l[?25h[?25l[7mi[23;13H [24;13H [25;13H[?12l[?25h[?25l[m[77;1H5 lines <ed 1 time[21;13Hi[23;13Hdefghijklmnopqrstuvwxyz[23;36H[K[24;13Hdefghijklmnopqrstuvwxyz[24;36H[K[25;13Hdefghijklmnopqrstuvwxyz[25;36H[K[21;13H[?12l[?25h[22;10H[?25l[77;1H[K[77;1H:[?12l[?25h$-4,$w! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 5 lines, 150 characters written[22;10H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h$-4,$s/\s\+//g[?25l7 substitutions on 4 lines[21;1Habcdefghijklmnopqrstuvwxyz[21;27H[K[23;1Habcdefghijklmnopqrstuvwxyz[23;27H[K[24;1Habcdefghijklmnopqrstuvwxyz[24;27H[K[25;1Habcdefghijklmnopqrstuvwxyz[25;27H[K[25;1H[?12l[?25h[?25l[?12l[?25h[?25l[22;1H[7ma
a
a
a[21;1H[?12l[?25h[?25l[m
a
a
a
a[21;1H    abcdefghijklmnopqrstuvwxyz
    abcdefghij
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz
    abcdefghijklmnopqrstuvwxyz[21;1H[?12l[?25h
[?25labcdefghij[22;11H[K[22;1H[?12l[?25h
    ab[?25lc         defghijklmnopqrstuvwxyz[23;16H[?12l[?25h[24;16H[24;7H[?25lc                       [10Cdefghijklmnopqrstuvwxyz[24;40H[?12l[?25h[25;30H[25;7H[?25lc                 defghijklmnopqrstuvwxyz[25;24H[?12l[?25h[21;24H[21;13H[?25l[?12l[?25h[?25l[7mi[23;13H [24;13H [25;13H[?12l[?25h[?25l[m[77;1H5 lines <ed 3 times[77;20H[K[21;13Hi[23;13Hdefghijklmnopqrstuvwxyz[23;36H[K[24;13H    defghijklmnopqrstuvwxyz[24;41H[K[25;13Hdefghijklmnopqrstuvwxyz[25;36H[K[21;13H[?12l[?25h[22;10H[?25l[77;1H[K[77;1H:[?12l[?25h$-4,$w >> test.out[?25l"test.out"[77;12H[K[77;12H5 lines, 147 characters appended[22;10H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test67.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest that groups and patterns are tested correctly when calling exists() for[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[4;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 27 lines, 998 characters written[5;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[5;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[32;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet results=[][?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25haugroup auexists[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25haugroup END[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "##BufEnter: " . exists("##BufEnter"))[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#BufEnter: " . exists("#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufEnter * let g:entered=1[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#BufEnter: " . exists("#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25haugroup auexists[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufEnter * let g:entered=1[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25haugroup END[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter"))[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test"))[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufEnter *.test let g:entered=1[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test"))[?25l[33;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H:[?12l[?25hcall add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hau BufEnter <buffer> let g:entered=1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hedit testfile2.test[?25l"testfile2.test" [New File][1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall add(results, "#BufEnter#<buffer>: " . exists("#BufEnter#<buffer>"))[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he test.out[?25l"test.out" [New File][1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(0, results)[?25l[1;76r[1;1H[10L[1;77r[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[77;1H[K[11;1H[?12l[?25h[?25l[77;1H:[?12l[?25h$d[?25l[11;1H[1m[34m~                                                                                                      [10;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hw[?25l"test.out" [New File] 10 lines, 190 characters written[10;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test68.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test68.in" 56 lines, 428 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
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
ENDTEST
[1m[34m~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for text formatting.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 4 lines, 48 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[10;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[11;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[13;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noai tw=2 fo=t[?25l[13;1H[?12l[?25h[?25la
b[?12l[?25h
[?25l[77;1H[K[77;1H/^STARTTEST[17;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3 lines, 38 characters written[18;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[18;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[21;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[22;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[24;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ai tw=2 fo=tw[?25l[24;1H[?12l[?25h[?25l[25;76r[25;1H[L[1;77r[24;4H[K[25;1Hb[77;1H[K[25;1H[?12l[?25h

a [?25l[28;76r[28;1H[L[1;77r[28;1Hb[?12l[?25h
[?25l[77;1H/^STARTTEST[31;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[32;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H4 lines, 34 characters written[32;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[32;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[36;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[37;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[39;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset tw=3 fo=t[?25l[39;1H[?12l[?25h[?25l[40;76r[40;1H[L[1;77r[39;3H[K[40;1H[34m^A[m[77;1H[K[40;1H[?12l[?25h

  [?25l[41;76r[41;1H[3L[1;77r[42;1Ha
[34m^A[?12l[?25h
[?25l[77;1H[m/^STARTTEST[46;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[47;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H5 lines, 58 characters written[47;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[47;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[52;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[53;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[55;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset tw=2 fo=tcq1 comments=:#[?25l[55;1H[?12l[?25h
[?25l[57;76r[57;1H[3L[1;77r[58;1Ha b
#a b[77;1H[K[59;4H[?12l[?25h
[?25l[77;1H/^STARTTEST[62;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[63;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2 lines, 56 characters written[63;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[63;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[63;19H[?12l[?25h[64;19H[?25l[77;1H[K[77;1H:so! Xdotest[64;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l28 fewer lines[77;15H[K[5;1H[K[6;1H{[6;2H[K[7;1Ha[7;2H[K[8;1Hb[8;2H[K[9;1H}[9;2H[K[10;1H[K[15;1H[K[16;1Ha
b[17;2H[K[18;1H}[18;2H[K[19;1H[K[20;1H[K[21;1H{[21;2H[K[22;1Ha
[34m^A[m[24;1H[K[25;1Ha
[34m^A[m
}[28;1H[K[29;1H[K[30;1H{
a b[31;4H[K[32;1H#a b[32;5H[K[33;1H[K[34;1Ha b[34;4H[K[35;1H#a b[35;5H[K[36;1H}[36;2H[K[38;1H[1m[34m~                                                                                                      [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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [37;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h1;/^Results/,$wq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 35 lines, 91 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test69.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test69.in" 139 lines, 1154 characters[1;1HTest for multi-byte text formatting.

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

{
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹
aï¼¸
abï¼¸
abcï¼¸
abï¼¸ c
abï¼¸ï¼¹
}

STARTTEST
/^{/+1
:set ai tw=2 fo=tm
gqgqjgqgqo
ï¼¸
ï¼¸a[34m^[[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for multi-byte text formatting.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 2 lines, 34 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[6;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso mbyte.vim[?25l[7;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset encoding=utf-8[?25l[27m[m[H[2J[1;1HTest for multi-byte text formatting.

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

{
ï¼¸
ï¼¸a
ï¼¸ a
ï¼¸ï¼¹
ï¼¸ ï¼¹
aï¼¸
abï¼¸
abcï¼¸
abï¼¸ c
abï¼¸ï¼¹
}

STARTTEST
/^{/+1
:set ai tw=2 fo=tm
gqgqjgqgqo
ï¼¸
ï¼¸a[34m^[[7;1H[?12l[?25h[?25l[77;1H[m/^STARTTEST[10;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H5 lines, 58 characters written[11;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[11;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[16;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[17;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[19;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset tw=2 fo=t[?25l[19;1H[?12l[?25h
[?25l[21;76r[21;1H[L[1;77r[20;5H[K[21;1Hï¼¸ï¼¹ï¼º[77;1H[K[21;1H[?12l[?25h[?25l[22;76r[22;1H[2L[1;77r[23;1H[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25l[24;76r[24;1H[L[1;77r[23;5Hï¼º
abc [?12l[?25h[?25l[25;76r[25;1H[L[1;77r[25;1Hï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25lï¼º[?12l[?25h
[?25l[77;1H/^STARTTEST[28;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[29;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H8 lines, 80 characters written[29;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[29;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[37;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[38;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[40;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset tw=1 fo=tm[?25l[40;1H[?12l[?25h
[?25l[42;76r[42;1H[L[1;77r[41;3H[K[42;1Ha[77;1H[K[42;1H[?12l[?25h
[?25l[44;76r[44;1H[L[1;77r[43;4H[K[44;1Ha[?12l[?25h
[?25l[46;76r[46;1H[L[1;77r[45;3H[K[46;1Hï¼¹[?12l[?25h
[?25l[48;76r[48;1H[L[1;77r[47;4H[K[48;1Hï¼¹[?12l[?25h[?25l[49;76r[49;1H[2L[1;77r[50;1H[?12l[?25h[?25l[51;76r[51;1H[L[1;77r[50;1Hï¼¸
[?12l[?25h[?25l[52;76r[52;1H[2L[1;77r[51;1Hï¼¸
a
[?12l[?25h[?25l[54;76r[54;1H[2L[1;77r[53;1Hï¼¸
a
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[56;76r[56;1H[2L[1;77r[56;1Hï¼¹
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25l[58;76r[58;1H[L[1;77r[58;1Hï¼¹[?12l[?25h
[?25l[77;1H/^STARTTEST[61;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H13 lines, 140 characters written[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[62;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[75;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[1;76r[1;1H[2M[1;77r[75;1H{
ï¼¸[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hset tw=2 fo=tm[?25l[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸a[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;3H[K[76;1Ha[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ a[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;4H[K[76;1Ha[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;3H[K[76;1Hï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ ï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;4H[K[76;1Hï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Haï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;2H[K[76;1Hï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Habï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;3H[K[76;1Hï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Habcï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;4H[K[76;1Hï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Habï¼¸ c[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[74;3H[K[75;1Hï¼¸
c[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Habï¼¸ï¼¹[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[74;3H[K[75;1Hï¼¸
ï¼¹[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;1Hï¼¸
[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[74;1Hï¼¸
a
[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[74;1Hï¼¸
a
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¹
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¹
a[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¸
ab[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¸
abc[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¸
ab[?12l[?25h[?25l[1;76r[1;1H[3M[1;77r[74;1Hï¼¸
c
ab[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H5 lines, 47 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[5M[1;77r[72;1H:set ai tw=2 fo=tm
gqgqjgqgqo
ï¼¸
ï¼¸a[34m^[[m
ENDTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[1;76r[1;1H[2M[1;77r[75;1H{
  ï¼¸[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hset ai tw=2 fo=tm[?25l[76;1H[?12l[?25h  [?25l[1;76r[76;1H
[1;77r[76;2H ï¼¸a[77;1H[K[76;3H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;5H[K[76;2H a[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[76;3H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;2H ï¼¸
  [?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;2H ï¼¸
  a[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H5 lines, 53 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[5M[1;77r[72;1H:set noai tw=2 fo=tm
gqgqjgqgqo
  ï¼¸
  ï¼¸a[34m^[[m
ENDTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[1;76r[1;1H[2M[1;77r[75;1H{
  ï¼¸[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hset noai tw=2 fo=tm[?25l[76;1H[?12l[?25h  [?25l[1;76r[76;1H
[1;77r[76;2H ï¼¸a[77;1H[K[76;3H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;5H[K[76;1Ha[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[76;3H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;2H ï¼¸
  [?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;2H ï¼¸
a[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H13 lines, 169 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[13M[1;77r[64;1H:set tw=2 fo=cqm comments=n:ï¼¸
gqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqjgqgqo
ï¼¸
ï¼¸a
ï¼¸aï¼¹
ï¼¸ï¼¹
ï¼¸ï¼¹ï¼º
ï¼¸ ï¼¹
ï¼¸ ï¼¹ï¼º
ï¼¸ï¼¸
ï¼¸ï¼¸a
ï¼¸ï¼¸ï¼¹[34m^[[m
ENDTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[1;76r[1;1H[2M[1;77r[75;1H{
ï¼¸[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hset tw=2 fo=cqm comments=n:ï¼¸[?25l[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸a[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸aï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;4H[K[76;1Hï¼¸ï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ï¼¹ï¼º[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;5H[K[76;1Hï¼¸ï¼º[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ ï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ ï¼¹ï¼º[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;6H[K[76;1Hï¼¸ ï¼º[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ï¼¸a[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1Hï¼¸ï¼¸ï¼¹[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;1Hï¼¸
[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;1Hï¼¸a
[?12l[?25h[?25lï¼¸a[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¸ï¼¹
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;3Hï¼¹
[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¸ï¼º
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;3H ï¼¹
[?12l[?25h[?25lï¼¸ [?12l[?25h[?25l ï¼¹[?12l[?25h[?25l[1;76r[1;1H[2M[1;77r[75;1Hï¼¸ ï¼º
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;3Hï¼¸
[?12l[?25h[?25lï¼¸[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;3Hï¼¸a
[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¸[?12l[?25h[?25lï¼¹[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H/^{/+1[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H3 lines, 30 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[3M[1;77r[74;1H:set tw=2 fo=tm
Rï¼¸a[34m^[[m
ENDTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25h^{/+1[?25l[1;76r[1;1H[2M[1;77r[75;1H{[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25hset tw=2 fo=tm[?25l[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[75;1Hï¼¸
a[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H}[?12l[?25h[?25l
/^STARTTEST[1;76r[1;1H[2M[1;77r[76;1HSTARTTEST[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:g/^STARTTEST/.,/^ENDTEST/d[?12l[?25h[?25l
:set ff=unix cpo-=A[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H2 lines, 56 characters written[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[76;1H[?12l[?25h[?25l
/ENDTEST[77;10H[K[77;1H[76;19H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H:1;/^Results/,$wq! test.out[77;1H[K[76;19H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hg/^STARTTEST/.,/^ENDTEST/d[?25l74 fewer lines[77;15H[K[1;1Ha[1;2H[K[2;1H}[2;2H[K[3;3H[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [3;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h1;/^Results/,$wq! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 142 lines, 574 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test70.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test70.in" 53 lines, 1249 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"
:endif
:call setline(search("^3"), "circular test " . res)
:?^1?,$w! test.out
:qa!
ENDTEST

1 line 1
2 line 2
3 line 3
[1m[34m~                                                                                                      [55;1H~                                                                                                      [56;1H~                                                                                                      [57;1H~                                                                                                      [58;1H~                                                                                                      [59;1H~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HSmoke test for MzScheme interface and mzeval() function[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 45 lines, 1146 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[49;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[50;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso mzscheme.vim[?25l"test.ok" [77;11H[K[77;11H5 lines, 82 characters
"test.out" [New File] 5 lines, 82 characters written
[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test71.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test71.in" 75 lines, 1397 characters[1;1HTest for encryption.

STARTTEST
:so small.vim
:/^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

start of text
01234567890123456789012345678901234567
line 2  foo bar blah
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
end of text

start of cm=zip bytes
VimCrypt~01![34m^F^\[mlV'Þ}Mg[34m| [mê£V©ç[34m^G[mE#3[34m~N[m2Ué[34m~W[m
end of cm=zip bytes

start of cm=blowfish bytes
VimCrypt~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Ú
end of cm=blowfish bytes
[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTest for encryption.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 57 lines, 1043 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[61;1H[?12l[?25h
[?25l[77;1H[K[77;1H:so! Xdotest[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[62;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of text/+1[?25l[64;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet text_lines = getline('.', line('.') + 2)[?25l[64;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of cm=zip bytes/+1[?25l[70;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet cm0_bytes = getline('.', '.')[?25l[70;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h/^start of cm=blowfish bytes/+1[?25l[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet cm1_bytes = getline('.', '.')[?25l[74;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcall append(0, text_lines)[?25l[1;76r[1;1H[3L[1;77r[1;1H01234567890123456789012345678901234567
line 2  foo bar blah
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[77;1H[K[4;1H[?12l[?25h[?25l[77;1H:[?12l[?25h$d[?25l[4;1H[1m[34m~                                                                                                      [3;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hX[?25l[77;1H[K[77;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1H01234567890123456789012345678901234567
line 2  foo bar blah[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H[New File][crypted] 3 lines, 98 characters written[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                      [3;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;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[77;1H[K[77;1H"Xtestfile" [crypted] 3 lines, 98 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet cm0_read_back = getline('.', '$')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset key=[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cryptmethod=blowfish[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" If the blowfish test fails 'cryptmethod' will be 'zip' now.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h%s/^/\=&cryptmethod == 'blowfish' ? "OK " : "blowfish test failed "/[?25l3 substitutions on 3 lines[77;27H[K[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah
OK line 3 [27Cxxx[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hX[?25l[77;1H[K[77;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H[crypted] 3 lines, 107 characters written[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                      [3;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [crypted] 3 lines, 107 characters[1;1H[2L[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah
OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[3;41H[K[77;1H[K[77;1H"Xtestfile" [crypted] 3 lines, 107 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet cm1_read_back = getline('.', '$')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                      [3;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset bin noeol key=[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(0, cm0_bytes)[?25l[1;76r[1;1H[L[1;77r[1;1HVimCrypt~01![34m^F^\[mlV'Þ}Mg[34m| [mê£V©ç[34m^G[mE#3[34m~N[m2Ué[34m~W[m[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25h$d[?25l[2;1H[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset fenc=latin1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H[Incomplete last line] 1 line, 36 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l[1;1H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nobin[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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[77;1H[K[77;1H"Xtestfile" [crypted] 2 lines, 24 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet cm0_read_bin = getline('.', '$')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l[1;1H[K[2;1H[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset bin noeol key=[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(0, cm1_bytes)[?25l[1;76r[1;1H[L[1;77r[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Ú[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25h$d[?25l[2;1H[1m[34m~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset fenc=latin1[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H[Incomplete last line] 1 line, 55 characters written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l[1;1H[K[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nobin[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" Need encryption key for "Xtestfile"
Enter encryption key: [?12l[?25h******
[?25l"Xtestfile" [crypted] 2 lines, 27 characters[1;1H[2L[1;1Hasdfasdfasdf
0001112223333[77;1H[K[77;1H"Xtestfile" [crypted] 2 lines, 27 characters[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall append(0, cm0_read_bin)[?25l[1;76r[1;1H[2L[1;77r[1;1H1234567890
aábbccddeëff[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hcall append(0, cm1_read_back)[?25l[1;76r[1;1H[3L[1;77r[1;1HOK 01234567890123456789012345678901234567
OK line 2  foo bar blah
OK line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[77;1H[K[6;1H[?12l[?25h[?25l[77;1H:[?12l[?25hcall append(0, cm0_read_back)[?25l[1;76r[1;1H[3L[1;77r[1;1H01234567890123456789012345678901234567
line 2  foo bar blah
line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[77;1H[K[9;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset key= fenc=latin1[?25l[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw! test.out[?25l"test.out" [77;12H[K[77;12H[New File] 10 lines, 256 characters written[9;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test72.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test72.in" 109 lines, 1564 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
:"
:" 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[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for undo file.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[5;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 98 lines, 1367 characters written[6;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[6;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[1;76r[1;1H[28M[1;77r[49;1H: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[77;1H[K[76;1H[?12l[?25h[?25l[1;76r[76;1H
[1;77r[76;1H[?12l[?25h[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test 'undofile': first a simple one-line change.[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocompatible viminfo+=nviminfo visualbell[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100 undofile nomore[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;1H[K[1;1Hthis is one line[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[1;16H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hs/one/ONE/[?25l[1;9HONE[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset ul=100[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"Xtestfile" [New] 1L, 17C written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l"test72.in" 109L, 1564C[1;2Hwo[1;4H[K[2;1Hthree[2;6H[K[3;1Hfour[3;5H[K[4;1Hfive[4;5H[K[5;1Hsix[5;4H[K[6;1Hseven[6;6H[K[7;1Height[7;6H[K[8;1Hnine[8;5H[K[9;1Hten[34m^[[m:set ul=100[9;17H[K[10;1H3Gdd:set ul=100[10;16H[K[11;1Hdd:set ul=100[11;14H[K[12;1Hdd:set ul=100[12;14H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1Hdd:set ul=100[15;14H[K[16;1H:w[16;3H[K[17;1H:bwipe![17;8H[K[18;1H:e Xtestfile[18;13H[K[19;1Huuu:w >>test.out[19;17H[K[20;1H:"[20;3H[K[21;1H:" And now with encryption, cryptmethod=zip[21;44H[K[22;1H:e! Xtestfile[22;14H[K[23;1H:set undofile cm=zip[23;21H[K[24;1HggdGimonday[24;12H[K[25;1Htuesday[25;8H[K[26;1Hwednesday[26;10H[K[27;1Hthursday[27;9H[K[28;1Hfriday[34m^[[m:set ul=100[28;20H[K[29;1Hkkkdd:set ul=100[29;17H[K[30;1Hdd:set ul=100[30;14H[K[31;1Hdd:set ul=100[31;14H[K[32;1H:X[32;3H[K[33;1Hfoobar[33;7H[K[34;1Hfoobar[34;7H[K[35;1H:w![35;4H[K[36;1H:bwipe![36;8H[K[37;1H:e Xtestfile[37;13H[K[38;1Hfoobar[38;7H[K[39;1H:set key=[39;10H[K[40;1Huu:w >>test.out[40;16H[K[41;1H:"[41;3H[K[42;1H:"[42;3H[K[43;1H:" With encryption, cryptmethod=blowfish[43;41H[K[44;1H:e! Xtestfile[44;14H[K[45;1H:set undofile cm=blowfish[45;26H[K[46;1HggdGijan[46;9H[K[47;1Hfeb[47;4H[K[48;1Hmar[48;4H[K[49;1Hapr[49;4H[K[50;1Hjun[34m^[[m:set ul=100[50;17H[K[51;1Hkk0ifoo [34m^[[m:set ul=100[51;22H[K[52;1Hdd:set ul=100[52;14H[K[53;1Hibar [34m^[[m:set ul=100[53;19H[K[54;1H:X[54;3H[K[55;1Hfoobar[55;7H[K[56;1Hfoobar[56;7H[K[57;1H:w![57;4H[K[58;1H:bwipe![58;8H[K[59;1H:e Xtestfile[59;13H[K[60;1Hfoobar[60;7H[K[61;1H:set key=[61;10H[K[62;1H/bar[62;5H[K[63;1H:.w >>test.out[63;15H[K[64;1Hu:.w >>test.out[64;16H[K[65;1Hu:.w >>test.out[65;16H[K[66;1Hu:.w >>test.out[66;16H[K[67;1H:"[67;3H[K[68;1H:" Rename the undo file so that it gets cleaned up.[68;52H[K[69;1H:call rename(".Xtestfile.un~", "Xtestundo")[69;44H[K[70;1H:qa![70;5H[K[71;1HENDTEST[71;8H[K[72;1H[K[73;1H1111 -----[73;11H[K[74;1H2222 -----[74;11H[K[75;1H[K[76;1H123456789[76;10H[K[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" 1L, 17C[1;2Hhis is ONE line
[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H1 change; before #2  0 seconds ago[1;9Hone[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w! test.out[?25l"test.out" [77;12H[K[77;12H[New] 1L, 17C written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test 'undofile', change in original file fails check[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset noundofile[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H1L, 17C[1;9HONE[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hs/line/Line/[?25l[1;13HL[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"Xtestfile" 1L, 17C written[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset undofile[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l"test72.in" 109L, 1564C[1;2Hwo[1;4H[K[2;1Hthree[2;6H[K[3;1Hfour[3;5H[K[4;1Hfive[4;5H[K[5;1Hsix[5;4H[K[6;1Hseven[6;6H[K[7;1Height[7;6H[K[8;1Hnine[8;5H[K[9;1Hten[34m^[[m:set ul=100[9;17H[K[10;1H3Gdd:set ul=100[10;16H[K[11;1Hdd:set ul=100[11;14H[K[12;1Hdd:set ul=100[12;14H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1Hdd:set ul=100[15;14H[K[16;1H:w[16;3H[K[17;1H:bwipe![17;8H[K[18;1H:e Xtestfile[18;13H[K[19;1Huuu:w >>test.out[19;17H[K[20;1H:"[20;3H[K[21;1H:" And now with encryption, cryptmethod=zip[21;44H[K[22;1H:e! Xtestfile[22;14H[K[23;1H:set undofile cm=zip[23;21H[K[24;1HggdGimonday[24;12H[K[25;1Htuesday[25;8H[K[26;1Hwednesday[26;10H[K[27;1Hthursday[27;9H[K[28;1Hfriday[34m^[[m:set ul=100[28;20H[K[29;1Hkkkdd:set ul=100[29;17H[K[30;1Hdd:set ul=100[30;14H[K[31;1Hdd:set ul=100[31;14H[K[32;1H:X[32;3H[K[33;1Hfoobar[33;7H[K[34;1Hfoobar[34;7H[K[35;1H:w![35;4H[K[36;1H:bwipe![36;8H[K[37;1H:e Xtestfile[37;13H[K[38;1Hfoobar[38;7H[K[39;1H:set key=[39;10H[K[40;1Huu:w >>test.out[40;16H[K[41;1H:"[41;3H[K[42;1H:"[42;3H[K[43;1H:" With encryption, cryptmethod=blowfish[43;41H[K[44;1H:e! Xtestfile[44;14H[K[45;1H:set undofile cm=blowfish[45;26H[K[46;1HggdGijan[46;9H[K[47;1Hfeb[47;4H[K[48;1Hmar[48;4H[K[49;1Hapr[49;4H[K[50;1Hjun[34m^[[m:set ul=100[50;17H[K[51;1Hkk0ifoo [34m^[[m:set ul=100[51;22H[K[52;1Hdd:set ul=100[52;14H[K[53;1Hibar [34m^[[m:set ul=100[53;19H[K[54;1H:X[54;3H[K[55;1Hfoobar[55;7H[K[56;1Hfoobar[56;7H[K[57;1H:w![57;4H[K[58;1H:bwipe![58;8H[K[59;1H:e Xtestfile[59;13H[K[60;1Hfoobar[60;7H[K[61;1H:set key=[61;10H[K[62;1H/bar[62;5H[K[63;1H:.w >>test.out[63;15H[K[64;1Hu:.w >>test.out[64;16H[K[65;1Hu:.w >>test.out[65;16H[K[66;1Hu:.w >>test.out[66;16H[K[67;1H:"[67;3H[K[68;1H:" Rename the undo file so that it gets cleaned up.[68;52H[K[69;1H:call rename(".Xtestfile.un~", "Xtestundo")[69;44H[K[70;1H:qa![70;5H[K[71;1HENDTEST[71;8H[K[72;1H[K[73;1H1111 -----[73;11H[K[74;1H2222 -----[74;11H[K[75;1H[K[76;1H123456789[76;10H[K[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" 1L, 17C[1;2Hhis is ONE Line
[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h" TODO: this beeps[?25l[1;1H[?12l[?25h[?5h[?5l[?25l[77;1HAlready at oldest change[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1L, 17C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test 'undofile', add 10 lines, delete 6 lines, undo 3[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset undofile[?25l[1;1H[?12l[?25h[?25l[1;1H[K[77;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;13H[K[77;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[77;1H:[?12l[?25hset ul=100[?25l[10;3H[?12l[?25h[3;1H[?25l[3;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[3;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hw[?25l"Xtestfile" 4L, 17C written[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l"test72.in" 109L, 1564C[1;1Htwo
three
four
five
six[5;4H[K[6;1Hseven[6;6H[K[7;1Height[7;6H[K[8;1Hnine[8;5H[K[9;1Hten[34m^[[m:set ul=100[9;17H[K[10;1H3Gdd:set ul=100[10;16H[K[11;1Hdd:set ul=100[11;14H[K[12;1Hdd:set ul=100[12;14H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1Hdd:set ul=100[15;14H[K[16;1H:w[16;3H[K[17;1H:bwipe![17;8H[K[18;1H:e Xtestfile[18;13H[K[19;1Huuu:w >>test.out[19;17H[K[20;1H:"[20;3H[K[21;1H:" And now with encryption, cryptmethod=zip[21;44H[K[22;1H:e! Xtestfile[22;14H[K[23;1H:set undofile cm=zip[23;21H[K[24;1HggdGimonday[24;12H[K[25;1Htuesday[25;8H[K[26;1Hwednesday[26;10H[K[27;1Hthursday[27;9H[K[28;1Hfriday[34m^[[m:set ul=100[28;20H[K[29;1Hkkkdd:set ul=100[29;17H[K[30;1Hdd:set ul=100[30;14H[K[31;1Hdd:set ul=100[31;14H[K[32;1H:X[32;3H[K[33;1Hfoobar[33;7H[K[34;1Hfoobar[34;7H[K[35;1H:w![35;4H[K[36;1H:bwipe![36;8H[K[37;1H:e Xtestfile[37;13H[K[38;1Hfoobar[38;7H[K[39;1H:set key=[39;10H[K[40;1Huu:w >>test.out[40;16H[K[41;1H:"[41;3H[K[42;1H:"[42;3H[K[43;1H:" With encryption, cryptmethod=blowfish[43;41H[K[44;1H:e! Xtestfile[44;14H[K[45;1H:set undofile cm=blowfish[45;26H[K[46;1HggdGijan[46;9H[K[47;1Hfeb[47;4H[K[48;1Hmar[48;4H[K[49;1Hapr[49;4H[K[50;1Hjun[34m^[[m:set ul=100[50;17H[K[51;1Hkk0ifoo [34m^[[m:set ul=100[51;22H[K[52;1Hdd:set ul=100[52;14H[K[53;1Hibar [34m^[[m:set ul=100[53;19H[K[54;1H:X[54;3H[K[55;1Hfoobar[55;7H[K[56;1Hfoobar[56;7H[K[57;1H:w![57;4H[K[58;1H:bwipe![58;8H[K[59;1H:e Xtestfile[59;13H[K[60;1Hfoobar[60;7H[K[61;1H:set key=[61;10H[K[62;1H/bar[62;5H[K[63;1H:.w >>test.out[63;15H[K[64;1Hu:.w >>test.out[64;16H[K[65;1Hu:.w >>test.out[65;16H[K[66;1Hu:.w >>test.out[66;16H[K[67;1H:"[67;3H[K[68;1H:" Rename the undo file so that it gets cleaned up.[68;52H[K[69;1H:call rename(".Xtestfile.un~", "Xtestundo")[69;44H[K[70;1H:qa![70;5H[K[71;1HENDTEST[71;8H[K[72;1H[K[73;1H1111 -----[73;11H[K[74;1H2222 -----[74;11H[K[75;1H[K[76;1H123456789[76;10H[K[72;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he Xtestfile[?25l"Xtestfile" 4L, 17C[1;1Hone
two[2;4H[K[3;1Hnine
ten[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [1;1H[?12l[?25h[?25l[m[77;1H1 more line; before #7  0 seconds ago[3;76r[3;1H[L[1;77r[3;1Height[77;1H[K[3;1H[?12l[?25h[?25l[77;1H1 more line; before #6  0 seconds ago[3;76r[3;1H[L[1;77r[3;1Hseven[77;1H[K[3;1H[?12l[?25h[?25l[77;1H1 more line; before #5  0 seconds ago[3;76r[3;1H[L[1;77r[3;1Hsix[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H7L, 33C appended[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" And now with encryption, cryptmethod=zip[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [77;13H[K[77;13H4L, 17C[3;1Hnine
ten[4;4H[K[5;1H[1m[34m~                                                                                                      [6;1H~                                                                                                      [7;1H~                                                                                                      [3;1H[?12l[?25h[?25l[m[77;1H[K[77;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[77;1H--No lines in buffer--[1;1H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;13H[K[77;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[77;1H:[?12l[?25hset ul=100[?25l[5;6H[?12l[?25h[4;6H[3;6H[2;6H[?25l[2;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[2;1H[?12l[?25h[?25l[2;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[2;1H[?12l[?25h[?25l[2;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hX[?25l[77;1H[K[77;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1Hmonday
friday[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25hw![?25l"Xtestfile" [crypted] 2L, 14C written[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l"test72.in" 109L, 1564C[1;1Htwo[1;4H[K[2;1Hthree[2;6H[K[3;1Hfour[3;5H[K[4;1Hfive[4;5H[K[5;1Hsix[5;4H[K[6;1Hseven[6;6H[K[7;1Height[7;6H[K[8;1Hnine[8;5H[K[9;1Hten[34m^[[m:set ul=100[9;17H[K[10;1H3Gdd:set ul=100[10;16H[K[11;1Hdd:set ul=100[11;14H[K[12;1Hdd:set ul=100[12;14H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1Hdd:set ul=100[15;14H[K[16;1H:w[16;3H[K[17;1H:bwipe![17;8H[K[18;1H:e Xtestfile[18;13H[K[19;1Huuu:w >>test.out[19;17H[K[20;1H:"[20;3H[K[21;1H:" And now with encryption, cryptmethod=zip[21;44H[K[22;1H:e! Xtestfile[22;14H[K[23;1H:set undofile cm=zip[23;21H[K[24;1HggdGimonday[24;12H[K[25;1Htuesday[25;8H[K[26;1Hwednesday[26;10H[K[27;1Hthursday[27;9H[K[28;1Hfriday[34m^[[m:set ul=100[28;20H[K[29;1Hkkkdd:set ul=100[29;17H[K[30;1Hdd:set ul=100[30;14H[K[31;1Hdd:set ul=100[31;14H[K[32;1H:X[32;3H[K[33;1Hfoobar[33;7H[K[34;1Hfoobar[34;7H[K[35;1H:w![35;4H[K[36;1H:bwipe![36;8H[K[37;1H:e Xtestfile[37;13H[K[38;1Hfoobar[38;7H[K[39;1H:set key=[39;10H[K[40;1Huu:w >>test.out[40;16H[K[41;1H:"[41;3H[K[42;1H:"[42;3H[K[43;1H:" With encryption, cryptmethod=blowfish[43;41H[K[44;1H:e! Xtestfile[44;14H[K[45;1H:set undofile cm=blowfish[45;26H[K[46;1HggdGijan[46;9H[K[47;1Hfeb[47;4H[K[48;1Hmar[48;4H[K[49;1Hapr[49;4H[K[50;1Hjun[34m^[[m:set ul=100[50;17H[K[51;1Hkk0ifoo [34m^[[m:set ul=100[51;22H[K[52;1Hdd:set ul=100[52;14H[K[53;1Hibar [34m^[[m:set ul=100[53;19H[K[54;1H:X[54;3H[K[55;1Hfoobar[55;7H[K[56;1Hfoobar[56;7H[K[57;1H:w![57;4H[K[58;1H:bwipe![58;8H[K[59;1H:e Xtestfile[59;13H[K[60;1Hfoobar[60;7H[K[61;1H:set key=[61;10H[K[62;1H/bar[62;5H[K[63;1H:.w >>test.out[63;15H[K[64;1Hu:.w >>test.out[64;16H[K[65;1Hu:.w >>test.out[65;16H[K[66;1Hu:.w >>test.out[66;16H[K[67;1H:"[67;3H[K[68;1H:" Rename the undo file so that it gets cleaned up.[68;52H[K[69;1H:call rename(".Xtestfile.un~", "Xtestundo")[69;44H[K[70;1H:qa![70;5H[K[71;1HENDTEST[71;8H[K[72;1H[K[73;1H1111 -----[73;11H[K[74;1H2222 -----[74;11H[K[75;1H[K[76;1H123456789[76;10H[K[72;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[77;1H"Xtestfile" [crypted] 2L, 14C[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset key=[?25l[1;1H[?12l[?25h[?25l[77;1H1 more line; before #11  0 seconds ago[2;76r[2;1H[L[1;77r[2;1Hthursday[77;1H[K[2;1H[?12l[?25h[?25l[77;1H1 more line; before #10  0 seconds ago[2;76r[2;1H[L[1;77r[2;1Hwednesday[77;1H[K[2;1H[?12l[?25h[?25l[77;1H:[?12l[?25hw >>test.out[?25l"test.out" [77;12H[K[77;12H4L, 33C appended[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" With encryption, cryptmethod=blowfish[?25l[2;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he! Xtestfile[?25l"Xtestfile" [77;13H[K[77;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[77;1H[K[77;1H"Xtestfile" [noeol][crypted] 1L, 14C[1;1H[?12l[?25h[?25l[1;1H[K[77;1H--No lines in buffer--[77;23H[K[1;1H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;13H[K[77;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[77;1H:[?12l[?25hset ul=100[?25l[5;3H[?12l[?25h[4;3H[3;3H[?25l[77;1H[1m-- INSERT --[m[77;1H[K[3;1Hfoo mar[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;4H[?12l[?25h[?25l[3;76r[76;1H
[1;77r[76;1H[1m[34m~                                                                                                      [m[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;1H[?12l[?25h[?25l[77;1H[1m-- INSERT --[m[77;1H[K[3;1Hbar apr[?12l[?25h[?25l[77;1H:[?12l[?25hset ul=100[?25l[3;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hX[?25l[77;1H[K[77;1HEnter encryption key: [?12l[?25h******
[?25lEnter same key again: [?12l[?25h******
[1;1H[2L[?25l[1;1Hjan
feb[77;1H[K[3;4H[?12l[?25h[?25l[77;1H:[?12l[?25hw![?25l"Xtestfile" [crypted] 4L, 20C written[3;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hbwipe![?25l"test72.in" 109L, 1564C[1;1Htwo
three
four[3;5H[K[4;1Hfive
six[5;4H[K[6;1Hseven[6;6H[K[7;1Height[7;6H[K[8;1Hnine[8;5H[K[9;1Hten[34m^[[m:set ul=100[9;17H[K[10;1H3Gdd:set ul=100[10;16H[K[11;1Hdd:set ul=100[11;14H[K[12;1Hdd:set ul=100[12;14H[K[13;1Hdd:set ul=100[13;14H[K[14;1Hdd:set ul=100[14;14H[K[15;1Hdd:set ul=100[15;14H[K[16;1H:w[16;3H[K[17;1H:bwipe![17;8H[K[18;1H:e Xtestfile[18;13H[K[19;1Huuu:w >>test.out[19;17H[K[20;1H:"[20;3H[K[21;1H:" And now with encryption, cryptmethod=zip[21;44H[K[22;1H:e! Xtestfile[22;14H[K[23;1H:set undofile cm=zip[23;21H[K[24;1HggdGimonday[24;12H[K[25;1Htuesday[25;8H[K[26;1Hwednesday[26;10H[K[27;1Hthursday[27;9H[K[28;1Hfriday[34m^[[m:set ul=100[28;20H[K[29;1Hkkkdd:set ul=100[29;17H[K[30;1Hdd:set ul=100[30;14H[K[31;1Hdd:set ul=100[31;14H[K[32;1H:X[32;3H[K[33;1Hfoobar[33;7H[K[34;1Hfoobar[34;7H[K[35;1H:w![35;4H[K[36;1H:bwipe![36;8H[K[37;1H:e Xtestfile[37;13H[K[38;1Hfoobar[38;7H[K[39;1H:set key=[39;10H[K[40;1Huu:w >>test.out[40;16H[K[41;1H:"[41;3H[K[42;1H:"[42;3H[K[43;1H:" With encryption, cryptmethod=blowfish[43;41H[K[44;1H:e! Xtestfile[44;14H[K[45;1H:set undofile cm=blowfish[45;26H[K[46;1HggdGijan[46;9H[K[47;1Hfeb[47;4H[K[48;1Hmar[48;4H[K[49;1Hapr[49;4H[K[50;1Hjun[34m^[[m:set ul=100[50;17H[K[51;1Hkk0ifoo [34m^[[m:set ul=100[51;22H[K[52;1Hdd:set ul=100[52;14H[K[53;1Hibar [34m^[[m:set ul=100[53;19H[K[54;1H:X[54;3H[K[55;1Hfoobar[55;7H[K[56;1Hfoobar[56;7H[K[57;1H:w![57;4H[K[58;1H:bwipe![58;8H[K[59;1H:e Xtestfile[59;13H[K[60;1Hfoobar[60;7H[K[61;1H:set key=[61;10H[K[62;1H/bar[62;5H[K[63;1H:.w >>test.out[63;15H[K[64;1Hu:.w >>test.out[64;16H[K[65;1Hu:.w >>test.out[65;16H[K[66;1Hu:.w >>test.out[66;16H[K[67;1H:"[67;3H[K[68;1H:" Rename the undo file so that it gets cleaned up.[68;52H[K[69;1H:call rename(".Xtestfile.un~", "Xtestundo")[69;44H[K[70;1H:qa![70;5H[K[71;1HENDTEST[71;8H[K[72;1H[K[73;1H1111 -----[73;11H[K[74;1H2222 -----[74;11H[K[75;1H[K[76;1H123456789[76;10H[K[72;1H[?12l[?25h[?25l[77;1H[K[77;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
jun[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~                                                                                                      [60;1H~                                                                                                      [61;1H~                                                                                                      [62;1H~                                                                                                      [63;1H~                                                                                                      [64;1H~                                                                                                      [65;1H~                                                                                                      [66;1H~                                                                                                      [67;1H~                                                                                                      [68;1H~                                                                                                      [69;1H~                                                                                                      [70;1H~                                                                                                      [71;1H~                                                                                                      [72;1H~                                                                                                      [73;1H~                                                                                                      [74;1H~                                                                                                      [75;1H~                                                                                                      [76;1H~                                                                                                      [m[77;1H[K[77;1H"Xtestfile" [crypted] 4L, 20C[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset key=[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H/[?12l[?25hbar[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1L, 8C appended[3;1H[?12l[?25h[?25l[77;1H1 change; before #15  0 seconds ago[3;1Hap[3;5H[K[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1L, 4C appended[3;1H[?12l[?25h[?25l[77;1H1 more line; before #14  0 seconds ago[3;76r[3;1H[L[1;77r[3;1Hfoo mar[77;1H[K[3;1H[?12l[?25h[?25l[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1L, 8C appended[3;1H[?12l[?25h[?25l[77;1H1 change; before #13  0 seconds ago[3;1Hmar[3;5H[K[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h.w >>test.out[?25l"test.out" [77;12H[K[77;12H1L, 4C appended[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Rename the undo file so that it gets cleaned up.[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall rename(".Xtestfile.un~", "Xtestundo")[?25l[3;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -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
../vim -u unix.vim -U NONE --noplugin -s dotest.in test73.in
Vim: Warning: Output is not to a terminal
[?1049h[?1h=[1;77r[?12;25h[?12l[?25h[27m[m[H[2J[?25l[77;1H"test73.in" 166 lines, 3622 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
:set path=Xfind/**
:find file
:exec "w >>" . test_out
:find file
:exec "w >>" . test_out
:find file
:exec "w >>" . test_out
:" Rerun the previous three find completions, using fullpath in 'path'
:exec "set path=" . cwd . "/Xfind/**"
:find file
:exec "w >>" .  test_out
:find file
:exec "w >>" . test_out
:find file
:exec "w >>" . test_out
:" Same steps again, using relative and fullpath items that point to the same
:" recursive location.[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset cp[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;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! Xdot
[76;103He[77;1Hst^[34m^M[mdotest[?25l[1;1H[L[1;1HTests for find completion.[77;1H[K[1;1H[?12l[?25h[?25l[77;1H/^STARTTEST[3;1H[?12l[?25h
[?25l[77;1H[K[77;1H:set ff=unix cpo-=A[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:.,/ENDTEST/-1w! Xdotest"Xdotest" [77;11H[K[77;11H[New File] 161 lines, 3575 characters written[4;1H[?12l[?25h[?25l[77;1H[K[77;1H:set ff& cpo+=A[4;1H[?12l[?25h[?25l[77;1H/ENDTEST[77;10H[K[77;1H[27m[m[H[2J[1;1H:" Test find completion for empty path item ",," which is the current directory
:cd Xfind
:set path=,,
:find f
:exec "w >>" . test_out
:" Test shortening of
:"
:"    foo/x/bar/voyager.txt
:"    foo/y/bar/voyager.txt
:"
:" When current directory is above foo/ they should be shortened to (in order
:" of appearance):
:"
:"    x/bar/voyager.txt
:"    y/bar/voyager.txt
:call mkdir('foo')
:cd foo
:call mkdir('x')
:call mkdir('y')
:cd x
:call mkdir('bar')
:cd ..
:cd y
:call mkdir('bar')
:cd ..
:cd ..
:" We should now be in the Xfind directory
: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
:q
:exec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa!
ENDTEST[?12l[?25h
[?25l
:so! Xdotest[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hso small.vim[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Do all test in a separate window to avoid E211 when we recursively[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" delete the Xfind directory during cleanup[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" This will cause a few errors, do it silently.[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset visualbell[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset nocp viminfo+=nviminfo[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;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:" Test find completion for empty path item ",," which is the current directory
:cd Xfind
:set path=,,
:find f
:exec "w >>" . test_out
:" Test shortening of[77;1H[K[76;1H[?12l[?25h[?25l
:[?12l[?25h" On windows a stale "Xfind" directory may exist, remove it so that[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" we start from a clean state.[?25l[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall DeleteDirectory("Xfind")[?25l[?1l>[?12l[?25h[?1049l[?1049h[?1h=[76;1H[?25l[77;1H[K[77;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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7m[No Name]                                                                                              [m[39;4H[K[40;7H./voyager.txt[41;7Hx/bar/voyager.txt
:cd foo[42;8H[K[43;5Hy[43;6H[K[44;5Hbar
:find voyager
:exec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out
:" Check the opposite too:
:cd ..[50;7H[K[52;5Hx[52;6H[K[53;5Hbar
: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"[59;32H[K[60;2Hfind file      [60;17H[K[61;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[63;30H[K[64;2Hset path=./path[64;17H[K[65;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[66;15H[K[67;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [68;18H[K[69;2Hexec "w >>" . test_out
:q[70;3H[K[71;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![73;5H[K[74;1HENDTEST[75;1H[K[76;1H[7mtest73.in                                                                                              [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hlet cwd=getcwd()[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hlet test_out = cwd . '/test.out'[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall mkdir('Xfind')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd Xfind[?25l/sources/vim73/src/testdir/Xfind[76;1H[7m/sources/vim73/src/testdir/test73.in[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset path=[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind ...[?25l[77;7H[K[77;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE345: Can't find file "" in path[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w! " . test_out[?25l"/sources/vim73/src/testdir/test.out" [New] 0L, 0C written[38;1H[1m[7m/sources/vim73/src/testdir/test.out[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hclose[?25l[1;1H:" Test find completion for empty path item ",," which is the current directory
:cd Xfind[2;10H[K[3;1H:set path=,,[3;13H[K[4;1H:find f         [4;17H[K[5;1H:exec "w >>" . test_out[5;24H[K[6;1H:" Test shortening of[6;22H[K[7;1H:"[7;3H[K[8;1H:"    foo/x/bar/voyager.txt[8;28H[K[9;1H:"    foo/y/bar/voyager.txt[9;28H[K[10;1H:"[10;3H[K[11;1H:" When current directory is above foo/ they should be shortened to (in order[11;78H[K[12;1H:" of appearance):[12;19H[K[13;1H:"[13;3H[K[14;1H:"    x/bar/voyager.txt[14;24H[K[15;1H:"    y/bar/voyager.txt[15;24H[K[16;1H:call mkdir('foo')[16;19H[K[17;1H:cd foo[17;8H[K[18;1H:call mkdir('x')[18;17H[K[19;1H:call mkdir('y')[19;17H[K[20;1H:cd x[20;6H[K[21;1H:call mkdir('bar')[21;19H[K[22;1H:cd ..[22;7H[K[23;1H:cd y[23;6H[K[24;1H:call mkdir('bar')[24;19H[K[25;1H:cd ..[25;7H[K[26;1H:cd ..[26;7H[K[27;1H:" We should now be in the Xfind directory[27;43H[K[28;1H:e foo/x/bar/voyager.txt[28;25H[K[29;1HSVoyager 1[34m^[[m:w[29;15H[K[30;1H:e foo/y/bar/voyager.txt[30;25H[K[31;1HSVoyager 2[34m^[[m:w[31;15H[K[32;1H:exec "set path=" . cwd . "/Xfind/**"[32;38H[K[33;1H:find voyager   [33;17H[K[34;1H:exec "w >>" . test_out[34;24H[K[35;1H:find voyager           [35;25H[K[36;1H:exec "w >>" . test_out[36;24H[K[37;1H:"[37;3H[K[38;1H:" When current directory is .../foo/y/bar they should be shortened to (in[38;75H[K[39;4Horder of appearance):[40;7H[K[41;7H./voyager.txt[41;20H[K[42;2H"    x/bar/voyager.txt
:cd foo
:cd y[44;6H[K[45;2Hcd bar[45;8H[K[46;2Hfind voyager  [46;17H[K[47;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[49;25H[K[50;2H" Check the opposite too:[52;5H..
:cd x[53;6H[K[54;2Hcd bar[54;8H[K[55;2Hfind voyager  [55;17H[K[56;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[58;25H[K[59;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [61;17H[K[62;2Hexec "w >>" . test_out[62;25H[K[63;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[65;18H[K[66;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[67;15H[K[68;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [69;17H[K[70;2Hexec "w >>" . test_out
:q[71;3H[K[72;2Hexec "cd " . cwd[72;18H[K[73;2Hcall DeleteDirectory("Xfind")
:qa![74;5H[K[75;1HENDTEST[76;1H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7m[No Name]                                                                                              [m[39;4H[K[40;7H./voyager.txt[41;7Hx/bar/voyager.txt
:cd foo[42;8H[K[43;5Hy[43;6H[K[44;5Hbar
:find voyager
:exec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out
:" Check the opposite too:
:cd ..[50;7H[K[52;5Hx[52;6H[K[53;5Hbar
: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"[59;32H[K[60;2Hfind file      [60;17H[K[61;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[63;30H[K[64;2Hset path=./path[64;17H[K[65;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[66;15H[K[67;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [68;18H[K[69;2Hexec "w >>" . test_out
:q[70;3H[K[71;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![73;5H[K[74;1HENDTEST[75;1H[K[76;1H[7m/sources/vim73/src/testdir/test73.in                                                                   [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset path=.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind ...[?25l[77;7H[K[77;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE32: No file name[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 0L, 0C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hclose[?25l[1;1H:" Test find completion for empty path item ",," which is the current directory
:cd Xfind[2;10H[K[3;1H:set path=,,[3;13H[K[4;1H:find f         [4;17H[K[5;1H:exec "w >>" . test_out[5;24H[K[6;1H:" Test shortening of[6;22H[K[7;1H:"[7;3H[K[8;1H:"    foo/x/bar/voyager.txt[8;28H[K[9;1H:"    foo/y/bar/voyager.txt[9;28H[K[10;1H:"[10;3H[K[11;1H:" When current directory is above foo/ they should be shortened to (in order[11;78H[K[12;1H:" of appearance):[12;19H[K[13;1H:"[13;3H[K[14;1H:"    x/bar/voyager.txt[14;24H[K[15;1H:"    y/bar/voyager.txt[15;24H[K[16;1H:call mkdir('foo')[16;19H[K[17;1H:cd foo[17;8H[K[18;1H:call mkdir('x')[18;17H[K[19;1H:call mkdir('y')[19;17H[K[20;1H:cd x[20;6H[K[21;1H:call mkdir('bar')[21;19H[K[22;1H:cd ..[22;7H[K[23;1H:cd y[23;6H[K[24;1H:call mkdir('bar')[24;19H[K[25;1H:cd ..[25;7H[K[26;1H:cd ..[26;7H[K[27;1H:" We should now be in the Xfind directory[27;43H[K[28;1H:e foo/x/bar/voyager.txt[28;25H[K[29;1HSVoyager 1[34m^[[m:w[29;15H[K[30;1H:e foo/y/bar/voyager.txt[30;25H[K[31;1HSVoyager 2[34m^[[m:w[31;15H[K[32;1H:exec "set path=" . cwd . "/Xfind/**"[32;38H[K[33;1H:find voyager   [33;17H[K[34;1H:exec "w >>" . test_out[34;24H[K[35;1H:find voyager           [35;25H[K[36;1H:exec "w >>" . test_out[36;24H[K[37;1H:"[37;3H[K[38;1H:" When current directory is .../foo/y/bar they should be shortened to (in[38;75H[K[39;4Horder of appearance):[40;7H[K[41;7H./voyager.txt[41;20H[K[42;2H"    x/bar/voyager.txt
:cd foo
:cd y[44;6H[K[45;2Hcd bar[45;8H[K[46;2Hfind voyager  [46;17H[K[47;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[49;25H[K[50;2H" Check the opposite too:[52;5H..
:cd x[53;6H[K[54;2Hcd bar[54;8H[K[55;2Hfind voyager  [55;17H[K[56;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[58;25H[K[59;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [61;17H[K[62;2Hexec "w >>" . test_out[62;25H[K[63;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[65;18H[K[66;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[67;15H[K[68;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [69;17H[K[70;2Hexec "w >>" . test_out
:q[71;3H[K[72;2Hexec "cd " . cwd[72;18H[K[73;2Hcall DeleteDirectory("Xfind")
:qa![74;5H[K[75;1HENDTEST[76;1H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7m[No Name]                                                                                              [m[39;4H[K[40;7H./voyager.txt[41;7Hx/bar/voyager.txt
:cd foo[42;8H[K[43;5Hy[43;6H[K[44;5Hbar
:find voyager
:exec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out
:" Check the opposite too:
:cd ..[50;7H[K[52;5Hx[52;6H[K[53;5Hbar
: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"[59;32H[K[60;2Hfind file      [60;17H[K[61;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[63;30H[K[64;2Hset path=./path[64;17H[K[65;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[66;15H[K[67;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [68;18H[K[69;2Hexec "w >>" . test_out
:q[70;3H[K[71;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![73;5H[K[74;1HENDTEST[75;1H[K[76;1H[7m/sources/vim73/src/testdir/test73.in                                                                   [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset path=.,,[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind ...[?25l[77;7H[K[77;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE32: No file name[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 0L, 0C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hclose[?25l[1;1H:" Test find completion for empty path item ",," which is the current directory
:cd Xfind[2;10H[K[3;1H:set path=,,[3;13H[K[4;1H:find f         [4;17H[K[5;1H:exec "w >>" . test_out[5;24H[K[6;1H:" Test shortening of[6;22H[K[7;1H:"[7;3H[K[8;1H:"    foo/x/bar/voyager.txt[8;28H[K[9;1H:"    foo/y/bar/voyager.txt[9;28H[K[10;1H:"[10;3H[K[11;1H:" When current directory is above foo/ they should be shortened to (in order[11;78H[K[12;1H:" of appearance):[12;19H[K[13;1H:"[13;3H[K[14;1H:"    x/bar/voyager.txt[14;24H[K[15;1H:"    y/bar/voyager.txt[15;24H[K[16;1H:call mkdir('foo')[16;19H[K[17;1H:cd foo[17;8H[K[18;1H:call mkdir('x')[18;17H[K[19;1H:call mkdir('y')[19;17H[K[20;1H:cd x[20;6H[K[21;1H:call mkdir('bar')[21;19H[K[22;1H:cd ..[22;7H[K[23;1H:cd y[23;6H[K[24;1H:call mkdir('bar')[24;19H[K[25;1H:cd ..[25;7H[K[26;1H:cd ..[26;7H[K[27;1H:" We should now be in the Xfind directory[27;43H[K[28;1H:e foo/x/bar/voyager.txt[28;25H[K[29;1HSVoyager 1[34m^[[m:w[29;15H[K[30;1H:e foo/y/bar/voyager.txt[30;25H[K[31;1HSVoyager 2[34m^[[m:w[31;15H[K[32;1H:exec "set path=" . cwd . "/Xfind/**"[32;38H[K[33;1H:find voyager   [33;17H[K[34;1H:exec "w >>" . test_out[34;24H[K[35;1H:find voyager           [35;25H[K[36;1H:exec "w >>" . test_out[36;24H[K[37;1H:"[37;3H[K[38;1H:" When current directory is .../foo/y/bar they should be shortened to (in[38;75H[K[39;4Horder of appearance):[40;7H[K[41;7H./voyager.txt[41;20H[K[42;2H"    x/bar/voyager.txt
:cd foo
:cd y[44;6H[K[45;2Hcd bar[45;8H[K[46;2Hfind voyager  [46;17H[K[47;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[49;25H[K[50;2H" Check the opposite too:[52;5H..
:cd x[53;6H[K[54;2Hcd bar[54;8H[K[55;2Hfind voyager  [55;17H[K[56;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[58;25H[K[59;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [61;17H[K[62;2Hexec "w >>" . test_out[62;25H[K[63;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[65;18H[K[66;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[67;15H[K[68;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [69;17H[K[70;2Hexec "w >>" . test_out
:q[71;3H[K[72;2Hexec "cd " . cwd[72;18H[K[73;2Hcall DeleteDirectory("Xfind")
:qa![74;5H[K[75;1HENDTEST[76;1H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7m[No Name]                                                                                              [m[39;4H[K[40;7H./voyager.txt[41;7Hx/bar/voyager.txt
:cd foo[42;8H[K[43;5Hy[43;6H[K[44;5Hbar
:find voyager
:exec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out
:" Check the opposite too:
:cd ..[50;7H[K[52;5Hx[52;6H[K[53;5Hbar
: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"[59;32H[K[60;2Hfind file      [60;17H[K[61;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[63;30H[K[64;2Hset path=./path[64;17H[K[65;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[66;15H[K[67;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [68;18H[K[69;2Hexec "w >>" . test_out
:q[70;3H[K[71;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![73;5H[K[74;1HENDTEST[75;1H[K[76;1H[7m/sources/vim73/src/testdir/test73.in                                                                   [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset path=./**[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind ...[?25l[77;7H[K[77;7H[?5h[?5l[?12l[?25h[?25l[1m[37m[41mE32: No file name[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 0L, 0C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hclose[?25l[1;1H:" Test find completion for empty path item ",," which is the current directory
:cd Xfind[2;10H[K[3;1H:set path=,,[3;13H[K[4;1H:find f         [4;17H[K[5;1H:exec "w >>" . test_out[5;24H[K[6;1H:" Test shortening of[6;22H[K[7;1H:"[7;3H[K[8;1H:"    foo/x/bar/voyager.txt[8;28H[K[9;1H:"    foo/y/bar/voyager.txt[9;28H[K[10;1H:"[10;3H[K[11;1H:" When current directory is above foo/ they should be shortened to (in order[11;78H[K[12;1H:" of appearance):[12;19H[K[13;1H:"[13;3H[K[14;1H:"    x/bar/voyager.txt[14;24H[K[15;1H:"    y/bar/voyager.txt[15;24H[K[16;1H:call mkdir('foo')[16;19H[K[17;1H:cd foo[17;8H[K[18;1H:call mkdir('x')[18;17H[K[19;1H:call mkdir('y')[19;17H[K[20;1H:cd x[20;6H[K[21;1H:call mkdir('bar')[21;19H[K[22;1H:cd ..[22;7H[K[23;1H:cd y[23;6H[K[24;1H:call mkdir('bar')[24;19H[K[25;1H:cd ..[25;7H[K[26;1H:cd ..[26;7H[K[27;1H:" We should now be in the Xfind directory[27;43H[K[28;1H:e foo/x/bar/voyager.txt[28;25H[K[29;1HSVoyager 1[34m^[[m:w[29;15H[K[30;1H:e foo/y/bar/voyager.txt[30;25H[K[31;1HSVoyager 2[34m^[[m:w[31;15H[K[32;1H:exec "set path=" . cwd . "/Xfind/**"[32;38H[K[33;1H:find voyager   [33;17H[K[34;1H:exec "w >>" . test_out[34;24H[K[35;1H:find voyager           [35;25H[K[36;1H:exec "w >>" . test_out[36;24H[K[37;1H:"[37;3H[K[38;1H:" When current directory is .../foo/y/bar they should be shortened to (in[38;75H[K[39;4Horder of appearance):[40;7H[K[41;7H./voyager.txt[41;20H[K[42;2H"    x/bar/voyager.txt
:cd foo
:cd y[44;6H[K[45;2Hcd bar[45;8H[K[46;2Hfind voyager  [46;17H[K[47;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[49;25H[K[50;2H" Check the opposite too:[52;5H..
:cd x[53;6H[K[54;2Hcd bar[54;8H[K[55;2Hfind voyager  [55;17H[K[56;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[58;25H[K[59;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [61;17H[K[62;2Hexec "w >>" . test_out[62;25H[K[63;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[65;18H[K[66;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[67;15H[K[68;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [69;17H[K[70;2Hexec "w >>" . test_out
:q[71;3H[K[72;2Hexec "cd " . cwd[72;18H[K[73;2Hcall DeleteDirectory("Xfind")
:qa![74;5H[K[75;1HENDTEST[76;1H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;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~                                                                                                      [30;1H~                                                                                                      [31;1H~                                                                                                      [32;1H~                                                                                                      [33;1H~                                                                                                      [34;1H~                                                                                                      [35;1H~                                                                                                      [36;1H~                                                                                                      [37;1H~                                                                                                      [m[38;1H[1m[7m[No Name]                                                                                              [m[39;4H[K[40;7H./voyager.txt[41;7Hx/bar/voyager.txt
:cd foo[42;8H[K[43;5Hy[43;6H[K[44;5Hbar
:find voyager
:exec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out
:" Check the opposite too:
:cd ..[50;7H[K[52;5Hx[52;6H[K[53;5Hbar
: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"[59;32H[K[60;2Hfind file      [60;17H[K[61;2Hexec "w >>" . test_out
:" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"[63;30H[K[64;2Hset path=./path[64;17H[K[65;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[66;15H[K[67;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [68;18H[K[69;2Hexec "w >>" . test_out
:q[70;3H[K[71;2Hexec "cd " . cwd
:call DeleteDirectory("Xfind")
:qa![73;5H[K[74;1HENDTEST[75;1H[K[76;1H[7m/sources/vim73/src/testdir/test73.in                                                                   [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h" We shouldn't find any file at this point, test.out must be empty.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall mkdir('in')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd in[?25l/sources/vim73/src/testdir/Xfind/in[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall mkdir('path')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "cd " . cwd[?25l/sources/vim73/src/testdir[76;1H[7mtest73.in                           [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he Xfind/file.txt[?25l"Xfind/file.txt" [New File][38;1H[1m[7mXfind/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;1H[K[1;1HHoly Grail[38;16H[1m[7m[+][1;10H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw[?25l"Xfind/file.txt" [New] 1L, 11C written[38;16H[1m[7m    [1;10H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he Xfind/in/file.txt[?25l"Xfind/in/file.txt" [New File][1;1H[K[38;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;1H[K[1;1HJimmy Hoffa[38;19H[1m[7m[+][1;11H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw[?25l"Xfind/in/file.txt" [New] 1L, 12C written[38;19H[1m[7m    [1;11H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he Xfind/in/stuff.txt[?25l"Xfind/in/stuff.txt" [New File][1;1H[K[38;10H[1m[7mstuff.txt[1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;1H[K[1;1HAnother Holy Grail[38;20H[1m[7m[+][1;18H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw[?25l"Xfind/in/stuff.txt" [New] 1L, 19C written[38;20H[1m[7m    [1;18H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he Xfind/in/path/file.txt[?25l"Xfind/in/path/file.txt" [New File][1;1H[K[38;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;1H[K[1;1HE.T.[38;24H[1m[7m[+][1;4H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw[?25l"Xfind/in/path/file.txt" [New] 1L, 5C written[38;24H[1m[7m    [1;4H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset path=Xfind/**[?25l[1;4H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h[?25l"Xfind/file.txt" [77;18H[K[77;18H1L, 11C[1;1HHoly Grail[38;7H[1m[7mfile.txtf         [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hin/file.txt[77;18H[K[77;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[38;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hin/file.txt[77;18H[K[77;18H[?12l[?25h...[?25l[77;7Hpath/file.txt[77;20H[K[77;20H[?12l[?25h[?25l"Xfind/in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[38;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Rerun the previous three find completions, using fullpath in 'path'[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "set path=" . cwd . "/Xfind/**"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h[?25l"Xfind/file.txt" [77;18H[K[77;18H1L, 11C[1;1HHoly Grail[38;7H[1m[7mfile.txtf         [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" .  test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hin/file.txt[77;18H[K[77;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[38;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hin/file.txt[77;18H[K[77;18H[?12l[?25h...[?25l[77;7Hpath/file.txt[77;20H[K[77;20H[?12l[?25h[?25l"Xfind/in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[38;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Same steps again, using relative and fullpath items that point to the same[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" recursive location.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" This is to test that there are no duplicates in the completion list.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "set path+=Xfind/**"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h[?25l"Xfind/file.txt" [77;18H[K[77;18H1L, 11C[1;1HHoly Grail[38;7H[1m[7mfile.txtf         [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" .  test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hin/file.txt[77;18H[K[77;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[38;7H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hin/file.txt[77;18H[K[77;18H[?12l[?25h...[?25l[77;7Hpath/file.txt[77;20H[K[77;20H[?12l[?25h[?25l"Xfind/in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[38;10H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./Xfind/file.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hin/file.txt[77;18H[K[77;18H[?12l[?25h[?25l"Xfind/in/file.txt" 1L, 12C[1;1HJimmy Hoffa[38;10H[1m[7mfile.txte      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h" Test find completion for directory of current buffer, which at this point[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" is Xfind/in/file.txt.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hset path=.[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind st...[?25luff.txt[?12l[?25h[?25l"Xfind/in/stuff.txt" 1L, 19C[1;1HAnother Holy Grail[38;10H[1m[7mstuff.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" .  test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 19C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test find completion for empty path item ",," which is the current directory[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd Xfind[?25l/sources/vim73/src/testdir/Xfind[38;1H[1m[7min/stuff.txtf       [m[76;1H[7m/sources/vim73/src/testdir/test73.in[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset path=,,[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind f...[?25lile.txt[?12l[?25h...[?25l[77;15H[K[77;15H[?12l[?25h[?25l"file.txt" [77;12H[K[77;12H1L, 11C[1;1HHoly Grail[1;11H[K[38;1H[1m[7mfile.txt.     [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 11C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test shortening of[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    foo/x/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    foo/y/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" When current directory is above foo/ they should be shortened to (in order[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" of appearance):[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    x/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    y/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall mkdir('foo')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd foo[?25l/sources/vim73/src/testdir/Xfind/foo[38;1H[1m[7m/sources/vim73/src/testdir/Xfind/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcall mkdir('x')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall mkdir('y')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd x[?25l/sources/vim73/src/testdir/Xfind/foo/x[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall mkdir('bar')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd ..[?25l/sources/vim73/src/testdir/Xfind/foo[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd y[?25l/sources/vim73/src/testdir/Xfind/foo/y[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall mkdir('bar')[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd ..[?25l/sources/vim73/src/testdir/Xfind/foo[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd ..[?25l/sources/vim73/src/testdir/Xfind[38;1H[1m[7mfile.txt/                                  [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25h" We should now be in the Xfind directory[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he foo/x/bar/voyager.txt[?25l"foo/x/bar/voyager.txt" [New File][1;1H[K[38;2H[1m[7moo/x/bar/voyager.txt[1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;1H[K[1;1HVoyager 1[38;23H[1m[7m[+][1;9H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw[?25l"foo/x/bar/voyager.txt" [New] 1L, 10C written[38;23H[1m[7m    [1;9H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25he foo/y/bar/voyager.txt[?25l"foo/y/bar/voyager.txt" [New File][1;1H[K[38;5H[1m[7my/[1;1H[?12l[?25h[?25l[m[77;1H[1m-- INSERT --[m[77;13H[K[77;1H[K[1;1HVoyager 2[38;23H[1m[7m[+][1;9H[?12l[?25h[?25l[77;1H[m:[?12l[?25hw[?25l"foo/y/bar/voyager.txt" [New] 1L, 10C written[38;23H[1m[7m    [1;9H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "set path=" . cwd . "/Xfind/**"[?25l[1;9H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind voyager...[?25l[77;7Hx/bar/voyager.txt[?5h[?5l[?12l[?25h[?25l"foo/x/bar/voyager.txt" 1L, 10C[1;9H1[38;5H[1m[7mx/[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind voyager...[?25l[77;7Hx/bar/voyager.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hy[77;24H[K[77;24H[?12l[?25h[?25l"foo/y/bar/voyager.txt" 1L, 10C[1;9H2[38;5H[1m[7my/[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" When current directory is .../foo/y/bar they should be shortened to (in[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" order of appearance):[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    ./voyager.txt[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h"    x/bar/voyager.txt[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd foo[?25l/sources/vim73/src/testdir/Xfind/foo[38;1H[1m[7my/bar/voyager.txt.     [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcd y[?25l/sources/vim73/src/testdir/Xfind/foo/y[38;1H[1m[7mbar/voyager.txt   [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcd bar[?25l/sources/vim73/src/testdir/Xfind/foo/y/bar[38;1H[1m[7mvoyager.txt.     [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hfind voyager...[?25l[77;7H./voyager.txt[?5h[?5l[?12l[?25h[?25l"voyager.txt" [77;15H[K[77;15H1L, 10C[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind voyager...[?25l[77;7H./voyager.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hx/bar/voyager.txt[?12l[?25h[?25l"/sources/vim73/src/testdir/Xfind/foo/x/bar/voyager.txt" 1L, 10C[1;9H1[38;1H[1m[7m/sources/vim73/src/testdir/Xfind/foo/x/bar/voyager.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Check the opposite too:[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd ..[?25l/sources/vim73/src/testdir/Xfind/foo/y[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcd ..[?25l/sources/vim73/src/testdir/Xfind/foo[38;1H[1m[7mx/bar/voyager.txtc                                      [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcd x[?25l/sources/vim73/src/testdir/Xfind/foo/x[38;1H[1m[7mbar/voyager.txt   [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hcd bar[?25l/sources/vim73/src/testdir/Xfind/foo/x/bar[38;1H[1m[7mvoyager.txt.     [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hfind voyager...[?25l[77;7H./voyager.txt[?5h[?5l[?12l[?25h[?25l"voyager.txt" [77;15H[K[77;15H1L, 10C[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind voyager...[?25l[77;7H./voyager.txt[?5h[?5l[?12l[?25h...[?25l[77;7Hy/bar/voyager.txt[?12l[?25h[?25l"/sources/vim73/src/testdir/Xfind/foo/y/bar/voyager.txt" 1L, 10C[1;9H2[38;1H[1m[7m/sources/vim73/src/testdir/Xfind/foo/y/bar/voyager.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >> " . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 10C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Check for correct handling of shorten_fname()'s behavior on windows[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "cd " . cwd . "/Xfind/in"[?25l/sources/vim73/src/testdir/Xfind/in[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25l[77;7H./file.txt[?5h[?5l[?12l[?25h[?25l"file.txt" [77;12H[K[77;12H1L, 12C[1;1HJimmy Hoffa[38;1H[1m[7mfile.txt/                                               [1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 12C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Test for relative to current buffer 'path' item[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "cd " . cwd . "/Xfind/"[?25l/sources/vim73/src/testdir/Xfind[38;1H[1m[7min/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hset path=./path[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Open the file where Jimmy Hoffa is found[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25he in/file.txt[?25l"in/file.txt" 1L, 12C[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25h" Find the file containing 'E.T.' in the Xfind/in/path directory[?25l[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hfind file...[?25ltxt[?12l[?25h[?25l"in/path/file.txt" 1L, 5C[1;1HE.T.[1;5H[K[38;4H[1m[7mpath/file.txt[1;1H[?12l[?25h[?25l[m[77;1H[K[77;1H:[?12l[?25hexec "w >>" . test_out[?25l"/sources/vim73/src/testdir/test.out" 1L, 5C appended[1;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hq[?25l[1;1H:" Test find completion for empty path item ",," which is the current directory
:cd Xfind[2;10H[K[3;1H:set path=,,[3;13H[K[4;1H:find f         [4;17H[K[5;1H:exec "w >>" . test_out[5;24H[K[6;1H:" Test shortening of[6;22H[K[7;1H:"[7;3H[K[8;1H:"    foo/x/bar/voyager.txt[8;28H[K[9;1H:"    foo/y/bar/voyager.txt[9;28H[K[10;1H:"[10;3H[K[11;1H:" When current directory is above foo/ they should be shortened to (in order[11;78H[K[12;1H:" of appearance):[12;19H[K[13;1H:"[13;3H[K[14;1H:"    x/bar/voyager.txt[14;24H[K[15;1H:"    y/bar/voyager.txt[15;24H[K[16;1H:call mkdir('foo')[16;19H[K[17;1H:cd foo[17;8H[K[18;1H:call mkdir('x')[18;17H[K[19;1H:call mkdir('y')[19;17H[K[20;1H:cd x[20;6H[K[21;1H:call mkdir('bar')[21;19H[K[22;1H:cd ..[22;7H[K[23;1H:cd y[23;6H[K[24;1H:call mkdir('bar')[24;19H[K[25;1H:cd ..[25;7H[K[26;1H:cd ..[26;7H[K[27;1H:" We should now be in the Xfind directory[27;43H[K[28;1H:e foo/x/bar/voyager.txt[28;25H[K[29;1HSVoyager 1[34m^[[m:w[29;15H[K[30;1H:e foo/y/bar/voyager.txt[30;25H[K[31;1HSVoyager 2[34m^[[m:w[31;15H[K[32;1H:exec "set path=" . cwd . "/Xfind/**"[32;38H[K[33;1H:find voyager   [33;17H[K[34;1H:exec "w >>" . test_out[34;24H[K[35;1H:find voyager           [35;25H[K[36;1H:exec "w >>" . test_out[36;24H[K[37;1H:"[37;3H[K[38;1H:" When current directory is .../foo/y/bar they should be shortened to (in[38;75H[K[39;4Horder of appearance):[40;7H[K[41;7H./voyager.txt[41;20H[K[42;2H"    x/bar/voyager.txt
:cd foo
:cd y[44;6H[K[45;2Hcd bar[45;8H[K[46;2Hfind voyager  [46;17H[K[47;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[49;25H[K[50;2H" Check the opposite too:[52;5H..
:cd x[53;6H[K[54;2Hcd bar[54;8H[K[55;2Hfind voyager  [55;17H[K[56;2Hexec "w >> " . test_out
:find voyager           
:exec "w >> " . test_out[58;25H[K[59;2H" Check for correct handling of shorten_fname()'s behavior on windows
:exec "cd " . cwd . "/Xfind/in"
:find file      [61;17H[K[62;2Hexec "w >>" . test_out[62;25H[K[63;2H" Test for relative to current buffer 'path' item
:exec "cd " . cwd . "/Xfind/"
:set path=./path[65;18H[K[66;2H" Open the file where Jimmy Hoffa is found
:e in/file.txt[67;15H[K[68;2H" Find the file containing 'E.T.' in the Xfind/in/path directory
:find file      [69;17H[K[70;2Hexec "w >>" . test_out
:q[71;3H[K[72;2Hexec "cd " . cwd[72;18H[K[73;2Hcall DeleteDirectory("Xfind")
:qa![74;5H[K[75;1HENDTEST[76;1H[K[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hexec "cd " . cwd[?25l/sources/vim73/src/testdir[76;1H[?12l[?25h[?25l[77;1H[K[77;1H:[?12l[?25hcall DeleteDirectory("Xfind")[?25l[?1l>[?12l[?25h[?1049l[?1049h[?1h=[76;1H[?25l[77;1H[K[77;1H:[?12l[?25hqa![?25l[77;1H[K[77;1H[?1l>[?12l[?25h[?1049lrm -rf X* test.ok viminfo

Test results:
ALL DONE
make[3]: Leaving directory `/sources/vim73/src/testdir'
make[2]: Leaving directory `/sources/vim73/src'
make[1]: Leaving directory `/sources/vim73'
