To: vim_dev@googlegroups.com Subject: Patch 8.0.1447 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1447 Problem: Still too many old style tests. Solution: Turn a few tests into new style. (Yegappan Lakshmanan, closes #2509) Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms, src/testdir/main.aap, src/testdir/test15.in, src/testdir/test15.ok, src/testdir/test36.in, src/testdir/test36.ok, src/testdir/test50.in, src/testdir/test50.ok, src/testdir/test_regex_char_classes.vim, src/testdir/test_shortpathname.vim, src/testdir/test_textformat.vim *** ../vim-8.0.1446/src/Makefile 2017-12-22 21:49:53.706738801 +0100 --- src/Makefile 2018-01-31 19:26:54.757664380 +0100 *************** *** 2101,2110 **** # These do not depend on the executable, compile it when needed. test1 \ test_eval \ ! test3 test11 test14 test15 test17 \ ! test29 test30 test36 test37 test39 \ test42 test44 test48 test49 \ ! test50 test52 test59 \ test64 test69 \ test70 test72 \ test85 test86 test87 test88 \ --- 2105,2114 ---- # These do not depend on the executable, compile it when needed. test1 \ test_eval \ ! test3 test11 test14 test17 \ ! test29 test30 test37 test39 \ test42 test44 test48 test49 \ ! test52 test59 \ test64 test69 \ test70 test72 \ test85 test86 test87 test88 \ *** ../vim-8.0.1446/src/testdir/Make_all.mak 2017-12-22 21:49:53.706738801 +0100 --- src/testdir/Make_all.mak 2018-01-31 19:23:08.487250611 +0100 *************** *** 15,23 **** SCRIPTS_ALL = \ test3.out \ test14.out \ - test15.out \ test29.out \ - test36.out \ test37.out \ test39.out \ test42.out \ --- 15,21 ---- *************** *** 57,63 **** # Tests specifically for MS-Windows. ! SCRIPTS_WIN32 = test50.out # Tests for the GUI. --- 55,61 ---- # Tests specifically for MS-Windows. ! SCRIPTS_WIN32 = # Tests for the GUI. *************** *** 158,163 **** --- 156,162 ---- test_ruby.res \ test_scrollbind.res \ test_search.res \ + test_shortpathname.res \ test_signs.res \ test_smartindent.res \ test_spell.res \ *** ../vim-8.0.1446/src/testdir/Make_vms.mms 2017-12-11 22:55:08.556254393 +0100 --- src/testdir/Make_vms.mms 2018-01-31 19:23:08.487250611 +0100 *************** *** 74,82 **** .SUFFIXES : .out .in SCRIPT = test1.out test3.out \ ! test14.out test15.out \ test29.out \ ! test30.out test36.out test37.out test39.out \ test42.out test44.out test48.out test49.out \ test64.out test69.out \ test72.out test77a.out test88.out \ --- 74,82 ---- .SUFFIXES : .out .in SCRIPT = test1.out test3.out \ ! test14.out \ test29.out \ ! test30.out test37.out test39.out \ test42.out test44.out test48.out test49.out \ test64.out test69.out \ test72.out test77a.out test88.out \ *************** *** 108,114 **** .ENDIF .IFDEF WANT_WIN ! SCRIPT_WIN = test50.out test52.out .ENDIF .IFDEF WANT_SPELL --- 108,114 ---- .ENDIF .IFDEF WANT_WIN ! SCRIPT_WIN = test52.out .ENDIF .IFDEF WANT_SPELL *** ../vim-8.0.1446/src/testdir/main.aap 2017-11-02 21:04:17.987345075 +0100 --- src/testdir/main.aap 2018-01-31 19:23:08.487250611 +0100 *************** *** 6,15 **** Scripts = test1.out test2.out test3.out test6.out test11.out ! test13.out test14.out test15.out test17.out test18.out test21.out test27.out test29.out test30.out ! test36.out test37.out test39.out test42.out test44.out test46.out test47.out test48.out test49.out test74.out --- 6,15 ---- Scripts = test1.out test2.out test3.out test6.out test11.out ! test13.out test14.out test17.out test18.out test21.out test27.out test29.out test30.out ! test37.out test39.out test42.out test44.out test46.out test47.out test48.out test49.out test74.out *** ../vim-8.0.1446/src/testdir/test15.in 2010-05-15 13:04:10.000000000 +0200 --- src/testdir/test15.in 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,136 **** - Tests 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 - :map gg :.,.+2s/^/x/kk:set tw=3gqq - /^aa - ggu - :?test for :left?,$w! test.out - :qa! - ENDTEST - - test for :left - a a - fa a - dfa a - sdfa a - asdfa a - xasdfa a - asxxdfa a - - test for :center - a a - fa afd asdf - dfa a - sdfa afd asdf - asdfa a - xasdfa asdfasdfasdfasdfasdf - asxxdfa a - - test for :right - a a - fa a - dfa a - sdfa a - asdfa a - xasdfa a - asxxdfa a - asxa;ofa a - asdfaqwer a - a ax - fa ax - dfa ax - sdfa ax - asdfa ax - xasdfa ax - asxxdfa ax - asxa;ofa ax - asdfaqwer ax - a axx - fa axx - dfa axx - sdfa axx - asdfa axx - xasdfa axx - asxxdfa axx - asxa;ofa axx - asdfaqwer axx - a axxx - fa axxx - dfa axxx - sdfa axxx - asdfa axxx - xasdfa axxx - asxxdfa axxx - asxa;ofa axxx - asdfaqwer axxx - a axxxo - fa axxxo - dfa axxxo - sdfa axxxo - asdfa axxxo - xasdfa axxxo - asxxdfa axxxo - asxa;ofa axxxo - asdfaqwer axxxo - a axxxoi - fa axxxoi - dfa axxxoi - sdfa axxxoi - asdfa axxxoi - xasdfa axxxoi - asxxdfa axxxoi - asxa;ofa axxxoi - asdfaqwer axxxoi - a axxxoik - fa axxxoik - dfa axxxoik - sdfa axxxoik - asdfa axxxoik - xasdfa axxxoik - asxxdfa axxxoik - asxa;ofa axxxoik - asdfaqwer axxxoik - a axxxoike - fa axxxoike - dfa axxxoike - sdfa axxxoike - asdfa axxxoike - xasdfa axxxoike - asxxdfa axxxoike - asxa;ofa axxxoike - asdfaqwer axxxoike - a axxxoikey - fa axxxoikey - dfa axxxoikey - sdfa axxxoikey - asdfa axxxoikey - xasdfa axxxoikey - asxxdfa axxxoikey - asxa;ofa axxxoikey - asdfaqwer axxxoikey - - 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 --- 0 ---- *** ../vim-8.0.1446/src/testdir/test15.ok 2010-05-15 13:04:10.000000000 +0200 --- src/testdir/test15.ok 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,111 **** - test for :left - a a - fa a - dfa a - sdfa a - asdfa a - xasdfa a - asxxdfa a - - test for :center - a a - fa afd asdf - dfa a - sdfa afd asdf - asdfa a - xasdfa asdfasdfasdfasdfasdf - asxxdfa a - - test for :right - a a - fa a - dfa a - sdfa a - asdfa a - xasdfa a - asxxdfa a - asxa;ofa a - asdfaqwer a - a ax - fa ax - dfa ax - sdfa ax - asdfa ax - xasdfa ax - asxxdfa ax - asxa;ofa ax - asdfaqwer ax - a axx - fa axx - dfa axx - sdfa axx - asdfa axx - xasdfa axx - asxxdfa axx - asxa;ofa axx - asdfaqwer axx - a axxx - fa axxx - dfa axxx - sdfa axxx - asdfa axxx - xasdfa axxx - asxxdfa axxx - asxa;ofa axxx - asdfaqwer axxx - a axxxo - fa axxxo - dfa axxxo - sdfa axxxo - asdfa axxxo - xasdfa axxxo - asxxdfa axxxo - asxa;ofa axxxo - asdfaqwer axxxo - a axxxoi - fa axxxoi - dfa axxxoi - sdfa axxxoi - asdfa axxxoi - xasdfa axxxoi - asxxdfa axxxoi - asxa;ofa axxxoi - asdfaqwer axxxoi - a axxxoik - fa axxxoik - dfa axxxoik - sdfa axxxoik - asdfa axxxoik - xasdfa axxxoik - asxxdfa axxxoik - asxa;ofa axxxoik - asdfaqwer axxxoik - a axxxoike - fa axxxoike - dfa axxxoike - sdfa axxxoike - asdfa axxxoike - xasdfa axxxoike - asxxdfa axxxoike - asxa;ofa axxxoike - asdfaqwer axxxoike - a axxxoikey - fa axxxoikey - dfa axxxoikey - sdfa axxxoikey - asdfa axxxoikey - xasdfa axxxoikey - asxxdfa axxxoikey - asxa;ofa axxxoikey - asdfaqwer axxxoikey - - 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 --- 0 ---- *** ../vim-8.0.1446/src/testdir/test36.in 2017-06-05 13:30:01.172255652 +0200 --- src/testdir/test36.in 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,114 **** - Test character classes in regexp using regexpengine 0, 1, 2. - - STARTTEST - /^start-here/+1 - Y:s/\%#=0\d//g - p:s/\%#=1\d//g - p:s/\%#=2\d//g - p:s/\%#=0[0-9]//g - p:s/\%#=1[0-9]//g - p:s/\%#=2[0-9]//g - p:s/\%#=0\D//g - p:s/\%#=1\D//g - p:s/\%#=2\D//g - p:s/\%#=0[^0-9]//g - p:s/\%#=1[^0-9]//g - p:s/\%#=2[^0-9]//g - p:s/\%#=0\o//g - p:s/\%#=1\o//g - p:s/\%#=2\o//g - p:s/\%#=0[0-7]//g - p:s/\%#=1[0-7]//g - p:s/\%#=2[0-7]//g - p:s/\%#=0\O//g - p:s/\%#=1\O//g - p:s/\%#=2\O//g - p:s/\%#=0[^0-7]//g - p:s/\%#=1[^0-7]//g - p:s/\%#=2[^0-7]//g - p:s/\%#=0\x//g - p:s/\%#=1\x//g - p:s/\%#=2\x//g - p:s/\%#=0[0-9A-Fa-f]//g - p:s/\%#=1[0-9A-Fa-f]//g - p:s/\%#=2[0-9A-Fa-f]//g - p:s/\%#=0\X//g - p:s/\%#=1\X//g - p:s/\%#=2\X//g - p:s/\%#=0[^0-9A-Fa-f]//g - p:s/\%#=1[^0-9A-Fa-f]//g - p:s/\%#=2[^0-9A-Fa-f]//g - p:s/\%#=0\w//g - p:s/\%#=1\w//g - p:s/\%#=2\w//g - p:s/\%#=0[0-9A-Za-z_]//g - p:s/\%#=1[0-9A-Za-z_]//g - p:s/\%#=2[0-9A-Za-z_]//g - p:s/\%#=0\W//g - p:s/\%#=1\W//g - p:s/\%#=2\W//g - p:s/\%#=0[^0-9A-Za-z_]//g - p:s/\%#=1[^0-9A-Za-z_]//g - p:s/\%#=2[^0-9A-Za-z_]//g - p:s/\%#=0\h//g - p:s/\%#=1\h//g - p:s/\%#=2\h//g - p:s/\%#=0[A-Za-z_]//g - p:s/\%#=1[A-Za-z_]//g - p:s/\%#=2[A-Za-z_]//g - p:s/\%#=0\H//g - p:s/\%#=1\H//g - p:s/\%#=2\H//g - p:s/\%#=0[^A-Za-z_]//g - p:s/\%#=1[^A-Za-z_]//g - p:s/\%#=2[^A-Za-z_]//g - p:s/\%#=0\a//g - p:s/\%#=1\a//g - p:s/\%#=2\a//g - p:s/\%#=0[A-Za-z]//g - p:s/\%#=1[A-Za-z]//g - p:s/\%#=2[A-Za-z]//g - p:s/\%#=0\A//g - p:s/\%#=1\A//g - p:s/\%#=2\A//g - p:s/\%#=0[^A-Za-z]//g - p:s/\%#=1[^A-Za-z]//g - p:s/\%#=2[^A-Za-z]//g - p:s/\%#=0\l//g - p:s/\%#=1\l//g - p:s/\%#=2\l//g - p:s/\%#=0[a-z]//g - p:s/\%#=1[a-z]//g - p:s/\%#=2[a-z]//g - p:s/\%#=0\L//g - p:s/\%#=1\L//g - p:s/\%#=2\L//g - p:s/\%#=0[^a-z]//g - p:s/\%#=1[^a-z]//g - p:s/\%#=2[^a-z]//g - p:s/\%#=0\u//g - p:s/\%#=1\u//g - p:s/\%#=2\u//g - p:s/\%#=0[A-Z]//g - p:s/\%#=1[A-Z]//g - p:s/\%#=2[A-Z]//g - p:s/\%#=0\U//g - p:s/\%#=1\U//g - p:s/\%#=2\U//g - p:s/\%#=0[^A-Z]//g - p:s/\%#=1[^A-Z]//g - p:s/\%#=2[^A-Z]//g - p:s/\%#=0\%210l^\t...//g - p:s/\%#=1\%211l^\t...//g - p:s/\%#=2\%212l^\t...//g - p:s/\%#=0[0-z]//g - p:s/\%#=1[0-z]//g - p:s/\%#=2[0-z]//g - p:s/\%#=0[^0-z]//g - p:s/\%#=1[^0-z]//g - p:s/\%#=2[^0-z]//g - :/^start-here/+1,$wq! test.out - ENDTEST - - start-here - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé --- 0 ---- *** ../vim-8.0.1446/src/testdir/test36.ok 2017-06-05 13:30:01.172255652 +0200 --- src/testdir/test36.ok 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,105 **** - !"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - 0123456789 - 0123456789 - 0123456789 - 0123456789 - 0123456789 - 0123456789 - !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - 01234567 - 01234567 - 01234567 - 01234567 - 01234567 - 01234567 - !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~€‚›¦±¼ÇÓé - 0123456789ABCDEFabcdef - 0123456789ABCDEFabcdef - 0123456789ABCDEFabcdef - 0123456789ABCDEFabcdef - 0123456789ABCDEFabcdef - 0123456789ABCDEFabcdef - !"#$%&'()#+'-./:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - 0123456789ABCDEFGHIXYZ_abcdefghiwxyz - 0123456789ABCDEFGHIXYZ_abcdefghiwxyz - 0123456789ABCDEFGHIXYZ_abcdefghiwxyz - 0123456789ABCDEFGHIXYZ_abcdefghiwxyz - 0123456789ABCDEFGHIXYZ_abcdefghiwxyz - 0123456789ABCDEFGHIXYZ_abcdefghiwxyz - !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~€‚›¦±¼ÇÓé - ABCDEFGHIXYZ_abcdefghiwxyz - ABCDEFGHIXYZ_abcdefghiwxyz - ABCDEFGHIXYZ_abcdefghiwxyz - ABCDEFGHIXYZ_abcdefghiwxyz - ABCDEFGHIXYZ_abcdefghiwxyz - ABCDEFGHIXYZ_abcdefghiwxyz - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~€‚›¦±¼ÇÓé - ABCDEFGHIXYZabcdefghiwxyz - ABCDEFGHIXYZabcdefghiwxyz - ABCDEFGHIXYZabcdefghiwxyz - ABCDEFGHIXYZabcdefghiwxyz - ABCDEFGHIXYZabcdefghiwxyz - ABCDEFGHIXYZabcdefghiwxyz - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~€‚›¦±¼ÇÓé - abcdefghiwxyz - abcdefghiwxyz - abcdefghiwxyz - abcdefghiwxyz - abcdefghiwxyz - abcdefghiwxyz - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - ABCDEFGHIXYZ - ABCDEFGHIXYZ - ABCDEFGHIXYZ - ABCDEFGHIXYZ - ABCDEFGHIXYZ - ABCDEFGHIXYZ - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./{|}~€‚›¦±¼ÇÓé - !"#$%&'()#+'-./{|}~€‚›¦±¼ÇÓé - 0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz - 0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz - 0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz --- 0 ---- *** ../vim-8.0.1446/src/testdir/test50.in 2013-06-19 20:03:18.000000000 +0200 --- src/testdir/test50.in 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,90 **** - Test for shortpathname ':8' extension. - Only for use on Win32 systems! - - STARTTEST - :so small.vim - :fun! TestIt(file, bits, expected) - let res=fnamemodify(a:file,a:bits) - if a:expected == '' - echo "'".a:file."'->(".a:bits.")->'".res."'" - else - if substitute(res,'/','\\', 'g') != substitute( a:expected, '/','\\', 'g') - echo "FAILED: '".a:file."'->(".a:bits.")->'".res."'" - echo "Expected: '".a:expected."'" - else - echo "OK" - endif - endif - endfun - :fun! MakeDir( dirname ) - "exe '!mkdir '.substitute(a:dirname,'/','\\','g') - call system('mkdir '.substitute(a:dirname,'/','\\','g')) - endfun - :fun! RMDir( dirname) - "exe '!rmdir '.substitute(a:dirname,'/','\\','g') - call system('rmdir '.substitute(a:dirname,'/','\\','g')) - endfun - :fun! MakeFile( filename) - "exe '!copy nul '.substitute(a:filename,'/','\\','g') - call system('copy nul '.substitute(a:filename,'/','\\','g')) - endfun - :fun! TestColonEight() - redir! >test.out - " This could change for CygWin to //cygdrive/c - let dir1='c:/x.x.y' - if filereadable(dir1) || isdirectory(dir1) - echo "FATAL: '".dir1."' exists, cannot run test" - return - endif - let file1=dir1.'/zz.y.txt' - let nofile1=dir1.'/z.y.txt' - let dir2=dir1.'/VimIsTheGreatestSinceSlicedBread' - let file2=dir2.'/z.txt' - let nofile2=dir2.'/zz.txt' - call MakeDir( dir1 ) - let resdir1 = substitute(fnamemodify(dir1, ':p:8'), '\\$', '', '') - if resdir1 !~ '\V\^c:/XX\x\x\x\x~1.Y\$' - echo "FATAL: unexpected short name: " . resdir1 - echo "INFO: please report your OS to vim-dev" - return - endif - let resfile1=resdir1.'/ZZY~1.TXT' - let resnofile1=resdir1.'/z.y.txt' - let resdir2=resdir1.'/VIMIST~1' - let resfile2=resdir2.'/z.txt' - let resnofile2=resdir2.'/zz.txt' - call MakeDir( dir2 ) - call MakeFile( file1 ) - call MakeFile( file2 ) - call TestIt(file1, ':p:8', resfile1) - call TestIt(nofile1, ':p:8', resnofile1) - call TestIt(file2, ':p:8', resfile2) - call TestIt(nofile2, ':p:8', resnofile2) - call TestIt(nofile2, ':p:8:h', fnamemodify(resnofile2,':h')) - exe 'cd '.dir1 - call TestIt(file1, ':.:8', strpart(resfile1,strlen(resdir1)+1)) - call TestIt(nofile1, ':.:8', strpart(resnofile1,strlen(resdir1)+1)) - call TestIt(file2, ':.:8', strpart(resfile2,strlen(resdir1)+1)) - call TestIt(nofile2, ':.:8', strpart(resnofile2,strlen(resdir1)+1)) - let $HOME=dir1 - call TestIt(file1, ':~:8', '~'.strpart(resfile1,strlen(resdir1))) - call TestIt(nofile1, ':~:8', '~'.strpart(resnofile1,strlen(resdir1))) - call TestIt(file2, ':~:8', '~'.strpart(resfile2,strlen(resdir1))) - call TestIt(nofile2, ':~:8', '~'.strpart(resnofile2,strlen(resdir1))) - cd c:/ - call delete( file2 ) - call delete( file1 ) - call RMDir( dir2 ) - call RMDir( dir1 ) - echo - redir END - endfun - :let dir = getcwd() - :call TestColonEight() - :exe "cd " . dir - :edit! test.out - :set ff=dos - :w - :qa! - ENDTEST - --- 0 ---- *** ../vim-8.0.1446/src/testdir/test50.ok 2010-05-15 13:04:10.000000000 +0200 --- src/testdir/test50.ok 1970-01-01 01:00:00.000000000 +0100 *************** *** 1,14 **** - - OK - OK - OK - OK - OK - OK - OK - OK - OK - OK - OK - OK - OK --- 0 ---- *** ../vim-8.0.1446/src/testdir/test_regex_char_classes.vim 2017-07-11 21:45:26.617831206 +0200 --- src/testdir/test_regex_char_classes.vim 2018-01-31 19:23:08.491250582 +0100 *************** *** 1,5 **** --- 1,11 ---- " Tests for regexp with backslash and other special characters inside [] " Also test backslash for hex/octal numbered character. + " + if !has('multi_byte') + finish + endif + + scriptencoding utf-8 function RunSTest(value, calls, expected) new *************** *** 56,58 **** --- 62,298 ---- call RunSTest(" xyz", "s/~/bcd/", " bcd") call RunSTest(" bcdbcdbcd", "s/~\\+/BB/", " BB") endfunction + + " Test character classes in regexp using regexpengine 0, 1, 2. + func Test_regex_char_classes() + new + let save_enc = &encoding + set encoding=utf-8 + + let input = "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé" + + " Format is [cmd_to_run, expected_output] + let tests = [ + \ [':s/\%#=0\d//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\d//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\d//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[0-9]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[0-9]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[0-9]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\D//g', + \ "0123456789"], + \ [':s/\%#=1\D//g', + \ "0123456789"], + \ [':s/\%#=2\D//g', + \ "0123456789"], + \ [':s/\%#=0[^0-9]//g', + \ "0123456789"], + \ [':s/\%#=1[^0-9]//g', + \ "0123456789"], + \ [':s/\%#=2[^0-9]//g', + \ "0123456789"], + \ [':s/\%#=0\o//g', + \ "\t\\ !\"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\o//g', + \ "\t\\ !\"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\o//g', + \ "\t\\ !\"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[0-7]//g', + \ "\t\\ !\"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[0-7]//g', + \ "\t\\ !\"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[0-7]//g', + \ "\t\\ !\"#$%&'()#+'-./89:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\O//g', + \ "01234567"], + \ [':s/\%#=1\O//g', + \ "01234567"], + \ [':s/\%#=2\O//g', + \ "01234567"], + \ [':s/\%#=0[^0-7]//g', + \ "01234567"], + \ [':s/\%#=1[^0-7]//g', + \ "01234567"], + \ [':s/\%#=2[^0-7]//g', + \ "01234567"], + \ [':s/\%#=0\x//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\x//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\x//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[0-9A-Fa-f]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[0-9A-Fa-f]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[0-9A-Fa-f]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@GHIXYZ[\]^_`ghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\X//g', + \ "0123456789ABCDEFabcdef"], + \ [':s/\%#=1\X//g', + \ "0123456789ABCDEFabcdef"], + \ [':s/\%#=2\X//g', + \ "0123456789ABCDEFabcdef"], + \ [':s/\%#=0[^0-9A-Fa-f]//g', + \ "0123456789ABCDEFabcdef"], + \ [':s/\%#=1[^0-9A-Fa-f]//g', + \ "0123456789ABCDEFabcdef"], + \ [':s/\%#=2[^0-9A-Fa-f]//g', + \ "0123456789ABCDEFabcdef"], + \ [':s/\%#=0\w//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\w//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\w//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[0-9A-Za-z_]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[0-9A-Za-z_]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[0-9A-Za-z_]//g', + \ "\t\\ !\"#$%&'()#+'-./:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\W//g', + \ "0123456789ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=1\W//g', + \ "0123456789ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=2\W//g', + \ "0123456789ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=0[^0-9A-Za-z_]//g', + \ "0123456789ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=1[^0-9A-Za-z_]//g', + \ "0123456789ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=2[^0-9A-Za-z_]//g', + \ "0123456789ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=0\h//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\h//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\h//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[A-Za-z_]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[A-Za-z_]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[A-Za-z_]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\H//g', + \ "ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=1\H//g', + \ "ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=2\H//g', + \ "ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=0[^A-Za-z_]//g', + \ "ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=1[^A-Za-z_]//g', + \ "ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=2[^A-Za-z_]//g', + \ "ABCDEFGHIXYZ_abcdefghiwxyz"], + \ [':s/\%#=0\a//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\a//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\a//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[A-Za-z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[A-Za-z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[A-Za-z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\A//g', + \ "ABCDEFGHIXYZabcdefghiwxyz"], + \ [':s/\%#=1\A//g', + \ "ABCDEFGHIXYZabcdefghiwxyz"], + \ [':s/\%#=2\A//g', + \ "ABCDEFGHIXYZabcdefghiwxyz"], + \ [':s/\%#=0[^A-Za-z]//g', + \ "ABCDEFGHIXYZabcdefghiwxyz"], + \ [':s/\%#=1[^A-Za-z]//g', + \ "ABCDEFGHIXYZabcdefghiwxyz"], + \ [':s/\%#=2[^A-Za-z]//g', + \ "ABCDEFGHIXYZabcdefghiwxyz"], + \ [':s/\%#=0\l//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\l//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\l//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[a-z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[a-z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[a-z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\L//g', + \ "abcdefghiwxyz"], + \ [':s/\%#=1\L//g', + \ "abcdefghiwxyz"], + \ [':s/\%#=2\L//g', + \ "abcdefghiwxyz"], + \ [':s/\%#=0[^a-z]//g', + \ "abcdefghiwxyz"], + \ [':s/\%#=1[^a-z]//g', + \ "abcdefghiwxyz"], + \ [':s/\%#=2[^a-z]//g', + \ "abcdefghiwxyz"], + \ [':s/\%#=0\u//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\u//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\u//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[A-Z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[A-Z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[A-Z]//g', + \ "\t\\ !\"#$%&'()#+'-./0123456789:;<=>?@[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0\U//g', + \ "ABCDEFGHIXYZ"], + \ [':s/\%#=1\U//g', + \ "ABCDEFGHIXYZ"], + \ [':s/\%#=2\U//g', + \ "ABCDEFGHIXYZ"], + \ [':s/\%#=0[^A-Z]//g', + \ "ABCDEFGHIXYZ"], + \ [':s/\%#=1[^A-Z]//g', + \ "ABCDEFGHIXYZ"], + \ [':s/\%#=2[^A-Z]//g', + \ "ABCDEFGHIXYZ"], + \ [':s/\%#=0\%' . line('.') . 'l^\t...//g', + \ "!\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1\%' . line('.') . 'l^\t...//g', + \ "!\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2\%' . line('.') . 'l^\t...//g', + \ "!\"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[0-z]//g', + \ "\t\\ !\"#$%&'()#+'-./{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=1[0-z]//g', + \ "\t\\ !\"#$%&'()#+'-./{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=2[0-z]//g', + \ "\t\\ !\"#$%&'()#+'-./{|}~\\u0080\u0082\u0090\u009b¦±¼ÇÓé"], + \ [':s/\%#=0[^0-z]//g', + \ "0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz"], + \ [':s/\%#=1[^0-z]//g', + \ "0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz"], + \ [':s/\%#=2[^0-z]//g', + \ "0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz"] + \] + + for [cmd, expected] in tests + call append(0, input) + call cursor(1, 1) + exe cmd + call assert_equal(expected, getline(1), cmd) + endfor + + let &encoding = save_enc + enew! + close + endfunc *** ../vim-8.0.1446/src/testdir/test_shortpathname.vim 2018-01-31 19:29:25.188611799 +0100 --- src/testdir/test_shortpathname.vim 2018-01-31 19:23:08.491250582 +0100 *************** *** 0 **** --- 1,70 ---- + " Test for shortpathname ':8' extension. + " Only for use on Win32 systems! + + if !has('win32') + finish + endif + + func TestIt(file, bits, expected) + let res = fnamemodify(a:file, a:bits) + if a:expected != '' + call assert_equal(substitute(a:expected, '/', '\\', 'g'), + \ substitute(res, '/', '\\', 'g'), + \ "'" . a:file . "'->(" . a:bits . ")->'" . res . "'") + endif + endfunc + + func Test_ColonEight() + let save_dir = getcwd() + + " This could change for CygWin to //cygdrive/c + let dir1 = 'c:/x.x.y' + if filereadable(dir1) || isdirectory(dir1) + call assert_report("Fatal: '" . dir1 . "' exists, cannot run test") + return + endif + + let file1 = dir1 . '/zz.y.txt' + let nofile1 = dir1 . '/z.y.txt' + let dir2 = dir1 . '/VimIsTheGreatestSinceSlicedBread' + let file2 = dir2 . '/z.txt' + let nofile2 = dir2 . '/zz.txt' + + call mkdir(dir1) + let resdir1 = substitute(fnamemodify(dir1, ':p:8'), '/$', '', '') + call assert_match('\V\^c:/XX\x\x\x\x~1.Y\$', resdir1) + + let resfile1 = resdir1 . '/ZZY~1.TXT' + let resnofile1 = resdir1 . '/z.y.txt' + let resdir2 = resdir1 . '/VIMIST~1' + let resfile2 = resdir2 . '/z.txt' + let resnofile2 = resdir2 . '/zz.txt' + + call mkdir(dir2) + call writefile([], file1) + call writefile([], file2) + + call TestIt(file1, ':p:8', resfile1) + call TestIt(nofile1, ':p:8', resnofile1) + call TestIt(file2, ':p:8', resfile2) + call TestIt(nofile2, ':p:8', resnofile2) + call TestIt(nofile2, ':p:8:h', fnamemodify(resnofile2, ':h')) + exe 'cd ' . dir1 + call TestIt(file1, ':.:8', strpart(resfile1, strlen(resdir1)+1)) + call TestIt(nofile1, ':.:8', strpart(resnofile1, strlen(resdir1)+1)) + call TestIt(file2, ':.:8', strpart(resfile2, strlen(resdir1)+1)) + call TestIt(nofile2, ':.:8', strpart(resnofile2, strlen(resdir1)+1)) + let $HOME=dir1 + call TestIt(file1, ':~:8', '~' . strpart(resfile1, strlen(resdir1))) + call TestIt(nofile1, ':~:8', '~' . strpart(resnofile1, strlen(resdir1))) + call TestIt(file2, ':~:8', '~' . strpart(resfile2, strlen(resdir1))) + call TestIt(nofile2, ':~:8', '~' . strpart(resnofile2, strlen(resdir1))) + + cd c:/ + call delete(file2) + call delete(file1) + call delete(dir2, 'd') + call delete(dir1, 'd') + + exe "cd " . save_dir + endfunc *** ../vim-8.0.1446/src/testdir/test_textformat.vim 2017-11-16 21:52:07.655021738 +0100 --- src/testdir/test_textformat.vim 2018-01-31 19:23:08.491250582 +0100 *************** *** 166,168 **** --- 166,454 ---- setl ai& tw& fo& si& comments& enew! endfunc + + " Tests for :right, :center and :left on text with embedded TAB. + func Test_format_align() + enew! + set tw=65 + + " :left alignment + call append(0, [ + \ " test for :left", + \ " a a", + \ " fa a", + \ " dfa a", + \ " sdfa a", + \ " asdfa a", + \ " xasdfa a", + \ "asxxdfa a", + \ ]) + %left + call assert_equal([ + \ "test for :left", + \ "a a", + \ "fa a", + \ "dfa a", + \ "sdfa a", + \ "asdfa a", + \ "xasdfa a", + \ "asxxdfa a", + \ "" + \ ], getline(1, '$')) + enew! + + " :center alignment + call append(0, [ + \ " test for :center", + \ " a a", + \ " fa afd asdf", + \ " dfa a", + \ " sdfa afd asdf", + \ " asdfa a", + \ " xasdfa asdfasdfasdfasdfasdf", + \ "asxxdfa a" + \ ]) + %center + call assert_equal([ + \ " test for :center", + \ " a a", + \ " fa afd asdf", + \ " dfa a", + \ " sdfa afd asdf", + \ " asdfa a", + \ " xasdfa asdfasdfasdfasdfasdf", + \ " asxxdfa a", + \ "" + \ ], getline(1, '$')) + enew! + + " :right alignment + call append(0, [ + \ " test for :right", + \ " a a", + \ " fa a", + \ " dfa a", + \ " sdfa a", + \ " asdfa a", + \ " xasdfa a", + \ " asxxdfa a", + \ " asxa;ofa a", + \ " asdfaqwer a", + \ " a ax", + \ " fa ax", + \ " dfa ax", + \ " sdfa ax", + \ " asdfa ax", + \ " xasdfa ax", + \ " asxxdfa ax", + \ " asxa;ofa ax", + \ " asdfaqwer ax", + \ " a axx", + \ " fa axx", + \ " dfa axx", + \ " sdfa axx", + \ " asdfa axx", + \ " xasdfa axx", + \ " asxxdfa axx", + \ " asxa;ofa axx", + \ " asdfaqwer axx", + \ " a axxx", + \ " fa axxx", + \ " dfa axxx", + \ " sdfa axxx", + \ " asdfa axxx", + \ " xasdfa axxx", + \ " asxxdfa axxx", + \ " asxa;ofa axxx", + \ " asdfaqwer axxx", + \ " a axxxo", + \ " fa axxxo", + \ " dfa axxxo", + \ " sdfa axxxo", + \ " asdfa axxxo", + \ " xasdfa axxxo", + \ " asxxdfa axxxo", + \ " asxa;ofa axxxo", + \ " asdfaqwer axxxo", + \ " a axxxoi", + \ " fa axxxoi", + \ " dfa axxxoi", + \ " sdfa axxxoi", + \ " asdfa axxxoi", + \ " xasdfa axxxoi", + \ " asxxdfa axxxoi", + \ " asxa;ofa axxxoi", + \ " asdfaqwer axxxoi", + \ " a axxxoik", + \ " fa axxxoik", + \ " dfa axxxoik", + \ " sdfa axxxoik", + \ " asdfa axxxoik", + \ " xasdfa axxxoik", + \ " asxxdfa axxxoik", + \ " asxa;ofa axxxoik", + \ " asdfaqwer axxxoik", + \ " a axxxoike", + \ " fa axxxoike", + \ " dfa axxxoike", + \ " sdfa axxxoike", + \ " asdfa axxxoike", + \ " xasdfa axxxoike", + \ " asxxdfa axxxoike", + \ " asxa;ofa axxxoike", + \ " asdfaqwer axxxoike", + \ " a axxxoikey", + \ " fa axxxoikey", + \ " dfa axxxoikey", + \ " sdfa axxxoikey", + \ " asdfa axxxoikey", + \ " xasdfa axxxoikey", + \ " asxxdfa axxxoikey", + \ " asxa;ofa axxxoikey", + \ " asdfaqwer axxxoikey", + \ ]) + %right + call assert_equal([ + \ "\t\t\t\t test for :right", + \ "\t\t\t\t a a", + \ "\t\t\t\t fa a", + \ "\t\t\t\t dfa a", + \ "\t\t\t\t sdfa a", + \ "\t\t\t\t asdfa a", + \ "\t\t\t\t xasdfa a", + \ "\t\t\t\t asxxdfa a", + \ "\t\t\t\t asxa;ofa a", + \ "\t\t\t\t asdfaqwer a", + \ "\t\t\t\t a ax", + \ "\t\t\t\t fa ax", + \ "\t\t\t\t dfa ax", + \ "\t\t\t\t sdfa ax", + \ "\t\t\t\t asdfa ax", + \ "\t\t\t\t xasdfa ax", + \ "\t\t\t\t asxxdfa ax", + \ "\t\t\t\t asxa;ofa ax", + \ "\t\t\t\t asdfaqwer ax", + \ "\t\t\t\t a axx", + \ "\t\t\t\t fa axx", + \ "\t\t\t\t dfa axx", + \ "\t\t\t\t sdfa axx", + \ "\t\t\t\t asdfa axx", + \ "\t\t\t\t xasdfa axx", + \ "\t\t\t\t asxxdfa axx", + \ "\t\t\t\t asxa;ofa axx", + \ "\t\t\t\t asdfaqwer axx", + \ "\t\t\t\t a axxx", + \ "\t\t\t\t fa axxx", + \ "\t\t\t\t dfa axxx", + \ "\t\t\t\t sdfa axxx", + \ "\t\t\t\t asdfa axxx", + \ "\t\t\t\t xasdfa axxx", + \ "\t\t\t\t asxxdfa axxx", + \ "\t\t\t\t asxa;ofa axxx", + \ "\t\t\t\t asdfaqwer axxx", + \ "\t\t\t\t a axxxo", + \ "\t\t\t\t fa axxxo", + \ "\t\t\t\t dfa axxxo", + \ "\t\t\t\t sdfa axxxo", + \ "\t\t\t\t asdfa axxxo", + \ "\t\t\t\t xasdfa axxxo", + \ "\t\t\t\t asxxdfa axxxo", + \ "\t\t\t\t asxa;ofa axxxo", + \ "\t\t\t\t asdfaqwer axxxo", + \ "\t\t\t\t a axxxoi", + \ "\t\t\t\t fa axxxoi", + \ "\t\t\t\t dfa axxxoi", + \ "\t\t\t\t sdfa axxxoi", + \ "\t\t\t\t asdfa axxxoi", + \ "\t\t\t\t xasdfa axxxoi", + \ "\t\t\t\t asxxdfa axxxoi", + \ "\t\t\t\t asxa;ofa axxxoi", + \ "\t\t\t\t asdfaqwer axxxoi", + \ "\t\t\t\t a axxxoik", + \ "\t\t\t\t fa axxxoik", + \ "\t\t\t\t dfa axxxoik", + \ "\t\t\t\t sdfa axxxoik", + \ "\t\t\t\t asdfa axxxoik", + \ "\t\t\t\t xasdfa axxxoik", + \ "\t\t\t\t asxxdfa axxxoik", + \ "\t\t\t\t asxa;ofa axxxoik", + \ "\t\t\t\t asdfaqwer axxxoik", + \ "\t\t\t\t a axxxoike", + \ "\t\t\t\t fa axxxoike", + \ "\t\t\t\t dfa axxxoike", + \ "\t\t\t\t sdfa axxxoike", + \ "\t\t\t\t asdfa axxxoike", + \ "\t\t\t\t xasdfa axxxoike", + \ "\t\t\t\t asxxdfa axxxoike", + \ "\t\t\t\t asxa;ofa axxxoike", + \ "\t\t\t\t asdfaqwer axxxoike", + \ "\t\t\t\t a axxxoikey", + \ "\t\t\t\t fa axxxoikey", + \ "\t\t\t\t dfa axxxoikey", + \ "\t\t\t\t sdfa axxxoikey", + \ "\t\t\t\t asdfa axxxoikey", + \ "\t\t\t\t xasdfa axxxoikey", + \ "\t\t\t\t asxxdfa axxxoikey", + \ "\t\t\t\t asxa;ofa axxxoikey", + \ "\t\t\t\t asdfaqwer axxxoikey", + \ "" + \ ], getline(1, '$')) + enew! + + set tw& + endfunc + + " Test formatting a paragraph. + func Test_format_para() + enew! + set fo+=tcroql tw=72 + + call append(0, [ + \ "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" + \ ]) + exe "normal /xxxxxxxx$\" + normal 0gq6kk + call assert_equal([ + \ "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", + \ "" + \ ], getline(1, '$')) + + set fo& tw& + enew! + endfunc + + " Test undo after ":%s" and formatting. + func Test_format_undo() + enew! + map gg :.,.+2s/^/x/kk:set tw=3gqq + + call append(0, [ + \ "aa aa aa aa", + \ "bb bb bb bb", + \ "cc cc cc cc" + \ ]) + " undo/redo here to make the next undo only work on the following changes + exe "normal i\u" + call cursor(1,1) + normal ggu + call assert_equal([ + \ "aa aa aa aa", + \ "bb bb bb bb", + \ "cc cc cc cc", + \ "" + \ ], getline(1, '$')) + + unmap gg + enew! + endfunc *** ../vim-8.0.1446/src/version.c 2018-01-31 19:06:45.450257136 +0100 --- src/version.c 2018-01-31 19:29:33.028556976 +0100 *************** *** 773,774 **** --- 773,776 ---- { /* Add new patch number below this line */ + /**/ + 1447, /**/ -- He was not in the least bit scared to be mashed into a pulp Or to have his eyes gouged out and his elbows broken; To have his kneecaps split and his body burned away And his limbs all hacked and mangled, brave Sir Robin. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///