From 292eff0c5aacb8531d65509679b6c29eae8dc22a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 11 Jul 2017 21:46:28 +0200 Subject: patch 8.0.0708: some tests are old style Problem: Some tests are old style. Solution: Change a few tests from old style to new style. (pschuh, closes #1813) --- src/Makefile | 18 ++++-- src/testdir/Make_all.mak | 10 +--- src/testdir/Make_ming.mak | 2 +- src/testdir/Make_vms.mms | 11 ++-- src/testdir/main.aap | 2 +- src/testdir/test23.in | 15 ----- src/testdir/test23.ok | 2 - src/testdir/test24.in | Bin 1301 -> 0 bytes src/testdir/test24.ok | 32 ----------- src/testdir/test26.in | 44 --------------- src/testdir/test26.ok | 10 ---- src/testdir/test67.in | 33 ----------- src/testdir/test67.ok | 10 ---- src/testdir/test75.in | 41 -------------- src/testdir/test75.ok | 7 --- src/testdir/test97.in | 23 -------- src/testdir/test97.ok | 8 --- src/testdir/test_comparators.in | 21 ------- src/testdir/test_comparators.ok | 1 - src/testdir/test_comparators.vim | 9 +++ src/testdir/test_escaped_glob.vim | 25 +++++++++ src/testdir/test_exec_while_if.vim | 53 ++++++++++++++++++ src/testdir/test_exists_autocmd.vim | 26 +++++++++ src/testdir/test_getcwd.in | 96 -------------------------------- src/testdir/test_getcwd.ok | 18 ------ src/testdir/test_getcwd.vim | 91 ++++++++++++++++++++++++++++++ src/testdir/test_maparg.vim | 52 +++++++++++++++++ src/testdir/test_plus_arg_edit.vim | 8 +++ src/testdir/test_regex_char_classes.vim | 58 +++++++++++++++++++ src/version.c | 2 + 30 files changed, 343 insertions(+), 385 deletions(-) delete mode 100644 src/testdir/test23.in delete mode 100644 src/testdir/test23.ok delete mode 100644 src/testdir/test24.in delete mode 100644 src/testdir/test24.ok delete mode 100644 src/testdir/test26.in delete mode 100644 src/testdir/test26.ok delete mode 100644 src/testdir/test67.in delete mode 100644 src/testdir/test67.ok delete mode 100644 src/testdir/test75.in delete mode 100644 src/testdir/test75.ok delete mode 100644 src/testdir/test97.in delete mode 100644 src/testdir/test97.ok delete mode 100644 src/testdir/test_comparators.in delete mode 100644 src/testdir/test_comparators.ok create mode 100644 src/testdir/test_comparators.vim create mode 100644 src/testdir/test_escaped_glob.vim create mode 100644 src/testdir/test_exec_while_if.vim create mode 100644 src/testdir/test_exists_autocmd.vim delete mode 100644 src/testdir/test_getcwd.in delete mode 100644 src/testdir/test_getcwd.ok create mode 100644 src/testdir/test_getcwd.vim create mode 100644 src/testdir/test_maparg.vim create mode 100644 src/testdir/test_plus_arg_edit.vim create mode 100644 src/testdir/test_regex_char_classes.vim (limited to 'src') diff --git a/src/Makefile b/src/Makefile index 50032f49d..2071217d2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -2092,25 +2092,23 @@ test1 \ test_autoformat_join \ test_changelist \ test_close_count \ - test_comparators \ test_erasebackword \ test_eval \ test_fixeol \ - test_getcwd \ test_insertcount \ test_listchars \ test_search_mbyte \ test_wordcount \ test3 test4 test5 test6 test7 test8 test9 \ test11 test12 test14 test15 test17 test18 test19 \ - test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \ + test20 test21 test22 test25 test27 test28 test29 \ test30 test31 test32 test33 test34 test36 test37 test38 test39 \ test40 test41 test42 test43 test44 test45 test48 test49 \ test50 test51 test52 test53 test54 test55 test56 test57 test59 \ - test60 test64 test66 test67 test68 test69 \ - test70 test72 test73 test74 test75 test77 test78 test79 \ + test60 test64 test66 test68 test69 \ + test70 test72 test73 test74 test77 test78 test79 \ test80 test83 test84 test85 test86 test87 test88 \ - test91 test94 test95 test97 test98 test99 \ + test91 test94 test95 test98 test99 \ test100 test101 test103 test104 test107 test108: cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE) @@ -2134,6 +2132,7 @@ test_arglist \ test_clientserver \ test_cmdline \ test_command_count \ + test_comparators \ test_crypt \ test_cscope \ test_cursor_func \ @@ -2142,9 +2141,12 @@ test_arglist \ test_digraph \ test_display \ test_edit \ + test_escaped_glob \ test_ex_undo \ test_ex_z \ + test_exec_while_if \ test_execute_func \ + test_exists_autocmd \ test_expand \ test_expand_dllpath \ test_expr \ @@ -2163,6 +2165,7 @@ test_arglist \ test_fold \ test_functions \ test_ga \ + test_getcwd \ test_gf \ test_glob2regpat \ test_global \ @@ -2191,6 +2194,7 @@ test_arglist \ test_lua \ test_makeencoding \ test_man \ + test_maparg \ test_mapping \ test_marks \ test_match \ @@ -2209,6 +2213,7 @@ test_arglist \ test_partial \ test_paste \ test_perl \ + test_plus_arg_edit \ test_popup \ test_profile \ test_put \ @@ -2219,6 +2224,7 @@ test_arglist \ test_quickfix \ test_quotestar \ test_recover \ + test_regex_char_classes \ test_regexp_latin \ test_regexp_utf8 \ test_reltime \ diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak index 9a3cafd37..217a29547 100644 --- a/src/testdir/Make_all.mak +++ b/src/testdir/Make_all.mak @@ -24,9 +24,6 @@ SCRIPTS_ALL = \ test19.out \ test20.out \ test22.out \ - test23.out \ - test24.out \ - test26.out \ test28.out \ test29.out \ test31.out \ @@ -51,12 +48,10 @@ SCRIPTS_ALL = \ test60.out \ test64.out \ test66.out \ - test67.out \ test68.out \ test69.out \ test70.out \ test73.out \ - test75.out \ test77.out \ test79.out \ test80.out \ @@ -75,11 +70,9 @@ SCRIPTS_ALL = \ test_autoformat_join.out \ test_changelist.out \ test_close_count.out \ - test_comparators.out \ test_erasebackword.out \ test_eval.out \ test_fixeol.out \ - test_getcwd.out \ test_insertcount.out \ test_listchars.out \ test_search_mbyte.out \ @@ -99,8 +92,7 @@ SCRIPTS_MORE1 = \ SCRIPTS_MORE2 = \ test12.out \ test25.out \ - test49.out \ - test97.out + test49.out # Tests that run on most systems, but not MingW and Cygwin. diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak index dbf94f055..31dfe702b 100644 --- a/src/testdir/Make_ming.mak +++ b/src/testdir/Make_ming.mak @@ -69,7 +69,7 @@ fixff: -$(VIMPROG) -u dos.vim $(NO_INITS) "+argdo set ff=dos|upd" +q *.in *.ok -$(VIMPROG) -u dos.vim $(NO_INITS) "+argdo set ff=unix|upd" +q \ dotest.in test60.ok test_listchars.ok \ - test_getcwd.ok test_wordcount.ok + test_wordcount.ok clean: -@if exist *.out $(DEL) *.out diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms index 5f124afc2..a85e98df9 100644 --- a/src/testdir/Make_vms.mms +++ b/src/testdir/Make_vms.mms @@ -80,7 +80,6 @@ SCRIPT = test1.out test3.out test4.out test5.out \ test7.out test8.out test9.out \ test14.out test15.out \ test19.out test20.out test22.out \ - test23.out test24.out test26.out \ test28.out test29.out test30.out test31.out test32.out \ test33.out test34.out test36.out test37.out \ test38.out test39.out test40.out test41.out test42.out \ @@ -88,8 +87,8 @@ SCRIPT = test1.out test3.out test4.out test5.out \ test48.out test49.out test51.out test53.out test54.out \ test55.out test56.out test57.out test60.out \ test64.out \ - test66.out test67.out test68.out test69.out \ - test72.out test75.out \ + test66.out test68.out test69.out \ + test72.out \ test77a.out test78.out test79.out test80.out \ test84.out test88.out \ test91.out test94.out \ @@ -101,11 +100,9 @@ SCRIPT = test1.out test3.out test4.out test5.out \ test_breakindent.out \ test_changelist.out \ test_close_count.out \ - test_comparators.out \ test_erasebackword.out \ test_eval.out \ test_fixeol.out \ - test_getcwd.out \ test_insertcount.out \ test_listchars.out \ test_listlbr.out \ @@ -131,7 +128,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \ # test83: ? # test85: no Lua interface # test89: bug - findfile() does not work on VMS (just in the current directory) -# test97, test102: Just ODS-5 supports space and special chars in the filename. +# test102: Just ODS-5 supports space and special chars in the filename. # On ODS-2 tests fail. .IFDEF WANT_GUI @@ -156,7 +153,7 @@ SCRIPT_MZSCH = test70.out .ENDIF .IFDEF HAVE_ODS5 -SCRIPT_ODS5 = test97.out test102.out +SCRIPT_ODS5 = test102.out .ENDIF .IFDEF HAVE_GZIP diff --git a/src/testdir/main.aap b/src/testdir/main.aap index 821aa2d94..93159ba20 100644 --- a/src/testdir/main.aap +++ b/src/testdir/main.aap @@ -8,7 +8,7 @@ Scripts = test1.out test2.out test3.out test4.out test5.out test6.out test7.out test8.out test9.out test11.out test12.out test13.out test14.out test15.out test17.out test18.out test19.out test20.out test21.out test22.out - test23.out test24.out test25.out test26.out test27.out + test25.out test27.out test28.out test29.out test30.out test31.out test32.out test33.out test34.out test36.out test37.out test38.out test39.out test40.out test41.out test42.out diff --git a/src/testdir/test23.in b/src/testdir/test23.in deleted file mode 100644 index 0e0e60553..000000000 --- a/src/testdir/test23.in +++ /dev/null @@ -1,15 +0,0 @@ -Tests 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 diff --git a/src/testdir/test23.ok b/src/testdir/test23.ok deleted file mode 100644 index f1930abad..000000000 --- a/src/testdir/test23.ok +++ /dev/null @@ -1,2 +0,0 @@ -fooSLASHbar -fooPIPEbar diff --git a/src/testdir/test24.in b/src/testdir/test24.in deleted file mode 100644 index 7dfc1afdc..000000000 Binary files a/src/testdir/test24.in and /dev/null differ diff --git a/src/testdir/test24.ok b/src/testdir/test24.ok deleted file mode 100644 index cd6121096..000000000 --- a/src/testdir/test24.ok +++ /dev/null @@ -1,32 +0,0 @@ -start -test text test text -test text test text -test text test text -test text test text -test text test text -test text test text -test text test text x61 -test text test text x60-x64 -test text test text x78 5 -test text test text o143 -test text test text o140-o144 -test text test text o41 7 -test text test text \%x42 -test text test text \%o103 -test text test text [\x00] -test text test text [\x00-\x10] -test text test text [\x-z] -test text test text [\u-z] -xx xx a -xx aaaaa xx a -xx aaaaa xx a -xx Aaa xx -xx Aaaa xx -xx Aaa xx -xx foobar xA xx -xx an A xx -XX 9; -YY 77; - xyz - bcd - BB diff --git a/src/testdir/test26.in b/src/testdir/test26.in deleted file mode 100644 index e7cd75766..000000000 --- a/src/testdir/test26.in +++ /dev/null @@ -1,44 +0,0 @@ -Test 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 -: if i == 9 -: break -: endif -: if i == 5 -: continue -: else -: let j = 9 -: while j > 0 -: if has("ebcdic") -: execute "normal" j . "a" . j . "\x27" -: else -: execute "normal" j . "a" . j . "\x1b" -: endif -: let j = j - 1 -: endwhile -: endif -: endif -: if i == 9 -: if has("ebcdic") -: execute "normal Az\047" -: else -: execute "normal Az\033" -: endif -: endif -:endwhile -:unlet i j -:'t,$w! test.out -:qa! -ENDTEST - diff --git a/src/testdir/test26.ok b/src/testdir/test26.ok deleted file mode 100644 index bc4476118..000000000 --- a/src/testdir/test26.ok +++ /dev/null @@ -1,10 +0,0 @@ - -1x999999999888888887777777666666555554444333221 -2 -3x999999999888888887777777666666555554444333221 -4 -5x -6 -7x999999999888888887777777666666555554444333221 -8 -9x diff --git a/src/testdir/test67.in b/src/testdir/test67.in deleted file mode 100644 index e40cbabd6..000000000 --- a/src/testdir/test67.in +++ /dev/null @@ -1,33 +0,0 @@ -Test that groups and patterns are tested correctly when calling exists() for -autocommands. - -STARTTEST -:so small.vim -:let results=[] -:augroup auexists -:augroup END -:call add(results, "##BufEnter: " . exists("##BufEnter")) -:call add(results, "#BufEnter: " . exists("#BufEnter")) -:au BufEnter * let g:entered=1 -:call add(results, "#BufEnter: " . exists("#BufEnter")) -:call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) -:augroup auexists -:au BufEnter * let g:entered=1 -:augroup END -:call add(results, "#auexists#BufEnter: " . exists("#auexists#BufEnter")) -:call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) -:au BufEnter *.test let g:entered=1 -:call add(results, "#BufEnter#*.test: " . exists("#BufEnter#*.test")) -:edit testfile.test -:call add(results, "#BufEnter#: " . exists("#BufEnter#")) -:au BufEnter let g:entered=1 -:call add(results, "#BufEnter#: " . exists("#BufEnter#")) -:edit testfile2.test -:call add(results, "#BufEnter#: " . exists("#BufEnter#")) -:e! test.out -:call append(0, results) -:$d -:w -:qa! -ENDTEST - diff --git a/src/testdir/test67.ok b/src/testdir/test67.ok deleted file mode 100644 index 51188e5af..000000000 --- a/src/testdir/test67.ok +++ /dev/null @@ -1,10 +0,0 @@ -##BufEnter: 1 -#BufEnter: 0 -#BufEnter: 1 -#auexists#BufEnter: 0 -#auexists#BufEnter: 1 -#BufEnter#*.test: 0 -#BufEnter#*.test: 1 -#BufEnter#: 0 -#BufEnter#: 1 -#BufEnter#: 0 diff --git a/src/testdir/test75.in b/src/testdir/test75.in deleted file mode 100644 index 8fabccdf5..000000000 --- a/src/testdir/test75.in +++ /dev/null @@ -1,41 +0,0 @@ -Tests for maparg(). -Also test utf8 map with a 0x80 byte. - -STARTTEST -:so small.vim -:so mbyte.vim -:set cpo-=< -:set encoding=utf8 -:" Test maparg() with a string result -:map foo isfoo -:vnoremap