Fri Aug 25 01:44:45 EEST 2006 Starting make in the src directory. If there are problems, cd to the src directory and run make there cd src && make test make[1]: Entering directory `/sources/vim70/src' make -f Makefile vim make[2]: Entering directory `/sources/vim70/src' make[2]: `vim' is up to date. make[2]: Leaving directory `/sources/vim70/src' if test -n "" -a -f po/Makefile; then \ cd po; make -f Makefile check VIM=../vim; \ fi if test vim != vim -a ! -e vim; then \ ln -s vim vim; \ fi cd testdir; make -f Makefile VIMPROG=../vim make[2]: Entering directory `/sources/vim70/src/testdir' echo Test results: >test.log rm -f test1.failed tiny.vim small.vim mbyte.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 [?1h="test1.in" 40 lines, 1465 charactersFirst a simple test to check if the test script works. If Vim was not compiled with the +eval feature, the small.vim script will be set to copy the test.ok file to test.out, so that it looks like the test succeeded. Otherwise an empty small.vim is written. small.vim is sourced by tests that require the +eval feature or other features that are missing in the small version. If Vim was not compiled with the +windows feature, the tiny.vim script will be set like small.vim above. tiny.vim is sourced by tests that require the +windows feature or other features that are missing in the tiny version. If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will be set like small.vim above. mbyte.vim is sourrced by tests that require the +multi_byte feature. STARTTEST :" Write a single line to test.out to check if testing works at all. :%d athis is a test^[:w! test.out :" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test. 0D:w! small.vim :w! tiny.vim ae! test.ok w! test.out qa! ^[:w! mbyte.vim :" If +multi_byte feature supported, make mbyte.vim empty. :if has("multi_byte") | sp another | w! mbyte.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 ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 21 lines, 661 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :" Write a single line to test.out to check if testing works at all. :%d ~ ~~~~~~ ~~~~ ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~ ~--No lines in buffer--this is a test:w! test.out "test.out" [New File] 1 line, 15 characters written:" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test.  :w! small.vim "small.vim" [New File] 1 line, 1 character written:w! tiny.vim "tiny.vim" [New File] 1 line, 1 character writtene! test.ok w! test.out qa!:w! mbyte.vim "mbyte.vim" [New File] 4 lines, 28 characters written:" If +multi_byte feature supported, make mbyte.vim empty. :if has("multi_byte") | sp another | w! mbyte.vim | q | endif "another" [New File] "mbyte.vim" 0 lines, 0 characters writtene! test.ok:" 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 [?1l>rm -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 [?1h="test2.in" 29 lines, 717 charactersThis 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("")) /^second /URL :call append(1, expand("")) :if has("ebcdic") : set isf=@,240-249,/,.,-,_,+,,,$,:,~,\ :else : set isf=@,48-57,/,.,-,_,+,,,$,:,~,\ :endif /^third /name :call append(2, expand("")) /^fourth /URL :call append(3, expand("")) 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 19 lines, 336 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim /^first search hit BOTTOM, continuing at TOP/tmp :call append(0, expand("")) URL://machine.name/tmp/vimtest2a/^second /URL :call append(1, expand("")) URL://machine.name/tmp/vimtest2b:if has("ebcdic") : : set isf=@,240-249,/,.,-,_,+,,,$,:,~,\ : :else : : set isf=@,48-57,/,.,-,_,+,,,$,:,~,\ : :endif URL://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/^third /name :call append(2, expand("")) URL:\\machine.name\vimtest2c/^fourth /URL :call append(3, expand("")) URL:\\machine.name\tmp\vimtest2d29 fewer lines~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~:wq! test.out "test.out" [New File] 4 lines, 128 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test3.failed test.ok test.out X* viminfo cp test3.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test3.in Vim: Warning: Output is not to a terminal [?1h="test3.in" 1320 lines, 13734 characters/* vim: set cin ts=4 sw=4 : */ Test for 'cindent' STARTTEST :so small.vim :set nocompatible viminfo+=nviminfo :edit" read modeline /start of AUTO =/end of AUTO ENDTEST /* start of AUTO matically checked vim: set ts=4 : */ {if (test)cmd1;cmd2; } {if (test)cmd1;elsecmd2; } {if (test){cmd1;cmd2;} } {if (test){cmd1;else} } {while (this)if (test)cmd1;:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 116 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :set nocompatible viminfo+=nviminfo :edit " read modeline "test3.in"1320L, 13734Cif (test)cmd1;cmd2;if (test)cmd1;elsecmd2;if (test){cmd1;cmd2;}if (test){cmd1;else}while (this)if (test)cmd1;/start of AUTO /end of AUTO 789 lines to indent... 7500 650 550 450 350 250 150 50 lines to indent... 790 lines indented /^STARTTEST {case 'c': if (cond){} } } main() { (void) MyFancyFuasdfadsfnction(argument); } main() { char foo[] = "/*"; /* asdf */ 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^[ ENDTEST { /* this is * a real serious important big * comment */ /* insert " about life, the universe, and the rest" after "serious" */ } STARTTEST :set nocin /comments joabout life^[/happens jothere^[/below oline^[/this Ohello^[ ENDTEST :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 93C written:set ff& cpo+=A /ENDTEST/+-1 :so! Xdotest :set tw=0 wm=60 columns=80 noai fo=croq {case 'c': if (cond){} } } main() { (void) MyFancyFuasdfadsfnction(argument); } main() { char foo[] = "/*"; /* asdf */ 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^[ ENDTEST { /* this is * a real serious important big * comment */ /* insert " about life, the universe, and the rest" after "serious" */ } STARTTEST :set nocin /comments joabout life^[/happens jothere^[/below oline^[/this Ohello^[ ENDTEST/serious/e -- INSERT --* about life, the * universe, and the * rest important big/^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 6L, 78C written:set ff& cpo+=A /ENDTEST/+-1 Ohello^[ ENDTEST :so! Xdotest :set nocin /comments { /** Testing for comments, without 'cin' set */ -- INSERT -- about life /happens /* * what happens here? */ -- INSERT -- there /below /*the end of the comment, try inserting a line below */ -- INSERT -- line /this /* how aboutthis one */ -- INSERT --hello this one */ /^STARTTEST } STARTTEST :set cin :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 18C written:set ff& cpo+=A  /ENDTEST/+-1/vec2 == ENDTEST :so! Xdotest :set cin /vec2 { var = this + that + vec[0] * vec[0]+ vec[1] * vec[1]+ vec2[2] * vec[2]; } /^STARTTEST STARTTEST :set cin :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 5L, 51C written:set ff& cpo+=A  /ENDTEST/+-1:set cino=}4 /testing1 k2==/testing2 k2== ENDTEST :so! Xdotest :set cin :set cino=}4 /testing1 {asdf asdflkajds f; if (tes & ting) {asdf asdf asdf ;asdfa sdf asdf;} testing1; /testing2 if (tes & ting) {asdf asdf asdf ;asdfa sdf asdf;} testing2;  /^STARTTEST } STARTTEST :set cin :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 4L, 36C written:set ff& cpo+=A  /ENDTEST/+-1:set cino=(0,)20 /main =][ ENDTEST :so! Xdotest :set cin :set cino=(0,)20 /main main ( int first_par, /* 19 lines to indent... 20indented  * Comment for /^STARTTEST * first par*/int second_par /** Comment for* second par*/) { func( first_par, /** Comment for* first par*/second_par /** Comment for* second par*/); } STARTTEST :set cin :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 26C written:set ff& cpo+=A  /ENDTEST/+-1:set cino= ]]=][ ENDTEST :so! Xdotest :set cin :set cino= { 11 lines to indent... 12indented  do /^STARTTEST {if (){if ()asdf;elseasdf;} } while (); cmd;/* this should go under the } */ } STARTTEST ]]=][ :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 1L, 6C written:set ff& cpo+=A  /ENDTEST/+-1 ENDTEST :so! Xdotest void f() { 8 lines to indent... 9indented  if ( k() ) { /^STARTTEST l();} else { /* Start (two words) end */m(); }n(); } STARTTEST :set cino={s,e-s :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A  /ENDTEST/+-1 ]]=][ ENDTEST :so! Xdotest :set cino={s,e-s void f() { 7 lines to indent... 8indented  { if ( k() ) /^STARTTEST {l();} else { /* Start (two words) end */m();} n(); /* should be under the if () */ } STARTTEST :set cino={s,fs :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 25C written:set ff& cpo+=A  /ENDTEST/+-1 ]]=/ foo ENDTEST :so! Xdotest :set cino={s,fs void bar(void) { / foo 30 lines to indent... 31indented  {/^STARTTEST }{int a;{a = a + 1;}} b = a; } void func(void) { a = 1;{b = 2;} c = 3; d = 4; } /* foo */ STARTTEST :set cino= /while ohere^[ ENDTEST a() { do { a = a +a; } while ( a );/* add text under this line */ if ( a )a; } STARTTEST :set cino= com= /comment olabel2: b();^Mlabel3 /* post */:^M/* pre */ label4:^Mf(/*com*/);^Mif (/*com*/)^^Mcmd();^[ ENDTEST a() :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 25C written:set ff& cpo+=A /ENDTEST/+-1 :so! Xdotest :set cino= /while -- INSERT --here/^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 109C written:set ff& cpo+=A /ENDTEST/+-1 :so! Xdotest :set cino= com= /comment a() { label1:/* hmm */// comment -- INSERT --label2: b(); label3 /* post */: /* pre */ label4:f(/*com*/);if (/*com*/)cmd(); } /^STARTTEST STARTTEST :set comments& comments^=s:/*,m:**,ex:*/ :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 53C written:set ff& cpo+=A  /ENDTEST/+-1/simple =5j ENDTEST :so! Xdotest :set comments& comments^=s:/*,m:**,ex:*/ /simple /* * A simple comment 5 lines to indent... 6indented * A simple comment */ /^STARTTEST /* ** A different comment */ STARTTEST :set cino=c0 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 70C written:set ff& cpo+=A  /ENDTEST/+-1:set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][ ENDTEST :so! Xdotest :set cino=c0 :set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][ENDTESTvoid f() { 4 lines to indent... 5indented   /^STARTTEST /*********A comment. *********/ } STARTTEST :set cino=c0,C1 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 73C written:set ff& cpo+=A  /ENDTEST/+-1:set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][ ENDTEST :so! Xdotest :set cino=c0,C1 :set comments& comments-=s1:/* comments^=s0:/* 2kdd]]=][ENDTESTvoid f() { 4 lines to indent... 5indented   /^STARTTEST /********* A comment. *********/ } STARTTEST :set cino= :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 17C written:set ff& cpo+=A  /ENDTEST/+-1 ]]=][ ENDTEST :so! Xdotest :set cino= void f() { 5 lines to indent... 6indented  c = c1 && /^STARTTEST (c2 ||c3) && c4; } STARTTEST :set cino=(s :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(s 2kdd]]=][ENDTESTvoid f() { 5 lines to indent... 6indented  c = c1 && /^STARTTEST (c2 ||c3) && c4; } STARTTEST :set cino=(s,U1 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(s,U1 2kdd]]=][ENDTESTvoid f() { 5 lines to indent... 6indented  c = c1 && /^STARTTEST (c2 ||c3) && c4; } STARTTEST :set cino=(0 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(0 2kdd]]=][ENDTESTvoid f() { 4 lines to indent... 5indented  if ( c1 /^STARTTEST && ( c2|| c3))foo; } STARTTEST :set cino=(0,w1 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(0,w1 2kdd]]=][ENDTESTvoid f() { 4 lines to indent... 5indented  if ( c1 /^STARTTEST && ( c2|| c3))foo; } STARTTEST :set cino=(s :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(s 2kdd]]=][ENDTESTvoid f() { 8 lines to indent... 9indented  c = c1 && ( /^STARTTEST c2 ||c3) && c4; if (c1 && c2)foo; } STARTTEST :set cino=(s,m1 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 28C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(s,m1 2kdd]]=][ENDTESTvoid f() { 8 lines to indent... 9indented  c = c1 && ( /^STARTTEST c2 ||c3 ) && c4; if (c1 && c2 )foo; } STARTTEST :set cino=b1 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=b1 2kdd]]=][ENDTESTvoid f() { 9 lines to indent... 10 lines indented  switch (x) /^STARTTEST {case 1:a = b;break;default:a = 0;break; } } STARTTEST :set cino=(0,W5 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 26C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(0,W5 2kdd]]=][ENDTESTvoid f() { 10 lines to indent... 11indented  invokeme( /^STARTTEST argu,ment); invokeme(argu,ment); invokeme(argu,ment); } STARTTEST :set cino=/6 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=/6 2kdd]]=][ENDTESTvoid f() { 3 lines to indent... 4indented  statement; /^STARTTEST // comment 1// comment 2 } STARTTEST :set cino= :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 3L, 34C written:set ff& cpo+=A  /ENDTEST/+-12kdd]]/comment 1/+1 == ENDTEST :so! Xdotest :set cino= ==ENDTESTvoid f() { /comment 1/+1 statement;// comment 1 // comment 2 // comment 2 } /^STARTTEST STARTTEST :set cino=g0 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=g0 2kdd]]=][ENDTESTclass CAbc { 6 lines to indent... 7indented  int Test() { return FALSE; } /^STARTTEST public: // comment void testfall(); protected: void testfall(); }; STARTTEST :set cino=+20 :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 24C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=+20 2kdd]]=][ENDTESTvoid foo() { 4 lines to indent... 5indented  if (a) /^STARTTEST { } elseasdf; } STARTTEST :set cino=(0,W2s :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 27C written:set ff& cpo+=A  /ENDTEST/+-1 2kdd]]=][ ENDTEST :so! Xdotest :set cino=(0,W2s 2kdd]]=][ENDTEST { 34 lines to indent... 35indented  averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( /^STARTTEST /* those are ugly, but consequent */func()->asd(asdasdf,averylongfunctionname(abc,dec)->averylongfunctionname(asdfadsf,asdfasdf,asdfasdf,),func(asdfadf,asdfasdf),asdasdf);averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf(abc,dec)->asdfasdfasdf(asdfadsf,asdfasdf,asdfasdf,),func(asdfadf,asdfasdf),asdasdf); } STARTTEST :set cino=M1 2kdd]]=][ ENDTEST int main () { if (cond1 &&cond2)foo; } STARTTEST :g/^STARTTEST/.,/^ENDTEST/d :1;/start of AUTO/,$wq! test.out ENDTEST :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 23C written:set ff& cpo+=A /ENDTEST/+-1 :so! Xdotest :set cino=M1  ~4 lines to indent... 5indented  /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" 2L, 61C written:set ff& cpo+=A /ENDTEST/+-1 :so! Xdotest :g/^STARTTEST/.,/^ENDTEST/d 128 fewer lines{averylongfunctionnamelongfunctionnameaverylongfunctionname()->asd( asdasdf,func(asdf,asdfadsf),asdfasdf);/* those are ugly, but consequent */func()->asd(asdasdf,averylongfunctionname( abc, dec)->averylongfunctionname( asdfadsf,asdfasdf, asdfasdf, ),func(asdfadf,asdfasdf),asdasdf);averylongfunctionnameaverylongfunctionnameavery()->asd(fasdf( abc, dec)->asdfasdfasdf( asdfadsf,asdfasdf, asdfasdf, ), func(asdfadf,asdfasdf), asdasdf ); }int main (){ if (cond1 && cond2 ) foo;}:1;/start of AUTO/,$wq! test.out "test.out" [New] 1185L, 11362C written [?1l> rm -rf X* test.ok viminfo rm -rf test4.failed test.ok test.out X* viminfo cp test4.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test4.in Vim: Warning: Output is not to a terminal [?1h="test4.in" 31 lines, 839 charactersTest for autocommand that changes current buffer on BufEnter event. Check if modelines are interpreted for the correct buffer. STARTTEST :so small.vim :set nocompatible viminfo+=nviminfo :au BufEnter Xxx brew /start of :.,/end of/w! Xxx " write test file Xxx :set ai modeline modelines=3 :sp Xxx" split to Xxx, autocmd will do :brew G?this is a othis should be auto-indented^[ :" Append text with autoindent to this file :au! BufEnter Xxx :buf Xxx" go to Xxx, no autocmd anymore G?this is a othis should be in column 1^[:wq " append text without autoindent to Xxx G:r Xxx" include Xxx in the current file :?startstart?,$w! test.out :qa! ENDTEST startstart start of test file Xxx vim: set noai :this is a testthis is a testthis is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 557 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :set nocompatible viminfo+=nviminfo :au BufEnter Xxx brew /start of :.,/end of/w! Xxx " write test file Xxx "Xxx" [New] 7L, 124C written:set ai modeline modelines=3 :sp Xxx " split to Xxx, autocmd will do :brew "Xxx" 7L, 124C:set ai modeline modelines=3:sp Xxx " split to Xxx, autocmd will do :brewG?this is a othis should be auto-indented^[ : " Append text with autoindent to this file :au! BufEnter Xxxbuf Xxx " go to Xxx, no autocmd anymore G?this is a othis should be in column 1^[:wq " append text without autoindent to Xxx G:r Xxx " include Xxx in the current file :?startstart?,$w! test.out:qa!ENDTESTstartstartstart of test file Xxxvim: set noai : this is a test this is a test this is a this is a test end of test file Xxx test4.in :set ai modeline modelines=3 :sp Xxx " split to Xxx, autocmd will do :brew G?this is aothis should be auto-indented^[ : " Append text with autoindent to this file :au! BufEnter Xxx:buf Xxx " go to Xxx, no autocmd anymore G?this is aothis should be in column 1^[:wq " append text without autoindent to Xxx G:r Xxx" include Xxx in the current file :?startstart?,$w! test.out :qa! ENDTESTstartstart start of test file Xxx vim: set noai : this is a test this is a test this is a test this is a test end of test file Xxx test4.in test4.in" line 25 of 31 --80%-- col 1?this is a -- INSERT -- this should be auto-indented[+] this should be auto-indented[+] end of test file Xxx: " Append text with autoindent to this file :au! BufEnter Xxx :buf Xxx " go to Xxx, no autocmd anymore "Xxx" 7L, 124Cstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a testend of test file Xxx~~~~~ ~~~~~~~~~~ Xxx ?this is a -- INSERT --this should be in column 1[+]:wq " append text without autoindent to Xxx "Xxx8L, 151C writtenTest for autocommand that changes current buffer on BufEnter event. Check if modelines are interpreted for the correct buffer.STARTTEST:so small.vim:set nocompatible viminfo+=nviminfo :au BufEnter Xxx brew/start of:.,/end of/w! Xxx " write test file Xxx :set ai modeline modelines=3 :sp Xxx" split to Xxx, autocmd will do :brew G?this is a othis should be auto-indented^[ : " Append text with autoindent to this file :au! BufEnter Xxx :buf Xxx" go to Xxx, no autocmd anymore G?this is a othis should be in column 1^[:wq " append text without autoindent to Xxx G:r Xxx" include Xxx in the current file :?startstart?,$w! test.out :qa! ENDTESTstartstartstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a test this should be auto-indented end of test file Xxx~~~~ ~~~~~~~~~~:r Xxx " include Xxx in the current file "Xxx" 8L, 151Cstart of test file Xxx vim: set noai : this is a test this is a test this is a test this is a test this should be in column 1 end of test file Xxx:?startstart?,$w! test.out "test.out" [New] 17L, 316C written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test5.failed test.ok test.out X* viminfo cp test5.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test5.in Vim: Warning: Output is not to a terminal [?1h="test5.in" 29 lines, 949 charactersTest for autocommand that deletes the current buffer on BufLeave event. Also test deleting the last buffer, should give a new, empty buffer. STARTTEST :so small.vim :au BufLeave Xxx bwipe /start of :.,/end of/w! Xxx" write test file Xxx :sp Xxx" split to Xxx :bwipe" delete buffer Xxx, now we're back here G?this is a othis is some more text^[ :" Append some text to this file :?start?,$w! test.out" Write current file contents :bwipe test.out" delete alternate buffer :au bufleave test5.in bwipe :bwipe!" delete current buffer, get an empty one ithis is another test line^[:w >>test.out :" append an extra line to the output file :qa! ENDTEST start of test file Xxx vim: set noai :this is a testthis is a testthis is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 16 lines, 664 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :au BufLeave Xxx bwipe /start of :.,/end of/w! Xxx " write test file Xxx "Xxx" [New File] 7 lines, 124 characters written:sp Xxx " split to Xxx "Xxx" 7 lines, 124 charactersstart of test file Xxxvim: set noai :this is a test this is a test this is a test this is a test end of test file Xxx~~~~~~~~~~~~~~ ~ Xxx :.,/end of/w! Xxx" write test file Xxx :sp Xxx " split to Xxx :bwipe " delete buffer Xxx, now we're back here G?this is aothis is some more text^[ : " Append some text to this file :?start?,$w! test.out" Write current file contents :bwipe test.out" delete alternate buffer :au bufleave test5.in bwipe :bwipe!" delete current buffer, get an empty one ithis is another test line^[:w >>test.out : " append an extra line to the output file :qa! ENDTESTstart of test file Xxx vim: set noai : this is a test this is a test this is a test this is a test end of test file Xxx test5.in :bwipe " delete buffer Xxx, now we're back here Test for autocommand that deletes the current buffer on BufLeave event. Also test deleting the last buffer, should give a new, empty buffer.STARTTEST:so small.vim:au BufLeave Xxx bwipe /start of:.,/end of/w! Xxx" write test file Xxx :sp Xxx" split to Xxx :bwipe" delete buffer Xxx, now we're back here G?this is a othis is some more text^[ : " Append some text to this file :?start?,$w! test.out" Write current file contents :bwipe test.out" delete alternate buffer :au bufleave test5.in bwipe :bwipe!" delete current buffer, get an empty one ithis is another test line^[:w >>test.out : " append an extra line to the output file :qa! ENDTESTstart of test file Xxxvim: set noai : this is a test this is a test this is a test this is a testend of test file Xxx~~~~~~~~ ~~~~~~~~~?this is a this is some more text: " Append some text to this file :?start?,$w! test.out " Write current file contents "test.out" [New File] 8 lines, 147 characters written:bwipe test.out " delete alternate buffer :au bufleave test5.in bwipe :bwipe! " delete current buffer, get an empty one Error detected while processing BufLeave Auto commands for "test5.in": E89: No write since last change for buffer 1 (add ! to override) Press ENTER or type command to continue~ ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~this is another test line:w >>test.out "test.out" 1 line, 26 characters appended: " append an extra line to the output file :qa! [?1l>rm -rf X* test.ok viminfo rm -rf test6.failed test.ok test.out X* viminfo cp test6.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test6.in Vim: Warning: Output is not to a terminal [?1h="test6.in" 24 lines, 739 charactersTest for autocommand that redefines the argument list, when doing ":all". STARTTEST :so small.vim :au BufReadPost Xxx2 next Xxx2 Xxx1 /^start of A1^[:.,/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" open window for all args :w! test.out" Write contents of Xxx1 ^W^W^W^W:w >>test.out " Append contents of last window (Xxx1) :rew" should now be in Xxx2 :w >>test.out" Append contents of Xxx2 :qa! ENDTEST start of test file Xxxthis is a testthis is a testthis is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 13 lines, 537 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :au BufReadPost Xxx2 next Xxx2 Xxx1 /^start of 1:.,/end of/w! Xxx1 " write test file Xxx1 "Xxx1" [New File] 6 lines, 109 characters written2:.,/end of/w! Xxx2 " write test file Xxx2 "Xxx2" [New File] 6 lines, 109 characters written3:.,/end of/w! Xxx3 " write test file Xxx3 "Xxx3" [New File] 6 lines, 109 characters written:next! Xxx1 Xxx2 Xxx3 " redefine arglist; go to Xxx1 "Xxx1"6 lines, 109 charactersstart of test file Xxx1this is a test this is a test this is a test this is a testend of test file Xxx~~~~~~~~~~~ ~~~~~~~:all " open window for all args "Xxx2"6 lines, 109 characters "Xxx2" 6 lines, 109 characters Press ENTER or type command to continue:w! test.out " Write contents of Xxx1 "test.out" [New File] 6 lines, 109 characters written Press ENTER or type command to continuestart of test file Xxx1this is a testthis is a testXxx1 start of test file Xxx2 this is a test this is a test this is a test this is a test end of test file XxxXxx2 Xxx1 Xxx2 Xxx1 Xxx2 :w >>test.out " Append contents of last window (Xxx1) "test.out" 6 lines, 109 characters appended:rew " should now be in Xxx2 "Xxx2" line 1 of 6 --16%-- col 1 (file 1 of 2)22:w >>test.out " Append contents of Xxx2 "test.out" 6 lines, 109 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test7.failed test.ok test.out X* viminfo cp test7.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test7.in Vim: Warning: Output is not to a terminal [?1h="test7.in" 26 lines, 675 charactersTest for autocommand that changes the buffer list, when doing ":ball". STARTTEST :so small.vim /^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1 :close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTEST start of test file Xxxthis is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 508 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim /^start of 1:.,/end of/w! Xxx1 " write test file Xxx1 "Xxx1" [New File] 4 lines, 77 characters written:sp Xxx1 "Xxx1" 4 lines, 77 charactersstart of test file Xxx1this is a test this is a test end of test file Xxx~~~~~~~~~~~~~~~~~ ~ Xxx1 /^start ofA1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1:close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx1 this is a test this is a test end of test file Xxx test7.in [+] :close Test for autocommand that changes the buffer list, when doing ":ball".STARTTEST:so small.vim/^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1 :close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx1 this is a test this is a testend of test file Xxx~~~~~~~~~~~~~~ ~~~~~~2:.,/end of/w! Xxx2 " write test file Xxx2 "Xxx2" [New File] 4 lines, 77 characters written:sp Xxx2 "Xxx2" 4 lines, 77 charactersstart of test file Xxx2this is a test this is a test end of test file Xxx~~~~~~~~~~~~~~~~~ ~ Xxx2 /^start ofA1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1:close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx2 this is a test this is a test end of test file Xxx test7.in [+] :close Test for autocommand that changes the buffer list, when doing ":ball".STARTTEST:so small.vim/^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1 :close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx2 this is a test this is a testend of test file Xxx~~~~~~~~~~~~~~ ~~~~~~3:.,/end of/w! Xxx3 " write test file Xxx3 "Xxx3" [New File] 4 lines, 77 characters written:sp Xxx3 "Xxx3" 4 lines, 77 charactersstart of test file Xxx3this is a test this is a test end of test file Xxx~~~~~~~~~~~~~~~~~ ~ Xxx3 /^start ofA1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1:close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx3 this is a test this is a test end of test file Xxx test7.in [+] :close Test for autocommand that changes the buffer list, when doing ":ball".STARTTEST:so small.vim/^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1 :close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTESTstart of test file Xxx3 this is a test this is a testend of test file Xxx~~~~~~~~~~~~~~ ~~~~~~:au BufReadPost Xxx2 bwipe 4:ball " open window for all args, close Xxx2 "Xxx1"4 lines, 77 characters "Xxx2" 4 lines, 77 characters Press ENTER or type command to continue:.,$w! test.out " Write contents of this file "test.out" [New File] 4 lines, 77 characters written Press ENTER or type command to continue/^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 :sp Xxx1 :close $r2:.,/end of/w! Xxx2 " write test file Xxx2 :sp Xxx2 :close $r3:.,/end of/w! Xxx3 " write test file Xxx3 :sp Xxx3 :close :au BufReadPost Xxx2 bwipe $r4:ball" open window for all args, close Xxx2 :.,$w! test.out" Write contents of this file ^W^W:w >>test.out" Append contents of second window (Xxx1) ^W^W:/^start of/,$w >>test.out " Append contents of last window (this file) :qa! ENDTEST start of test file Xxx4this is a testthis is a test end of test file Xxx test7.in [+] start of test file Xxx1this is a testthis is a test end of test file Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xxx1 test7.in [+] Xxx1 :w >>test.out " Append contents of second window (Xxx1) "test.out" 4 lines, 77 characters appendedtest7.in [+] Xxx1 :/^start of/,$w >>test.out " Append contents of last window (this file) search hit BOTTOM, continuing at TOP"test.out" 4 lines, 77 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test8.failed test.ok test.out X* viminfo cp test8.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test8.in Vim: Warning: Output is not to a terminal [?1h="test8.in" 24 lines, 797 charactersTest for BufWritePre autocommand that deletes or unloads the buffer. STARTTEST :so small.vim :au BufWritePre Xxx1 bunload :au BufWritePre Xxx2 bwipe /^start of A1^[:.,/end of/w! Xxx1 " write test file Xxx1 $r2:.,/end of/w! Xxx2 " write test file Xxx2 :e! Xxx2" edit Xxx2 :bdel test8.in" delete this file from the buffer list :e Xxx1" edit Xxx1 :w" write it, will unload it and give an error msg :w! test.out" Write contents of this file :e! Xxx2" start editing Xxx2 :bwipe test.out" remove test.out from the buffer list :w" write it, will delete the buffer and give an error msg :w >>test.out" Append contents of this file :qa! ENDTEST start of Xxxtest end of Xxx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 16 lines, 678 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :au BufWritePre Xxx1 bunload :au BufWritePre Xxx2 bwipe /^start of 1:.,/end of/w! Xxx1 " write test file Xxx1 "Xxx1" [New File] 3 lines, 31 characters written2:.,/end of/w! Xxx2 " write test file Xxx2 "Xxx2" [New File] 3 lines, 31 characters written:e! Xxx2 " edit Xxx2 "Xxx2" 3 lines, 31 charactersstart of Xxx2test end of Xxx~~~~~~~~~~~~~~~~~ ~~~~:bdel test8.in^I^I" delete this file from the buffer list :e Xxx1 " edit Xxx1 "Xxx1" 3 lines, 31 characters1 :w " write it, will unload it and give an error msg "Xxx2"3 lines, 31 characters E203: Autocommands deleted or unloaded buffer to be written Press ENTER or type command to continue:w! test.out " Write contents of this file "test.out" [New File] 3 lines, 31 characters written Press ENTER or type command to continue:e! Xxx2 " start editing Xxx2 "Xxx2" 3 lines, 31 charactersstart of Xxx2test end of Xxx"Xxx2" 3 lines, 31 characters:bwipe test.out " remove test.out from the buffer list :w " write it, will delete the buffer and give an error msg "Xxx1"3 lines, 31 characters E203: Autocommands deleted or unloaded buffer to be written Press ENTER or type command to continue:w >>test.out " Append contents of this file "test.out" 3 lines, 31 characters appended Press ENTER or type command to continue:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test9.failed test.ok test.out X* viminfo cp test9.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test9.in Vim: Warning: Output is not to a terminal [?1h="test9.in" 12 lines, 255 charactersTest for Bufleave autocommand that deletes the buffer we are about to edit. STARTTEST :so small.vim :au BufLeave test9.in bwipe yy :e yy :/^start of/,$w! test.out " Write contents of this file :qa! ENDTEST start of test file xx end of test file xx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 117 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :au BufLeave test9.in bwipe yy :e yy E143: Autocommands unexpectedly deleted new buffer yy:/^start of/,$w! test.out " Write contents of this file "test.out" [New File] 2 lines, 42 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test10.failed test.ok test.out X* viminfo cp test10.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test10.in Vim: Warning: Output is not to a terminal [?1h="test10.in" 57 lines, 1624 charactersTest 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" 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:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 15 lines, 225 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :/start of errorfile/,/end of errorfile/w! Xerrorfile "Xerrorfile" [New File] 13 lines, 447 characters written:/start of testfile/,/end of testfile/w! Xtestfile "Xtestfile" [New File] 23 lines, 853 characters written:cf Xerrorfile "Xtestfile" 23 lines, 853 characters (2 of 13): 1506-045 (S) Undeclared identifier fd_set. Press ENTER or type command to continuestart of testfile line 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 4 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxline 6 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxline 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 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxline 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxend of testfile~~~~ ~~~ ~~~ ~~~~~~~~~~~~~A:cn (3 of 13): this is an errorB:cn (5 of 13): parse error before `asd'C :cn (7 of 13): there is an errorD :cn (10 of 13): yet another problemE :w! test.out " Write contents of this file "test.out" [New File] 23 lines, 853 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test11.failed test.ok test.out X* viminfo cp test11.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test11.in Vim: Warning: Output is not to a terminal [?1h="test11.in" 78 lines, 3040 charactersTests for autocommands: - FileWritePrewriting a compressed file - FileReadPostreading a compressed file - BufNewFilereading a file template - BufReadPredecompressing the file to be read - FilterReadPresubstituting characters in the temp file - FilterReadPostsubstituting characters after filtering - FileReadPreset options for decompression - FileReadPostdecompress the file Note: This test will fail 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 :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" 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" Will load Xtest.c :au FileAppendPre *.out '[,']s/new/NEW/ :au FileAppendPost *.out !cat Xtest.c >>test.out :w>>test.out" Append it to the output file :au! FileAppendPre :" setup autocommands to decompress before reading and re-compress afterwards :au BufReadPre *.gz !gzip -d :au BufReadPre *.gz call rename(expand(":r"), expand("")) :au BufReadPost *.gz call rename(expand(""), expand(":r")) :au BufReadPost *.gz !gzip :r :e! Xtestfile.gz" Edit compressed file :w>>test.out" Append it to the output file :set shelltemp" need temp files here :au FilterReadPre *.out call rename(expand(""), expand("").".t") :au FilterReadPre *.out !sed s/e/E/ .t > :au FilterReadPre *.out !rm .t :au FilterReadPost *.out '[,']s/x/X/g :e! test.out" Edit the output file:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 42 lines, 1973 characters written:set ff& cpo+=A /ENDTEST:23,$!cat :23,$s/\r$//" remove CR for when sed adds them :au! FileReadPre *.gz !gzip -d :au FileReadPre *.gz call rename(expand(":r"), expand("")) :au! FileReadPost *.gz '[,']s/l/L/ :$r Xtestfile.gz" Read compressed file :w" write it, after filtering :au!" remove all autocommands :e" Edit test.out again :set nobin ff& " use the default fileformat for writing :w :qa! ENDTEST  :so! Xdotest :so small.vim :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 11 lines filtered "Xtestfile.gz" [New File][Incomplete last line] 1 line, 111 characters written 10 more lines; before #1 0 seconds ago Press ENTER or type command to continue:au FileReadPost *.gz '[,']!gzip -d :au BufNewFile *.c read Xtest.c :/^start of test.c/+1,/^end of test.c/-1w! Xtest.c :e! foo.c" Will load Xtest.c :au FileAppendPre *.out '[,']s/new/NEW/AppendPost *.out !cat Xtest.c >>test.outw>>test.out" Append it to the output file :au! FileAppendPre" setup autocommands to decompress before reading and re-compress afterwards :au BufReadPre *.gz !gzip -d BufReadPre call rename(expand(":r"), expand("")) :au BufReadPost *.gz call rename(expand(""), expand(":r")) :au BufReadPost *.gz !gzip :re! Xtestfile.gz " Edit compressed file :w>>test.out " Append it to the output file :set shelltempneed temp files hereterReacall rename(expand(""), expand("").".t")terReadPre sed s/e/E/ .t > :au FilterReadPre *.out !rm .t FilterReadPost *.out '[,']s/x/X/g :e! test.out " Edit the output file23,$!cat23,$s/\r$// " remove CR for when sed adds them! FileReadPre!gzip -d  FileReadPrecall rename(expand(":r"), expand("")) :au! FileReadPost *.gz '[,']s/l/L/$r Xtestfile.gz" Read compressed filew " write it, after filtering :au! " remove all autocommandse " Edit test.out againset nobin ff& " use the default fileformat for writing :wqa!ENDTESTstartstartstart of testfileline 2 Abcdefghijklmnopqrstuvwxyzline 3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxline 4 Abcdefghijklmnopqrstuvwxyzline 5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxline 6 Abcdefghijklmnopqrstuvwxyzline 7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxline 8 Abcdefghijklmnopqrstuvwxyz line 9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 10 Abcdefghijklmnopqrstuvwxyz end of testfile :$r Xtestfile.gz " Read and decompress the testfile "Xtestfile.gz" [Incomplete last line] 1 line, 111 characters start of test.c /* * Here is a new .c file */ end of test.c start of testfile :?startstart?,$w! test.out " Write contents of this file "test.out" [New File] 29 lines, 788 characters written:au BufNewFile *.c read Xtest.c :/^start of test.c/+1,/^end of test.c/-1w! Xtest.c search hit BOTTOM, continuing at TOP"Xtest.c" [New File] 3 lines, 32 characters written:e! foo.c " Will load Xtest.c "foo.c" [New File] "Xtest.c" 3 lines, 32 characters Press ENTER or type command to continue:au FileAppendPre *.out '[,']s/new/NEW/ /* * Here is a new .c file */~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ ~~~~~~~:au FileAppendPost *.out !cat Xtest.c >>test.out :w>>test.out " Append it to the output file "test.out" 4 lines, 33 characters appended :!cat Xtest.c >>test.out  Press ENTER or type command to continue:au! FileAppendPre /* * Here is a NEW .c file */ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:" setup autocommands to decompress before reading and re-compress afterwards :au BufReadPre *.gz !gzip -d :au BufReadPre *.gz call rename(expand(":r"), expand("")) :au BufReadPost *.gz call rename(expand(""), expand(":r")) :au BufReadPost *.gz !gzip :r :e! Xtestfile.gz " Edit compressed file :!gzip -d Xtestfile.gz "Xtestfile.gz""Xtestfile.gz" 11 lines, 357 characters:!gzip Xtestfile  Press ENTER or type command to continue:w>>test.out " Append it to the output file "test.out" 11 lines, 357 characters appended :!cat Xtest.c >>test.out  Press ENTER or type command to continue:set shelltemp " need temp files here 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:au FilterReadPre *.out call rename(expand(""), expand("").".t") :au FilterReadPre *.out !sed s/e/E/ .t > :au FilterReadPre *.out !rm .t :au FilterReadPost *.out '[,']s/x/X/g :e! test.out " Edit the output file "test.out" 50 lines, 1242 charactersstarstart of testfile2 Abcdefghijklmnopqrstuvwxyz3 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4 Abcdefghijklmnopqrstuvwxyz5 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6 Abcdefghijklmnopqrstuvwxyz7 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8 Abcdefghijklmnopqrstuvwxyz9 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 10 Abcdefghijklmnopqrstuvwxyz end of testfilestart 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:23,$!cat :!sed s/e/E/ /tmp/v466049/1.t >/tmp/v466049/1 :!rm /tmp/v466049/1.t 218 substitutions on 15 lines 28 lines filtered Press ENTER or type command to continue:23,$s/\r$// " remove CR for when sed adds them E486: Pattern not found: \r$ Press ENTER or type command to continue:au! FileReadPre *.gz !gzip -d 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 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:au FileReadPre *.gz call rename(expand(":r"), expand("")) :au! FileReadPost *.gz '[,']s/l/L/ :$r Xtestfile.gz " Read compressed file :!gzip -d Xtestfile.gz "Xtestfile.gz""Xtestfile.gz" 11 lines, 357 characters11 substitutions on 11 lines Press ENTER or type command to continue:w " write it, after filtering "test.out"61 lines, 1599 characters written Press ENTER or type command to continue:au! " remove all autocommands E216: No such group or event: " remove all autocommands Press ENTER or type command to continue:e " Edit test.out again "test.out"61 lines, 1599 charactersstartstart 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 "test.out" 61 lines, 1599 characters:set nobin ff& " use the default fileformat for writing :w "test.out" 61 lines, 1599 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test12.failed test.ok test.out X* viminfo cp test12.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test12.in Vim: Warning: Output is not to a terminal [?1h="test12.in" 52 lines, 1199 charactersTests 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!:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 40 lines, 965 characters written:set ff& cpo+=A /ENDTEST ENDTEST  :so! Xdotest :so small.vim :set nocompatible viminfo+=nviminfo :set dir=.,~ :/start of testfile/,/end of testfile/w! Xtest1 "Xtest1" [New] 4L, 70C written:" do an ls of the current dir to find the swap file (should not be there) :if has("unix") : : !ls .X*.swp >test.out :!ls .X*.swp >test.out[?1l> ls: .X*.swp: No such file or directory shell returned 2 [?1h=: :else : : r !ls X*.swp >test.out : :endif - "./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 :!echo first line >>test.out [?1l> [?1h= Press ENTER or type command to continue:e Xtest1 "Xtest1" 4L, 70Cstart of testfile line 2 Abcdefghij line 3 Abcdefghij end of testfile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "Xtest1" 4L, 70C: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 "test.out" 1L, 11C appended : : undo 1 line less; before #1 0 seconds ago : :else : : !ls X*.swp >>test.out : :endif start of testfile line 2 Abcdefghij line 3 Abcdefghij end of testfile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:!echo under Xtest1.swp >>test.out [?1l> [?1h= Press ENTER or type command to continue:!mkdir Xtest2 [?1l> [?1h= Press ENTER or type command to continue:set dir=./Xtest2,.,~ start of testfile line 2 Abcdefghij line 3 Abcdefghij end of testfile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:e Xtest1 "Xtest1" 4L, 70C:!ls X*.swp >>test.out [?1l> ls: X*.swp: No such file or directory shell returned 2 [?1h= Press ENTER or type command to continue:!echo under under >>test.out [?1l> [?1h= Press ENTER or type command to continue:!ls Xtest2 >>test.out [?1l> [?1h= Press ENTER or type command to continue:!echo under Xtest1.swp >>test.out [?1l> [?1h= Press ENTER or type command to continue:!mkdir Xtest.je [?1l> [?1h= Press ENTER or type command to continue:/start of testfile/,/end of testfile/w! Xtest2/Xtest3 search hit BOTTOM, continuing at TOP"Xtest2/Xtest3" [New] 4L, 70C written Press ENTER or type command to continue:set dir=Xtest.je,~ start of testfile line 2 Abcdefghij line 3 Abcdefghij end of testfile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:e Xtest2/Xtest3 "Xtest2/Xtest3" 4L, 70C:swap Xtest.je/Xtest3.swp:!ls Xtest2 >>test.out [?1l> [?1h= Press ENTER or type command to continue:!echo under Xtest3 >>test.out [?1l> [?1h= Press ENTER or type command to continue:!ls Xtest.je >>test.out [?1l> [?1h= Press ENTER or type command to continue:!echo under Xtest3.swp >>test.out [?1l> [?1h= Press ENTER or type command to continue:qa! [?1l>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 [?1h="test13.in" 58 lines, 1133 charactersTests 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^[ :w :sp Xtestje2 otestje2^[ :w :sp Xtestje3 otestje3^[ :w ^W^W :au WinLeave Xtestje2 bwipe ^W^W :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:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 38 lines, 631 characters written:set ff& cpo+=A /ENDTEST:bwipe Xtestje2 Xtestje3 test.out test13.in :au BufWipeout Xtestje1 buf Xtestje1 :bwipe :w >>test.out :qa! ENDTEST  :so! Xdotest :so small.vim :/^start of testfile/,/^end of testfile/w! Xtestje1 "Xtestje1" [New File] 5 lines, 64 characters written:/^start of testfile/,/^end of testfile/w! Xtestje2 "Xtestje2" [New File] 5 lines, 64 characters written:/^start of testfile/,/^end of testfile/w! Xtestje3 "Xtestje3" [New File] 5 lines, 64 characters written:e Xtestje1 "Xtestje1" 5 lines, 64 charactersstart of testfilecontents contents contentsend of testfile~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~testje1:w "Xtestje1" 6 lines, 72 characters written:sp Xtestje2 "Xtestje2" 5 lines, 64 characters contents end of testfile~Xtestje2 start of testfile testje1 contents contents contents end of testfileXtestje1 testje2[+]:w "Xtestje2" 6 lines, 72 characters written :sp Xtestje3 "Xtestje3" 5 lines, 64 charactersstart of testfilecontentscontentscontents end of testfile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtestje3 start of testfile testje2contentscontentscontents end of testfile ~ ~ ~ ~ ~ ~ ~ ~ Xtestje2 start of testfile testje1contentscontentscontents end of testfile ~ ~ ~ ~ ~ ~ ~ ~ Xtestje1 testje3[+]:w "Xtestje3" 6 lines, 72 characters written Xtestje3 Xtestje2 :au WinLeave Xtestje2 bwipe start of testfile testje3contentscontentscontents end of testfile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtestje3 start of testfile testje1contentscontentscontents end of testfile ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtestje1 :w! test.out "test.out" [New File] 6 lines, 72 characters written:au WinLeave Xtestje1 bwipe Xtestje3 :close 1~~~~~~~~:w >>test.out "test.out" 6 lines, 72 characters appended:e Xtestje1 "Xtestje1" 6 lines, 72 characters:bwipe Xtestje2 Xtestje3 test.out E94: No matching buffer for Xtestje2 Xtestje3 test.out:au! :au! BufUnload Xtestje1 bwipe :e Xtestje3 "Xtestje3" 6 lines, 72 characters3:w >>test.out "test.out" 6 lines, 72 characters appended:e Xtestje2 "Xtestje2" 6 lines, 72 characters2:sp Xtestje1 "Xtestje1" 6 lines, 72 characters1Xtestje1 start of testfile testje2 contents contents contents end of testfileXtestje2 :e E143: Autocommands unexpectedly deleted new buffer Xtestje12~~~~~~~~:w >>test.out "test.out" 6 lines, 72 characters appended:au! :only Already only one window:e Xtestje1 "Xtestje1" 6 lines, 72 characters1:bwipe Xtestje2 Xtestje3 test.out test13.in 4 buffers wiped out:au BufWipeout Xtestje1 buf Xtestje1 :bwipe "Xtestje1" 6 lines, 72 characters:w >>test.out "test.out" 6 lines, 72 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test14.failed test.ok test.out X* viminfo cp test14.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test14.in Vim: Warning: Output is not to a terminal [?1h="test14.in" 65 lines, 1012 charactersTests for "vaBiB", end could be wrong. Also test ":s/pat/sub/" with different ~s in sub. Also test for ^Vxff and ^Vo123 in Insert mode. Also test "[m", "]m", "[M" and "]M" 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\193\xc2\o303 \90a\xfg\o578\" :else : let tt = "o\65\x42\o103 \33a\xfg\o78\" :endif :exe "normal " . tt :.w >>test.out :set vb /^Piece 2]maA^[:.w >>test.out j]maB^[:.w >>test.out ]maC^[:.w >>test.out [maD^[:.w >>test.out k2[maE^[:.w >>test.out 3[maF^[:.w >>test.out ]MaG^[:.w >>test.out j2]MaH^[:.w >>test.out ]M]MaI^[:.w >>test.out 2[MaJ^[:.w >>test.out k[MaK^[:.w >>test.out 3[MaL^[:.w >>test.out :qa! ENDTEST - Bug in "vPPPP" on this text (Webb):{cmd;{cmd; /* <-- Start cursor here */{}}:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 30 lines, 613 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim /Start cursor here { cmd; /* <-- Start cursor here */ { }  cmd; } 6 fewer lines }Piece of Java{ tt m1 { t1;:?Bug?,/Piece/-2w! test.out "test.out" [New File] 3 lines, 44 characters written/^- Bug search hit BOTTOM, continuing at TOP:s/u/~u~/ :s/i/~u~/ uuun "vPPPP" on this text (Webb): :s/o/~~~/ uuuuuuuuun this text (Webb): :.w >>test.out "test.out" 1 line, 48 characters appended:if has("ebcdic") : : let tt = "o\193\xc2\o303 \90a\xfg\o578\" : :else : : let tt = "o\65\x42\o103 \33a\xfg\o78\" : :endif Tests 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":exe "normal " . tt ABC !a^Og^G8:.w >>test.out "test.out" 1 line, 11 characters appended:set vb /^Piece {A:.w >>test.out "test.out" 1 line, 10 characters appended t1;} e1tt m2 {{B :.w >>test.out "test.out" 1 line, 10 characters appendedt2;} e2tt m3 {{C :.w >>test.out "test.out" 1 line, 10 characters appended{DC:.w >>test.out "test.out" 1 line, 11 characters appended{EA:.w >>test.out "test.out" 1 line, 11 characters appended{F:.w >>test.out "test.out" 1 line, 3 characters appended}G e1:.w >>test.out "test.out" 1 line, 7 characters appended if (x){t3;}} e3}H e3 :.w >>test.out "test.out" 1 line, 7 characters appended }}I :.w >>test.out "test.out" 1 line, 3 characters appended}JH e3:.w >>test.out "test.out" 1 line, 8 characters appended}K e2:.w >>test.out "test.out" 1 line, 7 characters appended{LF:.w >>test.out "test.out" 1 line, 4 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test15.failed test.ok test.out X* viminfo cp test15.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test15.in Vim: Warning: Output is not to a terminal [?1h="test15.in" 136 lines, 2246 charactersTests for :right on text with embedded TAB. Also test formatting a paragraph. Also test undo after ":%s" and formatting. STARTTEST :so small.vim :set tw=65 :/^\s*test for :left/,/^\s*test for :center/ left :/^\s*test for :center/,/^\s*test for :right/ center :/^\s*test for :right/,/^xxx/-1 right :set fo+=tcroql tw=72 /xxxxxxxx$ 0gq6kk :set nocp viminfo+=nviminfo :" undo/redo here to make the next undo only work on the following changes u^R :map gg :.,.+2s/^/x/kk:set tw=3gqq /^aa ggu :?test for :left?,$w! test.out :qa! ENDTESTtest for :leftaafaadfaasdfaaasdfaaxasdfaa asxxdfaatest for :centeraafaafd asdfdfaasdfaafd asdfasdfaaxasdfaasdfasdfasdfasdfasdf asxxdfaatest for :rightaafaadfaa:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 401 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :set tw=65 :/^\s*test for :left/,/^\s*test for :center/ left search hit BOTTOM, continuing at TOPtest for :lefta afa adfa asdfaaasdfa axasdfaatest for :cente:/^\s*test for :center/,/^\s*test for :right/ center  test for :center  aa fa afd asdf  dfaa sdfa afd asdf  asdfaaxasdfa  asxxdfaa test for :right:/^\s*test for :right/,/^xxx/-1 right  test for :right  aa  faa  dfaa:set fo+=tcroql tw=72 /xxxxxxxx$ dfaaxxxoisdfaaxxxoiasdfaaxxxoixasdfaaxxxoiasxxdfaaxxxoiasxa;ofaaxxxoiasdfaqweraxxxoiaaxxxoikfaaxxxoikdfaaxxxoiksdfaaxxxoikasdfaaxxxoikxasdfaaxxxoikasxxdfaaxxxoikasxa;ofaaxxxoikasdfaqweraxxxoikaaxxxoikefaaxxxoikedfaaxxxoikesdfaaxxxoikeasdfaaxxxoikexasdfaaxxxoikeasxxdfaaxxxoikeasxa;ofaaxxxoikeasdfaqweraxxxoikeaaxxxoikeyfaaxxxoikeydfaaxxxoikeysdfaaxxxoikeyasdfaaxxxoikeyxasdfaaxxxoikeyasxxdfaaxxxoikeyasxa;ofaaxxxoikeyasdfaqweraxxxoikey xxxxx xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx xxxxxxxxxxxxxxxxxx xxxxx xxxx, xxxx xxxx xxxx xxxx xxx xx xx xx xxxxxxx. xxxx xxxx. > xx xx, xxxx xxxx xxx xxxx xxx xxxxx xxx xxx xxxxxxx xxx xxxxx > xxxxxx xxxxxxx: xxxx xxxxxxx, xx xxxxxx xxxx xxxxxxxxxx aa aa aa aa bb bb bb bb cc cc cc cc   xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xxxx xxxxxxx. xxxx xxxx.xxxxxxx: xxxx xxxxxxx, xx xxxx xxxxxxx~ :set nocp viminfo+=nviminfo :" undo/redo here to make the next undo only work on the following changes 1 more line; before #1 0 seconds agoAlso test undo after ":%s" and formatting. STARTTEST :so small.vim :set tw=65 :/^\s*test for :left/,/^\s*test for :center/ left :/^\s*test for :center/,/^\s*test for :right/ center :/^\s*test for :right/,/^xxx/-1 right :set fo+=tcroql tw=72 /xxxxxxxx$ 0gq6kk :set nocp viminfo+=nviminfo :" undo/redo here to make the next undo only work on the following changes u^R :map gg :.,.+2s/^/x/kk:set tw=3gqq /^aa ggu :?test for :left?,$w! test.out :qa! ENDTESTtest for :leftaafaadfaasdfaaasdfaaxasdfaa asxxdfaatest for :centeraafaafd asdfdfaasdfaafd asdfasdfaaxasdfaasdfasdfasdfasdfasdf asxxdfaatest for :rightaafaadfaasdfaaasdfaa1 line less; after #1 0 seconds agotest for :lefta afa adfa asdfaaasdfa axasdfaa test for :center  aa fa afd asdf  dfaa sdfa afd asdf  asdfaaxasdfa  asxxdfaa test for :right  aa  faa  dfaa  sdfaa  asdfaa :map gg :.,.+2s/^/x/kk:set tw=3gqq /^aa faaxxxoidfaaxxxoisdfaaxxxoiasdfaaxxxoixasdfaaxxxoiasxxdfaaxxxoiasxa;ofaaxxxoiasdfaqweraxxxoiaaxxxoikfaaxxxoikdfaaxxxoiksdfaaxxxoikasdfaaxxxoikxasdfaaxxxoikasxxdfaaxxxoikasxa;ofaaxxxoikasdfaqweraxxxoikaaxxxoikefaaxxxoikedfaaxxxoikesdfaaxxxoikeasdfaaxxxoikexasdfaaxxxoikeasxxdfaaxxxoikeasxa;ofaaxxxoikeasdfaqweraxxxoikeaaxxxoikeyfaaxxxoikeydfaaxxxoikeysdfaaxxxoikeyasdfaaxxxoikeyxasdfaaxxxoikeyasxxdfaaxxxoikeyasxa;ofaaxxxoikeyasdfaqweraxxxoikey xxxxx xx xxxxxx xxxxxxx xxxxxxxxx xxx xxxx xxxxx xxxxx xxx xx xxxxxxxxxxxxxxxxxx xxxxx xxxx, xxxx xxxx xxxx xxxx xxx xx xx xx xxxxxxx. xxxx xxxx. > xx xx, xxxx xxxx xxx xxxx xxx xxxxx xxx xxx xxxxxxx xxx xxxxx xxxxxx > xxxxxxx: xxxx xxxxxxx, xx xxxxxx xxxx xxxxxxxxxx aa aa aa aa bb bb bb bb cc cc cc cc :.,.+2s/^/x/ 3 substitutions on 3 linesxaa aa aa aa xbb bb bb bb xcc cc cc cc :set tw=3  3 more lines aaaaaa3 more lines 3 fewer lines; before #2 0 seconds agoaa aa aa aa bb bb bb bb cc cc cc cc~ :?test for :left?,$w! test.out "test.out"[New] 111L, 2304C written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test17.failed test.ok test.out X* viminfo cp test17.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test17.in Vim: Warning: Output is not to a terminal [?1h="test17.in" 27 lines, 368 charactersTests 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${CDIR}/test17a.in$TDIR/test17a.in ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 20 lines, 285 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :if has("ebcdic") : : set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,} : :else : : set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,} : :endif Tests for "gf" on ${VAR} STARTTEST :so small.vim:if has("unix") : :let $CDIR = "." : /CDIR : :else : :if has("amiga") : :let $TDIR = "/testdir" : :else : :let $TDIR = "." : :endif : /TDIR : :endif Tests for "gf" on ${VAR} STARTTEST :so small.vim :if has("ebcdic") : set isfname=@,240-249,/,.,-,_,+,,,$,:,~,{,} :else : set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,} :endif :if has("unix")"/sources/vim70/src/testdir/./test17a.in" 3 lines, 88 charactershis file is just to test "gf" in test 17. The contents is not importent. Just testing!~~~~~~~~~~~~~~~~~~~~~ ~~~ :w! test.out "test.out" [New File] 3 lines, 88 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test18.failed test.ok test.out X* viminfo cp test18.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test18.in Vim: Warning: Output is not to a terminal [?1h="test18.in" 16 lines, 213 charactersTests for not doing smart indenting when it isn't set. STARTTEST :so small.vim :set nocin nosi ai /some 2cc#test^[ :?start?,$w! test.out :qa! ENDTEST start textsome test texttest text test texttest text ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 6 lines, 76 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :set nocin nosi ai /some  #test~:?start?,$w! test.out "test.out" [New File] 4 lines, 41 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test19.failed test.ok test.out X* viminfo cp test19.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test19.in Vim: Warning: Output is not to a terminal [?1h="test19.in" 23 lines, 374 charactersTests for "r" with 'smarttab' and 'expandtab' set/not set. STARTTEST :set smarttab expandtab ts=8 sw=4 /some r:set noexpandtab /other r :" Test replacing with Tabs and then backspacing to undo it 0wR^H^H^H^[ :" Test replacing with Tabs 0wR^[ :?^start?,$w! test.out :qa! ENDTEST start textsome test text test textother test text a cde f ghi test text ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 11 lines, 204 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :set smarttab expandtab ts=8 sw=4 /some  ome test text:set noexpandtab /other  ther test text:" Test replacing with Tabs and then backspacing to undo it   :" Test replacing with Tabs  hi:?^start?,$w! test.out "test.out" [New File] 7 lines, 91 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test20.failed test.ok test.out X* viminfo cp test20.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test20.in Vim: Warning: Output is not to a terminal [?1h="test20.in" 22 lines, 361 charactersTests Blockwise Visual when there are TABs before the text. First test for undo working properly when executing commands from a register. Also test this in an empty buffer. STARTTEST :so tiny.vim G0"ay$k@au :new @auY:quit! GP /start here$ ^Vjjlld :/here$/,$-1w! test.out :qa! ENDTEST test text test tex start heresome texttest text test text Ox^[jAy^[kdd ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 9 lines, 92 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so tiny.vim x y ~2 changes; before #1 0 seconds ago :new ~~ ~~~~~~~~~~~~ ~~~~~ ~~ [No Name] Tests 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$ ^Vjjlld :/here$/,$-1w! test.out :qa! ENDTESTtest text test tex start here some text test text test textOx^[jAy^[kdd test20.in x[+] y ~1 line less; before #1 0 seconds ago :quit! Tests 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$ ^Vjjlld :/here$/,$-1w! test.out :qa! ENDTESTtest text test tex start here some text test text test textOx^[jAy^[kdd~~~~ ~~~~~~~~~~~~ ~~~~~ ~~~ /start here$ search hit BOTTOM, continuing at TOPset tat rt hereextex:/here$/,$-1w! test.out search hit BOTTOM, continuing at TOP "test.out" [New File] 6 lines, 57 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test21.failed test.ok test.out X* viminfo cp test21.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test21.in Vim: Warning: Output is not to a terminal [?1h="test21.in" 19 lines, 297 charactersTests 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^W :.w >>test.out :qa! ENDTEST #include test21.in /* test text test tex start heresome texttest textstart OK if found this linestart found wrong line test text ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 6 lines, 73 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim /start :.w! test.out "test.out" [New File] 1 line, 30 characters written?start here test21.in Tests for [ CTRL-I with a count and CTRL-W CTRL-I with a countSTARTTEST :so small.vim /start 6[ :.w! test.out ?start here 6^W :.w >>test.out :qa! ENDTEST#include test21.in/* test text test tex start here some text test text start OK if found this line start found wrong line test texttest21.in :.w >>test.out "test.out" 1 line, 30 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test22.failed test.ok test.out X* viminfo cp test22.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test22.in Vim: Warning: Output is not to a terminal [?1h="test22.in" 13 lines, 197 charactersTests for file with some lines ending in CTRL-M, some not^M ^M STARTTEST :set ta tx :e! :$-3,$w! test.out :qa! ENDTEST this lines ends in a^M this one doesn't this one does^M and the last one doesn't ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 4 lines, 38 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :set ta tx :e! "test22.in" 13 lines, 197 characters:$-3,$w! test.out "test.out" [New File] 4 lines, 79 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test23.failed test.ok test.out X* viminfo cp test23.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test23.in Vim: Warning: Output is not to a terminal [?1h="test23.in" 15 lines, 282 charactersTests for complicated + argument to :edit command STARTTEST :$-1w! Xfile1 :$w! Xfile2 :edit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w :w! test.out :e Xfile1 :w >> test.out :qa! ENDTEST The result should be in Xfile1: "fooPIPEbar", in Xfile2: "fooSLASHbar" foo|bar foo/bar ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 7 lines, 125 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :$-1w! Xfile1 "Xfile1" [New File] 1 line, 8 characters written:$w! Xfile2 "Xfile2" [New File] 1 line, 8 characters written:edit +1|s/|/PIPE/|w Xfile1| e Xfile2|1 | s/\//SLASH/|w "Xfile1" 1 line, 8 characters foo|bar "Xfile1" 1 line, 11 characters written "Xfile2" 1 line, 8 characters foo/bar "Xfile2" 1 line, 12 characters written Press ENTER or type command to continue:w! test.out "test.out" [New File] 1 line, 12 characters written Press ENTER or type command to continue:e Xfile1 "Xfile1" 1 line, 11 charactersfooPIPEbar ~ ~ ~ ~ ~ ~~~~~ ~~~~"Xfile1" 1 line, 11 characters:w >> test.out "test.out" 1 line, 11 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test24.failed test.ok test.out X* viminfo cp test24.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test24.in Vim: Warning: Output is not to a terminal [?1h="test24.in" 79 lines, 1240 charactersTests for regexp with backslash and other special characters inside [] Also test backslash for hex/octal numbered character. STARTTEST :set nocompatible viminfo+=nviminfo /[\x] x/[\t\]] x/[]y] x/[\]] x/[y^] x/[$y] x/[\x61] x/[\x60-\x64] xj0/[\x785] x/[\o143] x/[\o140-\o144] x/[\o417] x/\%x42 x/\%o103 x/[\x00] x :s/[\x00-\x10]//g :s/[\x-z]\+// :s/[\u-z]\{2,}// :s/\(a\)\+// :s/\(a*\)\+// :s/\(a*\)*// :s/\(a\)\{2,3}/A/ :s/\(a\)\{-2,3}/A/ :s/\(a\)*\(12\)\@>/A/ :s/\(foo\)\@\|\.\)\=\)\+=/XX/ :s/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 44 lines, 480 characters written:set ff& cpo+=A /ENDTEST:?start?,$w! test.out :qa! ENDTEST  :so! Xdotest :set nocompatible viminfo+=nviminfo /[\x] start test \text test texttext test text /[\t\]]  test text test texttext test tex /[]y]  test text ]test texttest text /[\]]  test ]text test texttext test text /[y^]  test text te^st textst text /[$y]  test te$xt test textxt test text /[\x61]  test taext test text x61ext test text x61 /[\x60-\x64]  test tbext test text x60-x64ext test text x60-x64 test 5text test text x78 5 /[\x785] text test text x78 5/[\o143]  testc text test text o143 text test text o143 /[\o140-\o144]  tesdt text test text o140-o144t text test text o140-o14 /[\o417]  test7 text test text o41 7 text test text o41 7 /\%x42  test text tBest text \%x42est text \%x42 /\%o103  test text teCst text \%o103st text \%o103 /[\x00]  test text ^@test text [\x00]test text [\x00] test te^@xt t^Dest t^Pext [\x00-\x10] :s/[\x00-\x10]//g 3 substitutions on 1 linext test text [\x00-\x10] test \xyztext test text [\x-z] :s/[\x-z]\+// text test text [\x-z] test text tev\uyst text [\u-z] :s/[\u-z]\{2,}// st text [\u-z] xx aaaaa xx a :s/\(a\)\+//  xx  xx aaaaa xx a :s/\(a*\)\+//  xx aaaaa xx a :s/\(a*\)*//  xx aaaaa xx :s/\(a\)\{2,3}/A/ Aaa xx xx aaaaa xx :s/\(a\)\{-2,3}/A/ Aaaa x xx aaa12aa xx :s/\(a\)*\(12\)\@>/A/ Aaa xx xx foobar xbar xx :s/\(foo\)\@\|\.\)\=\)\+=/XX/ XX  hh= 77; :s/^\(\h\w*\%(->\|\.\)\=\)\+=/YY/ YY 77;:?start?,$w! test.out "test.out" [New] 29L, 571C written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test25.failed test.ok test.out X* viminfo cp test25.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test25.in Vim: Warning: Output is not to a terminal [?1h="test25.in" 31 lines, 840 charactersTest 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^] 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 17 lines, 540 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :set hidden :" Create a link from test25.dir to the current directory. :!rm -f test25.dir [?1l> [?1h= Press ENTER or type command to continue:!ln -s . test25.dir [?1l> [?1h= Press ENTER or type command to continue:" Create tags.text, with the current directory name inserted. Test 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^] 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~/tags line :r !pwd Test 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^] x:.w! test.out :!rm -f test25.dir tags.test :qa! ENDTEST tags line: /sources/vim70/src/testdir SECTION_OFF /test25.dir/test25.in /^#define SECTION_OFF 3$/ /*tx.c*/ #define SECTION_OFF 3 #define NUM_SECTIONS 3 SECTION_OFF ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~/test /sources/vim70/src/testdir/test25.dir/test25.in /^#define SECTION_OFF 3$/:.w! tags.test "tags.test" [New File] 1 line, 88 characters written:" 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 #efine SECTION_OFF 3:.w! test.out "test.out" [New File] 1 line, 23 characters written:!rm -f test25.dir tags.test [?1l> [No write since last change] [?1h= Press ENTER or type command to continue:qa! [?1l>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 [?1h="test26.in" 43 lines, 739 charactersTest for :execute, :while and :if STARTTEST :so small.vim mt:let i = 0 :while i < 12 : let i = i + 1 : if has("ebcdic") : execute "normal o" . i . "\047" : else : execute "normal o" . i . "\033" : endif : if i % 2 : normal Ax^V^[ : if i == 9 : break : endif : if i == 5 : continue : else : let j = 9 : while j > 0 :if has("ebcdic") :execute "normal" j . "a" . j . "\x27" :else :execute "normal" j . "a" . j . "\x1b" :endif :let j = j - 1 : endwhile : endif : endif : if i == 9 : if has("ebcdic") : execute "normal Az\047" : else : execute "normal Az\033" : endif : endif :endwhile :'t,$w! test.out :qa! ENDTEST ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 38 lines, 685 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :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^^[  : : if i == 9 : : break : : endif : : if i == 5 : : continue : : else : : let j = 9 : : while j > 0 :: if has("ebcdic") :: execute "normal" j . "a" . j . "\x27" :: else :: execute "normal" j . "a" . j . "\x1b" :: endif :: let j = j - 1 :: endwhile : : endif : : endif : : if i == 9 : : if has("ebcdic") : : execute "normal Az\047" : : else : : execute "normal Az\033" : : endif : : endif : :endwhile : let i = i + 1 : if has("ebcdic") : execute "normal o" . i . "\047" : else : execute "normal o" . i . "\033" : endif : if i % 2 : normal Ax^V^[ : if i == 9 : break : endif : if i == 5 : continue : else : let j = 9 : while j > 0 :if has("ebcdic") :execute "normal" j . "a" . j . "\x27" :else :execute "normal" j . "a" . j . "\x1b" :endif :let j = j - 1 : endwhile : endif : endif : if i == 9 : if has("ebcdic") : execute "normal Az\047" : else : execute "normal Az\033" : endif : endif :endwhile :'t,$w! test.outqa!ENDTEST1x999999999888888887777777666666555554444333221 23x999999999888888887777777666666555554444333221 45x6 7x999999999888888887777777666666555554444333221 8 9x :'t,$w! test.out "test.out" [New File] 10 lines, 159 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test27.failed test.ok test.out X* viminfo cp test27.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test27.in Vim: Warning: Output is not to a terminal [?1h="test27.in" 20 lines, 270 charactersTest 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^R%^[:.w! test.out :n! Xdir?/*/nofile Go^R%^[:.w >>test.out :e! xx :!rm -rf Xdir1 Xdir2 Xdir3 :qa! ENDTEST ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 15 lines, 220 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :!mkdir Xdir1 [?1l> [?1h= Press ENTER or type command to continue:!mkdir Xdir2 [?1l> [?1h= Press ENTER or type command to continue:!mkdir Xdir3 [?1l> [?1h= Press ENTER or type command to continue:cd Xdir3 /sources/vim70/src/testdir/Xdir3 Press ENTER or type command to continue:!mkdir Xdir4 [?1l> [?1h= Press ENTER or type command to continue:cd .. /sources/vim70/src/testdir Press ENTER or type command to continue:w Xdir1/file "Xdir1/file" [New File] 20 lines, 270 characters written Press ENTER or type command to continue:w Xdir3/Xdir4/file "Xdir3/Xdir4/file" [New File] 20 lines, 270 characters written Press ENTER or type command to continue:n Xdir?/*/file "Xdir3/Xdir4/file" 20 lines, 270 charactersTest 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^R%^[:.w! test.out :n! Xdir?/*/nofile Go^R%^[:.w >>test.out :e! xx :!rm -rf Xdir1 Xdir2 Xdir3 :qa! ENDTEST ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "Xdir3/Xdir4/file" 20 lines, 270 characters Xdir3/Xdir4/file:.w! test.out "test.out" [New File] 1 line, 17 characters written:n! Xdir?/*/nofile "Xdir?/*/nofile" [New DIRECTORY]~~~~~~~~~~~~~~~~~~ ~~ Xdir?/*/nofile:.w >>test.out "test.out" 1 line, 15 characters appended:e! xx "xx" [New File]~:!rm -rf Xdir1 Xdir2 Xdir3 [?1l> [?1h= Press ENTER or type command to continue:qa! [?1l>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 [?1h="test28.in" 23 lines, 364 charactersTest for sourcing a file with CTRL-V's at the end of the line STARTTEST :/firstline/+1,/lastline/-1w! Xtestfile :so Xtestfile Gmm__1^[^[__2^[__3^[^[__4^[__5^[:'m,$s/^@/0/g :'m,$w! test.out :qa! ENDTEST firstline map __1 afirst map __2 asecond map __3 athird map __4 afourth map __5 afifth map __1 asd^V map __2 asd^V^V map __3 asd^V^V map __4 asd^V^V^V map __5 asd^V^V^V lastline ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 114 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :/firstline/+1,/lastline/-1w! Xtestfile "Xtestfile" [New File] 10 lines, 148 characters written:so Xtestfile sd map __2 asd^[secondd sd^[^[ sd^@map __5 asd^@fifth:'m,$s/^@/0/g 0map __5 asd0fifth:'m,$w! test.out "test.out" [New File] 2 lines, 45 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test29.failed test.ok test.out X* viminfo cp test29.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test29.in Vim: Warning: Output is not to a terminal [?1h="test29.in" 67 lines, 663 charactersTest for joining lines with 'joinspaces' set or not STARTTEST :set nojoinspaces /firstline/ jJjJjJjJjJjJjJjJjJjJjJjJjJjJ:set joinspaces jJjJjJjJjJjJjJjJjJjJjJjJjJjJ:?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 asdfasdf. asdf asdfasdf. asdf asdfasdf. asdf asdfasdf.:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 135 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :set nojoinspaces /firstline/   asdf. asdfasdf asdf. asdfasdfasdf. asdf. asdfasdf asdf.asdfasdfasdf. asdf.asdfasdf asdf.asdfasdfasdf. asdf.asdfasdf asdf asdfasdfasdf asdf asdfasdf asdf asdfasdfasdf asdfasdfasdf asdfasdfasdfasdf asdfasdfasdf asdfasdfasdfasdf:set joinspaces  asdf. asdfasdf asdf. asdfasdfasdf asdf. asdfasdf asdf.asdfasdfasdf asdf.asdfasdf asdf.asdfasdfasdf asdf.asdfasdf asdf asdf~ asdf asdf~ asdf asdf~ asdfasdf~ asdfasdf~ asdfasdf~ asdf~:?firstline?+1,$w! test.out "test.out" [New File] 28 lines, 424 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test30.failed test.ok test.out X* viminfo cp test30.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test30.in Vim: Warning: Output is not to a terminal [?1h="test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' option 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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 183 lines, 2957 characters written:set ff& cpo+=A /ENDTESTGo2^[:$r XXtt21 :$r XXtt22 :$r XXtt23 Go3^[:$r XXtt31 :$r XXtt32 :$r XXtt33 Go4^[:$r XXtt41 :$r XXtt42 :$r XXtt43 Go5^[:$r XXtt51 :$r XXtt52 :$r XXtt53 Go6^[:$r XXtt61 :$r XXtt62 :$r XXtt63 Go7^[:$r XXtt71 Go8^[:$r XXtt81 Go9^[:$r XXtt91 :$r XXtt92 :$r XXtt93 Go10^[:$r XXUnix :set nobinary ff& :w :qa! ENDTEST 1 2 3 4 5 6 7 8 9 10 unix unix eof dos^M dos^M eof mac^Mmac^M :so! Xdotest :so small.vim :" first write three test files, one in each format :set fileformat=unix :set fileformats= :/^1/w! XX1 "XX1" [New File] 1 line, 2 characters written:/^2/w! XX2 "XX2" [New File] 1 line, 2 characters written:/^3/w! XX3 "XX3" [New File] 1 line, 2 characters written:/^4/w! XX4 "XX4" [New File] 1 line, 2 characters written:/^5/w! XX5 "XX5" [New File] 1 line, 2 characters written:/^6/w! XX6 "XX6" [New File] 1 line, 2 characters written:/^7/w! XX7 "XX7" [New File] 1 line, 2 characters written:/^8/w! XX8 "XX8" [New File] 1 line, 2 characters written:/^9/w! XX9 "XX9" [New File] 1 line, 2 characters written:/^10/w! XX10 "XX10" [New File] 1 line, 3 characters written:/^unix/;/eof/-1w! XXUnix "XXUnix" [New File] 2 lines, 10 characters written:/^dos/;/eof/-1w! XXDos "XXDos" [New File] 2 lines, 10 characters written:set bin noeol :$w! XXMac "XXMac" [New File][Incomplete last line] 1 line, 8 characters written:set nobin eol :bwipe XXUnix XXDos XXMac 3 buffers wiped out:" create mixed format files :!cat XXUnix XXDos >XXUxDs [?1l> [?1h= Press ENTER or type command to continue:!cat XXUnix XXMac >XXUxMac [?1l> [?1h= Press ENTER or type command to continue:!cat XXDos XXMac >XXDosMac [?1l> [?1h= Press ENTER or type command to continue:!cat XXUnix XXDos XXMac >XXUxDsMc [?1l> [?1h= Press ENTER or type command to continue:" Go2^[:$r XXtt21 :$r XXtt22 :$r XXtt23 Go3^[:$r XXtt31 :$r XXtt32 :$r XXtt33 Go4^[:$r XXtt41 :$r XXtt42 :$r XXtt43 Go5^[:$r XXtt51 :$r XXtt52 :$r XXtt53 Go6^[:$r XXtt61 :$r XXtt62 :$r XXtt63 Go7^[:$r XXtt71 Go8^[:$r XXtt81 Go9^[:$r XXtt91 :$r XXtt92 :$r XXtt93 Go10^[:$r XXUnix :set nobinary ff& :w :qa! ENDTEST 1 2 3 4 5 6 7 8 9 10 unix unix eof dos^M dos^M eof mac^Mmac^M:" try reading and writing with 'fileformats' empty :set fileformat=unix :e! XXUnix "XXUnix" 2 lines, 10 charactersunixunix~~~~~~~~~~~~~~~~~~~~~~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~~~~ ~~~~ ~~:w! test.out "test.out" [New File] 2 lines, 10 characters written:e! XXDos "XXDos" 2 lines, 10 charactersdos^M dos^M:w! XXtt01 "XXtt01" [New File] 2 lines, 10 characters written:e! XXMac "XXMac" [Incomplete last line] 1 line, 8 charactersmacmac^M~:w! XXtt02 "XXtt02" [New File] 1 line, 9 characters written:bwipe XXUnix XXDos XXMac "test30.in" 208 lines, 3095 characters 3 buffers wiped out Press ENTER or type command to continue:set fileformat=dos Go2^[:$r XXtt21 :$r XXtt22 :$r XXtt23 Go3^[:$r XXtt31 :$r XXtt32 :$r XXtt33 Go4^[:$r XXtt41 :$r XXtt42 :$r XXtt43 Go5^[:$r XXtt51 :$r XXtt52 :$r XXtt53 Go6^[:$r XXtt61 :$r XXtt62 :$r XXtt63 Go7^[:$r XXtt71 Go8^[:$r XXtt81 Go9^[:$r XXtt91 :$r XXtt92 :$r XXtt93 Go10^[:$r XXUnix :set nobinary ff& :w :qa! ENDTEST1 2 3 4 5 6 7 8 9 10unix unix eofdos^M dos^M eofmac^Mmac^M:e! XXUnix "XXUnix" [CR missing][dos format] 2 lines, 10 charactersunixunix~~~~~~~~~~~~~~~~~~~~~~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~~~~ ~~~~ ~~:w! XXtt11 "XXtt11" [New File][dos format] 2 lines, 12 characters written:e! XXDos "XXDos" [dos format] 2 lines, 10 charactersdosdos:w! XXtt12 "XXtt12" [New File][dos format] 2 lines, 10 characters written:e! XXMac "XXMac" [Incomplete last line][dos format] 1 line, 8 charactersmac^Mmac^M~:w! XXtt13 "XXtt13" [New File][dos format] 1 line, 10 characters written:bwipe XXUnix XXDos XXMac "test30.in" [CR missing][dos format] 208 lines, 3095 characters 3 buffers wiped out Press ENTER or type command to continue:set fileformat=mac Go2^[:$r XXtt21 :$r XXtt22 :$r XXtt23 Go3^[:$r XXtt31 :$r XXtt32 :$r XXtt33 Go4^[:$r XXtt41 :$r XXtt42 :$r XXtt43 Go5^[:$r XXtt51 :$r XXtt52 :$r XXtt53 Go6^[:$r XXtt61 :$r XXtt62 :$r XXtt63 Go7^[:$r XXtt71 Go8^[:$r XXtt81 Go9^[:$r XXtt91 :$r XXtt92 :$r XXtt93 Go10^[:$r XXUnix :set nobinary ff& :w :qa! ENDTEST1 2 3 4 5 6 7 8 9 10unix unix eofdos dos eofmac^Jmac:e! XXUnix "XXUnix" [Incomplete last line][mac format] 1 line, 10 charactersunix^Junix^J~~~~~~~~~~~~~~~~~~~~~~~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~~~~ ~~~~ ~~:w! XXtt21 "XXtt21" [New File][mac format] 1 line, 11 characters written:e! XXDos "XXDos" [Incomplete last line][mac format] 3 lines, 10 charactersdos^Jdos ^J:w! XXtt22 "XXtt22" [New File][mac format] 3 lines, 11 characters written:e! XXMac "XXMac" [mac format] 2 lines, 8 charactersmac mac~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:w! XXtt23 "XXtt23" [New File][mac format] 2 lines, 8 characters written:bwipe XXUnix XXDos XXMac "test30.in" [Incomplete last line][mac format] 5 lines, 3095 characters 3 buffers wiped out Press ENTER or type command to continue:" Test for a lot of variations of the 'fileformats' option^J^JSTARTTEST^J:so small.vim^J:" first write three test files, one in eeach format^J:set fileformat=unix^J:set fileformats=^J:/^1/w! XX1^J:/^2/w! XX2^J:/^3/w! XX3^J:/^4/w! XX4^J:/^5/w! XX5^J:/^6/w! XXX6^J:/^7/w! XX7^J:/^8/w! XX8^J:/^9/w! XX9^J:/^10/w! XX10^J:/^unix/;/eof/-1w! XXUnix^J:/^dos/;/eof/-1w! XXDos^J:set bin noeol^J::$w! XXMac^J:set nobin eol^J:bwipe XXUnix XXDos XXMac^J:" create mixed format files^J:!cat XXUnix XXDos >XXUxDs^J:!cat XXUnix XXXMac >XXUxMac^J:!cat XXDos XXMac >XXDosMac^J:!cat XXUnix XXDos XXMac >XXUxDsMc^J:"^J:" try reading and writing with 'fileformatss' empty^J:set fileformat=unix^J:e! XXUnix^J:w! test.out^J:e! XXDos^J:w! XXtt01^J:e! XXMac^J:w! XXtt02^J:bwipe XXUnix XXDos XXMaac^J:set fileformat=dos^J:e! XXUnix^J:w! XXtt11^J:e! XXDos^J:w! XXtt12^J:e! XXMac^J:w! XXtt13^J:bwipe XXUnix XXDos XXMac^J:set ffileformat=mac^J:e! XXUnix^J:w! XXtt21^J:e! XXDos^J:w! XXtt22^J:e! XXMac^J:w! XXtt23^J:bwipe XXUnix XXDos XXMac^J:"^J:" try readding and writing with 'fileformats' set to one format^J:set fileformats=unix^J:e! XXUxDsMc^J:w! XXtt31^J:bwipe XXUxDsMc^J:set fiileformats=dos^J:e! XXUxDsMc^J:w! XXtt32^J:bwipe XXUxDsMc^J:set fileformats=mac^J:e! XXUxDsMc^J:w! XXtt33^J:bwipe XXUxDsMc^J:"^JJ:" try reading and writing with 'fileformats' set to two formats^J:set fileformats=unix,dos^J:e! XXUxDsMc^J:w! XXtt41^J:bwipe XXXUxDsMc^J:e! XXUxMac^J:w! XXtt42^J:bwipe XXUxMac^J:e! XXDosMac^J:w! XXtt43^J:bwipe XXDosMac^J:set fileformats=unix,mac^J:e! XXUUxDs^J:w! XXtt51^J:bwipe XXUxDs^J:e! XXUxDsMc^J:w! XXtt52^J:bwipe XXUxDsMc^J:e! XXDosMac^J:w! XXtt53^J:bwipe XXDosMac^J:set fileeformats=dos,mac^J:e! XXUxDs^J:w! XXtt61^J:bwipe XXUxDs^J:e! XXUxMac^J:w! XXtt62^J:bwipe XXUxMac^J:e! XXUxDsMc^J:w! XXtt63^J:bwiipe XXUxDsMc^J:"^J:" try reading and writing with 'fileformats' set to three formats^J:set fileformats=unix,dos,mac^J:e! XXUxDsMMc^J:w! XXtt71^J:bwipe XXUxDsMc^J:set fileformats=mac,dos,unix^J:e! XXUxDsMc^J:w! XXtt81^J:bwipe XXUxDsMc^J:" try with 'binary' set^J:set fileformats=mac,unix,dos^J:set binary^J:e! XXUxDsMc^J:w! XXtt91^J:bwipe XXUxDsMc^J:set fileformats=mac^J:e! XXUxDsMc^^J:w! XXtt92^J:bwipe XXUxDsMc^J:set fileformats=dos^J:e! XXUxDsMc^J:w! XXtt93^J:"^J:" Append "END" to each file so that we can ssee what the last written char was.^J:set fileformat=unix nobin^JggdGaEND^[:w >>XXtt01^J:w >>XXtt02^J:w >>XXtt11^J:w >>XXtt12^J::w >>XXtt13^J:w >>XXtt21^J:w >>XXtt22^J:w >>XXtt23^J:w >>XXtt31^J:w >>XXtt32^J:w >>XXtt33^J:w >>XXtt41^J:w >>XXtt42^J:w >>XXtt433^J:w >>XXtt51^J:w >>XXtt52^J:w >>XXtt53^J:w >>XXtt61^J:w >>XXtt62^J:w >>XXtt63^J:w >>XXtt71^J:w >>XXtt81^J:w >>XXtt91^J:w >>XXttt92^J:w >>XXtt93^J:"^J:" Concatenate the results.^J:" Make fileformat of test.out the native fileformat.^J:" Add a newline at tthe end.^J:set binary^J:e! test.out^J:$r XXtt01^J:$r XXtt02^JGo1^[:$r XXtt11^J:$r XXtt12^J:$r XXtt13^JGo2^[:$r XXtt21^J:$r XXtt222^J:$r XXtt23^JGo3^[:$r XXtt31^J:$r XXtt32^J:$r XXtt33^JGo4^[:$r XXtt41^J:$r XXtt42^J:$r XXtt43^JGo5^[:$r XXtt51^J:$r XXtt52^J::$r XXtt53^JGo6^[:$r XXtt61^J:$r XXtt62^J:$r XXtt63^JGo7^[:$r XXtt71^JGo8^[:$r XXtt81^JGo9^[:$r XXtt91^J:$r XXtt92^J:$r XXtt93^JJGo10^[:$r XXUnix^J:set nobinary ff&^J:w^J:qa!^JENDTEST^J^J1^J2^J3^J4^J5^J6^J7^J8^J9^J10^J^Junix^Junix^Jeof^J^Jdos ^Jdos ^Jeof^J^Jmac mac ^J:" try reading and writing with 'fileformats' set to one format :set fileformats=unix :e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunixdos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:w! XXtt31 "XXtt31" [New File] 5 lines, 29 characters written:bwipe XXUxDsMc "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 fileformats=dos :e! XXUxDsMc "XXUxDsMc" [Incomplete last line][CR missing][dos format] 5 lines, 28 charactersunixunix dosdosmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt32 "XXtt32" [New File][dos format] 5 lines, 32 characters written:bwipe XXUxDsMc "test30.in" [CR missing][dos format] 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 fileformats=mac :e! XXUxDsMc "XXUxDsMc" [mac format] 4 lines, 28 charactersunix^Junix^Jdos^Jdos ^Jmacmac~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt33 "XXtt33" [New File][mac format] 4 lines, 28 characters written:bwipe XXUxDsMc "test30.in" [Incomplete last line][mac format] 5 lines, 3095 charactersTest for a lot of variations of the 'fileformats' option^J^JSTARTTEST^J:so small.vim^J:" first write three test files, one in eeach format^J:set fileformat=unix^J:set fileformats=^J:/^1/w! XX1^J:/^2/w! XX2^J:/^3/w! XX3^J:/^4/w! XX4^J:/^5/w! XX5^J:/^6/w! XXX6^J:/^7/w! XX7^J:/^8/w! XX8^J:/^9/w! XX9^J:/^10/w! XX10^J:/^unix/;/eof/-1w! XXUnix^J:/^dos/;/eof/-1w! XXDos^J:set bin noeol^J::$w! XXMac^J:set nobin eol^J:bwipe XXUnix XXDos XXMac^J:" create mixed format files^J:!cat XXUnix XXDos >XXUxDs^J:!cat XXUnix XXXMac >XXUxMac^J:!cat XXDos XXMac >XXDosMac^J:!cat XXUnix XXDos XXMac >XXUxDsMc^J:"^J:" try reading and writing with 'fileformatss' empty^J:set fileformat=unix^J:e! XXUnix^J:w! test.out^J:e! XXDos^J:w! XXtt01^J:e! XXMac^J:w! XXtt02^J:bwipe XXUnix XXDos XXMaac^J:set fileformat=dos^J:e! XXUnix^J:w! XXtt11^J:e! XXDos^J:w! XXtt12^J:e! XXMac^J:w! XXtt13^J:bwipe XXUnix XXDos XXMac^J:set ffileformat=mac^J:e! XXUnix^J:w! XXtt21^J:e! XXDos^J:w! XXtt22^J:e! XXMac^J:w! XXtt23^J:bwipe XXUnix XXDos XXMac^J:"^J:" try readding and writing with 'fileformats' set to one format^J:set fileformats=unix^J:e! XXUxDsMc^J:w! XXtt31^J:bwipe XXUxDsMc^J:set fiileformats=dos^J:e! XXUxDsMc^J:w! XXtt32^J:bwipe XXUxDsMc^J:set fileformats=mac^J:e! XXUxDsMc^J:w! XXtt33^J:bwipe XXUxDsMc^J:"^JJ:" try reading and writing with 'fileformats' set to two formats^J:set fileformats=unix,dos^J:e! XXUxDsMc^J:w! XXtt41^J:bwipe XXXUxDsMc^J:e! XXUxMac^J:w! XXtt42^J:bwipe XXUxMac^J:e! XXDosMac^J:w! XXtt43^J:bwipe XXDosMac^J:set fileformats=unix,mac^J:e! XXUUxDs^J:w! XXtt51^J:bwipe XXUxDs^J:e! XXUxDsMc^J:w! XXtt52^J:bwipe XXUxDsMc^J:e! XXDosMac^J:w! XXtt53^J:bwipe XXDosMac^J:set fileeformats=dos,mac^J:e! XXUxDs^J:w! XXtt61^J:bwipe XXUxDs^J:e! XXUxMac^J:w! XXtt62^J:bwipe XXUxMac^J:e! XXUxDsMc^J:w! XXtt63^J:bwiipe XXUxDsMc^J:"^J:" try reading and writing with 'fileformats' set to three formats^J:set fileformats=unix,dos,mac^J:e! XXUxDsMMc^J:w! XXtt71^J:bwipe XXUxDsMc^J:set fileformats=mac,dos,unix^J:e! XXUxDsMc^J:w! XXtt81^J:bwipe XXUxDsMc^J:" try with 'binary' set^J:set fileformats=mac,unix,dos^J:set binary^J:e! XXUxDsMc^J:w! XXtt91^J:bwipe XXUxDsMc^J:set fileformats=mac^J:e! XXUxDsMc^^J:w! XXtt92^J:bwipe XXUxDsMc^J:set fileformats=dos^J:e! XXUxDsMc^J:w! XXtt93^J:"^J:" Append "END" to each file so that we can ssee what the last written char was.^J:set fileformat=unix nobin^JggdGaEND^[:w >>XXtt01^J:w >>XXtt02^J:w >>XXtt11^J:w >>XXtt12^J::w >>XXtt13^J:w >>XXtt21^J:w >>XXtt22^J:w >>XXtt23^J:w >>XXtt31^J:w >>XXtt32^J:w >>XXtt33^J:w >>XXtt41^J:w >>XXtt42^J:w >>XXtt433^J:w >>XXtt51^J:w >>XXtt52^J:w >>XXtt53^J:w >>XXtt61^J:w >>XXtt62^J:w >>XXtt63^J:w >>XXtt71^J:w >>XXtt81^J:w >>XXtt91^J:w >>XXttt92^J:w >>XXtt93^J:"^J:" Concatenate the results.^J:" Make fileformat of test.out the native fileformat.^J:" Add a newline at tthe end.^J:set binary^J:e! test.out^J:$r XXtt01^J:$r XXtt02^JGo1^[:$r XXtt11^J:$r XXtt12^J:$r XXtt13^JGo2^[:$r XXtt21^J:$r XXtt222^J:$r XXtt23^JGo3^[:$r XXtt31^J:$r XXtt32^J:$r XXtt33^JGo4^[:$r XXtt41^J:$r XXtt42^J:$r XXtt43^JGo5^[:$r XXtt51^J:$r XXtt52^J::$r XXtt53^JGo6^[:$r XXtt61^J:$r XXtt62^J:$r XXtt63^JGo7^[:$r XXtt71^JGo8^[:$r XXtt81^JGo9^[:$r XXtt91^J:$r XXtt92^J:$r XXtt93^JJGo10^[:$r XXUnix^J:set nobinary ff&^J:w^J:qa!^JENDTEST^J^J1^J2^J3^J4^J5^J6^J7^J8^J9^J10^J^Junix^Junix^Jeof^J^Jdos ^Jdos ^Jeof^J^Jmac mac ^J :" :" try reading and writing with 'fileformats' set to two formats :set fileformats=unix,dos :e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunixdos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:w! XXtt41 "XXtt41" [New File] 5 lines, 29 characters written:bwipe XXUxDsMc "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:e! XXUxMac "XXUxMac" [Incomplete last line] 3 lines, 18 charactersunixunix mac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt42 "XXtt42" [New File] 3 lines, 19 characters written:bwipe XXUxMac "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST: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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:e! XXDosMac "XXDosMac" [Incomplete last line][dos format] 3 lines, 18 charactersdodos mac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt43 "XXtt43" [New File][dos format] 3 lines, 20 characters written:bwipe XXDosMac "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST: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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 fileformats=unix,mac :e! XXUxDs "XXUxDs" 4 lines, 20 charactersunixunix dos^Mdos^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt51 "XXtt51" [New File] 4 lines, 20 characters written:bwipe XXUxDs "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunix dos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt52 "XXtt52" [New File] 5 lines, 29 characters written:bwipe XXUxDsMc "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:e! XXDosMac "XXDosMac" [mac format] 4 lines, 18 charactersdo^Jdos ^Jmacmac~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt53 "XXtt53" [New File][mac format] 4 lines, 18 characters written:bwipe XXDosMac "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 fileformats=dos,mac :e! XXUxDs "XXUxDs" [CR missing][dos format] 4 lines, 20 charactersunixunix dosdos~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt61 "XXtt61" [New File][dos format] 4 lines, 22 characters written:bwipe XXUxDs "test30.in" [CR missing][dos format] 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:e! XXUxMac "XXUxMac" [Incomplete last line][CR missing][dos format] 3 lines, 18 charactersunixunix mac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt62 "XXtt62" [New File][dos format] 3 lines, 22 characters written:bwipe XXUxMac "test30.in" [CR missing][dos format] 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST: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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:e! XXUxDsMc "XXUxDsMc" [Incomplete last line][CR missing][dos format] 5 lines, 28 charactersunixunix dosdosmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt63 "XXtt63" [New File][dos format] 5 lines, 32 characters written:bwipe XXUxDsMc "test30.in" [CR missing][dos format] 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:" :" try reading and writing with 'fileformats' set to three formats :set fileformats=unix,dos,mac :e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunix dos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt71 "XXtt71" [New File] 5 lines, 29 characters written:bwipe XXUxDsMc "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 fileformats=mac,dos,unix :e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunix dos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt81 "XXtt81" [New File] 5 lines, 29 characters written:bwipe XXUxDsMc "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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:" try with 'binary' set :set fileformats=mac,unix,dos :set binary :e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunix dos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt91 "XXtt91" [New File][Incomplete last line] 5 lines, 28 characters written:bwipe XXUxDsMc "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 fileformats=mac :e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunix dos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt92 "XXtt92" [New File][Incomplete last line] 5 lines, 28 characters written:bwipe XXUxDsMc "test30.in" 208 lines, 3095 charactersTest for a lot of variations of the 'fileformats' optionSTARTTEST :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 :!cat XXUnix XXDos >XXUxDs :!cat XXUnix XXMac >XXUxMac :!cat XXDos XXMac >XXDosMac :!cat XXUnix XXDos XXMac >XXUxDsMc :" :" 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 fileformats=dos :e! XXUxDsMc "XXUxDsMc" [Incomplete last line] 5 lines, 28 charactersunixunix dos^Mdos^Mmac^Mmac^M~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:w! XXtt93 "XXtt93" [New File][Incomplete last line] 5 lines, 28 characters written:" :" Append "END" to each file so that we can see what the last written char was. :set fileformat=unix nobin ~~~~--No lines in buffer--END:w >>XXtt01 "XXtt01" 1 line, 4 characters appended:w >>XXtt02 "XXtt02" 1 line, 4 characters appended:w >>XXtt11 "XXtt11" 1 line, 4 characters appended:w >>XXtt12 "XXtt12" 1 line, 4 characters appended:w >>XXtt13 "XXtt13" 1 line, 4 characters appended:w >>XXtt21 "XXtt21" 1 line, 4 characters appended:w >>XXtt22 "XXtt22" 1 line, 4 characters appended:w >>XXtt23 "XXtt23" 1 line, 4 characters appended:w >>XXtt31 "XXtt31" 1 line, 4 characters appended:w >>XXtt32 "XXtt32" 1 line, 4 characters appended:w >>XXtt33 "XXtt33" 1 line, 4 characters appended:w >>XXtt41 "XXtt41" 1 line, 4 characters appended:w >>XXtt42 "XXtt42" 1 line, 4 characters appended:w >>XXtt43 "XXtt43" 1 line, 4 characters appended:w >>XXtt51 "XXtt51" 1 line, 4 characters appended:w >>XXtt52 "XXtt52" 1 line, 4 characters appended:w >>XXtt53 "XXtt53" 1 line, 4 characters appended:w >>XXtt61 "XXtt61" 1 line, 4 characters appended:w >>XXtt62 "XXtt62" 1 line, 4 characters appended:w >>XXtt63 "XXtt63" 1 line, 4 characters appended:w >>XXtt71 "XXtt71" 1 line, 4 characters appended:w >>XXtt81 "XXtt81" 1 line, 4 characters appended:w >>XXtt91 "XXtt91" 1 line, 4 characters appended:w >>XXtt92 "XXtt92" 1 line, 4 characters appended:w >>XXtt93 "XXtt93" 1 line, 4 characters appended:" :" Concatenate the results. :" Make fileformat of test.out the native fileformat. :" Add a newline at the end. :set binary :e! test.out "test.out" 2 lines, 10 charactersunix unix:$r XXtt01 "XXtt01" 3 lines, 14 charactersdos^M dos^M END:$r XXtt02 "XXtt02" 2 lines, 13 charactersmac^Mmac^M END 1:$r XXtt11 "XXtt11" 3 lines, 16 charactersunix^M unix^M END:$r XXtt12 "XXtt12" 3 lines, 14 charactersdos^M dos^M END:$r XXtt13 "XXtt13" 2 lines, 14 charactersmac^Mmac^M^M END 2:$r XXtt21 "XXtt21" 3 lines, 15 charactersunix unix ^MEND:$r XXtt22 "XXtt22" 3 lines, 15 charactersdos^M dos^M ^MEND:$r XXtt23 "XXtt23" 1 line, 12 charactersmac^Mmac^MEND 3:$r XXtt31 "XXtt31" 6 lines, 33 charactersunix unix dos^M dos^M mac^Mmac^M END:$r XXtt32 "XXtt32" 6 lines, 36 charactersunix^M unix^M dos^M dos^M mac^Mmac^M^M END:$r XXtt33 "XXtt33" 5 lines, 32 charactersunix unix dos^M dos^M mac^Mmac^MEND 4:$r XXtt41 "XXtt41" 6 lines, 33 charactersunix unix dos^M:$r XXtt42 "XXtt42" 4 lines, 23 charactersdos^M mac^Mmac^M END unix :$r XXtt43 "XXtt43" 4 lines, 24 charactersunix mac^Mmac^M END dos^Mdos^M mac^Mmac^M^M END  5 :$r XXtt51 "XXtt51" 5 lines, 24 characters unix :$r XXtt52 "XXtt52" 6 lines, 33 charactersunix dos^M dos^M END unix :$r XXtt53 "XXtt53" 3 lines, 22 charactersunix dos^M dos^M mac^Mmac^M END dos^Mdos^M mac^Mmac^MEND  6 :$r XXtt61 "XXtt61" 5 lines, 26 characters unix^M :$r XXtt62 "XXtt62" 4 lines, 26 charactersunix^M dos^M dos^M END unix^M :$r XXtt63 "XXtt63" 6 lines, 36 charactersunix^M mac^Mmac^M^M END unix^Munix^M dos^M dos^M mac^Mmac^M^M END  7 :$r XXtt71 "XXtt71" 6 lines, 33 characters unixunix dos^M dos^M mac^Mmac^M END  8 :$r XXtt81 "XXtt81" 6 lines, 33 characters unixunix dos^M dos^M mac^Mmac^M END  9 :$r XXtt91 "XXtt91" 5 lines, 32 characters unix :$r XXtt92 "XXtt92" 5 lines, 32 charactersunix dos^M dos^M mac^Mmac^MEND unix :$r XXtt93 "XXtt93" 5 lines, 32 charactersunix dos^M dos^M mac^Mmac^MEND unixunix dos^M dos^M mac^Mmac^MEND  10 :$r XXUnix "XXUnix" 2 lines, 10 characters unix :set nobinary ff& :w "test.out" 121 lines, 664 characters written:qa! [?1l>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 [?1h="test31.in" 69 lines, 1423 charactersTest for commands that close windows and/or buffers: :quit :close :hide :only :sall :all :ball :buf :edit STARTTEST :so tiny.vim GA 1^[:$w! Xtest1 $r2:$w! Xtest2 $r3:$w! Xtest3 :n! Xtest1 Xtest2 A 1^[:set hidden :" test for working :n when hidden set; write "testtext 2" :n :w! test.out :" test for failing :rew when hidden not set; write "testtext 2 2" :set nohidden A 2^[:rew :w >>test.out :" test for working :rew when hidden set; write "testtext 1 1" :set hidden :rew :w >>test.out :" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" :set nohidden A 1^[:sp :n Xtest2 Xtest3 :all :1wincmd w :w >>test.out :" test abandoning changed buffer, should be unloaded even when 'hidden' set :" write "testtext 2 2" twice :set hidden A 1^[:q! :w >>test.out :unhide :w >>test.out :" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" :set nohidden A 2^[:hide:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 54 lines, 1288 characters written:set ff& cpo+=A /ENDTEST:w >>test.out :" test ":edit" failing in modified buffer when 'hidden' not set :" write "testtext 3 3" A 3^[:e Xtest1 :w >>test.out :" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" :set hidden :e Xtest1 :w >>test.out :" test ":close" not hiding when 'hidden' not set in modified buffer; :" write "testtext 3 3 3" :sp Xtest3 :set nohidden A 3^[:close :w >>test.out :" test ":close!" does hide when 'hidden' not set in modified buffer; :" write "testtext 1" A 3^[:close! :w >>test.out :qa! ENDTEST  :so! Xdotest :so tiny.vim  testtext1 :$w! Xtest1 "Xtest1" [New File] 1 line, 11 characters written2:$w! Xtest2 "Xtest2" [New File] 1 line, 11 characters written3:$w! Xtest3 "Xtest3" [New File] 1 line, 11 characters written:n! Xtest1 Xtest2 "Xtest1" 1 line, 11 characterstesttext 1~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~1:set hidden :" test for working :n when hidden set; write "testtext 2" :n "Xtest2" 1 line, 11 characters2:w! test.out "test.out" [New File] 1 line, 11 characters written:" test for failing :rew when hidden not set; write "testtext 2 2" :set nohidden 2:rew E37: No write since last change (add ! to override):w >>test.out "test.out" 1 line, 13 characters appended:" test for working :rew when hidden set; write "testtext 1 1" :set hidden :rew "Xtest1" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)1 1 :w >>test.out "test.out" 1 line, 13 characters appended:" test for :all keeping a buffer when it's modified; write "testtext 1 1 1" :set nohidden 1:sp Xtest1 [+] testtext 1 1 1Xtest1 [+] :n Xtest2 Xtest3 "Xtest2" [Modified] line 1 of 1 --100%-- col 1 (file 1 of 2)2 22 :all "Xtest3" 1 line, 11 characterstesttext 1 1 1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest1 [+] testtext 2 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 :1wincmd w Xtest1 [+] Xtest2 [+] :w >>test.out "test.out" 1 line, 15 characters appended:" test abandoning changed buffer, should be unloaded even when 'hidden' set :" write "testtext 2 2" twice :set hidden 1 1:q! testtext 2 2 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest2 [+] testtext 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest3 :w >>test.out "test.out" 1 line, 13 characters appended:unhide :w >>test.out "test.out" 1 line, 13 characters appended:" test ":hide" hides anyway when 'hidden' not set; write "testtext 3" :set nohidden 2:hide 3~~~:w >>test.out "test.out" 1 line, 11 characters appended:" test ":edit" failing in modified buffer when 'hidden' not set :" write "testtext 3 3" 3:e Xtest1 E37: No write since last change (add ! to override):w >>test.out "test.out" 1 line, 13 characters appended:" test ":edit" working in modified buffer when 'hidden' set; write "testtext 1" :set hidden :e Xtest1 "Xtest1" 1 line, 11 characters1:w >>test.out "test.out" 1 line, 11 characters appended:" test ":close" not hiding when 'hidden' not set in modified buffer; :" write "testtext 3 3 3" :sp Xtest3 "Xtest3" [Modified] line 1 of 1 --100%-- col 1 (file 2 of 2)3 3Xtest3 [+] testtext 1Xtest1 :set nohidden 3:close E37: No write since last change (add ! to override):w >>test.out "test.out" 1 line, 15 characters appended:" test ":close!" does hide when 'hidden' not set in modified buffer; :" write "testtext 1" 3 3:close! 1~~~:w >>test.out "test.out" 1 line, 11 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test32.failed test.ok test.out X* viminfo cp test32.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test32.in Vim: Warning: Output is not to a terminal [?1h="test32.in" 57 lines, 1242 charactersTest 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= ^WnO#include "Xtestfile" ru^N^N^X^N^[^A O^P^X^N ^X^P^P^P^P^P ^X^P^P^X^X^N^X^N^N^[ :se cpt=.,w,i kOM^N^X^N^X^N^X^X^X^P ^X^L^X^L^P^P^[ :se cpt=kXtestfile :w Xtest11.one :w Xtest11.two O^N^[IX^[A^X^F^N^[ :se cpt=w OST^N^P^P^P^P^[ :se cpt=u nohid ^WoOEN^N unl^N^X^X^P^[ :se cpt=t,d def=^\\k* tags=Xtestfile notagbsearch O^X^]^X^D^X^D^X^X^D^X^D^X^D^X^D a^N^[:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 24 lines, 384 characters written:set ff& cpo+=A /ENDTEST:wq! test.out ENDTEST  :so! Xdotest :so small.vim :se nocp viminfo+=nviminfo cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& "Xtestfile" [New] 3L, 57C written:se cot= ~~~~~~~~~~~~~~~~~ ~~~~ [No Name] ru^N^N^X^N^[^AO^P^X^N^X^P^P^P^P^PX^X^N^X^N^N^[ :se cpt=.,w,ikOM^N^X^N^X^N^X^X^X^P ^X^L^X^L^P^P^[:se cpt=kXtestfile :w Xtest11.onetwo O^N^[IX^[A^X^F^N^[ :se cpt=wOST^N^P^P^P^P^[ :se cpt=u nohid ^WoOEN^Nunl^N^X^X^P^[ :se cpt=t,d def=^\\k* tags=Xtestfile notagbsearch O^X^]^X^D^X^D^X^X^D^X^D^X^D^X^DaN^[:wq! test.out ENDTESTtest32.in -- INSERT -- -- Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.inmatch in file test32.in -- Keyword completion (^N^P) match 1 of 4match in file test32.in-- Keyword completion (^N^P) match 2 of 4-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Adding Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.inmatch in file test32.in -- Adding Keyword completion (^N^P) Word from other line#include "Xtestfile" run1 run2[+]-- Adding Keyword completion (^N^P) Word from other line-- INSERT --3 -- INSERT -- -- Keyword completion (^N^P) -- Searching... search hit TOP, continuing at BOTTOMScanning: test32.i-- Keyword completion (^N^P) match 1 of 103-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Adding Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.in-- Adding Keyword completion (^N^P) Word from other line-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Keyword Local completion (^N^P) -- Searching... search hit TOP, continuing at BOTTOM-- Keyword Local completion (^N^P) match 1 of 4 match 2 of 4 match 3 of 4 match 4 of 4 Back at original-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Keyword Local completion (^N^P) -- Searching... search hit TOP, continuing at BOTTOM-- Keyword Local completion (^N^P) match 1 of 4 match 2 of 4-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.in-- Keyword completion (^N^P) The only match-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Adding Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.in-- Adding Keyword completion (^N^P) match 1 of 2match in file test32.in-- Adding Keyword completion (^N^P) Word from other linerun3 run3 run1 run2-- Adding Keyword completion (^N^P) Word from other line-- INSERT -- :se cpt=.,w,i -- INSERT --Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.in included file: Xtestfile match in file test32.in-- Keyword completion (^N^P) The only match-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Adding Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.in included file: Xtestfile match in file test32.in-- Adding Keyword completion (^N^P) The only match-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Adding Keyword completion (^N^P) -- Searching... search hit BOTTOM, continuing at TOPScanning: test32.in included file: Xtestfile match in file test32.in-- Adding Keyword completion (^N^P) The only match-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Keyword Local completion (^N^P) -- Searching... search hit TOP, continuing at BOTTOM-- Keyword Local completion (^N^P) match 1 of 3-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- Whole line completion (^L^N^P) -- Searching... search hit TOP, continuing at BOTTOMScanning: test32.i-- Whole line completion (^L^N^P) match 1 of 54INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) match 1 of 54Adding Whole line completion (^L^N^P) -- Searching... search hit TOP, continuing at BOTTOMScanning: test32.i-- Adding Whole line completion (^L^N^P) The only match Back at original The only matchMakefileto run3 Makefileto run3 Makefileto run3-- INSERT --:se cpt=kXtestfile :w Xtest11.one "Xtest11.one" [New] 9L, 104C writtenXtest11.one :w Xtest11.two "Xtest11.two" [New] 9L, 104C written-- INSERT --Keyword completion (^N^P) -- Searching... Scanning dictionary: Xtestfilematch in file Xtestfile-- Keyword completion (^N^P) match 1 of 9test11[+]I -- Keyword completion (^N^P) match 1 of 9-- INSERT ---- INSERT --Xtest11 -- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- File name completion (^F^N^P) -- Searching...match 1 of 2 match 2 of 2.two-- INSERT --:se cpt=w -- INSERT -- -- Keyword completion (^N^P) -- Searching... Scanning: test32.inmatch in file test32.in -- Keyword completion (^N^P) The only match Back at originalmatch in file test32.in-- Keyword completion (^N^P) The only match Back at originalmatch in file test32.in-- Keyword completion (^N^P) The only matchSTARTTEST-- Keyword completion (^N^P) The only match-- INSERT --:se cpt=u nohid ~~~~~~~~~~~~~~~~~~~~~~ ~~-- INSERT --Keyword completion (^N^P) -- Searching... Scanning: test32.inmatch in file test32.in -- Keyword completion (^N^P) The only match-- INSERT -- -- Keyword completion (^N^P) -- Searching... Scanning: test32.inmatch in file test32.in -- Keyword completion (^N^P) match 1 of 3-- INSERT -- -- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- INSERT --Keyword completion (^N^P) -- Searching... Scanning: test32.inmatch in file test32.in -- Keyword completion (^N^P) The only matchENDTEST unless-- Keyword completion (^N^P) The only match-- INSERT --:se cpt=t,d def=^\\k* tags=Xtestfile notagbsearch -- INSERT --^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- Tag completion (^]^N^P) -- Searching...match 1 of 3INSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) match 1 of 3Definition completion (^D^N^P) -- Searching...Scanning included file: Xtestfilematch in file Xtestfile-- Definition completion (^D^N^P) The only matchINSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match -- Adding Definition completion (^D^N^P) -- Searching... Scanning included file: Xtestfilematch in file Xtestfile-- Adding Definition completion (^D^N^P) The only matchINSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match -- INSERT --^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) -- Definition completion (^D^N^P) -- Searching... Scanning included file: Xtestfilematch in file Xtestfile-- Definition completion (^D^N^P) The only matchINSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match -- Adding Definition completion (^D^N^P) -- Searching... Scanning included file: Xtestfilematch in file Xtestfile-- Adding Definition completion (^D^N^P) The only matchINSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match -- Adding Definition completion (^D^N^P) -- Searching... Scanning included file: Xtestfilematch in file Xtestfile-- Adding Definition completion (^D^N^P) The only matchINSERT ---- ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y) The only match -- Adding Definition completion (^D^N^P) -- Searching... Scanning included file: Xtestfilematch in file Xtestfile-- Adding Definition completion (^D^N^P) Word from other lineINSERT ---- Keyword completion (^N^P) -- Searching... Scanning tags.included file: Xtestfile -- Keyword completion (^N^P) The only matchtest11file 36Gepeto/Tag/ asd asd-- Keyword completion (^N^P) The only match-- INSERT -- ru:wq! test.out "test.out" [New] 15L, 175C written [?1l> rm -rf X* test.ok viminfo rm -rf test33.failed test.ok test.out X* viminfo cp test33.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test33.in Vim: Warning: Output is not to a terminal [?1h="test33.in" 34 lines, 616 charactersTest for 'lisp' If the lisp feature is not enabled, this will fail! STARTTEST :so small.vim :set lisp /^(defun =G:/^(defun/,$w! test.out :q! ENDTEST (defun html-file (base) (format nil "~(~A~).html" base)) (defmacro page (name title &rest body) (let ((ti (gensym))) `(with-open-file (*standard-output* (html-file ,name) :direction :output :if-exists :supersede) (let ((,ti ,title)) (as title ,ti) (with center (as h2 (string-upcase ,ti))) (brs 3) ,@body)))) ;;; Utilities for generating links (defmacro with-link (dest &rest body) `(progn (format t "" (html-file ,dest)) ,@body (princ ""))) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 5 lines, 63 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :set lisp /^(defun 22 lines to indent... 23indented  (format nil "~(~A~).html" base)) (let ((ti (gensym))) `(with-open-file (*standard-output* (html-file ,name) :direction :output :if-exists :supersede) (let ((,ti ,title)) (as title ,ti) (with center (as h2 (string-upcase ,ti))) (brs 3) ,@body)))) `(progn (format t "" (html-file ,dest)) ,@body (princ ""))):/^(defun/,$w! test.out search hit BOTTOM, continuing at TOP "test.out" [New File] 23 lines, 544 characters written:q! [?1l>rm -rf X* test.ok viminfo rm -rf test34.failed test.ok test.out X* viminfo cp test34.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test34.in Vim: Warning: Output is not to a terminal [?1h="test34.in" 58 lines, 1014 charactersTest for user functions. Also test an 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 :let counter = 0 :inoremap ( ListItem() :inoremap [ ListReset() :imap + Expr1() :imap * Expr2() :let retval = "nop" /^here C^R=Table("xxx", 4, "asdf") ^R=Compute(45, 0, "retval"):set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 51 lines, 916 characters written:set ff& cpo+=A /ENDTEST^R=retval ^R=Compute(45, 5, "retval") ^R=retval XX+-XX ---*--- (one (two [(one again^[:$-5,$wq! test.out ENDTEST  :so! Xdotest :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 : 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 :function Compute(n1, n2, divname) : : if a:n2 == 0 : : return "fail" : : endif : : exe "let g:" . a:divname . " = ". a:n1 / a:n2 : : return "ok" : :endfunction : endwhile : return ret :endfunction :function Compute(n1, n2, divname) : if a:n2 == 0 : return "fail" :func Expr1() : : normal! v : : return "111" : :endfunc : endwhile : return ret :endfunction :func Expr2() : : call search('XX', 'b') : : return "222" : :endfunc : endwhile : return ret :endfunction :func ListItem() : : let g:counter += 1 : : return g:counter . '. ' : :endfunc : endwhile : return ret :endfunction :func ListReset() : : let g:counter = 0 : : return '' : :endfunc : endwhile : return ret :endfunction :let counter = 0 :inoremap ( ListItem() :inoremap [ ListReset() :imap + Expr1() :imap * Expr2() :let retval = "nop" /^here  hereher$ =Table("xxx", 4, "asdf") =Compute(45, 0, "retval") =retval =Compute(45, 5, "retval") =retval Error detected while processing function Expr1: line 1: E523: Not allowed here Press ENTER or type command to continue: endif : exe "let g:" . a:divname . " = ". a:n1 / a:n2 : return "ok" :endfunction :func Expr1()normal! v : return "111endfuncfunc Expr2() : call search('XX', 'b') : return "222" :endfuncfunc ListItem() : let g:counter += 1 : return g:counter . '. ' :endfuncfunc ListReset() : let g:counter = 0 : return ''endfunclet counter = 0 :inoremap ( ListItem() :inoremap [ ListReset() :imap + Expr1() :imap * Expr2()retval = "nop" /^heC^R=Table("xxx", 4, "asdf") ^R=Compute(45, 0, "retval") ^R=retval ^R=Compute(45, 5, "retval") ^R=retvalXX+-XX---*---(one(two[(one again^[:$-5,$wq! test.out ENDTESTxxx4asdf fail nop ok 9 XX111XX ---222---1. one2. two1. one again :$-5,$wq! test.out "test.out" [New File] 6 lines, 68 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test35.failed test.ok test.out X* viminfo cp test35.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test35.in Vim: Warning: Output is not to a terminal [?1h="test35.in" 21 lines, 448 charactersTest Ctrl-A and Ctrl-X, which increment and decrement decimal, hexadecimal, and octal numbers. STARTTEST /^start-here :set nrformats=octal,hex j^A102^X^Al^Xl^A64^A128^X$^X :set nrformats=octal 0^A102^X^Al^X2^Aw65^A129^Xblx6lD :set nrformats=hex 0101^Xl257^X^ATxldt ^A ^X ^X :set nrformats= 0200^Xl100^Xw78^X^Ak :$-3,$wq! test.out ENDTEST start-here 100 0x100 077 0 100 0x100 077 100 0x100 077 0xfF 0xFf 100 0x100 077 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 10 lines, 200 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest /^start-here :set nrformats=octal,hex  101 -1 0x100 077 00 0x100 077 000fff 0100 020000 -1:set nrformats=octal  101 -1 0x100 077 -0 0x100 077 0 -1x100 0771x100 077 02003777777777707 777777:set nrformats=hex  -1 0x100 077 0xfF 0xFf1ffffffff 077 0xfF 0xFf000000000 077 0xfF 0xFf88FEEfe:set nrformats=  -100 0x100 077 -100 -100x100 077-001000 :$-3,$wq! test.out "test.out" [New File] 4 lines, 120 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test36.failed test.ok test.out X* viminfo cp test36.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test36.in Vim: Warning: Output is not to a terminal [?1h="test36.in" 40 lines, 1596 charactersTest 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^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé^L^M !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 18 lines, 204 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest /^start-here :s/\d//g 10 substitutions on 1 line:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé:s/\D//g 72 substitutions on 1 line0123456789:s/\o//g 8 substitutions on 1 line89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé:s/\O//g 74 substitutions on 1 line01234567:s/\x//g 22 substitutions on 1 line:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé:s/\X//g 60 substitutions on 1 line0123456789ABCDEFabcdef:s/\w//g 36 substitutions on 1 line:;<=>?@[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé:s/\W//g 46 substitutions on 1 line0123456789ABCDEFGHIXYZ_abcdefghiwxyz:s/\h//g 26 substitutions on 1 line[\]^`{|}~^?~@~B~P~[¦±¼ÇÓé:s/\H//g 56 substitutions on 1 lineABCDEFGHIXYZ_abcdefghiwxyz:s/\a//g 25 substitutions on 1 line[\]^_`{|}~^?~@~B~P~[¦±¼ÇÓé:s/\A//g 57 substitutions on 1 lineABCDEFGHIXYZabcdefghiwxyz:s/\l//g 13 substitutions on 1 line{|}~^?~@~B~P~[¦±¼ÇÓé:s/\L//g 69 substitutions on 1 lineabcdefghiwxyz:s/\u//g 12 substitutions on 1 line[\]^_`abcdefghiwxyz{|}~^?~@~B~P~[¦±¼ÇÓé:s/\U//g 70 substitutions on 1 lineABCDEFGHIXYZ:/^start-here/+1,$wq! test.out search hit BOTTOM, continuing at TOP "test.out" [New File] 16 lines, 672 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test37.failed test.ok test.out X* viminfo cp test37.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test37.in Vim: Warning: Output is not to a terminal [?1h="test37.in" 116 lines, 3262 charactersTest for 'scrollbind'. Do not add a line below! STARTTEST :so small.vim :set noscrollbind :set scrollopt=ver,jump :set scrolloff=2 :set nowrap :set noequalalways :set splitbelow :" TEST using two windows open to one buffer, one extra empty window :split :new ^Wt: :resize 8 /^start of window 1$/ zt: :set scrollbind ^Wj: :resize 7 /^start of window 2$/ zt: :set scrollbind :" -- start of tests -- :" TEST scrolling down L5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3: :" TEST scrolling up ^WtH4k^WjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3k^WtH^WjHyy^Wbpr6^WtHyy^Wbpr7: :" TEST horizontal scrolling :set scrollopt+=hor gg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG: :set scrollopt-=hor :" ****** tests using two different buffers ***** ^Wt^Wj: :close ^Wt: :set noscrollbind :/^start of window 2$/,/^end of window 2$/y :new ^Wt^Wj4"zpGp: ^Wt/^start of window 1$/ zt: :set scrollbind ^Wj: /^start of window 2$/ zt::set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 72 lines, 1498 characters written:set ff& cpo+=A /ENDTEST:" TEST horizontal scrolling :set scrollopt+=hor gg"zyyG"zpG^Wt015zly$^Wbp"zpG^Wky$^Wbp"zpG: ^Wk10jH7zhg0y$^Wbp"zpG^WtHg0y$^Wbp"zpG: :set scrollopt-=hor :" TEST syncbind ^Wt:set noscb ggL^Wj:set noscb ggL:set scb ^Wt:set scb G^WjG:syncbind Hk^WtH^WjHyy^Wbp^Wtyy^Wbp: ^Wt:set noscb ggL^Wj:set noscb ggL:set scb ^Wt:set scb ^WtG^WjG^Wt:syncbind Hk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: ^WtH3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out" Write contents of this file :qa! ENDTEST start of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03 . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08 . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09 . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15 end of window 1 start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 :so! Xdotest :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 ^Wt:set noscbggL^Wj:set noscbL:set scbt:set scb^WtG^WjG^Wt:syncbind Hk^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp:H3k^WjH^WtHyy^Wbp^Wt^Wjyy^Wbp: :" ***** done with tests ***** :w! test.out" Write contents of this file :qa!ENDTESTstart of window 1 . 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 test37.in :qa! ENDTESTstart of window 1112233445566770808090900112233 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15 end of window 1test37.in :new test37.in ~~~~~~~~~ ~ [No Name]test37.in [No Name] ::resize 8 :" ***** done with tests ***** :w! test.out " Write contents of this file :qa!ENDTESTstart of window 1. line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 test37.in . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09. line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 141515 end of window 1start of window 2/^start of window 1$/  . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02. line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03 . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05::set scrollbind test37.in test37.in ::resize 7 w! test.out" Write contents of this file :qa!ENDTESTstart of window 111 test37.in ~~~~~~~~~~~~ ~ ~~~ ~/^start of window 2$/ end of window 1start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 023 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04::set scrollbind :" -- start of tests -- :" TEST scrolling down  . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08 . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09 . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10. line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07 . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08 . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09test37.in [No Name]  . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05[+]0test37.in [No Name] [+] test37.in [No Name] [+]  . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 1test37.in [No Name] [+]  . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15 end of window 1. line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10 . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13 . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15test37.in [No Name] [+]  . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 2test37.in [No Name] [+] test37.in [No Name] [+]  . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 3::" TEST scrolling up test37.in [No Name] [+] . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04 . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08440505060607070808090900test37.in test37.in test37.in test37.in test37.in [No Name] [+]  . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 4test37.in [No Name] [+] test37.in [No Name] [+]  . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 5test37.in [No Name] [+] start of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 . line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 test37.in test37.in test37.in test37.in test37.in [No Name] [+]  . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 6test37.in [No Name] [+] test37.in [No Name] [+]  . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 7::" TEST horizontal scrolling :set scrollopt+=hor test37.in [No Name] [+]  156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0256789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0356789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0556789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0656789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 2UTSRQPONMLKJIHGREDCBA9876543210 01UTSRQPONMLKJIHGREDCBA9876543210 02UTSRQPONMLKJIHGREDCBA9876543210 03UTSRQPONMLKJIHGREDCBA9876543210 04UTSRQPONMLKJIHGREDCBA9876543210 05UTSRQPONMLKJIHGREDCBA9876543210 06test37.in [No Name] [+] 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02test37.in [No Name] [+] test37.in [No Name] [+] UTSRQPONMLKJIHGREDCBA9876543210 02:test37.in [No Name] [+] 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09101112131415UTSRQPONMLKJIHGREDCBA9876543210 09101112131415. 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 15test37.in [No Name] [+] . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11test37.in [No Name] [+]  test37.in [No Name] [+] . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11::set scrollopt-=hor :" ****** tests using two different buffers ***** test37.in [No Name] [+] test37.in test37.in ::close start of window 20000000000::set noscrollbind :/^start of window 2$/,/^end of window 2$/y 18 lines yanked:new test37.in ~~~~~~~ [No Name]test37.in [No Name] test37.in [No Name] 4 more lines[+] 18 more linesstart of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02:test37.in [No Name] [+] /^start of window 1$/ search hit BOTTOM, continuing at TOPENDTESTstart of window 1010102020303 . line 04 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 04::set scrollbind test37.in [No Name] [+] :/^start of window 2$/ search hit BOTTOM, continuing at TOP. line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 . line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04 . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05::set scrollbind :" -- start of tests -- :" TEST scrolling down  . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 . line 07 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 07 . line 08 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 08 . line 09 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09. line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07 . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08 . line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09 . line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10[No Name] [+] [No Name] [+]  . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 0test37.in [No Name] [+] test37.in [No Name] [+]  . line 05 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 05 1test37.in [No Name] [+]  . line 10 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 10 . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 . line 12 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 12 . line 13 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 13 . line 14 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 . line 15 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 15. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13 . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16test37.in [No Name] [+]  . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11 2[No Name] [+] [No Name] [+] [No Name] [+] [No Name] [+]  . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 3::" TEST scrolling up test37.in [No Name] [+] 440505060607070808090900. line 04 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 04 . line 05 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 05 . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 . line 07 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 07 . line 08 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 08test37.in [No Name] [+] test37.in [No Name] [+] test37.in [No Name] [+]  . line 06 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 4[No Name] [+] [No Name] [+] [No Name] [+] [No Name] [+]  . line 06 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 06 5[No Name] [+] [No Name] [+] start of window 1 . line 01 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 01 . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 . line 03 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 03start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 . line 03 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 03 test37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+]  . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02 6test37.in [No Name] [+] test37.in [No Name] [+]  . line 02 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02 7::" TEST horizontal scrolling :set scrollopt+=hor test37.in [No Name] [+]  156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0156789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0256789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0356789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 0556789ABCDEFGHIJKLMNOPQRSTUVWXYZ 06 2UTSRQPONMLKJIHGREDCBA9876543210 01UTSRQPONMLKJIHGREDCBA9876543210 02UTSRQPONMLKJIHGREDCBA9876543210 03UTSRQPONMLKJIHGREDCBA9876543210 04UTSRQPONMLKJIHGREDCBA9876543210 05UTSRQPONMLKJIHGREDCBA9876543210 06UTSRQPONMLKJIHGREDCBA9876543210 07test37.in [No Name] [+] 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 02[No Name] [+] [No Name] [+] [No Name] [+] [No Name] [+] UTSRQPONMLKJIHGREDCBA9876543210 02:[No Name] [+] [No Name] [+] 56789ABCDEFGHIJKLMNOPQRSTUVWXYZ 09101112131415 UTSRQPONMLKJIHGREDCBA9876543210 0910111213141516. 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[No Name] [+] [No Name] [+] . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11test37.in [No Name] [+]  test37.in [No Name] [+] . line 11 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ 11::set scrollopt-=hor :" TEST syncbind test37.in [No Name] [+] :set noscb Test for 'scrollbind'. Do not add a line below! STARTTEST:so small.vim:set noscrollbind:set scrollopt=ver,jump:set scrolloff=2:set nowrap test37.in [No Name] [+] :set noscb start of window 201010202:set scb test37.in [No Name] [+] :set scb . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 end of window 2end of test37.in (please don't delete this line) end of window 2 ~ ~ ~ ~~~~zt::set scrollbind:" -- start of tests --:" TEST scrolling downL5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3: :" TEST scrolling up ^WtH4k^WjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3k^WtH^WjHyy^Wbpr6^WtHyy^Wbpr7: test37.in . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[No Name] [+] :syncbind /^start of window 2$/. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14test37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+]  . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 test37.in [No Name] [+] test37.in [No Name] [+]  :set scrollbind :test37.in [No Name] [+] :set noscb Test for 'scrollbind'. Do not add a line below! STARTTEST :so small.vimset noscrollbindset scrollopt=ver,jump :set scrolloff=2set nowrap test37.in [No Name] [+] :set noscb start of window 2 . line 01 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 01 . line 02 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 02:set scb test37.in [No Name] [+] :set scb . line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13. line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14 . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16 end of window 2end of test37.in (please don't delete this line) end of window 2 ~ ~ ~ ~~~~zt::set scrollbind:" -- start of tests --:" TEST scrolling downL5jHyy^Wbpr0^WtHyy^Wbpr1^WtL6jHyy^Wbpr2^WkHyy^Wbpr3: :" TEST scrolling up ^WtH4k^WjH^WtHyy^Wbpr4^WkHyy^Wbpr5^Wk3k^WtH^WjHyy^Wbpr6^WtHyy^Wbpr7: test37.in . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16[No Name] [+] test37.in [No Name] [+] :syncbind /^start of window 2$/. line 13 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 13 . line 14 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 14:resize 7test37.in [No Name] [+] test37.in [No Name] [+] test37.in [No Name] [+]  zt: test37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+]  . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15 :test37.in [No Name] [+] /^start of window 1$/ zt: :set scrollbind ^Wj:. line 09 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 09 . line 10 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 10 . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12test37.in [No Name] [+] test37.in [No Name] [+] test37.in [No Name] [+]  :set scrollbind test37.in [No Name] [+] test37.in [No Name] [+] [No Name] [+] [No Name] [+]  . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11 ::" ***** done with tests ***** :w! test.out " Write contents of this file "test.out" [New File] 33 lines, 1329 characters writtentest.out :qa! [?1l>rm -rf X* test.ok viminfo rm -rf test38.failed test.ok test.out X* viminfo cp test38.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test38.in Vim: Warning: Output is not to a terminal [?1h="test38.in" 33 lines, 364 charactersTest Virtual replace mode. STARTTEST :so small.vim ggdGa abcdefghi jk lmn opq rst ^Duvwxyz ^[gg:set ai :set bs=2 gR0^D 1 A BCDEFGHIJKL MNO PQR^[G:ka o0^D abcdefghi jk lmn opq rst ^Duvwxyz ^['ajgR0^D 1 A BCDEFGHIJKL MNO PQR^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^[:$ iab cdefghi jkl^[0gRAB......CDEFGHI.J^[o^[: iabcdefghijklmnopqrst^[0gRAB IJKLMNO QR^[:wq! test.out ENDTEST ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 27 lines, 316 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim ~ ~~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~~ ~--No lines in buffer-- abcdefghi jk lmn opq rst uvwxyz:set ai :set bs=2  1 A BCDEFGHIJ KL MNOPQR:ka abcdefghi jk lmn opq rst uvwxyz 1:$ ab cdefghi jkl AB......CDEFGHI.J:abcdefghijklmnopqrst AB IJKLMNO QR:wq! test.out "test.out" [New File] 13 lines, 107 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test39.failed test.ok test.out X* viminfo cp test39.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test39.in Vim: Warning: Output is not to a terminal [?1h="test39.in" 24 lines, 364 charactersTest Visual block mode commands STARTTEST :so small.vim /^abcde :" Test shift-right of a block jllll^Vjj>wll^Vjlll> :" Test shift-left of a block G$hhhh^Vkk< :" Test block-insert Gkl^VkkkIxyz^[ :" Test block-replace Gllll^Vkkklllrq :" Test block-change G$khhh^Vhhkkcmno^[ :$-4,$wq! test.out ENDTEST abcdefghijklm abcdefghijklm abcdefghijklm abcdefghijklm abcdefghijklm ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 13 lines, 241 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim /^abcde :" Test shift-right of a block  abcde abcde abcd3 lines >ed 1 time efghijklm abcd efghijklm abcd efghijklm efghgihji ghijklm ghijklm:" Test shift-left of a block  i 3 lines rm -rf X* test.ok viminfo rm -rf test40.failed test.ok test.out X* viminfo cp test40.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test40.in Vim: Warning: Output is not to a terminal [?1h="test40.in" 63 lines, 1521 charactersTest for "*Cmd" autocommands STARTTEST :so small.vim :/^start/,$w! Xxx" write lines below to Xxx :au BufReadCmd testA 0r Xxx|$del :e testA" will read text of Xxd instead :au BufWriteCmd testA call append(line("$"), "write") :w" will append a line to the file :r testA" should not read anything :" now we have: :" 1 start of Xxx :" 2test40 :" 3 end of Xxx :" 4 write :au FileReadCmd testB '[r Xxx :2r testB" will read Xxx below line 2 instead :" 1 start of Xxx :" 2test40 :" 3 start of Xxx :" 4test40 :" 5 end of Xxx :" 6 end of Xxx :" 7 write :au FileWriteCmd testC '[,']copy $ 4GA1^[ :4,5w testC" will copy lines 4 and 5 to the end :r testC" should not read anything :" 1 start of Xxx :" 2test40 :" 3 start of Xxx :" 4test401 :" 5 end of Xxx :" 6 end of Xxx :" 7 write :" 8test401 :" 9 end of Xxx :au FILEAppendCmd testD '[,']w! test.out :w >>testD" will write all lines to test.out :$r testD" should not read anything :$w >>test.out" append "end of Xxx" to test.out :au BufReadCmd testE 0r test.out|$del :sp testE" split window with test.out 5Goasdf^[^W^W:" :au BufWriteCmd testE w! test.out :wall" will write other window to test.out:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1440 characters written:set ff& cpo+=A /ENDTEST:" 1 start of Xxx :" 2test40 :" 3 start of Xxx :" 4test401 :" 5 end of Xxx :" 6 asdf :" 7 end of Xxx :" 8 write :" 9test401 :" 10 end of Xxx :" 11 end of Xxx :qa! ENDTEST  :so! Xdotest :so small.vim :/^start/,$w! Xxx^I^I" write lines below to Xxx "Xxx" [New File] 3 lines, 32 characters written:au BufReadCmd testA 0r Xxx|$del :e testA^I^I^I" will read text of Xxd instead "Xxx" 3 lines, 32 charactersstart of Xxx test40end of Xxx~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~:au BufWriteCmd testA call append(line("$"), "write") :w^I^I^I^I" will append a line to the file write:r testA^I^I^I" should not read anything E484: Can't open file testA:^I^I^I^I" now we have: :^I^I^I^I" 1^Istart of Xxx :^I^I^I^I" 2^I^Itest40 :^I^I^I^I" 3^Iend of Xxx :^I^I^I^I" 4^Iwrite :au FileReadCmd testB '[r Xxx :2r testB^I^I^I" will read Xxx below line 2 instead "Xxx" 3 lines, 32 charactersstart of Xxxtest40 end of Xxx:^I^I^I^I" 1^Istart of Xxx :^I^I^I^I" 2^I^Itest40 :^I^I^I^I" 3^Istart of Xxx :^I^I^I^I" 4^I^Itest40 :^I^I^I^I" 5^Iend of Xxx :^I^I^I^I" 6^Iend of Xxx :^I^I^I^I" 7^Iwrite :au FileWriteCmd testC '[,']copy $ test401:4,5w testC^I^I^I" will copy lines 4 and 5 to the end  test401 end of Xxx :r testC^I^I^I" should not read anything E484: Can't open file testC:^I^I^I^I" 1^Istart of Xxx :^I^I^I^I" 2^I^Itest40 :^I^I^I^I" 3^Istart of Xxx :^I^I^I^I" 4^I^Itest401 :^I^I^I^I" 5^Iend of Xxx :^I^I^I^I" 6^Iend of Xxx :^I^I^I^I" 7^Iwrite :^I^I^I^I" 8^I^Itest401 :^I^I^I^I" 9^Iend of Xxx :au FILEAppendCmd testD '[,']w! test.out :w >>testD^I^I^I" will write all lines to test.out "test.out" [New File] 9 lines, 91 characters written:$r testD^I^I^I" should not read anything E484: Can't open file testD:$w >>test.out^I^I^I" append "end of Xxx" to test.out "test.out" 1 line, 11 characters appended:au BufReadCmd testE 0r test.out|$del :sp testE^I^I^I" split window with test.out "test.out" 10 lines, 102 charactersend of XxxtestE start of Xxx test40 start of Xxx test401 end of Xxx end of Xxx write test401 end of XxxtestA asdf[+]testE [+] testA :" :au BufWriteCmd testE w! test.out :wall^I^I^I^I" will write other window to test.out "test.out" 11 lines, 107 characters written :^I^I^I^I" 1^Istart of Xxx :^I^I^I^I" 2^I^Itest40 :^I^I^I^I" 3^Istart of Xxx :^I^I^I^I" 4^I^Itest401 :^I^I^I^I" 5^Iend of Xxx :^I^I^I^I" 6^Iasdf :^I^I^I^I" 7^Iend of Xxx :^I^I^I^I" 8^Iwrite :^I^I^I^I" 9^I^Itest401 :^I^I^I^I" 10^Iend of Xxx :^I^I^I^I" 11^Iend of Xxx :qa! [?1l>rm -rf X* test.ok viminfo rm -rf test41.failed test.ok test.out X* viminfo cp test41.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test41.in Vim: Warning: Output is not to a terminal [?1h="test41.in" 24 lines, 421 charactersTest for writing and reading a file of over 100 Kbyte 1 line: "This is the start" 3001 lines: "This is the leader" 1 line: "This is the middle" 3001 lines: "This is the trailer" 1 line: "This is the end" STARTTEST :%d aThis is the start This is the leader This is the middle This is the trailer This is the end^[kY3000p2GY3000p :w! Xtest :%d :e! Xtest :.w! test.out 3003G:.w >>test.out 6005G:.w >>test.out :qa! ENDTEST ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 13 lines, 196 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :%d ~~~~~~ ~~~~~~~~~~~~~~~~ ~--No lines in buffer--This is the start This is the leader This is the middle This is the trailer This is the end3000 more linestrailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailerleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleaderleader :w! Xtest "Xtest" [New File] 6005 lines, 117092 characters written:%d ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --No lines in buffer--:e! Xtest "Xtest" 6005 lines, 117092 charactersThis is the start 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 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:.w! test.out "test.out" [New File] 1 line, 18 characters writtenThis 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:.w >>test.out "test.out" 1 line, 19 characters appendedThis is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the trailer This is the 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 :.w >>test.out "test.out" 1 line, 16 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test42.failed test.ok test.out X* viminfo cp test42.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test42.in Vim: Warning: Output is not to a terminal [?1h="test42.in" 130 lines, 2368 charactersTest for writing and reading a file starting with a BOM STARTTEST :so mbyte.vim :set encoding=utf-8 :set fileencodings=ucs-bom,latin-1 :set ff=unix ffs=unix" This changes the file for DOS and MAC :" --- Write the test files :/^latin-1$/+1w! Xtest0 :/^utf-8$/+1w! Xtest1 :/^utf-8-err$/+1w! Xtest2 :/^ucs-2$/+1w! Xtest3 :/^ucs-2le$/+1w! Xtest4 :" Need to add a NUL byte after the NL byte :set bin :e! Xtest4" Ignore change from setting 'ff' o^V^@^[:set noeol :w :set ffs& nobinary" Allow default test42.in format :e # :set ff=unix" Format for files to write :/^ucs-4$/+1w! Xtest5 :/^ucs-4le$/+1w! Xtest6 :" Need to add three NUL bytes after the NL byte :set bin :e! Xtest6" ! for when setting 'ff' is a change o^V^@^V^@^V^@^[:set noeol :w :set nobin :e # :" :" --- Check that editing a latin-1 file doesn't see a BOM :e! Xtest0 :redir! >test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set bomb fenc=latin-1 :w! Xtest0x :" :" --- Check utf-8 :e! Xtest1 :redir >>test.out :set fileencoding bomb? :redir END:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 111 lines, 2116 characters written:set ff& cpo+=A /ENDTEST:set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4 :w! Xtest5x :" :" --- Check ucs-4le :e! Xtest6 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4le :w! Xtest6x :" :" --- Check the files written with BOM :set bin :e! test.out :$r Xtest0x :$r Xtest1x :$r Xtest2x :$r Xtest3x :$r Xtest4x :$r Xtest5x :$r Xtest6x :set nobin ff&" Write the file in default format :w! test.out :qa! ENDTEST latin-1 þþlatin-1 utf-8 utf-8 utf-8-err utf-8~@err ucs-2 þÿ^@u^@c^@s^@-^@2^@ ucs-2le ÿþu^@c^@s^@-^@2^@l^@e^@ ucs-4 ^@^@þÿ^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ ucs-4le ÿþ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@ :so! Xdotest :so mbyte.vim :set encoding=utf-8 :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4 :w! Xtest5x :" :" --- Check ucs-4le :e! Xtest6 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4le :w! Xtest6x :" :" --- Check the files written with BOM :set bin :e! test.out :$r Xtest0x :$r Xtest1x :$r Xtest2x :$r Xtest3x :$r Xtest4x :$r Xtest5x :$r Xtest6x :set nobin ff&" Write the file in default format :w! test.out :qa! ENDTEST latin-1 latin-1 utf-8 utf-8 utf-8-err utf-8<80>err ucs-2 ^@u^@c^@s^@-^@2^@ ucs-2le u^@c^@s^@-^@2^@l^@e^@ ucs-4 ^@^@^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ ucs-4le ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@:set fileencodings=ucs-bom,latin-1 :set ff=unix ffs=unix " This changes the file for DOS and MAC :" --- Write the test files :/^latin-1$/+1w! Xtest0 "Xtest0" "Xtest0" [New File] 1 line, 10 characters written "Xtest0" [New File] 1 line, 10 characters written:/^utf-8$/+1w! Xtest1 "Xtest1" "Xtest1" [New File] 1 line, 9 characters written "Xtest1" [New File] 1 line, 9 characters written:/^utf-8-err$/+1w! Xtest2 "Xtest2" "Xtest2" [New File] 1 line, 13 characters written "Xtest2" [New File] 1 line, 13 characters written:/^ucs-2$/+1w! Xtest3 "Xtest3" "Xtest3" [New File] 1 line, 14 characters written "Xtest3" [New File] 1 line, 14 characters written:/^ucs-2le$/+1w! Xtest4 "Xtest4" "Xtest4" [New File] 1 line, 17 characters written "Xtest4" [New File] 1 line, 17 characters written:" Need to add a NUL byte after the NL byte :set bin :e! Xtest4 " Ignore change from setting 'ff' "Xtest4" "Xtest4" 1 line, 17 charactersu^@c^@s^@-^@2^@l^@e^@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ^@ :set noeol :w "Xtest4" "Xtest4" [Incomplete last line] 2 lines, 18 characters written "Xtest4" [Incomplete last line] 2 lines, 18 characters written:set ffs& nobinary " Allow default test42.in format :e # "test42.in" "test42.in" [converted] 130 lines, 2385 characters:set fileencoding bomb?:redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4 :w! Xtest5x :" :" --- Check ucs-4le :e! Xtest6 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4le :w! Xtest6x :" :" --- Check the files written with BOM :set bin :e! test.out :$r Xtest0x :$r Xtest1x :$r Xtest2x :$r Xtest3x :$r Xtest4x :$r Xtest5x :$r Xtest6x :set nobin ff&" Write the file in default format :w! test.out :qa! ENDTESTlatin-1 þþlatin-1 utf-8 utf-8 utf-8-err utf-8<80>err ucs-2 þÿ^@u^@c^@s^@-^@2^@ ucs-2le ÿþu^@c^@s^@-^@2^@l^@e^@ ucs-4 ^@^@þÿ^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ ucs-4le ÿþ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@:set ff=unix " Format for files to write :/^ucs-4$/+1w! Xtest5 "Xtest5" "Xtest5" [converted][New File] 1 line, 30 characters written "Xtest5" [converted][New File] 1 line, 30 characters written:/^ucs-4le$/+1w! Xtest6 "Xtest6" "Xtest6" [converted][New File] 1 line, 35 characters written "Xtest6" [converted][New File] 1 line, 35 characters written:" Need to add three NUL bytes after the NL byte :set bin :e! Xtest6 " ! for when setting 'ff' is a change "Xtest6" "Xtest6" 1 line, 33 characters^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~ ^@^@^@:set noeol :w "Xtest6" "Xtest6" [Incomplete last line] 2 lines, 36 characters written "Xtest6" [Incomplete last line] 2 lines, 36 characters written:set nobin :e # "test42.in" "test42.in" [converted] 130 lines, 2385 characters:set fileencoding bomb?:redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4 :w! Xtest5x :" :" --- Check ucs-4le :e! Xtest6 :redir >>test.out :set fileencoding bomb? :redir END :set fenc=latin-1 :w >>test.out :set fenc=ucs-4le :w! Xtest6x :" :" --- Check the files written with BOM :set bin :e! test.out :$r Xtest0x :$r Xtest1x :$r Xtest2x :$r Xtest3x :$r Xtest4x :$r Xtest5x :$r Xtest6x :set nobin ff&" Write the file in default format :w! test.out :qa! ENDTESTlatin-1 þþlatin-1 utf-8 utf-8 utf-8-err utf-8<80>err ucs-2 þÿ^@u^@c^@s^@-^@2^@ ucs-2le ÿþu^@c^@s^@-^@2^@l^@e^@ ucs-4 ^@^@þÿ^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ ucs-4le ÿþ^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@:" :" --- Check that editing a latin-1 file doesn't see a BOM :e! Xtest0 "Xtest0" "Xtest0" [converted] 1 line, 12 charactersþþlatin-1~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~:redir! >test.out :set fileencoding bomb?  fileencoding=latin1 nobomb Press ENTER or type command to continue:redir END þþlatin-1 ~:set fenc=latin-1 :w >>test.out "test.out" "test.out" [converted] 1 line, 12 characters appended "test.out" [converted] 1 line, 12 characters appended:set bomb fenc=latin-1 :w! Xtest0x "Xtest0x" "Xtest0x" [converted][New File] 1 line, 12 characters written "Xtest0x" [converted][New File] 1 line, 12 characters written:" :" --- Check utf-8 :e! Xtest1 "Xtest1" "Xtest1" 1 line, 9 charactersutf-8:redir >>test.out :set fileencoding bomb?  fileencoding=utf-8 bomb Press ENTER or type command to continue:redir END utf-8 ~:set fenc=latin-1 :w >>test.out "test.out" "test.out" [converted] 1 line, 6 characters appended "test.out" [converted] 1 line, 6 characters appended:set fenc=utf-8 :w! Xtest1x "Xtest1x" "Xtest1x" [New File] 1 line, 9 characters written "Xtest1x" [New File] 1 line, 9 characters written:" :" --- Check utf-8 with an error (will fall back to latin-1) :e! Xtest2 "Xtest2" "Xtest2" [converted] 1 line, 17 charactersutf-8<80>err :redir >>test.out :set fileencoding bomb?  fileencoding=latin1 nobomb Press ENTER or type command to continue:redir END utf-8<80>err ~:set fenc=latin-1 :w >>test.out "test.out" "test.out" [converted] 1 line, 17 characters appended "test.out" [converted] 1 line, 17 characters appended:set fenc=utf-8 :w! Xtest2x "Xtest2x" "Xtest2x" [New File] 1 line, 17 characters written "Xtest2x" [New File] 1 line, 17 characters written:" :" --- Check ucs-2 :e! Xtest3 "Xtest3" "Xtest3" [converted] 1 line, 8 charactersucs-2:redir >>test.out :set fileencoding bomb?  fileencoding=ucs-2 bomb Press ENTER or type command to continue:redir END ucs-2 ~:set fenc=latin-1 :w >>test.out "test.out" "test.out" [converted] 1 line, 6 characters appended "test.out" [converted] 1 line, 6 characters appended:set fenc=ucs-2 :w! Xtest3x "Xtest3x" "Xtest3x" [converted][New File] 1 line, 8 characters written "Xtest3x" [converted][New File] 1 line, 8 characters written:" :" --- Check ucs-2le :e! Xtest4 "Xtest4" "Xtest4" [converted] 1 line, 10 charactersle :redir >>test.out :set fileencoding bomb?  fileencoding=ucs-2le bomb Press ENTER or type command to continue:redir END ucs-2le ~:set fenc=latin-1 :w >>test.out "test.out" "test.out" [converted] 1 line, 8 characters appended "test.out" [converted] 1 line, 8 characters appended:set fenc=ucs-2le :w! Xtest4x "Xtest4x" "Xtest4x" [converted][New File] 1 line, 10 characters written "Xtest4x" [converted][New File] 1 line, 10 characters written:" :" --- Check ucs-4 :e! Xtest5 "Xtest5" "Xtest5" [converted] 1 line, 10 characters4:redir >>test.out :set fileencoding bomb?  fileencoding=ucs-4 bomb Press ENTER or type command to continue:redir END ucs-4 ~:set fenc=latin-1 :w >>test.out "test.out" "test.out" [converted] 1 line, 6 characters appended "test.out" [converted] 1 line, 6 characters appended:set fenc=ucs-4 :w! Xtest5x "Xtest5x" "Xtest5x" [converted][New File] 1 line, 10 characters written "Xtest5x" [converted][New File] 1 line, 10 characters written:" :" --- Check ucs-4le :e! Xtest6 "Xtest6" "Xtest6" [converted] 1 line, 12 charactersle :redir >>test.out :set fileencoding bomb?  fileencoding=ucs-4le bomb Press ENTER or type command to continue:redir END ucs-4le ~:set fenc=latin-1 :w >>test.out "test.out" "test.out" [converted] 1 line, 8 characters appended "test.out" [converted] 1 line, 8 characters appended:set fenc=ucs-4le :w! Xtest6x "Xtest6x" "Xtest6x" [converted][New File] 1 line, 12 characters written "Xtest6x" [converted][New File] 1 line, 12 characters written:" :" --- Check the files written with BOM :set bin :e! test.out "test.out" "test.out" 35 lines, 273 characters fileencoding=latin1 nobomb latin-1 fileencoding=utf-8 bomb utf-8 fileencoding=latin1 nobomb utf-8<80>err fileencoding=ucs-2 bomb ucs-2 fileencoding=ucs-2le bomb ucs-2le fileencoding=ucs-4 bomb ucs-4 fileencoding=ucs-4le bomb ucs-4le:$r Xtest0x "Xtest0x" "Xtest0x" 1 line, 10 characterslatin-1 :$r Xtest1x "Xtest1x" "Xtest1x" 1 line, 9 charactersutf-8 :$r Xtest2x "Xtest2x" "Xtest2x" 1 line, 17 charactersutf-8<80>err :$r Xtest3x "Xtest3x" "Xtest3x" 1 line, 14 characters^@u^@c^@s^@-^@2^@ :$r Xtest4x "Xtest4x" "Xtest4x" [Incomplete last line] 2 lines, 18 charactersu^@c^@s^@-^@2^@l^@e^@ ^@:$r Xtest5x "Xtest5x" "Xtest5x" 1 line, 28 characters^@^@^@^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@ :$r Xtest6x "Xtest6x" "Xtest6x" [Incomplete last line] 2 lines, 36 characters^@^@u^@^@^@c^@^@^@s^@^@^@-^@^@^@4^@^@^@l^@^@^@e^@^@^@ ^@^@^@:set nobin ff& " Write the file in default format :w! test.out "test.out" "test.out" 44 lines, 407 characters written "test.out" 44 lines, 407 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test43.failed test.ok test.out X* viminfo cp test43.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test43.in Vim: Warning: Output is not to a terminal [?1h="test43.in" 27 lines, 412 charactersTests 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 14 lines, 217 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :set nocompatible viminfo+=nviminfo /^1 /a*b\{2}c\+/e /\Md\*e\{2}f\+/e :set nomagic /g\*h\{2}i\+/e /\mj*k\{2}l\+/e /\vm*n{2}o+/e /\V^aa$ aa$ x:set magic /\v(a)(b)\2\1\1/e /\V[ab]\(\[xy]\)\1 ab]x:?^1?,$w! test.out "test.out" [New] 8L, 121C written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test44.failed test.ok test.out X* viminfo cp test44.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test44.in Vim: Warning: Output is not to a terminal [?1h="test44.in" 55 lines, 1137 charactersTests 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 /มà¹~H x:" find word by change of word class /ã~A¡\<ã~B«ã~C¨\>ã~A¯ 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(\"×~P×~Q×~R×~S\", \".\", 0, 2) " ×~Q :put =matchstr(\"×~P×~Q×~R×~S\", \"..\", 0, 2) " ×~Q×~R :put =matchstr(\"×~P×~Q×~R×~S\", \".\", 0, 0) " ×~P :put =matchstr(\"×~P×~Q×~R×~S\", \".\", 4, -1) " ×~R :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:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 33 lines, 760 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so mbyte.vim :set nocompatible encoding=utf-8 termencoding=latin1 viminfo+=nviminfo Tests 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/^1 /^1 /a*b\{2}c\+/e /a*b\{2}c\+/e /\Md\*e\{2}f\+/e /\Md\*e\{2}f\+/e :set nomagic /g\*h\{2}i\+/e /g\*h\{2}i\+/e /\mj*k\{2}l\+/e /\mj*k\{2}l\+/e /\vm*n{2}o+/e /\vm*n{2}o+/e /\V^aa$ /\V^aa$ aa$ x:set magic /\v(a)(b)\2\1\1/e /\v(a)(b)\2\1\1/e /\V[ab]\(\[xy]\)\1 /\V[ab]\(\[xy]\)\1  8 axx [ab]xxab]x :" Now search for multi-byte without composing char /¿ / 9 ¿¿x ¿¿xx :" Now search for multi-byte with composing char /¿¿ / a ¿¿x ¿¿xx :" find word by change of word class /¿?\<¿?¿?\>¿? /\<\>  b ¿?¿?¿?¿?¿?¿?¿? :" Test \%u, [\u] and friends /\%u20ac /\%u20ac  c x ¬¿xx /[\u4f7f\u5929]\+ /[\u4f7f\u5929]\+  d ¿?¿?x¿?x  /\%U12345678 /\%U12345678  e ?yy /[\U1234abcd\u1234\uabcd] /[\U1234abcd\u1234\uabcd]  f ?zz /\%d21879b /\%d21879b  g a¿?bbbb :?^1?,$w! test.out "test.out" "test.out" [New] 16L, 195C written "test.out" [New] 16L, 195C written:e! test.out "test.out" "test.out" 16L, 195C1 a aa abb abbcc 2 d dd dee deeff 3 g gg ghh ghhii 4 j jj jkk jkkll 5 m mm mnn mnnoo 6 x aa$ x7 (a)(b) abba8 axx ab]xx9 ¿¿x ¿xa ¿¿x ¿x b ¿?¿?¿?c x ¬x d ¿?xe yf zg abb~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~:put =matchstr(\"¿¿¿¿\", \".\", 0, 2) " ¿ ¿:put =matchstr(\"¿¿¿¿\", \"..\", 0, 2) " ¿¿ ¿¿ :put =matchstr(\"¿¿¿¿\", \".\", 0, 0) " ¿ ¿:put =matchstr(\"¿¿¿¿\", \".\", 4, -1) " ¿ ¿:w! "test.out" "test.out" 20L, 209C written "test.out" 20L, 209C written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test45.failed test.ok test.out X* viminfo cp test45.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test45.in Vim: Warning: Output is not to a terminal [?1h="test45.in" 72 lines, 1498 charactersTests 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{{ ^[r{jj:call append("$", foldlevel(".")) kYpj:call append("$", foldlevel(".")) :" test folding with indent :set fdm=indent sw=2 /^2 b i ^[jI ^[:call append("$", "indent " . foldlevel(".")) k:call append("$", foldlevel(".")) :" test syntax folding :set fdm=syntax fdl=0 :syn region Hup start="dd" end="hh" fold Gzk:call append("$", "folding " . getline(".")) k: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 "=":set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 55 lines, 1365 characters written:set ff& cpo+=A /ENDTESTendfun :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 :qa! ENDTEST  :so! Xdotest :so small.vim :" We also need the +syntax feature here. :if !has("syntax") : e! test.ok : w! test.out : qa! : :endif ]z:call append("$", getline(".")) zc:call append("$", getline(foldclosed("."))) :" test folding with markers. :set fdm=marker fdl=1 fdc=3 :" basic test if a fold can be created, opened, moving to the end and closed /^1  1 aa+-- 3 lines: 1 aa------------------------------------------------------------------------------------------------------------- :call append("$", "manual " . getline(foldclosed("."))) 1 aa:call append("$", foldclosed(".")) 2 bb 3 cc :call append("$", getline(".")) +-- 3 lines: 1 aa-------------------------------------------------------------------------------------------------------------4 dd {{{ 5 ee {{{ }}}:call append("$", getline(foldclosed("."))) :" test folding with markers. :set fdm=marker fdl=1 fdc=3  :set fdm=marker fdl=1 fdc=3  /^5  :call append("$", "marker " . foldlevel("."))  [z:call append("$", foldlevel("."))  jo{{ ^[r{jj:call append("$", foldlevel("."))  kYpj:call append("$", foldlevel("."))  :" test folding with indent  :set fdm=indent sw=2  /^2 b  i ^[jI ^[:call append("$", "indent " . foldlevel("."))  k:call append("$", foldlevel("."))  :" test syntax folding  :set fdm=syntax fdl=0  :syn region Hup start="dd" end="hh" fold  Gzk:call append("$", "folding " . getline("."))  k: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  :qa!  ENDTEST  1 aa 2 bb 3 cc/^5 call append("$", "marker " . foldlevel("."))[z:call append("$", foldlevel("."))jo{{ ^[r{jj:call append("$", foldlevel(".")kYpj:call append("$", foldlevel(".")):" test folding with indent:set fdm=indent sw=2/^2 bi ^[jI ^[:call append("$", "indent " . foldlevel("."))k:call append("$", foldlevel(".")):" test syntax folding:set fdm=syntax fdl=0syn region Hup start="dd" end="hh" foldGzk:call append("$", "folding " . getline("."))k:call append("$", getline(".")):" test expression folding:fun Flvl() let l = getline(v:lnum) if l =~ "bb$" return 2elseif l =~ "gg$""s1"ii>2kk0"ndifreturn "=endfun:set fdm=expr fde=Flvl()/bb$call append("$", "expr " . foldlevel("."))hhfoldlevel("."))iikk:/^last/+1,$w! test.outqa!ENDTEST1 aa2 bb3 cc -4 dd {{{ |-5 ee {{{ }}}:call append("$", "marker " . foldlevel(".")) :call append("$", foldlevel("."))  | {{-{ || 6 ff }}} | 7 gg :call append("$", foldlevel(".")) 6 ff }}}  7 gg :call append("$", foldlevel(".")) :" test folding with indent :set fdm=indent sw=2 - | |- | |- | |- | |- | | /^2 b search hit BOTTOM, continuing at TOP - 2 bb |- 3 cc:call append("$", "indent " . foldlevel(".")) :call append("$", foldlevel(".")) :" test syntax folding :set fdm=syntax fdl=0   :syn region Hup start="dd" end="hh" fold + +-- 7 lines: 4 dd ---------------------------------------------------------------------------------------------------------9 iia jjb kklastmanual 1 aa -1  3 cc  1 aa  marker 2  1  1  0  indent 2  1:call append("$", "folding " . getline(".")) :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  k: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":set fdm=expr fde=Flvl() + +-- 11 lines: 2 bb----------------------------------------------------------------------------------------------------------b kk lastmanual 1 aa-13 cc1 aarker 2110indentfolding 8 hh 3 cc~~/bb$ search hit BOTTOM, continuing at TOP-- 2 bb|| 3 cc ||4 dd {{{ ||5 ee {{{ }}} ||{{{ ||6 ff }}} ||6 ff }}} ||7 gg|8 hh |+ +--- 2 lines: 9 ii---------------------------------------------------------------------------------------------------------b kklastmanual 1 aa-13 cc1 aamarker 2:call append("$", "expr " . foldlevel(".")) /hh$ :call append("$", foldlevel(".")) /ii$ -9 ii||a jjb kklastmanual 1 aa-13 cc1 aa:call append("$", foldlevel(".")) /kk$ :call append("$", foldlevel(".")) :/^last/+1,$w! test.out "test.out" [New File] 16 lines, 86 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test46.failed test.ok test.out X* viminfo cp test46.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test46.in Vim: Warning: Output is not to a terminal [?1h="test46.in" 27 lines, 431 charactersTests 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 8 lines, 292 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :" test if replacing a line break works with a back reference :/^1/,/^2/s/\n\(.\)/ \1/ 4 substitutions on 1 line1 aa bb cc 2 dd ee~ ~ ~ ~4 substitutions on 1 line:" test if inserting a line break works with a back reference :/^3/,/^4/s/\(.\)$/\r\1/ 3 substitutions on 3 linesfgh 4 i j3 substitutions on 3 lines:" test if replacing a line break with another line break works :/^5/,/^6/s/\(\_d\{3}\)/x\1x/ 3 substitutions on 2 linesx8 8xb cx9 9xd 6 ex7 7x7f :/^1/,$w! test.out search hit BOTTOM, continuing at TOP "test.out" [New File] 13 lines, 70 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test47.failed test.ok test.out X* viminfo cp test47.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test47.in Vim: Warning: Output is not to a terminal [?1h="test47.in" 44 lines, 1040 charactersTests for vertical splits and filler lines in diff mode STARTTEST :so small.vim /^1 yG:new pkdd:w! Xtest ddGpkkrXoxxx^[:w! Xtest2 :file Nop ggoyyy^[jjjozzzz^[ :vert diffsplit Xtest :vert diffsplit Xtest2 :" jump to second window for a moment to have filler line appear at start of :" first window ^W^Wgg^Wpgg: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() ^W^Wgg:let two = winline() j:let two = two . "-" . winline() j:let two = two . "-" . winline() j:let two = two . "-" . winline() j:let two = two . "-" . winline() ^W^Wgg: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() ^W^W:call append("$", one) :call append("$", two) :call append("$", three) :$-2,$w! test.out :qa! ENDTEST 1 aa 2 bb 3 cc 4 dd 5 ee ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 34 lines, 939 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim /^1 5 lines yanked:new ~~~~~~~~~~~~~~~~~~~~~ [No Name] j:let two = two . "-" . winline()wo = two . "-" . winline()^W^Wgg:let three = winline()j:let three = three . "-" . winline() j:let three = three . "-" . winline() ^W^W:call append("$", one) :call append("$", two) :call append("$", three) :$-2,$w! test.out :qa! ENDTEST1 aa 2 bb 3 cc 4 dd test47.in 5 more lines1 aa 2 bb 3 cc 4 dd 5 ee[+] ~:w! Xtest "Xtest" [New File] 5 lines, 25 characters writtenXtest  ~[+] 1 aa Xxxx:w! Xtest2 "Xtest2" [New File] 6 lines, 29 characters written :file Nop "Nop" [Not edited] line 4 of 6 --66%-- col 3Nop yyy[+] 3 X xxzzzz 5 e:vert diffsplit Xtest "Xtest" 5 lines, 25 characters 1 aa |  2 bb|  -------------------------------------------------------------|  3 cc|  4 dd |  -------------------------------------------------------------|  -------------------------------------------------------------|  5 ee||||||||||||||| -------------------------------------------------------------  ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~  Xtest  ------------------------------------------------------------- 2 bb yyy  3 cc X dd  xxx  zzzz  5 ee 1 aa              ~~~~~~~~~~~~~Nop [+] :vert diffsplit Xtest2 "Xtest2" 6 lines, 29 characters 2 bb|  ----------------------------------------|  3 cc|  X dd |  xxx |  ----------------------------------------|  5 ee|  1 aa ||||||||||||||| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~  Xtest2  2 bb| ----------------------------------------| 3 cc| 4 dd | ----------------------------------------| ----------------------------------------| 5 ee|||||||||||||||| ----------------------------------------              ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Xtest  2 bb yyy  3 cc X dd  xxx  zzzz  5 ee 1 aa               ~~~~~~~~~~~~~~Nop [+] j:let two = two . "-" . winline() j:let two = two . "-" . winline() j:let two = two . "-" . winline() j:let two = two . "-" . winline() ^W^Wgg: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() ^W^W:call append("$", one) :call append("$", two) :call append("$", three) :$-2,$w! test.out :qa! ENDTEST 1 aa 2 bb 3 cc 4 dd test47.in :" jump to second window for a moment to have filler line appear at start of :" first window Xtest2 Xtest ----------------------------------------2 bb ----------------------------------------3 cc X dd xxx ----------------------------------------5 ee 1 aa   2 bb  ---------------------------------------- 3 cc  4 dd  ---------------------------------------- ---------------------------------------- 5 ee  ---------------------------------------- ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  ~  1 aa ---------------------------------------2 bbyyy 3 ccX dd xxx zzzz 5 ee1 aa Xtest2 Xtest :let one = winline() :let one = one . "-" . winline() :let one = one . "-" . winline() :let one = one . "-" . winline() :let one = one . "-" . winline() :let one = one . "-" . winline() Xtest2 Xtest :let two = winline() :let two = two . "-" . winline() :let two = two . "-" . winline() :let two = two . "-" . winline() :let two = two . "-" . winline() Xtest Nop [+] :let three = winline() :let three = three . "-" . winline() :let three = three . "-" . winline() :let three = three . "-" . winline() :let three = three . "-" . winline() :let three = three . "-" . winline() :let three = three . "-" . winline() Nop [+] test47.in :call append("$", one) [+]:call append("$", two) :call append("$", three) :$-2,$w! test.out "test.out" [New File] 3 lines, 36 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test48.failed test.ok test.out X* viminfo cp test48.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test48.in Vim: Warning: Output is not to a terminal [?1h="test48.in" 74 lines, 1452 charactersThis is a test of 'virtualedit'. STARTTEST :so small.vim :set noswf :set ve=all -dgg :" :" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword". :" Repeating CTRL-N fixes it. (Mary Ellen Foster) 2/w C^N^[ :" :" Using "C" then then moves the last remaining character to the next :" line. (Mary Ellen Foster) j^/are C^Mare belong to vim^[ :" :" When past the end of a line that ends in a single character "b" skips :" that word. ^$15lbC7^[ :" :" Make sure 'i' works $4li<-- should be 3 ' '^[ :" :" Make sure 'C' works $4lC<-- should be 3 ' '^[ :" :" Make sure 'a' works $4la<-- should be 4 ' '^[ :" :" Make sure 'A' works $4lA<-- should be 0 ' '^[ :" :" Make sure 'D' works $4lDi<-- 'D' should be intact^[ :" :" Test for yank bug reported by Mark Waggoner. :set ve=block ^2w^V3jyGp :" :" Test "r" beyond the end of the line :set ve=all /^"r" $5lrxa<-- should be 'x'^[ :":set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 54 lines, 1250 characters written:set ff& cpo+=A /ENDTEST:" Test to make sure 'x' can delete control characters :set display=uhex ^xxxxxxi[This line should contain only the text between the brackets.]^[ :set display= :" :" Test for ^Y/^E due to bad w_virtcol value, reported by :" Roy . ^O^[3li^E^[4li^E^[4li^E <-- should show the name of a noted text editor^[ ^o^[4li^Y^[4li^Y^[4li^Y <-- and its version number^[-dd :" :wq! test.out ENDTEST keyword keyw :so! Xdotest :so small.vim :set noswf :set ve=all  58 fewer lineskeyword keywall your base are belong to us1 2 3 4 5 6 'i''C' 'a''A''D'this is a test this is a testthis is a test"r" a^Vb^Msdabcv6efi.him0kl~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :" :" Insert "keyword keyw", ESC, C CTRL-N, shows "keyword ykeyword". :" Repeating CTRL-N fixes it. (Mary Ellen Foster) /w search hit BOTTOM, continuing at TOP$Scanning tags.The only matchword:" :" Using "C" then then moves the last remaining character to the next :" line. (Mary Ellen Foster)  /are search hit BOTTOM, continuing at TOP$are belong to vim 1 2 3 4 5 6 'i 'C 'a 'A 'D'this is a test "r"^Vb^Msdabcv6efi.him0kl:" :" When past the end of a line that ends in a single character "b" skips :" that word.  $7:" :" Make sure 'i' works  'i' <-- should be 3 ' ':" :" Make sure 'C' works  'C' $<-- should be 3 ' ':" :" Make sure 'a' works  'a' <-- should be 4 ' ':" :" Make sure 'A' works  'A' <-- should be 0 ' ':" :" Make sure 'D' works  'D' <-- 'D' should be intact:" :" Test for yank bug reported by Mark Waggoner. :set ve=block  aaaaaablock of 4 lines yanked3 more linesa a a  :" :" Test "r" beyond the end of the line :set ve=all /^"r" search hit BOTTOM, continuing at TOP"r" xx<-- should be 'x':" :" Test to make sure 'x' can delete control characters :set display=uhex <16>b<0d>sd <16>b<0d>sdb<0d>sd<0d>sdsdd[This line should contain only the text between the brackets.]:set display= :" :" Test for ^Y/^E due to bad w_virtcol value, reported by :" Roy .   vv ii m <-- should show the name of a noted text editor  66 .. 0 <-- and its version number ~  :" :wq! test.out "test.out" [New File] 21 lines, 443 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test49.failed test.ok test.out X* viminfo cp test49.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test49.in Vim: Warning: Output is not to a terminal [?1h="test49.in" 13 lines, 320 charactersThis 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 before ENDTEST. STARTTEST :so small.vim :se nocp nomore viminfo+=nviminfo :so test49.vim GGGGGGGGGG"rp:.-,$wq! test.out ENDTEST Results of test49.vim: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 4 lines, 94 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :se nocp nomore viminfo+=nviminfo :so test49.vim Error detected while processing function G: line 16: E171: Missing :endif: endwhile *** Test 1: OK (34695) function F() 1 Xpath 1" X: 1 2 let first = 1 3 XloopINIT 2 8 4 while 1 5Xloop 1" X: 2 + 0 * 16 6if first 7Xloop 2" X: 4 + 0 * 32 8let first = 0 9XloopNEXT 10break 11else 12Xloop 4" X: 0 + 0 * 64 13return 14endif 15 endwhile endfunction"/tmp/v466537/0"[noeol] 18L, 528C 15 substitutions on 15 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/0" 15L, 476C written "test49.in" 13L, 320C function G() 1 Xpath 256" X: 256 + 0 * 2048 2 let first = 1 3 XloopINIT 512 8 4 while 1 5Xloop 1" X: 512 + 0 * 4096 6if first 7Xloop 2" X: 1024 + 0 * 8192 8let first = 0 9XloopNEXT 10break 11else 12Xloop 4" X: 0 + 0 * 16384 13return 14endif 15if 1 " unmatched :if 16 endwhile endfunction"/tmp/v466537/1"[noeol] 19L, 588C 16 substitutions on 16 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/1" 16L, 534C written "test49.in" 13L, 320C Error detected while processing /tmp/v466537/1: line 16: E171: Missing :endif: endwhile *** Test 2: OK (34695) *** Test 3: OK (1384648195) *** Test 4: OK (32883) function F() 1 if 1 2Xpath 1" X: 1 3let loops = 3 4XloopINIT 2 16 5while loops > 0" 3: 2: 1: 6Xloop 1" X: 2 + 2*16 + 0*16*16 7if (loops == 2) 8Xloop 2" X: 4*16 9return 10Xloop 4" X: 0 11endif 12Xloop 8" X: 16 13let loops = loops - 1 14XloopNEXT 15endwhile 16Xpath 8192" X: 0 17 else 18Xpath 16384" X: 0 19 endif endfunction"/tmp/v466537/2"[noeol] 22L, 784C 19 substitutions on 19 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/2" 19L, 724C written "test49.in" 13L, 320C *** Test 5: OK (32883) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "/tmp/v466537/3" [New] 53L, 1582C written14L, 358C appended26L, 824C appended34L, 986C appended :!echo 'source /tmp/v466537/3' >/tmp/v466537/4[?1l>[?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/4" 130L, 2431C appended131L, 2453C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/5[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/5"' -S /tmp/v466537/4[?1l> [?1h="/tmp/v466537/5" 21L, 130C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 6: OK (603978947) Error detected while processing /sources/vim70/src/testdir/test49.vim: line 976: E492: Not an editor command: ^Iasdf line 988: E492: Not an editor command: ^Iasdf line 996: E492: Not an editor command: asdf line 999: E492: Not an editor command: asdf | Xpath 32768^I^I^I^I" X: 0 *** Test 7: OK (90563) Error detected while processing function F: line 5: E492: Not an editor command: ^I asdf line 7: E492: Not an editor command: ^I asdf | Xpath 8^I^I^I" X: 0 line 19: E492: Not an editor command: ^I asdf line 21: E492: Not an editor command: ^I asdf | Xpath 2048^I^I^I" X: 0 line 29: E121: Undefined variable: novar E15: Invalid expression: novar^I^I" returns (default return value 0) Error detected while processing function G: line 5: E492: Not an editor command: ^I asdf^I^I" returns -1 Error detected while processing function H: line 5: E492: Not an editor command: ^I asdf^I^I" returns -1 *** Test 8: OK (562493431) Error detected while processing function F..G..H..I: line 2: E492: Not an editor command: asdf^I^I" error *** Test 9: OK (363) Error detected while processing /sources/vim70/src/testdir/test49.vim: line 1201: E15: Invalid expression: | strlen("\"") | Xpath 512^I^I" X: 0 E15: Invalid expression: 1 ||| strlen("\"") | Xpath 512^I^I" X: 0 line 1211: E15: Invalid expression: | strlen("\"") | Xpath 8192^I^I" X: 0 E15: Invalid expression: 1 ||| strlen("\"") | Xpath 8192^I^I" X: 0 line 1220: E15: Invalid expression: | strlen("\"") | Xpath 131072^I^I" X: 0 E15: Invalid expression: 1 ||| strlen("\"") | Xpath 131072^I^I" X: 0 *** Test 10: OK (559615) line 1252: E492: Not an editor command: asdf^I^I" error *** Test 11: OK (2049) 1 line 1330: E492: Not an editor command: asdf^I^I" error line 1338: E492: Not an editor command: asdf^I^I" error *** Test 12: OK (352256) line 1357: E121: Undefined variable: asdf E15: Invalid expression: asdf line 1368: E121: Undefined variable: asdf E15: Invalid expression: asdf | Xpath 32 | endwhile | Xpath 64^I" X: 0 *** Test 13: OK (145) Error detected while processing function F: line 8: E121: Undefined variable: g:boolvar E15: Invalid expression: g:boolvar^I" possibly undefined *** Test 14: OK (42413) E121: Undefined variable: g:boolvar E15: Invalid expression: g:boolvar | Xloop 8 | else | Xloop 16 | endif " X: 8 *** Test 15: OK (42413) line 5: E583: multiple :else: else^I^I Error detected while processing function G: line 5: E584: :elseif after :else: elseif 1^I^I" aborts function Error detected while processing function H: line 7: E583: multiple :else: else^I^I Error detected while processing function I: line 7: E584: :elseif after :else: elseif 1^I^I" aborts function *** Test 16: OK (8722) Error detected while processing function F: line 18: E171: Missing :endif: endwhile^I E171: Missing :endif: endwhile^I line 34: E171: Missing :endif: endwhile^I E171: Missing :endif: endwhile^I E171: Missing :endif: endwhile^I line 47: E580: :endif without :if: ^Iendif^I E580: :endif without :if: ^Iendif^I E580: :endif without :if: ^Iendif^I Error detected while processing /sources/vim70/src/testdir/test49.vim: line 1626: E171: Missing :endif: endwhile  *** Test 17: OK (285127993) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/6[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/6" 16L, 304C appended17L, 326C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/7[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/7"' -c 'breakadd file 8 /tmp/v466537/6' -S /tmp/v466537/6[?1l> shell returned 1 [?1h="/tmp/v466537/7" 3L, 6C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/8[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/8" 6L, 127C appended7L, 149C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/9[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/9"' -c 'breakadd file 4 /tmp/v466537/8' -S /tmp/v466537/8[?1l> shell returned 1 [?1h="/tmp/v466537/9" 1L, 5C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/10[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/10" 21L, 486C appended22L, 508C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/11[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/11"' -c 'breakadd func 7 F' -S /tmp/v466537/10[?1l> shell returned 1 [?1h="/tmp/v466537/11" 3L, 18C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/12[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/12" 13L, 364C appended14L, 386C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/13[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/13"' -c 'breakadd func 3 G' -S /tmp/v466537/12[?1l> shell returned 1 [?1h="/tmp/v466537/13" 1L, 9C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 18: OK (67224583) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/14[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/14" 12L, 201C appended13L, 223C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/15[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/15"' -S /tmp/v466537/14[?1l> shell returned 1 [?1h="/tmp/v466537/15" 2L, 4C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/16[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/16" 12L, 205C appended13L, 227C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/17[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/17"' -S /tmp/v466537/16[?1l> shell returned 1 [?1h="/tmp/v466537/17" 2L, 7C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/18[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/18" 6L, 122C appended7L, 144C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/19[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/19"' -S /tmp/v466537/18[?1l> shell returned 1 [?1h="/tmp/v466537/19" 1L, 5C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/20[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/20" 8L, 176C appended9L, 198C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/21[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/21"' -S /tmp/v466537/20[?1l> shell returned 1 [?1h="/tmp/v466537/21" 1L, 6C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/22[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/22" 10L, 215C appended11L, 237C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/23[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/23"' -S /tmp/v466537/22[?1l> shell returned 1 [?1h="/tmp/v466537/23" 1L, 8C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/24[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/24" 7L, 149C appended8L, 171C8L, 170C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/25[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/25"' -S /tmp/v466537/24[?1l> shell returned 1 [?1h="/tmp/v466537/25" 1L, 9C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 19: OK (69275973) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/26[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/26" 9L, 135C appended10L, 157C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/27[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/27"' -S /tmp/v466537/26[?1l> shell returned 1 [?1h="/tmp/v466537/27" 2L, 4C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/28[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/28" 10L, 155C appended11L, 177C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/29[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/29"' -S /tmp/v466537/28[?1l> shell returned 1 [?1h="/tmp/v466537/29" 3L, 8C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/30[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/30" 12L, 204C appended13L, 226C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/31[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/31"' -S /tmp/v466537/30[?1l> shell returned 1 [?1h="/tmp/v466537/31" 4L, 18C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/32[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/32" 12L, 214C appended13L, 236C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/33[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/33"' -S /tmp/v466537/32[?1l> shell returned 1 [?1h="/tmp/v466537/33" 4L, 22C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/34[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/34" 12L, 211C appended13L, 233C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/35[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/35"' -S /tmp/v466537/34[?1l> shell returned 1 [?1h="/tmp/v466537/35" 3L, 22C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/36[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/36" 14L, 263C appended15L, 285C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/37[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/37"' -S /tmp/v466537/36[?1l> shell returned 1 [?1h="/tmp/v466537/37" 4L, 34C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/38[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/38" 14L, 277C appended15L, 299C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/39[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/39"' -S /tmp/v466537/38[?1l> shell returned 1 [?1h="/tmp/v466537/39" 4L, 40C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 20: OK (1874575085) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/40[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/40" 58L, 1022C appended59L, 1044C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/41[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/41"' -S /tmp/v466537/40[?1l> [?1h="/tmp/v466537/41" 9L, 56C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 21: OK (147932225) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/42[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/42" 23L, 418C appended24L, 440C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/43[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/43"' -S /tmp/v466537/42[?1l> shell returned 1 [?1h="/tmp/v466537/43" 1L, 2C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/44[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/44" 23L, 437C appended24L, 459C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/45[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/45"' -c 'breakadd func 2 Interrupt' -S /tmp/v466537/44[?1l> shell returned 1 [?1h="/tmp/v466537/45" 1L, 3C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/46[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/46" 21L, 386C appended22L, 408C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/47[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/47"' -S /tmp/v466537/46[?1l> shell returned 1 [?1h="/tmp/v466537/47" 1L, 5C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 22: OK (4161) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/48[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/48" 25L, 432C appended26L, 454C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/49[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/49"' -S /tmp/v466537/48[?1l> shell returned 1 [?1h="/tmp/v466537/49" 3L, 8C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 23: OK (49) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/50[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/50" 16L, 392C appended17L, 414C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/51[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/51"' -S /tmp/v466537/50[?1l> [?1h="/tmp/v466537/51" 3L, 7C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 24: OK (41) *** Test 25: OK (260177811) *** Test 26: OK (1681500476) *** Test 27: OK (1996459) function F() 1 try 2Xpath 1" X: 1 3try 4Xpath 2" X: 2 5return 6Xpath 4" X: 0 7finally 8Xpath 8" X: 8 9endtry 10Xpath 16" X: 0 11 finally 12Xpath 32" X: 32 13 endtry 14 Xpath 64" X: 0 endfunction"/tmp/v466537/52"[noeol] 17L, 552C 14 substitutions on 14 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/52"14L, 502C written "test49.in" 13L, 320C function G() 1 try 2Xpath 128" X: 128 3return 4Xpath 256" X: 0 5 finally 6Xpath 512" X: 512 7call F() 8Xpath 1024" X: 1024 9 endtry 10 Xpath 2048" X: 0 endfunction"/tmp/v466537/53"[noeol] 13L, 406C 10 substitutions on 10 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/53"10L, 378C written "test49.in" 13L, 320C function H() 1 try 2Xpath 4096" X: 4096 3call G() 4Xpath 8192" X: 8192 5 finally 6Xpath 16384" X: 16384 7return 8Xpath 32768" X: 0 9 endtry 10 Xpath 65536" X: 0 endfunction"/tmp/v466537/54"[noeol] 13L, 409C 10 substitutions on 10 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/54"10L, 381C written "test49.in" 13L, 320C *** Test 28: OK (1996459) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/55[?1l>[?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/55" 39L, 721C appended40L, 743C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/56[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/56"' -S /tmp/v466537/55[?1l> shell returned 1 [?1h="/tmp/v466537/56" 6L, 21C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/57[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/57" 23L, 509C appended24L, 531C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/58[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/58"' -S /tmp/v466537/57[?1l> shell returned 1 [?1h="/tmp/v466537/58" 4L, 34C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 29: OK (170428555) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/59[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/59" 60L, 1101C appended61L, 1123C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/60[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let Extr aVimResult = "/tmp/v466537/60"' -c 'breakadd func 3 F' -c 'breakadd file 19 /tmp/v466537/59' -c 'breakadd file 31 /tmp/v466537/ 59' -S /tmp/v466537/59[?1l> shell returned 1 [?1h="/tmp/v466537/60" 16L, 89C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 30: OK (190905173) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/61[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/61" 60L, 1122C appended61L, 1144C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/62[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/62"' -S /tmp/v466537/61[?1l> shell returned 1 [?1h="/tmp/v466537/62" 16L, 89C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 31: OK (190905173) *** Test 32: OK (354833067) *** Test 33: OK (1216907538) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/63[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/63" 63L, 1288C appended64L, 1310C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/64[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/64"' -c 'breakadd func 16 C' -S /tmp/v466537/63[?1l> shell returned 1 [?1h="/tmp/v466537/64" 17L, 127C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 34: OK (2146584868) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/65[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/65" 63L, 1285C appended64L, 1307C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/66[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/66"' -c 'breakadd func 16 B' -S /tmp/v466537/65[?1l> shell returned 1 [?1h="/tmp/v466537/66" 17L, 127C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 35: OK (2146584868) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/67[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/67" 66L, 1430C appended67L, 1452C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/68[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'le tExtraVimResult = "/tmp/v466537/68"' -c 'breakadd func 16 R' -S /tmp/v466537/67[?1l> shell returned 1 [?1h="/tmp/v466537/68" 9L, 81C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 36: OK (1071644672) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/69[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/69" 73L, 1488C appended74L, 1510C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/70[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/70"' -c 'breakadd func 16 F' -S /tmp/v466537/69[?1l> shell returned 1 [?1h="/tmp/v466537/70" 9L, 81C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 37: OK (1071644672) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/71[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/71" 82L, 1519C appended83L, 1541C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/72[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/72"' -c 'breakadd func 16 E' -S /tmp/v466537/71[?1l> shell returned 1 [?1h="/tmp/v466537/72" 8L, 63C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 38: OK (357908480) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/73[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/73" 83L, 1538C appended84L, 1560C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/74[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let E xtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/74"' -c 'breakadd func 16 I' -c 'breakadd func 22 I' -S /tmp/v466537/7 3[?1l> shell returned 1 [?1h="/tmp/v466537/74" 8L, 63C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 39: OK (357908480) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/75[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/75" 82L, 1519C appended83L, 1541C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/76[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/76"' -c 'breakadd func 16 T' -S /tmp/v466537/75[?1l> shell returned 1 [?1h="/tmp/v466537/76" 8L, 63C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** 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 2Xpath 1" X: 1 3throw "arrgh" 4Xpath 2" X: 0 5 catch /arrgh/ 6Xpath 4" X: 4 7 endtry 8 Xpath 8" X: 8 endfunction"/tmp/v466537/77"[noeol] 11L, 334C 8 substitutions on 8 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/77"8L, 295C written "test49.in" 13L, 320C function T1() 1 XloopNEXT 2 try 3Xloop 1" X: 16 + 16*16 4throw "arrgh" 5Xloop 2" X: 0 6 finally 7Xloop 4" X: 64 + 64*16 8 endtry 9 Xloop 8" X: 0 endfunction"/tmp/v466537/78"[noeol] 12L, 364C 9 substitutions on 9 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/78"9L, 323C written "test49.in" 13L, 320C function T2() 1 try 2Xpath 4096" X: 4096 3call T1() 4Xpath 8192" X: 0 5 finally 6Xpath 16384" X: 16384 7 endtry 8 Xpath 32768" X: 0 endfunction"/tmp/v466537/79"[noeol] 11L, 332C 8 substitutions on 8 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/79"8L, 305C written "test49.in" 13L, 320C *** Test 50: OK (363550045) *** Test 51: OK (40744667) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/81[?1l>[?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/81" 2L, 41C appended3L, 63C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/82[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/80' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/82"' -S /tmp/v466537/81[?1l> shell returned 1 [?1h="/tmp/v466537/82" 1L, 2C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/80" 8L, 182C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/83[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/83" 7L, 115C appended8L, 137C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/84[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/80' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/84"' -S /tmp/v466537/83[?1l> shell returned 1 [?1h="/tmp/v466537/84" 1L, 2C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/80" 8L, 181C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/85[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/85" 12L, 180C appended13L, 202C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/86[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/80' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/86"' -S /tmp/v466537/85[?1l> shell returned 1 [?1h="/tmp/v466537/86" 2L, 8C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/80" 10L, 209C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/87[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/87" 8L, 139C appended9L, 161C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/88[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/80' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/88"' -S /tmp/v466537/87[?1l> shell returned 1 [?1h="/tmp/v466537/88" 2L, 11C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/80" 10L, 217C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/89[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/89" 5L, 87C appended6L, 109C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/90[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/80' -c 'debuggreedy|set viminfo+= nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/90"' -c 'breakadd file 4 /tmp/v466537/89' -S /tmp/v 466537/89[?1l> shell returned 1 [?1h="/tmp/v466537/90" 1L, 7C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/80" [noeol] 9L, 202C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/91[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/91" 7L, 189C appended8L, 211C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/92[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/80' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/92"' -S /tmp/v466537/91[?1l> shell returned 1 [?1h="/tmp/v466537/92" 1L, 8C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/80" 9L, 252C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/93[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/93" 7L, 199C appended8L, 221C8L, 220C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/94[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/80' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/94"' -S /tmp/v466537/93[?1l> shell returned 1 [?1h="/tmp/v466537/94" 1L, 10C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/80" 9L, 214C "test49.in" 13L, 320C *** Test 52: OK (1247112011) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/96[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/96" 1L, 10C appended2L, 32C2L, 31C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/97[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/97"' -S /tmp/v466537/96[?1l> shell returned 1 [?1h="/tmp/v466537/97" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 154C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/98[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/98" 3L, 39C appended4L, 61C 3 substitutions on 3 lines "/tmp/v466537/98" 4L, 58C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/99[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/99"' -S /tmp/v466537/98[?1l> shell returned 1 [?1h="/tmp/v466537/99" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 158C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/100[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/100" 4L, 45C appended5L, 67C 4 substitutions on 4 lines "/tmp/v466537/100"5L, 63C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/101[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/101"' -S /tmp/v466537/100[?1l> shell returned 1 [?1h="/tmp/v466537/101" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 159C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/102[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/102" 3L, 33C appended4L, 55C 3 substitutions on 3 lines "/tmp/v466537/102"4L, 52C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/103[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/103"' -S /tmp/v466537/102[?1l> shell returned 1 [?1h="/tmp/v466537/103" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 159C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/104[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/104" 5L, 65C appended6L, 87C 5 substitutions on 5 lines "/tmp/v466537/104"6L, 82C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/105[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/105"' -S /tmp/v466537/104[?1l> shell returned 1 [?1h="/tmp/v466537/105" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 159C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/106[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/106" 1L, 9C appended2L, 31C2L, 30C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/107[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/107"' -S /tmp/v466537/106[?1l> shell returned 1 [?1h="/tmp/v466537/107" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 153C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/108[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/108" 3L, 38C appended4L, 60C 3 substitutions on 3 lines "/tmp/v466537/108"4L, 57C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/109[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/109"' -S /tmp/v466537/108[?1l> shell returned 1 [?1h="/tmp/v466537/109" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 157C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/110[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/110" 4L, 44C appended5L, 66C 4 substitutions on 4 lines "/tmp/v466537/110"5L, 62C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/111[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/111"' -S /tmp/v466537/110[?1l> shell returned 1 [?1h="/tmp/v466537/111" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 157C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/112[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/112" 3L, 32C appended4L, 54C 3 substitutions on 3 lines "/tmp/v466537/112"4L, 51C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/113[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/113"' -S /tmp/v466537/112[?1l> shell returned 1 [?1h="/tmp/v466537/113" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 157C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/114[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/114" 5L, 64C appended6L, 86C 5 substitutions on 5 lines "/tmp/v466537/114"6L, 81C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/115[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/115"' -S /tmp/v466537/114[?1l> shell returned 1 [?1h="/tmp/v466537/115" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 157C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/116[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/116" 1L, 11C appended2L, 33C2L, 32C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/117[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/117"' -S /tmp/v466537/116[?1l> shell returned 1 [?1h="/tmp/v466537/117" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 157C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/118[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/118" 3L, 40C appended4L, 62C 3 substitutions on 3 lines "/tmp/v466537/118"4L, 59C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/119[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/119"' -S /tmp/v466537/118[?1l> shell returned 1 [?1h="/tmp/v466537/119" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 161C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/120[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/120" 4L, 46C appended5L, 68C 4 substitutions on 4 lines "/tmp/v466537/120"5L, 64C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/121[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/121"' -S /tmp/v466537/120[?1l> shell returned 1 [?1h="/tmp/v466537/121" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 161C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/122[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/122" 3L, 34C appended4L, 56C 3 substitutions on 3 lines "/tmp/v466537/122"4L, 53C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/123[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/123"' -S /tmp/v466537/122[?1l> shell returned 1 [?1h="/tmp/v466537/123" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 161C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/124[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/124" 5L, 66C appended6L, 88C 5 substitutions on 5 lines "/tmp/v466537/124"6L, 83C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/125[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/125"' -S /tmp/v466537/124[?1l> shell returned 1 [?1h="/tmp/v466537/125" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 161C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/126[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/126" 4L, 37C appended5L, 59C 4 substitutions on 4 lines "/tmp/v466537/126"5L, 55C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/127[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/127"' -S /tmp/v466537/126[?1l> shell returned 1 [?1h="/tmp/v466537/127" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 150C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/128[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/128" 4L, 41C appended5L, 63C 4 substitutions on 4 lines "/tmp/v466537/128"5L, 59C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/129[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/95' -c 'debuggreedy|set viminfo+=nvi minfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/129"' -S /tmp/v466537/128[?1l> shell returned 1 [?1h="/tmp/v466537/129" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/95" 6L, 159C "test49.in" 13L, 320C *** Test 53: OK (131071) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/131[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/131" 1L, 13C appended2L, 35C2L, 34C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/132[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/132"' -S /tmp/v466537/131[?1l> shell returned 1 [?1h="/tmp/v466537/132" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 164C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/133[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/133" 3L, 36C appended4L, 58C 3 substitutions on 3 lines "/tmp/v466537/133"4L, 55C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/134[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/134"' -S /tmp/v466537/133[?1l> shell returned 1 [?1h="/tmp/v466537/134" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 168C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/135[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/135" 3L, 38C appended4L, 60C 3 substitutions on 3 lines "/tmp/v466537/135"4L, 57C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/136[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/136"' -S /tmp/v466537/135[?1l> shell returned 1 [?1h="/tmp/v466537/136" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 154C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/137[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/137" 4L, 48C appended5L, 70C 4 substitutions on 4 lines "/tmp/v466537/137"5L, 66C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/138[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/138"' -S /tmp/v466537/137[?1l> shell returned 1 [?1h="/tmp/v466537/138" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 168C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/139[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/139" 4L, 53C appended5L, 75C 4 substitutions on 4 lines "/tmp/v466537/139"5L, 71C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/140[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/140"' -S /tmp/v466537/139[?1l> shell returned 1 [?1h="/tmp/v466537/140" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 155C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/141[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/141" 5L, 62C appended6L, 84C 5 substitutions on 5 lines "/tmp/v466537/141"6L, 79C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/142[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/142"' -S /tmp/v466537/141[?1l> shell returned 1 [?1h="/tmp/v466537/142" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 155C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/143[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/143" 5L, 64C appended6L, 86C 5 substitutions on 5 lines "/tmp/v466537/143"6L, 81C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/144[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/144"' -S /tmp/v466537/143[?1l> shell returned 1 [?1h="/tmp/v466537/144" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 154C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/145[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/145" 3L, 36C appended4L, 58C 3 substitutions on 3 lines "/tmp/v466537/145"4L, 55C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/146[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/146"' -S /tmp/v466537/145[?1l> shell returned 1 [?1h="/tmp/v466537/146" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 168C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/147[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/147" 5L, 67C appended6L, 89C 5 substitutions on 5 lines "/tmp/v466537/147"6L, 84C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/148[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/148"' -S /tmp/v466537/147[?1l> shell returned 1 [?1h="/tmp/v466537/148" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 167C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/149[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/149" 5L, 68C appended6L, 90C 5 substitutions on 5 lines "/tmp/v466537/149"6L, 85C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/150[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/150"' -S /tmp/v466537/149[?1l> shell returned 1 [?1h="/tmp/v466537/150" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 168C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/151[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/151" 7L, 95C appended8L, 117C 7 substitutions on 7 lines "/tmp/v466537/151"8L, 110C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/152[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/130' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/152"' -S /tmp/v466537/151[?1l> shell returned 1 [?1h="/tmp/v466537/152" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/130" 6L, 167C "test49.in" 13L, 320C *** Test 54: OK (2047) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/154[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/154" 1L, 13C appended2L, 35C2L, 34C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/155[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/155"' -S /tmp/v466537/154[?1l> shell returned 1 [?1h="/tmp/v466537/155" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 172C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/156[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/156" 3L, 36C appended4L, 58C 3 substitutions on 3 lines "/tmp/v466537/156"4L, 55C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/157[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/157"' -S /tmp/v466537/156[?1l> shell returned 1 [?1h="/tmp/v466537/157" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 176C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/158[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/158" 4L, 48C appended5L, 70C 4 substitutions on 4 lines "/tmp/v466537/158"5L, 66C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/159[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/159"' -S /tmp/v466537/158[?1l> shell returned 1 [?1h="/tmp/v466537/159" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 176C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/160[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/160" 3L, 36C appended4L, 58C 3 substitutions on 3 lines "/tmp/v466537/160"4L, 55C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/161[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/161"' -S /tmp/v466537/160[?1l> shell returned 1 [?1h="/tmp/v466537/161" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 176C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/162[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/162" 5L, 68C appended6L, 90C 5 substitutions on 5 lines "/tmp/v466537/162"6L, 85C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/163[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/163"' -S /tmp/v466537/162[?1l> shell returned 1 [?1h="/tmp/v466537/163" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 176C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/164[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/164" 1L, 10C appended2L, 32C2L, 31C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/165[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/165"' -S /tmp/v466537/164[?1l> shell returned 1 [?1h="/tmp/v466537/165" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 166C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/166[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/166" 3L, 33C appended4L, 55C 3 substitutions on 3 lines "/tmp/v466537/166"4L, 52C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/167[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/167"' -S /tmp/v466537/166[?1l> shell returned 1 [?1h="/tmp/v466537/167" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 170C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/168[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/168" 4L, 45C appended5L, 67C 4 substitutions on 4 lines "/tmp/v466537/168"5L, 63C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/169[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/169"' -S /tmp/v466537/168[?1l> shell returned 1 [?1h="/tmp/v466537/169" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 170C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/170[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/170" 3L, 33C appended4L, 55C 3 substitutions on 3 lines "/tmp/v466537/170"4L, 52C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/171[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/171"' -S /tmp/v466537/170[?1l> shell returned 1 [?1h="/tmp/v466537/171" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 170C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/172[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/172" 5L, 65C appended6L, 87C 5 substitutions on 5 lines "/tmp/v466537/172"6L, 82C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/173[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/153' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/173"' -S /tmp/v466537/172[?1l> shell returned 1 [?1h="/tmp/v466537/173" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/153" 6L, 170C "test49.in" 13L, 320C *** Test 55: OK (1023) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/175[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/175" 1L, 11C appended2L, 33C2L, 32C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/176[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/176"' -S /tmp/v466537/175[?1l> shell returned 1 [?1h="/tmp/v466537/176" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 158C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/177[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/177" 3L, 34C appended4L, 56C 3 substitutions on 3 lines "/tmp/v466537/177"4L, 53C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/178[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/178"' -S /tmp/v466537/177[?1l> shell returned 1 [?1h="/tmp/v466537/178" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 162C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/179[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/179" 3L, 40C appended4L, 62C 3 substitutions on 3 lines "/tmp/v466537/179"4L, 59C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/180[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/180"' -S /tmp/v466537/179[?1l> shell returned 1 [?1h="/tmp/v466537/180" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 162C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/181[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/181" 3L, 32C appended4L, 54C 3 substitutions on 3 lines "/tmp/v466537/181"4L, 51C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/182[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/182"' -S /tmp/v466537/181[?1l> shell returned 1 [?1h="/tmp/v466537/182" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 152C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/183[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/183" 3L, 35C appended4L, 57C 3 substitutions on 3 lines "/tmp/v466537/183"4L, 54C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/184[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/184"' -S /tmp/v466537/183[?1l> shell returned 1 [?1h="/tmp/v466537/184" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 155C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/185[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/185" 4L, 44C appended5L, 66C 4 substitutions on 4 lines "/tmp/v466537/185"5L, 62C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/186[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/186"' -S /tmp/v466537/185[?1l> shell returned 1 [?1h="/tmp/v466537/186" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 152C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/187[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/187" 4L, 47C appended5L, 69C 4 substitutions on 4 lines "/tmp/v466537/187"5L, 65C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/188[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/188"' -S /tmp/v466537/187[?1l> shell returned 1 [?1h="/tmp/v466537/188" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 155C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/189[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/189" 5L, 64C appended6L, 86C 5 substitutions on 5 lines "/tmp/v466537/189"6L, 81C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/190[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/190"' -S /tmp/v466537/189[?1l> shell returned 1 [?1h="/tmp/v466537/190" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 152C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/191[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/191" 5L, 67C appended6L, 89C 5 substitutions on 5 lines "/tmp/v466537/191"6L, 84C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/192[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'au VimLeave * redir END' -c 'redir! >/tmp/v466537/174' -c 'debuggreedy|set viminfo+=nv iminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/192"' -S /tmp/v466537/191[?1l> shell returned 1 [?1h="/tmp/v466537/192" 0L, 0C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/tmp/v466537/174" 6L, 155C "test49.in" 13L, 320C *** Test 56: OK (511) function FuncException() 1 let g:exception = v:exception endfunction"/tmp/v466537/193" [noeol] 4L, 80C E486: Pattern not found: ^\s*$ "/tmp/v466537/193" 1L, 36C written "test49.in" 13L, 320C function FuncThrowpoint() 1 let g:throwpoint = v:throwpoint endfunction"/tmp/v466537/194" [noeol] 4L, 83C E486: Pattern not found: ^\s*$ "/tmp/v466537/194" 1L, 38C written "test49.in" 13L, 320C function T(arg, line) 1 if a:line == 2 2throw a:arg" in line 2 3 elseif a:line == 4 4throw a:arg" in line 4 5 elseif a:line == 6 6throw a:arg" in line 6 7 elseif a:line == 8 8throw a:arg" in line 8 9 endif endfunction"/tmp/v466537/195"[noeol] 12L, 341C 9 substitutions on 9 lines 8 substitutions on 8 lines E486: Pattern not found: ^\s*$ "/tmp/v466537/195" 9L, 292C written "test49.in" 13L, 320C function G(arg, line) 1 call T(a:arg, a:line) endfunction"/tmp/v466537/196"[noeol] 4L, 69C E486: Pattern not found: ^\s*$ "/tmp/v466537/196" 1L, 30C written "test49.in" 13L, 320C function F(arg, line) 1 call G(a:arg, a:line) endfunction"/tmp/v466537/197"[noeol] 4L, 69C E486: Pattern not found: ^\s*$ "/tmp/v466537/197" 1L, 30C written "test49.in" 13L, 320C *** Test 57: OK (2147450880) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/198[?1l>[?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/198" 87L, 1700C appended88L, 1722C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/199[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/199"' -c 'breakadd func 4 T' -S /tmp/v466537/198[?1l> shell returned 1 [?1h="/tmp/v466537/199" 8L, 36C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 58: OK (624945) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/200[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/200" 293L, 5789C appended294L, 5811C 3 substitutions on 3 lines "/tmp/v466537/200"294L, 5808C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/201[?1l> [?1h=:!echo 'q^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimRe sult = "/tmp/v466537/201"' -c 'breakadd file 115 /tmp/v466537/200' -c 'breakadd file 225 /tmp/v466537/200' -S /tmp/v466537/200[?1l> shell returned 1 [?1h="/tmp/v466537/201" 28L, 162C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 59: OK (2038431743) "/n/o/n/w/r/i/t/a/b/l/e/_/f/i/l/e" "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/202[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/202" 33L, 765C appended34L, 787C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/203[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/203"' -c 'breakadd file 7 /tmp/v466537/202' -S /tmp/v466537/202[?1l> shell returned 1 [?1h="/tmp/v466537/203" 3L, 27C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 60: OK (311511339) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/204[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/204" 115L, 2272C appended116L, 2294C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/205[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'le tExtraVimResult = "/tmp/v466537/205"' -c 'breakadd file 8 /tmp/v466537/204' -c 'breakadd file 36 /tmp/v466537/204' -c 'breakad dfile 40 /tmp/v466537/204' -c 'breakadd file 69 /tmp/v466537/204' -c 'breakadd file 95 /tmp/v466537/204' -c 'breakadd file 97 /tmp/v466537/204' -S /tmp/v466537/204[?1l> shell returned 1 [?1h="/tmp/v466537/205" 14L, 81C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 61: OK (374889517) function F() 1 while 1 2 " Missing :endwhile endfunction"/tmp/v466537/206"[noeol] 5L, 73C E486: Pattern not found: ^\s*$ "/tmp/v466537/206" 2L, 40C written "test49.in" 13L, 320C *** Test 62: OK (286331153) "/i/m/p/o/s/s/i/b/l/e" line 6342: "/i/m/p/o/s/s/i/b/l/e" E212: Can't open file for writing *** Test 63: OK (236978127) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/207[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/207" 149L, 2828C appended150L, 2850C 6 substitutions on 6 lines "/tmp/v466537/207"150L, 2844C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/208[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/208"' -c 'breakadd file 63 /tmp/v466537/207' -S /tmp/v466537/207[?1l> shell returned 1 [?1h="/tmp/v466537/208" 16L, 97C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 64: OK (1499645335) *** Test 65: OK (70187) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/209[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/209" 78L, 1520C appended79L, 1542C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/210[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/210"' -c 'breakadd func 8 F' -S /tmp/v466537/209[?1l> shell returned 1 [?1h="/tmp/v466537/210" 6L, 22C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** 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/v466537/211" [New File] "test49.in" 13L, 320C "/tmp/v466537/212" [New File] "test49.in" 13L, 320C *** Test 74: OK (224907669) *** Test 75: OK (2000403408) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/213[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/213" 253L, 6369C appended254L, 6391C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/214[?1l> [?1h=:!echo 'q^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/214"' -c 'breakadd func 2 INT' -S /tmp/v466537/213[?1l> shell returned 1 [?1h="/tmp/v466537/214" 28L, 167C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 76: OK (1610087935) Error detected while processing function ERR: line 2: E492: Not an editor command: asdf E492: Not an editor command: asdf E492: Not an editor command: asdf *** Test 77: OK (1388671) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/215[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/215" 161L, 4543C appended162L, 4565C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/216[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/216"' -S /tmp/v466537/215[?1l> shell returned 1 [?1h="/tmp/v466537/216" 1L, 10C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 78: OK (134217728) Error detected while processing function NEXT: line 1: E121: Undefined variable: novar E15: Invalid expression: novar | Xloop 1 E121: Undefined variable: novar E488: Trailing characters E108: No such variable: "novar" E488: Trailing characters E121: Undefined variable: novar E15: Invalid expression: novar E475: Invalid argument: {novar} | Xloop 1 E121: Undefined variable: novar E15: Invalid expression: novar E475: Invalid argument: { novar} | Xloop 1 *** Test 79: OK (70288929) Error detected while processing /sources/vim70/src/testdir/test49.vim: line 8828: E584: :elseif after :else: elseif 1 ||| 2 line 8838: E584: :elseif after :else: elseif 1 ||| 2 line 8846: E582: :elseif without :if: elseif 1 ||| 2 line 8854: E582: :elseif without :if: elseif 1 ||| 2 *** Test 80: OK (17895765) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/217[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/217" 15L, 272C appended16L, 294C16L, 293C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/218[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/218"' -S /tmp/v466537/217[?1l> shell returned 1 [?1h="/tmp/v466537/218" 2L, 4C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/219[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/219" 12L, 227C appended13L, 249C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/220[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/220"' -c 'breakadd file 8 /tmp/v466537/219' -S /tmp/v466537/219[?1l> shell returned 1 [?1h="/tmp/v466537/220" 2L, 8C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 81: OK (387) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/221[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/221" 20L, 417C appended21L, 439C21L, 438C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/222[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/222"' -S /tmp/v466537/221[?1l> shell returned 1 [?1h="/tmp/v466537/222" 1L, 2C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/223[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/223" 24L, 480C appended25L, 502C25L, 501C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/224[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/224"' -S /tmp/v466537/223[?1l> shell returned 1 [?1h="/tmp/v466537/224" 1L, 4C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/225[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/225" 17L, 390C appended18L, 412C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/226[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/226"' -c 'breakadd file 7 /tmp/v466537/225' -S /tmp/v466537/225[?1l> shell returned 1 [?1h="/tmp/v466537/226" 1L, 6C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/227[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/227" 21L, 444C appended22L, 466C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/228[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/228"' -c 'breakadd func 6 I' -S /tmp/v466537/227[?1l> shell returned 1 [?1h="/tmp/v466537/228" 1L, 8C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 82: OK (8454401) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/229[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/229" 17L, 307C appended18L, 329C18L, 328C written "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/230[?1l> [?1h=:!echo 'q' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResult = "/tmp/v466537/230"' -S /tmp/v466537/229[?1l> shell returned 1 [?1h="/tmp/v466537/230" 3L, 7C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/231[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/231" 14L, 266C appended15L, 288C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/232[?1l> [?1h=:!echo 'q^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimResul t= "/tmp/v466537/232"' -c 'breakadd file 8 /tmp/v466537/231' -S /tmp/v466537/231[?1l> shell returned 1 [?1h="/tmp/v466537/232" 3L, 13C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 83: OK (2835) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/233[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/233" 154L, 3580C appended155L, 3602C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/234[?1l> [?1h=:!echo 'q^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVimRe sult = "/tmp/v466537/234"' -c 'breakadd func 1 INT' -S /tmp/v466537/233[?1l> shell returned 1 [?1h="/tmp/v466537/234" 18L, 118C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 84: OK (934782101) TMP "/tmp/v466537/235" [noeol] 2L, 6C/ "test49.in" 13L, 320C "/n/o/n/e/x/i/s/t/e/n/t" "/tmp/v466537/237" 1L, 1C "test49.in" 13L, 320C :!echo XYZ >/tmp/v466537/238[?1l> [?1h="/tmp/v466537/239" [New File] "test49.in" 13L, 320C *** Test 85: OK (198689) "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!echo 'source /tmp/v466537/3' >/tmp/v466537/240[?1l> [?1h=/^\s*if\s\+ExtraVim(.*)/+ 1 "/tmp/v466537/240" 151L, 3929C appended152L, 3951C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C :!>/tmp/v466537/241[?1l> [?1h=:!echo 'q^Mq^Mq^Mq' | ../vim -u NONE -N -Xes -c 'debuggreedy|set viminfo+=nviminfo' -c 'let ExtraVimBegin = 1' -c 'let ExtraVi mResult = "/tmp/v466537/241"' -c 'breakadd func 5 ThrowOnInterrupt' -S /tmp/v466537/240[?1l> shell returned 1 [?1h="/tmp/v466537/241" 16L, 281C "/sources/vim70/src/testdir/test49.vim" [readonly] 9802L, 224141C "test49.in" 13L, 320C *** Test 86: OK (50443995) Press ENTER or type command to continueThis 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 before ENDTEST. STARTTEST :so small.vim :se nocp nomore viminfo+=nviminfo :so test49.vim GGGGGGGGGG"rp:.-,$wq! test.out ENDTEST Results of test49.vim: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 91 more lines*** Test 1: OK (34695) *** Test 2: OK (34695) *** Test 3: OK (1384648195) *** Test 4: OK (32883) *** Test 5: OK (32883) *** Test 6: OK (603978947) *** Test 7: OK (90563) *** Test 8: OK (562493431) *** Test 9: OK (363) *** Test 10: OK (559615) *** Test 11: OK (2049) *** Test 12: OK (352256) *** Test 13: OK (145) *** Test 14: OK (42413) *** Test 15: OK (42413) *** Test 16: OK (8722) *** Test 17: OK (285127993) *** Test 18: OK (67224583) *** Test 19: OK (69275973) *** Test 20: OK (1874575085) *** Test 21: OK (147932225) *** Test 22: OK (4161) *** Test 23: OK (49) *** Test 24: OK (41) *** Test 25: OK (260177811) *** Test 26: OK (1681500476) *** Test 27: OK (1996459) *** Test 28: OK (1996459) *** Test 29: OK (170428555) *** Test 30: OK (190905173) *** Test 31: OK (190905173) *** Test 32: OK (354833067) --- Test 33: sum = 178275600 (ok):.-,$wq! test.out "test.out" [New] 92L, 2672C written [?1l> 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 [?1h="test51.in" 36 lines, 808 charactersTests for ":highlight". vim: set ft=vim : STARTTEST :so small.vim :" basic test if ":highlight" doesn't crash :highlight :hi Search :" test setting colors. :" test clearing one color and all doesn't generate error or warning :hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibg=Cyan :hi Group2 term= cterm= :hi Group3 term=underline cterm=bold :redir! >test.out :hi NewGroup :hi Group2 :hi Group3 :hi clear NewGroup :hi NewGroup :hi Group2 :hi Group2 NONE :hi Group2 :hi clear :hi Group3 :hi Crash term='asdf :redir END :" filter ctermfg and ctermbg, the numbers depend on the terminal :e test.out :%s/ctermfg=\d*/ctermfg=2/ :%s/ctermbg=\d*/ctermbg=3/ :" filter out possibly translated error message :%s/E475: [^:]*:/E475:/ :" fix the fileformat :set ff& :wq! ENDTEST ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 31 lines, 746 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :" basic test if ":highlight" doesn't crash :highlight SpecialKey xxx term=bold ctermfg=1 NonTextxxx term=bold ctermfg=9 Directory xxx term=bold ctermfg=1 ErrorMsgxxx term=standout ctermfg=15 ctermbg=4 IncSearch xxx term=reverse cterm=reverse Searchxxx term=reverse ctermfg=0 ctermbg=14 MoreMsgxxx term=bold ctermfg=2 ModeMsgxxx term=bold cterm=bold LineNrxxx term=underline ctermfg=6 Questionxxx term=standout ctermfg=2 StatusLine xxx term=bold,reverse cterm=bold,reverse StatusLineNC xxx term=reverse cterm=reverse VertSplit xxx term=reverse cterm=reverse Titlexxx term=bold ctermfg=5 Visualxxx term=reverse cterm=reverse VisualNOS xxx cleared WarningMsg xxx term=standout ctermfg=4 WildMenuxxx term=standout ctermfg=0 ctermbg=14 Foldedxxx term=standout ctermfg=1 ctermbg=7 FoldColumn xxx term=standout ctermfg=1 ctermbg=7 DiffAddxxx term=bold ctermbg=9 DiffChange xxx term=bold ctermbg=13 DiffDelete xxx term=bold ctermfg=9 ctermbg=11 DiffTextxxx term=reverse cterm=bold ctermbg=12 SignColumn xxx cleared SpellBadxxx term=reverse ctermbg=12 SpellCapxxx term=reverse ctermbg=9 SpellRare xxx term=reverse ctermbg=13 SpellLocal xxx term=underline ctermbg=11 Pmenuxxx ctermbg=13 PmenuSelxxx ctermbg=7 PmenuSbar xxx ctermbg=7 PmenuThumb xxx cterm=reverse TabLinexxx term=underline cterm=underline ctermfg=0 ctermbg=7 TabLineSel xxx term=bold cterm=bold TabLineFill xxx term=reverse cterm=reverse CursorColumn xxx term=reverse ctermbg=7 CursorLine xxx term=underline cterm=underline MatchParen xxx term=reverse ctermbg=11 Press ENTER or type command to continue:hi Search Searchxxx term=reverse ctermfg=0 ctermbg=14 Press ENTER or type command to continue:" test setting colors. Tests 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 ~ ~ ~ ~ ~ ~:" 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 E418: Illegal value: guifg=#00ff00:hi Group2 term= cterm= E418: Illegal value: cterm=:hi Group3 term=underline cterm=bold :redir! >test.out :hi NewGroup NewGroupxxx term=bold cterm=italic ctermfg=1 ctermbg=7 Press ENTER or type command to continue:hi Group2 Group2xxx cleared Press ENTER or type command to continue:hi Group3 Group3xxx term=underline cterm=bold Press ENTER or type command to continue:hi clear NewGroup Tests for ":highlight". vim: set ft=vim : STARTTEST :so small.vim :" basic test if ":highlight" doesn't crash :highlight:hi NewGroup NewGroupxxx cleared Press ENTER or type command to continue:hi Group2 Group2xxx cleared Press ENTER or type command to continue:hi Group2 NONE Tests for ":highlight". vim: set ft=vim : STARTTEST :so small.vim:hi Group2 Group2xxx cleared Press ENTER or type command to continue:hi clear Tests 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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:hi Group3 Group3xxx cleared Press ENTER or type command to continue:hi Crash term='asdf E475: Invalid argument: term='asdf Press ENTER or type command to continue:redir END Tests for ":highlight". vim: set ft=vim : STARTTEST:" filter ctermfg and ctermbg, the numbers depend on the terminal :e test.out "test.out" 20 lines, 289 charactersNewGroup xxx term=bold cterm=italic ctermfg=1 ctermbg=7Group2 xxx clearedGroup3 xxx term=underline cterm=boldNewGroup xxx clearedGroup2 xxx clearedGroup2 xxx clearedGroup3 xxx clearedE475: Invalid argument: term='asdf~~~~~~~~~~~~~~~ ~:%s/ctermfg=\d*/ctermfg=2/ 2 :%s/ctermbg=\d*/ctermbg=3/ 3 :" filter out possibly translated error message :%s/E475: [^:]*:/E475:/ term='asdf:" fix the fileformat :set ff& :wq! "test.out" 20 lines, 271 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test52.failed test.ok test.out X* viminfo cp test52.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test52.in Vim: Warning: Output is not to a terminal [?1h="test52.in" 65 lines, 1645 charactersTests 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:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 57 lines, 1333 characters written:set ff& cpo+=A /ENDTEST: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  :so! Xdotest :so mbyte.vim :" make this a dummy test for non-Win32 systems :if !has("win32") | e! test.ok | wq! test.out | endif "test.ok" 18 lines, 1374 characters "test.out" [New File] 18 lines, 1374 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test53.failed test.ok test.out X* viminfo cp test53.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test53.in Vim: Warning: Output is not to a terminal [?1h="test53.in" 48 lines, 952 charactersTests for string and html text objects. vim: set ft=vim : Note that the end-of-line moves the cursor to the next test line. Also test match() and matchstr() STARTTEST :so small.vim /^start:/ da" 0va'a'rx 02f`da` 0fXdi" 03f'vi'ry :set quoteescape=+*- di` $F"va"oha"i"rz :" /^ first match) :put =matchstr(\"abcd\", \".\", 0, -1) " a :put =match(\"abcd\", \".\", 0, 5) " -1 :put =match(\"abcd\", \".\", 0, -1) " 0 :/^start:/,/^end:/wq! test.out ENDTEST start: "wo\"rd\\" foo 'foo' 'bar' 'piep' bla bla `quote` blah out " in "noXno" "'" 'blah' rep 'buh' bla `s*`d-`+++`l**` b`la voo "nah" sdf " asdf" sdf " sdf" sd -asdfXasdfasdf- -asdXasdfasdf- -asdfXasdfasdf- -asdXasdfasdf-:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 24 lines, 461 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim /^start:/ fo 'foo' 'bar' xxxxxxxxxxxx blah " ' repyyyyy:set quoteescape=+*- ` b`la" sdf"" " asdf" sdf ah" sdf " voo "zzzzzzzzzzzzzzzzzzzzzzzzzzzz voo " :" /^asdf- - -asdf-  --  :" :put =matchstr(\"abcd\", \".\", 0, 2) " b  b :put =matchstr(\"abcd\", \"..\", 0, 2) " bc  bc :put =matchstr(\"abcd\", \".\", 2, 0) " c (zero and negative -> first match)  c :put =matchstr(\"abcd\", \".\", 0, -1) " a  a :put =match(\"abcd\", \".\", 0, 5) " -1  -1 :put =match(\"abcd\", \".\", 0, -1) " 0  0 :/^start:/,/^end:/wq! test.out search hit BOTTOM, continuing at TOP "test.out" [New File] 21 lines, 217 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test54.failed test.ok test.out X* viminfo cp test54.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test54.in Vim: Warning: Output is not to a terminal [?1h="test54.in" 17 lines, 527 charactersSome tests for buffer-local autocommands STARTTEST :so small.vim :e xx :!rm -f test.out :au BufLeave :!echo buffer-local autommand in %>> test.out :e somefile" here, autocommand for xx shall write test.out :" but autocommand shall not apply to buffer named :bwipe xx" here, autocommand shall be auto-deleted :e xx" nothing shall be written :e somefile" nothing shall be written :qa! ENDTEST start of test file xx end of test file xx ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 10 lines, 424 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :e xx "xx" [New File]~~~~~~~~~~~~~ ~~~:!rm -f test.out [?1l> [?1h= Press ENTER or type command to continue:au BufLeave :!echo buffer-local autommand in %>> test.out ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:e somefile " here, autocommand for xx shall write test.out :!echo buffer-local autommand in xx>> test.out "somefile" [New File] Press ENTER or type command to continue: " but autocommand shall not apply to buffer named ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:bwipe xx " here, autocommand shall be auto-deleted :e xx " nothing shall be written "xx" [New File]:e somefile " nothing shall be written "somefile" [New File]:qa! [?1l>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 [?1h="test55.in" 343 lines, 6998 charactersTests 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]:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 337 lines, 6912 characters written:set ff& cpo+=A /ENDTEST: 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)) :" :endfun :call Test(1, 2, [3, 4], {5: 6}) " This may take a while :" :/^start:/,$wq! test.out ENDTEST start: :so! Xdotest :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) : :try : :unlet l[:3] : :unlet l[1:] : :catch : :$put =v:exception : :endtry : :$put =string(l) : :" : :unlet d.c : :unlet d[-1] : :$put =string(d) : :" : :" removing items out of range: silently skip items that don't exist : let l = [0, 1, 2, 3] : :unlet l[2:1] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[2:2] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[2:3] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[2:4] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[2:5] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[-1:2] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[-2:2] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[-3:2] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[-4:2] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[-5:2] : :$put =string(l) : let l = [0, 1, 2, 3] : :unlet l[-6:2] : :$put =string(l) : :" : :" assignment to a list : :let l = [0, 1, 2, 3] : :let [va, vb] = l[2:3] : :$put =va : :$put =vb : :try : : let [va, vb] = l : :catch : : $put =v:exception[:14] : :endtry : :try : : let [va, vb] = l[1:1] : :catch : : $put =v:exception[:14] : :endtry : :" : :" manipulating a big Dictionary (hashtable.c has a border of 1000 entries) : :let d = {} : :for i in range(1500) : : let d[i] = 3000 - i : :endfor : :$put =d[0] . ' ' . d[100] . ' ' . d[999] . ' ' . d[1400] . ' ' . d[1499] : :try : : let n = d[1500] : :catch : : $put =v:exception[:14] . v:exception[-4:-1] : :endtry : :" lookup each items : :for i in range(1500) : : if d[i] != 3000 - i : : $put =d[i] : : endif : :endfor : : let i += 1 : :" delete even items : :while i >= 2 : : let i -= 2 : : unlet d[i] : :endwhile : :$put =get(d, 1500 - 100, 'NONE') . ' ' . d[1] : :" delete odd items, checking value, one intentionally wrong : :let d[33] = 999 : :let i = 1 : :while i < 1500 : : if d[i] != 3000 - i : : $put =i . '=' . d[i] : : else : : unlet d[i] : : endif : : let i += 2 : :endwhile : :$put =string(d) " must be almost empty now : :unlet d : :" : :" Dictionary function : :let dict = {} : :func dict.func(a) dict : : $put =a:a . len(self.data) : :endfunc : :let dict.data = [1,2,3] : :call dict.func("len: ") : :let x = dict.func("again: ") : :try : : let Fn = dict.func : : call Fn('xxx') : :catch : : $put =v:exception[:15] : :endtry : :" : :" Function in script-local List or Dict : :let g:dict = {} : :function g:dict.func() dict : : $put ='g:dict.func'.self.foo[1].self.foo[0]('asdf') : :endfunc : :let g:dict.foo = ['-', 2, 3] : :call insert(g:dict.foo, function('strlen')) : :call g:dict.func() : :" : :" Nasty: remove func from Dict that's being called (works) : :let d = {1:1} : :func d.func(a) :: return "a:". a:a ::endfunc ::$put =d.func(string(remove(d, 'func'))) ::" ::" Nasty: deepcopy() dict that refers to itself (fails when noref used) ::let d = {1:1, 2:2} ::let l = [4, d, 6] ::let d[3] = l ::let dc = deepcopy(d) ::try :: let dc = deepcopy(d, 1) ::catch :: $put =v:exception[:14] ::endtry ::let l2 = [0, l, l, 3] ::let l[1] = l2 ::let l3 = deepcopy(l2) ::$put ='same list: ' . (l3[1] is l3[2]) ::" ::" Locked variables ::for depth in range(5) :: $put ='depth is ' . depth :: for u in range(3) :: unlet l :: let l = [0, [1, [2, 3]], {4: 5, 6: {7: 8}}] :: exe "lockvar " . depth . " l" :: if u == 1 :: exe "unlockvar l" :: elseif u == 2 :: exe "unlockvar " . depth . " l" :: endif :: let ps = islocked("l").islocked("l[1]").islocked("l[1][1]").islocked("l[1][1][0]").'-'.islocked("l[2]").islo cked("l[2]['6']").islocked("l[2]['6'][7]") :: $put =ps :: let ps = '' :: try :: let l[1][1][0] = 99 :: let ps .= 'p' :: catch :: let ps .= 'F' :: endtry :: try :: let l[1][1] = [99] :: let ps .= 'p' :: catch :: let ps .= 'F' :: endtry :: try :: let l[1] = [99] :: let ps .= 'p' :: catch :: let ps .= 'F' :: endtry :: try :: let l[2]['6'][7] = 99 :: let ps .= 'p' :: catch :: let ps .= 'F' :: endtry :: try :: let l[2][6] = {99: 99} :: let ps .= 'p' :: catch :: let ps .= 'F' :: endtry :: try :: let l[2] = {99: 99} :: let ps .= 'p' :: catch :: let ps .= 'F' :: endtry :: try :: let l = [99] :: let ps .= 'p' :: catch :: let ps .= 'F' :: 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)) ::" ::endfun : 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)) :" :endfun :call Test(1, 2, [3, 4], {5: 6}) " This may take a while :" :/^start:/,$wq! test.out ENDTEST start: :call Test(1, 2, [3, 4], {5: 6}) " This may take a while 1000-000ppppppF 0000-000ppppppp 0000-000 pppppppdepth is 2 1100-100ppFppFF 0000-000ppppppp 0000-000pppppppdepth is 31110-110pFFpFFF0010-010 pFppFpp0000-000 ppppppp depth is 41111-111FFFFFFF0011-011FFpFFpp0000-000pppppppcaught a:000 caught a:000[0]caught a:000[2]caught a:000[3][1, 2, [3, 9, 5, 6], {'a': 12, '5': 8}]['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0'] ['x8', [0, 1, 2], 'foo6', 'foo', 4, 'xaaa', 2, 'A11', '-0'] ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]] [[0, 1, 2], 4, 2, 'xaaa', 'x8', 'foo6', 'foo', 'A11', '-0'] ['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 2, 4, [0, 1, 2]] ['aa', 'bb']['aa', 'bb'] ['', 'aa', 'bb', ''] ['', '', 'aa', '', 'bb', '', '']['aa', '', 'bb'] ['', 'aa', '', 'bb', ''] ['aa', '', 'bb', 'cc', ''] ['a', 'b', 'c'] ['', 'a', '', 'b', '', 'c', ''] :" :/^start:/,$wq! test.out search hit BOTTOM, continuing at TOP "test.out" [New File] 107 lines, 1891 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test56.failed test.ok test.out X* viminfo cp test56.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test56.in Vim: Warning: Output is not to a terminal [?1h="test56.in" 21 lines, 388 charactersTest for script-local function. vim: set ft=vim : STARTTEST :so small.vim :" :set nocp :/^start:/+1,/^end:/-1w! Xtest.vim :source Xtest.vim _x :$-1,$wq! test.out ENDTEST start: fun DoLast() call append(line('$'), "last line") endfun fun s:DoNothing() call append(line('$'), "nothing line") endfun nnoremap _x :call DoNothing()call DoLast() end: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 7 lines, 102 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :" :set nocp :/^start:/+1,/^end:/-1w! Xtest.vim "Xtest.vim" [New] 7L, 200C written:source Xtest.vim :call 3_DoNothing()|call 3_DoLast() nothing line last line :$-1,$wq! test.out "test.out" [New] 2L, 23C written [?1l> rm -rf X* test.ok viminfo rm -rf test57.failed test.ok test.out X* viminfo cp test57.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test57.in Vim: Warning: Output is not to a terminal [?1h="test57.in" 496 lines, 3654 charactersTests for :sort command. vim: set ft=vim : STARTTEST :so small.vim :" :/^t01:/+1,/^t02/-1sort :/^t02:/+1,/^t03/-1sort n :/^t03:/+1,/^t04/-1sort x :/^t04:/+1,/^t05/-1sort u :/^t05:/+1,/^t06/-1sort! :/^t06:/+1,/^t07/-1sort! n :/^t07:/+1,/^t08/-1sort! u :/^t08:/+1,/^t09/-1sort o :/^t09:/+1,/^t10/-1sort! x :/^t10:/+1,/^t11/-1sort/./ :/^t11:/+1,/^t12/-1sort/../ :/^t12:/+1,/^t13/-1sort/../u :/^t13:/+1,/^t14/-1sort/./n :/^t14:/+1,/^t15/-1sort/./r :/^t15:/+1,/^t16/-1sort/../r :/^t16:/+1,/^t17/-1sort/./rn :/^t17:/+1,/^t18/-1sort/\d/ :/^t18:/+1,/^t19/-1sort/\d/r :/^t19:/+1,/^t20/-1sort/\d/n :/^t20:/+1,/^t21/-1sort/\d/rn :/^t21:/+1,/^t22/-1sort/\d\d/ :/^t22:/+1,/^t23/-1sort/\d\d/n :/^t23:/+1,/^t24/-1sort/\d\d/x :/^t24:/+1,/^t25/-1sort/\d\d/r :/^t25:/+1,/^t26/-1sort/\d\d/rn :/^t26:/+1,/^t27/-1sort/\d\d/rx :/^t27:/+1,/^t28/-1sort no :/^t01:/,$wq! test.out ENDTEST t01: alphebetical abc ab a a321 a123 a122 b321 b123 c123d 123b:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 30 lines, 842 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :" :/^t01:/+1,/^t02/-1sort  123b2 a123 a ababcb:/^t02:/+1,/^t03/-1sort n b321 b321 b321b b322b c123d c321d t02: numeric abc :/^t03:/+1,/^t04/-1sort x ab a a122 a123 b123 c123d 123b a321 b321 c321d b321 b321b b322b t03: hexadecimal :/^t04:/+1,/^t05/-1sort u a ab abc 123b a122 a123 a321 b123 b321 b321 b321b b322b c123d c321d t04: alpha, unique :/^t05:/+1,/^t06/-1sort! 123b a a122 a123 a321 ab abc b123 b321 b321b b322b c123d c321d t05: alpha, reverse c321d :/^t06:/+1,/^t07/-1sort! n c123d b322b b321b b321 b321 b123 abc ab a321 a123 a122 a 123b t06: numeric, reverse b322b :/^t07:/+1,/^t08/-1sort! u b321b b321 c321d b321 a321 123b c123d b123 a123 a122 a ab abc t07: unique, reverse c321d :/^t08:/+1,/^t09/-1sort o c123d b322b b321b b321 b123 abc ab a321 a123 a122 a 123b t08: octal abc :/^t09:/+1,/^t10/-1sort! x ab a a122 a123 b123 c123d 123b a321 b321 c321d b321 b321b b322b t09: reverse, hexadecimal c321d :/^t10:/+1,/^t11/-1sort/./ c123d b322b b321b b321 b321 b123 a321 a123 a122 123b abc ab a t10: alpha, skip first character a :/^t11:/+1,/^t12/-1sort/../ a122 a123 b123 123b c123d a321 b321 b321 b321b c321d b322b ab abc t11: alpha, skip first 2 characters ab :/^t12:/+1,/^t13/-1sort/../u a a321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d abc t12: alpha, unique, skip first 2 characters ab :/^t13:/+1,/^t14/-1sort/./n a a321 b321 b321b c321d a122 b322b a123 b123 123b c123d abc t13: numeric, skip first character abc :/^t14:/+1,/^t15/-1sort/./r ab a a122 a123 b123 c123d 123b a321 b321 c321d b321 b321b b322b t14: alpha, sort on first character :/^t15:/+1,/^t16/-1sort/../r 123b abc ab a a321 a123 a122 b321 b123 b322b b321 b321b c123d c321d t15: alpha, sort on first 2 characters a :/^t16:/+1,/^t17/-1sort/./rn 123b a123 a122 a321 abc ab b123 b321 b322b b321 b321b c123d c321d t16: numeric, sort on first character abc :/^t17:/+1,/^t18/-1sort/\d/ ab a a321 a123 a122 b321 b123 c123d 123b c321d b322b b321 b321b t17: alpha, skip past first digit abc :/^t18:/+1,/^t19/-1sort/\d/r ab a a321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d t18: alpha, sort on first digit abc :/^t19:/+1,/^t20/-1sort/\d/n ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t19: numeric, skip past first digit abc :/^t20:/+1,/^t21/-1sort/\d/rn ab a a321 b321 c321d b321 b321b a122 b322b a123 b123 c123d 123b t20: numeric, sort on first digit abc :/^t21:/+1,/^t22/-1sort/\d\d/ ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t21: alpha, skip past first 2 digits abc :/^t22:/+1,/^t23/-1sort/\d\d/n ab a a321 b321 b321 b321b c321d a122 b322b a123 b123 123b c123d t22: numeric, skip past first 2 digits abc :/^t23:/+1,/^t24/-1sort/\d\d/x ab a a321 b321 c321d b321 b321b a122 b322b a123 b123 c123d 123b t23: hexadecimal, skip past first 2 digits abc :/^t24:/+1,/^t25/-1sort/\d\d/r ab a a321 b321 b321 a122 a123 b123 b321b c321d b322b 123b c123d t24: alpha, sort on first 2 digits abc :/^t25:/+1,/^t26/-1sort/\d\d/rn ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t25: numeric, sort on first 2 digits abc :/^t26:/+1,/^t27/-1sort/\d\d/rx ab a a123 a122 b123 c123d 123b a321 b321 c321d b322b b321 b321b t26: hexadecimal, sort on first 2 digits abc :/^t27:/+1,/^t28/-1sort no E474: Invalid argument:/^t01:/,$wq! test.out search hit BOTTOM, continuing at TOP "test.out" [New File] 455 lines, 2727 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test58.failed test.ok test.out X* viminfo cp test58.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test58.in Vim: Warning: Output is not to a terminal [?1h="test58.in" 630 lines, 10705 charactersTests 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'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'):set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 100 lines, 2377 characters written:set ff& cpo+=A /ENDTEST:$put =str :set spl=Xtest_ca.latin1.spl /^test2: ]smm:let [str, a] = spellbadword() :$put =str `m]s:let [str, a] = spellbadword() :$put =str :" :" 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') :" gg:/^test output:/,$wq! test.out ENDTEST 1affstart SET ISO8859-1 TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? MIDWORD '- KEP = RAR ? BAD ! PFX I N 1 PFX I 0 in . PFX O Y 1 PFX O 0 out . :so! Xdotest :so small.vim :" :" Don't want to depend on the locale from the environment :set enc=latin1 :$put =str :set spl=Xtest_ca.latin1.spl /^test2: ]smm:let [str, a] = spellbadword() :$put =str `m]s:let [str, a] = spellbadword() :$put =str :" :" 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') :" gg:/^test output:/,$wq! test.out ENDTEST 1affstart SET ISO8859-1 TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? MIDWORD '- KEP = RAR ? BAD ! PFX I N 1 PFX I 0 in . PFX O Y 1 PFX O 0 out .:e! "test58.in" 630 lines, 10705 charactersTests 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 $pu $put ='-------' " find all bad words and suggestions for themexe '1;/^' . a:aff . 'good:' normal 0f:]s let prevbad = '' while 1let [bad, a] = spellbadword() if bad == '' || bad == prevbad || bad == 'badend' breakendif 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'):" :" 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' : break : endif : let prevbad = bad : let lst = spellsuggest(bad, 3) : normal mm : $put =bad : $put =string(lst) : normal `m]s : endwhile : endfunc Tests 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():" :call TestOne('1', '1') "Xtest.aff" [New File] 46 lines, 754 characters written "Xtest.dic" [New File] 11 lines, 71 characters written Reading affix file Xtest.aff ... Reading dictionary file Xtest.dic ... line 2, word 0 - test Compressing word tree... 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 Press ENTER or type command to continue:$put =soundfold('goobledygoook') 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 putstesttestentestnthe end ukwrong-------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'] the ['put', 'uk', 'test']gebletegek :$put =soundfold('kóopërÿnôven')  kepereneven :$put =soundfold('oeverloos gezwets edale')  everles gesvets etele :" :" :" and now with SAL instead of SOFO items; test automatic reloading Tests 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'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'):/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff "Xtest.aff" 151 lines, 3412 characters written:mkspell! Xtest Xtest Reading affix file Xtest.aff ... Reading dictionary file Xtest.dic ... line 2, word 0 - test Compressing word tree... 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 Press ENTER or type command to continue:$put =soundfold('goobledygoook') badend test output: test 1-1 # file: Xtest.latin1.spl Comment deol déôr input OK output outputs outtestputputstesttestentestnthe endukwrong------- 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'] the['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etelekbltykk :$put =soundfold('kóopërÿnôven')  kprnfn :$put =soundfold('oeverloos gezwets edale')  *fls kswts tl :" :" also use an addition file Tests 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'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'):/^addstart/+1,/^addend/-1w! Xtest.latin1.add "Xtest.latin1.add" [New File] 3 lines, 38 characters written:mkspell! Xtest.latin1.add.spl Xtest.latin1.add Reading word file Xtest.latin1.add ... 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 Press ENTER or type command to continue:set spellfile=Xtest.latin1.add Tests for spell checking. vim: set ft=vim : STARTTEST :so small.vim :" :" Don't want to depend on the locale from the environment/^test2: MAP 9 MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend:let [str, a] = spellbadword() :$put =str 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'] end ['put', 'uk', 'test'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent :set spl=Xtest_us.latin1.spl /^test2: search hit BOTTOM, continuing at TOPMAP 9 MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend search hit BOTTOM, continuing at TOP :let [str, a] = spellbadword() :$put =str 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'] end ['put', 'uk', 'test'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend:let [str, a] = spellbadword() :$put =str 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'] end ['put', 'uk', 'test'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint :set spl=Xtest_gb.latin1.spl elequint /^test2: search hit BOTTOM, continuing at TOPMAP 9 MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend search hit BOTTOM, continuing at TOP:let [str, a] = spellbadword() :$put =str # 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'] end ['put', 'uk', 'test'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent :set spl=Xtest_nz.latin1.spl elequint elekwint elekwint /^test2: search hit BOTTOM, continuing at TOPMAP 9 MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend search hit BOTTOM, continuing at TOP :let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint elekwent :set spl=Xtest_ca.latin1.spl elequint elekwint elekwint elequint /^test2: search hit BOTTOM, continuing at TOPMAP 9 MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend search hit BOTTOM, continuing at TOP :let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint elekwent elequint MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûü MAP nñ MAP cç MAP yÿý MAP sß 2affend 2good: puts bad: inputs comment ok Ok end the. test déôl badend addstart /regions=usgbnz elequint/2 elekwint/3 addend test2: elequint test elekwint test elekwent asdf Test rules for compounding. 3affstart SET ISO8859-1 COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend 3dicstart 1234 foo/m bar/mx mï/m la/mx 3dicend 3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint elekwent elequint elekwint :" :" Postponed prefixes :call TestOne('2', '1') "Xtest.aff" 44 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... 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 Press ENTER or type command to continue:" SFX N 0 en [^n] SFX N 0 nen n SFX N 0 n . REP 3 REP g ch REP ch g REP svp s.v.p. MAP 9 MAP aàáâãäå MAP eèéêë MAP iìíîï MAP oòóôõö MAP uùúûüMAP nñ MAP cçMAP yÿý MAP sß2affend2good: puts bad: inputs comment ok Ok end the. test déôl badendaddstart /regions=usgbnzlequint/2 elekwint/3addendtest2:elequint test elekwint test elekwent asdfTest rules for compounding.3affstarSET ISO8859-1COMPOUNDMIN 3 COMPOUNDRULE m* NEEDCOMPOUND x 3affend3dicstart 1234:" Compound words :call TestOne('3', '3') "Xtest.aff" 5 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... 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 Press ENTER or type command to continue:call TestOne('4', '4') "Xtest.aff" 45 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... 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 Press ENTER or type command to continue:call TestOne('5', '5') "Xtest.aff" 25 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... 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 Press ENTER or type command to continue:call TestOne('6', '6') "Xtest.aff" 23 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... 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 Press ENTER or type command to continue:call TestOne('7', '7') "Xtest.aff" 22 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... 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 Press ENTER or type command to continue:" 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 leadprebarlead tail leadtail leadmiddletail bad: mee meea2 prabar probarmaat middle leadmiddle middletail tailleadleadprobar 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::" NOSLITSUGS :call TestOne('8', '8') "Xtest.aff" 3 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... 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 Press ENTER or type command to continue:" 7good: meea1 meeaé bar prebar barmeat prebarmeat leadprebarlead tail leadtail leadmiddletail bad: mee meea2 prabar probarmaat middle leadmiddle middletail tailleadleadprobar badend Test NOSLITSUGS 8affstart SET ISO8859-1 NOSPLITSUGS 8affend8dicstart 1234foobarfaabar 8dicend8good: foo bar faabarbad: foobar barfootest output:test 1-1# file: Xtest.latin1.spl Commentdeoldéôr inputOKoutput outputs outtest putputs testtestentestthe end uk wrongTests 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'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'):/^test output:/,$wq! test.out "test.out" [New File] 283 lines, 3793 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test59.failed test.ok test.out X* viminfo cp test59.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test59.in Vim: Warning: Output is not to a terminal [?1h="test59.in" 621 lines, 10818 charactersTests 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'break endif let prevbad = bad let lst = spellsuggest(bad, 3) normal mm $put =bad $put =string(lst) normal `m]s endwhile:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 101 lines, 2441 characters written:set ff& cpo+=A /ENDTEST]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 :" :" 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') :" gg:/^test output:/,$wq! test.out ENDTEST 1affstart SET ISO8859-1 TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? MIDWORD '- KEP = RAR ? BAD ! #NOSPLITSUGS PFX I N 1 PFX I 0 in . :so! Xdotest :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 ]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 :" :" 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') :" gg:/^test output:/,$wq! test.out ENDTEST 1affstart SET ISO8859-1 TRY esianrtolcdugmphbyfvkwjkqxz-ëéèêïîäàâöüû'ESIANRTOLCDUGMPHBYFVKWJKQXZ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep? MIDWORD '- KEP = RAR ? BAD ! #NOSPLITSUGS PFX I N 1 PFX I 0 in .:e! "test59.in" 621 lines, 10818 charactersTests for spell checking with 'encoding' set to "utf-8". vim: set ft=vim :STARTTESTso 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=latin1e!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 %yankquit $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' break endif let prevbad = bad let lst = spellsuggest(bad, 3) normal mm $put =bad $put =string(lst) normal `m]s endwhile:set enc=utf-8 Tests 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'break endif let prevbad = bad let lst = spellsuggest(bad, 3) normal mm $put =bad $put =string(lst) normal `m]s endwhile: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' : break : endif : let prevbad = bad : let lst = spellsuggest(bad, 3) : normal mm : $put =bad : $put =string(lst) : normal `m]s : endwhile : endfunc Tests 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:':" :call TestOne('1', '1') "Xtest.aff" "Xtest.aff" [New File] 48 lines, 768 characters written "Xtest.dic" "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... 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 Press ENTER or type command to continue:$put =soundfold('goobledygoook') 7good: meea1 meeaé bar prebar barmeat prebarmeat leadprebarlead tail leadtail leadmiddletail bad: mee meea2 prabar probarmaat middle leadmiddle middletail tailleadleadprobar badend test output: test 1-1 # file: Xtest.utf-8.spl Comment deol déôr input OK output outputs outtest put putstesttestentestnthe endukwrong------- 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'] the['put', 'uk', 'test'] gebletegek :$put =soundfold('kóopërÿnôven')  kepereneven :$put =soundfold('oeverloos gezwets edale')  everles gesvets etele :" :" :" and now with SAL instead of SOFO items; test automatic reloading Tests 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'break  endif  let prevbad = bad  let lst = spellsuggest(bad, 3) normal mm $put =bad $put =string(lst) normal `m]s  endwhile:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff "Xtest.aff" "Xtest.aff" 153 lines, 3426 characters written "Xtest.aff" 153 lines, 3426 characters written:mkspell! Xtest Xtest Reading affix file Xtest.aff ... Reading dictionary file Xtest.dic ... line 2, word 0 - test Compressing word tree... 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 Press ENTER or type command to continue:$put =soundfold('goobledygoook') leadprobar badend test output: test 1-1 # file: Xtest.utf-8.spl Comment deol déôr input OK output outputs outtestputputstesttestentestnthe endukwrong-------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'] the['put', 'uk', 'test'] gebletegekkepereneveneverles gesvets etele kbltykk :$put =soundfold('kóopërÿnôven')  kprnfn :$put =soundfold('oeverloos gezwets edale')  *fls kswts tl :" :" also use an addition file Tests 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'break  endif  let prevbad = bad  let lst = spellsuggest(bad, 3) normal mm $put =bad $put =string(lst) normal `m]s  endwhile:/^addstart/+1,/^addend/-1w! Xtest.utf-8.add "Xtest.utf-8.add" "Xtest.utf-8.add" [New File] 3 lines, 38 characters written "Xtest.utf-8.add" [New File] 3 lines, 38 characters written:mkspell! Xtest.utf-8.add.spl Xtest.utf-8.add Reading word file Xtest.utf-8.add ... 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 Press ENTER or type command to continue:set spellfile=Xtest.utf-8.add Tests for spell checking with 'encoding' set to "utf-8". vim: set ft=vim : STARTTEST :so small.vim :so mbyte.vim :"/^test2: /^test2: word/mP util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent :set spl=Xtest_us.utf-8.spl /^test2: /^test2: search hit BOTTOM, continuing at TOPword/mP util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 search hit BOTTOM, continuing at TOP :let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 SFX a 0 a .:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint :set spl=Xtest_gb.utf-8.spl elequint /^test2: /^test2: search hit BOTTOM, continuing at TOPword/mP util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 search hit BOTTOM, continuing at TOP:let [str, a] = spellbadword() :$put =str # 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 SFX a 0 a .:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent :set spl=Xtest_nz.utf-8.spl elequint elekwint elekwint /^test2: /^test2: search hit BOTTOM, continuing at TOPword/mP util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 search hit BOTTOM, continuing at TOP :let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 SFX a 0 a .:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint elekwent :set spl=Xtest_ca.utf-8.spl elequint elekwint elekwint elequint /^test2: /^test2: search hit BOTTOM, continuing at TOPword/mP util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 search hit BOTTOM, continuing at TOP :let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint elekwent elequint util/am pro/xq tomato/m bork/mp start/s end/e 4dicend 4good: word util bork prebork start end wordutil wordutils pro-okbork borkbork borkborkbork borkborkborkbork borkborkborkborkborktomato tomatotomato startend startword startwordword startwordendstartwordwordend startwordwordwordend prebork preborkborkpreborkborkborknouword bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomatoendstart endend startstart wordend wordstartpreborkprebork preborkpreborkborkstartwordwordwordwordend borkpreborkpreborkborkutilsbork startnouword badend test2: elequint test elekwint test elekwent asdf Test affix flags with two characters 5affstart SET ISO8859-1 FLAG long NEEDAFFIX !! COMPOUNDRULE ssmm*ee NEEDCOMPOUND xx COMPOUNDPERMITFLAG pp SFX 13 Y 1 SFX 13 0 bork . SFX a1 Y 1 SFX a1 0 a1 . SFX a Y 1 SFX a 0 a .:let [str, a] = spellbadword() :$put =str 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'] the ['put', 'uk', 'test'] gebletegek kepereneven everles gesvets etele kbltykk kprnfn *fls kswts tl elekwent elequint elekwint elekwint elekwent elequint elekwent elequint elekwint :" :" Postponed prefixes :call TestOne('2', '1') "Xtest.aff" "Xtest.aff" 46 lines, 461 characters written "Xtest.dic" "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... 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 Press ENTER or type command to continue:" # comment wrong Comment OK uk put/ISO the end deol dr 1dicend addstart /regions=usgbnz elequint/2 elekwint/3addend1good: wrong OK puts. Test the end bad: inputs comment ok Ok. test déôl end the badend2good: puts bad: inputs comment ok Ok end the. test déôl badendTest rules for compounding.3affstart SET ISO8859-1COMPOUNDMIN 3COMPOUNDRULE m* NEEDCOMPOUND x 3affend3dicstart 1234foo/mbar/mxm/mla/mx3dicend3good: foo mï foobar foofoobar barfoo barbarfoo bad: bar la foomï barmï mïfoo mïbar mïmï lala mïla lamï foola labar badend:" Compound words :call TestOne('3', '3') "Xtest.aff" "Xtest.aff" 5 lines, 60 characters written "Xtest.dic" "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... 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 Press ENTER or type command to continue:call TestOne('4', '4') "Xtest.aff" "Xtest.aff" 45 lines, 559 characters written "Xtest.dic" "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... 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 Press ENTER or type command to continue:call TestOne('5', '5') "Xtest.aff" "Xtest.aff" 25 lines, 237 characters written "Xtest.dic" "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... 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 Press ENTER or type command to continue:call TestOne('6', '6') "Xtest.aff" "Xtest.aff" 23 lines, 211 characters written "Xtest.dic" "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... 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 Press ENTER or type command to continue:call TestOne('7', '7') "Xtest.aff" "Xtest.aff" 26 lines, 338 characters written "Xtest.dic" "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... 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 Press ENTER or type command to continue:" 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 leadprebarlead tail leadtail leadmiddletail bad: mee meea2 prabar probarmaat middle leadmiddle middletail tailleadleadprobar 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 -------Tests 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'break  endif  let prevbad = bad  let lst = spellsuggest(bad, 3) normal mm $put =bad $put =string(lst) normal `m]s  endwhile:/^test output:/,$wq! test.out "test.out" "test.out" [New File] 270 lines, 3685 characters written [?1l> rm -rf X* test.ok viminfo rm -rf test60.failed test.ok test.out X* viminfo cp test60.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test60.in Vim: Warning: Output is not to a terminal [?1h="test60.in" 577 lines, 12425 charactersTests for the exists() function. vim: set ft=vim : STARTTEST :so small.vim :function! RunTest(str, result) if exists(a:str) == a:resultecho "OK" elseecho "FAILED: Checking for " . a:str endif endfunction :function! TestExists() augroup myagroupautocmd! BufEnter *.my echo 'myfile edited' augroup ENDlet test_cases = []" valid autocmd group let test_cases += [['#myagroup', 1]] " valid autocmd group with garbage let test_cases += [['#myagroup+b', 0]] " Valid autocmd group and event let test_cases += [['#myagroup#BufEnter', 1]] " Valid autocmd group, event and pattern let test_cases += [['#myagroup#BufEnter#*.my', 1]] " Valid autocmd event let test_cases += [['#BufEnter', 1]] " Valid autocmd event and pattern let test_cases += [['#BufEnter#*.my', 1]] " Non-existing autocmd group or event let test_cases += [['#xyzagroup', 0]] " Non-existing autocmd group and valid autocmd event let test_cases += [['#xyzagroup#BufEnter', 0]] " Valid autocmd group and event with no matching pattern let test_cases += [['#myagroup#CmdwinEnter', 0]] " Valid autocmd group and non-existing autocmd event let test_cases += [['#myagroup#xyzacmd', 0]] " Valid autocmd group and event and non-matching pattern let test_cases += [['#myagroup#BufEnter#xyzpat', 0]] " Valid autocmd event and non-matching pattern let test_cases += [['#BufEnter#xyzpat', 0]] " Empty autocmd group, event and pattern let test_cases += [['###', 0]] " Empty autocmd group and event or empty event and pattern let test_cases += [['##', 0]]:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 572 lines, 12353 characters written:set ff& cpo+=A /ENDTESTelseecho "FAILED" endif" Function arguments function TestFuncArg(func_arg, ...)echo 'a:func_arg: 1'if exists('a:func_arg')echo "OK"elseecho "FAILED"endifecho 'a:non_exists_arg: 0'if !exists('a:non_exists_arg')echo "OK"elseecho "FAILED"endifecho 'a:1: 1'if exists('a:1')echo "OK"elseecho "FAILED"endifecho 'a:2: 0'if !exists('a:2')echo "OK"elseecho "FAILED"endif endfunctioncall TestFuncArg("arg1", "arg2")redir END endfunction :call TestExists() :edit! test.out :set ff=unix :w :qa! ENDTEST :so! Xdotest :so small.vim :function! RunTest(str, result) : if exists(a:str) == a:result : ^Iecho "OK" : else : ^Iecho "FAILED: Checking for " . a:str : endif : endfunction elseecho "FAILED" endif" Function arguments function TestFuncArg(func_arg, ...) :function! TestExists() : augroup myagroup : ^Iautocmd! BufEnter *.my echo 'myfile edited' : augroup END : : let test_cases = [] : : " valid autocmd group : let test_cases += [['#myagroup', 1]] : " valid autocmd group with garbage : let test_cases += [['#myagroup+b', 0]] : " Valid autocmd group and event : let test_cases += [['#myagroup#BufEnter', 1]] : " Valid autocmd group, event and pattern : let test_cases += [['#myagroup#BufEnter#*.my', 1]] : " Valid autocmd event : let test_cases += [['#BufEnter', 1]] : " Valid autocmd event and pattern : let test_cases += [['#BufEnter#*.my', 1]] : " Non-existing autocmd group or event : let test_cases += [['#xyzagroup', 0]] : " Non-existing autocmd group and valid autocmd event : let test_cases += [['#xyzagroup#BufEnter', 0]] : " Valid autocmd group and event with no matching pattern : let test_cases += [['#myagroup#CmdwinEnter', 0]] : " Valid autocmd group and non-existing autocmd event : let test_cases += [['#myagroup#xyzacmd', 0]] : " Valid autocmd group and event and non-matching pattern : let test_cases += [['#myagroup#BufEnter#xyzpat', 0]] : " Valid autocmd event and non-matching pattern : let test_cases += [['#BufEnter#xyzpat', 0]] : " Empty autocmd group, event and pattern : let test_cases += [['###', 0]] : " Empty autocmd group and event or empty event and pattern : let test_cases += [['##', 0]] : " Valid autocmd event : let test_cases += [['##FileReadCmd', 1]] : " Non-existing autocmd event : let test_cases += [['##MySpecialCmd', 0]] : : " Existing and working option (long form) : let test_cases += [['&textwidth', 1]] : " Existing and working option (short form) : let test_cases += [['&tw', 1]] : " Existing and working option with garbage : let test_cases += [['&tw-', 0]] : " Global option : let test_cases += [['&g:errorformat', 1]] : " Local option : let test_cases += [['&l:errorformat', 1]] : " Negative form of existing and working option (long form) : 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]] : : " 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]] : : " Existing environment variable : let $EDITOR_NAME = 'Vim Editor' : let test_cases += [['$EDITOR_NAME', 1]] : " Non-existing environment variable : let test_cases += [['$NON_ENV_VAR', 0]] : : " Valid internal function : let test_cases += [['*bufnr', 1]] : " Valid internal function with () : let test_cases += [['*bufnr()', 1]] : " Non-existing internal function : let test_cases += [['*myxyzfunc', 0]] : " Valid internal function with garbage : let test_cases += [['*bufnr&6', 0]] : : " Valid user defined function : let test_cases += [['*TestExists', 1]] : " Non-existing user defined function : let test_cases += [['*MyxyzFunc', 0]] : : redir! > test.out : : for [test_case, result] in test_cases : ^Iecho test_case . ": " . result : call RunTest(test_case, result) : endfor : : " Valid internal command (full match) : echo ':edit: 2' : if exists(':edit') == 2 : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid internal command (full match) with garbage : echo ':edit/a: 0' : if exists(':edit/a') == 0 : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid internal command (partial match) : echo ':q: 1' : if exists(':q') == 1 : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing internal command : echo ':invalidcmd: 0' : if !exists(':invalidcmd') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " User defined command (full match) : command! MyCmd :echo 'My command' : echo ':MyCmd: 2' : if exists(':MyCmd') == 2 : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " User defined command (partial match) : command! MyOtherCmd :echo 'Another command' : echo ':My: 3' : if exists(':My') == 3 : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Command modifier : echo ':rightbelow: 2' : if exists(':rightbelow') == 2 : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing user defined command (full match) : delcommand MyCmd : : echo ':MyCmd: 0' : if !exists(':MyCmd') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing user defined command (partial match) : delcommand MyOtherCmd : : echo ':My: 0' : if !exists(':My') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid local variable : let local_var = 1 : echo 'local_var: 1' : if exists('local_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid local variable with garbage : let local_var = 1 : echo 'local_var%n: 0' : if !exists('local_var%n') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing local variable : unlet local_var : echo 'local_var: 0' : if !exists('local_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid local list : let local_list = ["blue", "orange"] : echo 'local_list: 1' : if exists('local_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid local list item : echo 'local_list[1]: 1' : if exists('local_list[1]') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid local list item with garbage : echo 'local_list[1]+5: 0' : if !exists('local_list[1]+5') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Invalid local list item : echo 'local_list[2]: 0' : if !exists('local_list[2]') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing local list : unlet local_list : echo 'local_list: 0' : if !exists('local_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Valid local dictionary : let local_dict = {"xcord":100, "ycord":2} : echo 'local_dict: 1' : if exists('local_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing local dictionary : unlet local_dict : echo 'local_dict: 0' : if !exists('local_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing local curly-brace variable : let str = "local" : let curly_{str}_var = 1 : echo 'curly_' . str . '_var: 1' : if exists('curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing local curly-brace variable : unlet curly_{str}_var : echo 'curly_' . str . '_var: 0' : if !exists('curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : : " Existing global variable : let g:global_var = 1 : echo 'g:global_var: 1' : if exists('g:global_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing global variable with garbage : echo 'g:global_var-n: 1' : if !exists('g:global_var-n') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing global variable : unlet g:global_var : echo 'g:global_var: 0' : if !exists('g:global_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing global list : let g:global_list = ["blue", "orange"] : echo 'g:global_list: 1' : if exists('g:global_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing global list : unlet g:global_list : echo 'g:global_list: 0' : if !exists('g:global_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing global dictionary : let g:global_dict = {"xcord":100, "ycord":2} : echo 'g:global_dict: 1' : if exists('g:global_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing global dictionary : unlet g:global_dict : echo 'g:global_dict: 0' : if !exists('g:global_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing global curly-brace variable : let str = "global" : let g:curly_{str}_var = 1 : echo 'g:curly_' . str . '_var: 1' : if exists('g:curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing global curly-brace variable : unlet g:curly_{str}_var : echo 'g:curly_' . str . '_var: 0' : if !exists('g:curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing window variable : echo 'w:window_var: 1' : let w:window_var = 1 : if exists('w:window_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing window variable : unlet w:window_var : echo 'w:window_var: 0' : if !exists('w:window_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing window list : let w:window_list = ["blue", "orange"] : echo 'w:window_list: 1' : if exists('w:window_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing window list : unlet w:window_list : echo 'w:window_list: 0' : if !exists('w:window_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing window dictionary : let w:window_dict = {"xcord":100, "ycord":2} : echo 'w:window_dict: 1' : if exists('w:window_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing window dictionary : unlet w:window_dict : echo 'w:window_dict: 0' : if !exists('w:window_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing window curly-brace variable : let str = "window" : let w:curly_{str}_var = 1 : echo 'w:curly_' . str . '_var: 1' : if exists('w:curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing window curly-brace variable : unlet w:curly_{str}_var : echo 'w:curly_' . str . '_var: 0' : if !exists('w:curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing buffer variable : echo 'b:buffer_var: 1' : let b:buffer_var = 1 : if exists('b:buffer_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing buffer variable : unlet b:buffer_var : echo 'b:buffer_var: 0' : if !exists('b:buffer_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing buffer list : let b:buffer_list = ["blue", "orange"] : echo 'b:buffer_list: 1' : if exists('b:buffer_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing buffer list : unlet b:buffer_list : echo 'b:buffer_list: 0' : if !exists('b:buffer_list') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing buffer dictionary : let b:buffer_dict = {"xcord":100, "ycord":2} : echo 'b:buffer_dict: 1' : if exists('b:buffer_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing buffer dictionary : unlet b:buffer_dict : echo 'b:buffer_dict: 0' : if !exists('b:buffer_dict') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Existing buffer curly-brace variable : let str = "buffer" : let b:curly_{str}_var = 1 : echo 'b:curly_' . str . '_var: 1' : if exists('b:curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing buffer curly-brace variable : unlet b:curly_{str}_var : echo 'b:curly_' . str . '_var: 0' : if !exists('b:curly_{str}_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Script-local tests : source test60.vim : : " Existing Vim internal variable : echo 'v:version: 1' : if exists('v:version') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Non-existing Vim internal variable : echo 'v:non_exists_var: 0' : if !exists('v:non_exists_var') : ^Iecho "OK" : else : ^Iecho "FAILED" : endif : : " Function arguments : function TestFuncArg(func_arg, ...) : echo 'a:func_arg: 1' : if exists('a:func_arg') : echo "OK" : else : echo "FAILED" : endif : : echo 'a:non_exists_arg: 0' : if !exists('a:non_exists_arg') : echo "OK" : else : echo "FAILED" : endif : : echo 'a:1: 1' : if exists('a:1') : echo "OK" : else : echo "FAILED" : endif : : echo 'a:2: 0' : if !exists('a:2') : echo "OK" : else : echo "FAILED" : endif : endfunction : : call TestFuncArg("arg1", "arg2") : : redir END : endfunction elseecho "FAILED" endif" Function arguments function TestFuncArg(func_arg, ...)echo 'a:func_arg: 1'if exists('a:func_arg')echo "OK"elseecho "FAILED"endifecho 'a:non_exists_arg: 0'if !exists('a:non_exists_arg')echo "OK"elseecho "FAILED"endifecho 'a:1: 1'if exists('a:1')echo "OK"elseecho "FAILED"endifecho 'a:2: 0'if !exists('a:2')echo "OK"elseecho "FAILED"endif endfunctioncall TestFuncArg("arg1", "arg2")redir END endfunction :call TestExists() :edit! test.out :set ff=unix :w :qa! ENDTEST :call TestExists() #myagroup: 1 OK #myagroup+b: 0 OK #myagroup#BufEnter: 1 OK #myagroup#BufEnter#*.my: 1 OK #BufEnter: 1 OK #BufEnter#*.my: 1 OK #xyzagroup: 0 OK #xyzagroup#BufEnter: 0 OK #myagroup#CmdwinEnter: 0 OK #myagroup#xyzacmd: 0 OK #myagroup#BufEnter#xyzpat: 0 OK #BufEnter#xyzpat: 0 OK ###: 0 OK ##: 0 OK ##FileReadCmd: 1 OK ##MySpecialCmd: 0 OK &textwidth: 1 OK &tw: 1 OK &tw-: 0 OK &g:errorformat: 1 OK &l:errorformat: 1 OK &nojoinspaces: 0 OK &nojs: 0 OK &myxyzoption: 0 OK +incsearch: 1 OK +incsearch!1: 0 OK +is: 1 OK +autoprint: 0 OK $EDITOR_NAME: 1 OK $NON_ENV_VAR: 0 OK *bufnr: 1 OK *bufnr(): 1 OK *myxyzfunc: 0 OK *bufnr&6: 0 OK *TestExists: 1 OK *MyxyzFunc: 0 OK :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 Press ENTER or type command to continue:edit! test.out "test.out" [Incomplete last line] 197 lines, 1844 characters#myagroup: 1 OK #myagroup+b: 0 OK #myagroup#BufEnter: 1 OK #myagroup#BufEnter#*.my: 1 OK #BufEnter: 1 OK #BufEnter#*.my: 1 OK #xyzagroup: 0 OK #xyzagroup#BufEnter: 0 OK #myagroup#CmdwinEnter: 0 OK #myagroup#xyzacmd: 0 OK #myagroup#BufEnter#xyzpat: 0 OK #BufEnter#xyzpat: 0 OK ###: 0 OK ##: 0 OK ##FileReadCmd: 1 OK ##MySpecialCmd: 0 OK &textwidth: 1 OK &tw: 1 OK &tw-: 0 OK &g:errorformat: 1 OK &l:errorformat: 1 OK &nojoinspaces: 0 OK &nojs: 0 "test.out" [Incomplete last line] 197 lines, 1844 characters:set ff=unix :w "test.out" 197 lines, 1845 characters written:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test61.failed test.ok test.out X* viminfo cp test61.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test61.in Vim: Warning: Output is not to a terminal [?1h="test61.in" 59 lines, 1011 charactersTests for undo tree. Since this script is sourced we need to explicitly break changes up in undo-able pieces. Do that by setting 'undolevels'. 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^[:set ul=100 Ab^[:set ul=100 Ac^[: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 :":set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 48 lines, 814 characters written:set ff& cpo+=A /ENDTEST:" test undojoin Goaaaa^[:set ul=100 obbbb^[u:.w >>test.out obbbb^[:set ul=100 :undojoin occcc^[u:.w >>test.out :qa! ENDTEST  :so! Xdotest :" Delete three characters and undo 1111 ----- 2222 ----- 12345678923456789 :set ul=100 3456789:set ul=100 456789:.w! test.out "test.out" [New File] 1 line, 7 characters written 1 change; before #3 0 seconds ago3456789 :.w >>test.out "test.out" 1 line, 8 characters appended 1 change; before #2 0 seconds ago23456789 :.w >>test.out "test.out" 1 line, 9 characters appended 1 change; before #1 0 seconds ago123456789 :.w >>test.out "test.out" 1 line, 10 characters appended Already at oldest change:.w >>test.out "test.out" 1 line, 10 characters appended:" :/^111/w >>test.out search hit BOTTOM, continuing at TOP "test.out" 1 line, 11 characters appended:" Delete three other characters and go back in time step by step :set ul=100 :set ul=100 :.w >>test.out "test.out" 1 line, 7 characters appended:sleep 1  1 change; before #6 1 seconds ago7:.w >>test.out "test.out" 1 line, 8 characters appended 1 change; before #5 1 seconds ago8:.w >>test.out "test.out" 1 line, 9 characters appended 4 changes; after #3 1 seconds ago456789:.w >>test.out "test.out" 1 line, 7 characters appended 1 change; before #3 1 seconds ago3456789 :.w >>test.out "test.out" 1 line, 8 characters appended 1 change; before #2 1 seconds ago23456789 :.w >>test.out "test.out" 1 line, 9 characters appended 1 change; before #1 1 seconds ago123456789 :.w >>test.out "test.out" 1 line, 10 characters appended Already at oldest change:.w >>test.out "test.out" 1 line, 10 characters appended Already at oldest change:.w >>test.out "test.out" 1 line, 10 characters appended 3 changes; after #6 1 seconds ago:.w >>test.out "test.out" 1 line, 7 characters appended:" :/^222/w >>test.out search hit BOTTOM, continuing at TOP "test.out" 1 line, 11 characters appended:" Delay for three seconds and go some seconds forward and backward :sleep 2 6a:set ul=100 ab:set ul=100 bc:set ul=100 :.w >>test.out "test.out" 1 line, 10 characters appended:ear 1s 3 changes; before #7 0 seconds ago:.w >>test.out "test.out" 1 line, 7 characters appended:ear 3s 3 changes; before #1 3 seconds ago789:.w >>test.out "test.out" 1 line, 10 characters appended:later 1s 3 changes; after #6 3 seconds ago:.w >>test.out "test.out" 1 line, 7 characters appended:later 1h 3 changes; after #9 0 seconds agoabc:.w >>test.out "test.out" 1 line, 10 characters appended:" :" test undojoin   aaaa :set ul=100  bbbb 1 line less; before #11 0 seconds ago~:.w >>test.out "test.out" 1 line, 5 characters appended bbbb:set ul=100 :undojoin  cccc 2 fewer lines; before #12 0 seconds ago~~:.w >>test.out "test.out" 1 line, 5 characters appended:qa! [?1l>rm -rf X* test.ok viminfo rm -rf test62.failed test.ok test.out X* viminfo cp test62.ok test.ok # Sleep a moment to avoid that the xterm title is messed up ../vim -u unix.vim -U NONE --noplugin -s dotest.in test62.in Vim: Warning: Output is not to a terminal [?1h="test62.in" 32 lines, 522 charactersTests 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) :" :" 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) :" :" :/^Results/,$w! test.out :qa! ENDTEST Results: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:set cp :map dotest /^STARTTEST^^Mj:set ff=unix cpo-=A^^M:.,/ENDTEST/-1w! Xdotest^^M:set ff& cpo+=A^^Mnj0:so! Xdotest^^Mdotest /^STARTTEST  :set ff=unix cpo-=A :.,/ENDTEST/-1w! Xdotest "Xdotest" [New File] 26 lines, 473 characters written:set ff& cpo+=A /ENDTEST :so! Xdotest :so small.vim :" Simple test for opening and closing a tab page :tabnew  test62.in | [No Name] ________________________________________________________________________________________________________X~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:let nr = tabpagenr() :q Tests 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) :" :" 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) :" :" :/^Results/,$w! test.out :qa! ENDTEST Results: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:call append(line('$'), 'tab page ' . nr) tab page 2:" :" Open three tab pages and use ":tabdo" :0tabnew  [No Name] | + test62.in ______________________________________________________________________________________________________X~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:1tabnew  [No Name] | [No Name] | + test62.in __________________________________________________________________________________________X~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:888tabnew  [No Name] | [No Name] | + test62.in | [No Name] ______________________________________________________________________________X~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:tabdo call append(line('$'), 'this is tab page ' . tabpagenr())  + [No Name] | + [No Name] | + test62.in | + [No Name] ________________________________________________________________________Xthis is tab page 4 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:tabclose! 2 test62.in| + [No Name] _______________X:tabrewind  + [No Name] | + test62.in | + [No Name] ______________________________________________________________________________________Xthis is tab page 1 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:let line1 = getline('$') :undo 2 fewer lines; before #1 0 seconds ago[No Name] | + test62.in | + [No Name] ___X~:q  + test62.in | + [No Name] ____________________________________________________________________________________________________XTests 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) :" :" 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) :" :" :/^Results/,$w! test.out :qa! ENDTEST Results: tab page 2 this is tab page 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:tablast  + test62.in | + [No Name] ____________________________________________________________________________________________________Xthis is tab page 4 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:let line2 = getline('$') :q! Tests 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) :" :" 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) :" :" :/^Results/,$w! test.out :qa! ENDTEST Results: tab page 2 this is tab page 3 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~:call append(line('$'), line1) this is tab page 1:call append(line('$'), line2) this is tab page 4:" :" :/^Results/,$w! test.out "test.out" [New File] 5 lines, 77 characters written:qa! [?1l>rm -rf X* test.ok viminfo Test results: ALL DONE make[2]: Leaving directory `/sources/vim70/src/testdir' make[1]: Leaving directory `/sources/vim70/src'