Patch 7.4.2307
Problem: Several tests are old style.
Solution: Turn them into new style tests. (Yegappan Lakshmanan)
Files: src/testdir/Make_all.mak, src/testdir/test102.in,
src/testdir/test102.ok, src/testdir/test46.in,
src/testdir/test46.ok, src/testdir/test81.in,
src/testdir/test81.ok, src/testdir/test_charsearch.in,
src/testdir/test_charsearch.ok, src/testdir/test_charsearch.vim,
src/testdir/test_fnameescape.vim, src/testdir/test_substitute.vim,
src/Makefile
*** ../vim-7.4.2306/src/testdir/Make_all.mak 2016-09-01 22:19:22.540166008
+0200
--- src/testdir/Make_all.mak 2016-09-02 19:39:33.929523113 +0200
***************
*** 42,48 ****
test43.out \
test44.out \
test45.out \
- test46.out \
test48.out \
test51.out \
test53.out \
--- 42,47 ----
***************
*** 64,70 ****
test77.out \
test79.out \
test80.out \
- test81.out \
test82.out \
test84.out \
test88.out \
--- 63,68 ----
***************
*** 77,83 ****
test98.out \
test99.out \
test101.out \
- test102.out \
test103.out \
test104.out \
test107.out \
--- 75,80 ----
***************
*** 157,167 ****
--- 154,166 ----
test_bufwintabinfo.res \
test_cdo.res \
test_channel.res \
+ test_charsearch.res \
test_cmdline.res \
test_cscope.res \
test_diffmode.res \
test_digraph.res \
test_farsi.res \
+ test_fnameescape.res \
test_gn.res \
test_gui.res \
test_hardcopy.res \
***************
*** 185,190 ****
--- 184,190 ----
test_startup.res \
test_startup_utf8.res \
test_stat.res \
+ test_substitute.res \
test_syntax.res \
test_textobjects.res \
test_undo.res \
*** ../vim-7.4.2306/src/testdir/test102.in 2014-07-30 13:20:35.719622565
+0200
--- src/testdir/test102.in 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,13 ****
- Test if fnameescape is correct for special chars like !
-
- STARTTEST
- :so small.vim
- :%d
- :let fname = 'Xspa ce'
- :try | exe "w! " . fnameescape(fname) | put='Space' | endtry
- :let fname = 'Xemark!'
- :try | exe "w! " . fnameescape(fname) | put='ExclamationMark' | endtry
- :w! test.out
- :qa!
- ENDTEST
-
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test102.ok 2013-11-12 05:28:08.000000000
+0100
--- src/testdir/test102.ok 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,3 ****
-
- Space
- ExclamationMark
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test46.in 2010-05-15 13:04:10.000000000
+0200
--- src/testdir/test46.in 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,27 ****
- Tests 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
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test46.ok 2010-05-15 13:04:10.000000000
+0200
--- src/testdir/test46.ok 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,13 ****
- 1 aa bb cc 2 dd ee
- 3 e
- f
- g
- h
- 4 i
- j
- 5 ax8
- 8xb cx9
- 9xd
- 6 ex7
- 7x7f
- xxxxx
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test81.in 2011-07-15 13:25:00.000000000
+0200
--- src/testdir/test81.in 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,22 ****
- Test for t movement command and 'cpo-;' setting
-
- STARTTEST
- :set nocompatible viminfo+=nviminfo
- :set cpo-=;
- /firstline/
- j0tt;D
- 0fz;D
- $Fy;D
- $Ty;D:set cpo+=;
- j0tt;;D
- $Ty;;D:?firstline?+1,$w! test.out
- :qa!
- ENDTEST
-
- firstline
- aaa two three four
- zzz
- yyy
- bbb yee yoo four
- ccc two three four
- ddd yee yoo four
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test81.ok 2011-07-15 13:14:27.000000000
+0200
--- src/testdir/test81.ok 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,6 ****
- aaa two
- z
- y
- bbb y
- ccc
- ddd yee y
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test_charsearch.in 2016-02-20
15:10:46.693695130 +0100
--- src/testdir/test_charsearch.in 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,26 ****
- Test for character searches
-
- STARTTEST
- :so small.vim
- :" check that "fe" and ";" work
- /^X
- ylfep;;p,,p:
- :" check that save/restore works
- /^Y
- ylfep:let csave = getcharsearch()
- fip:call setcharsearch(csave)
- ;p;p:
- :" check that setcharsearch() changes the settings.
- /^Z
- ylfep:call setcharsearch({'char': 'k'})
- ;p:call setcharsearch({'forward': 0})
- $;p:call setcharsearch({'until': 1})
- :set cpo-=;
- ;;p:
- :/^X/,$w! test.out
- :qa!
- ENDTEST
-
- Xabcdefghijkemnopqretuvwxyz
- Yabcdefghijkemnopqretuvwxyz
- Zabcdefghijkemnokqretkvwxyz
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test_charsearch.ok 2016-02-20
15:10:46.693695130 +0100
--- src/testdir/test_charsearch.ok 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,3 ****
- XabcdeXfghijkeXmnopqreXtuvwxyz
- YabcdeYfghiYjkeYmnopqreYtuvwxyz
- ZabcdeZfghijkZZemnokqretkZvwxyz
--- 0 ----
*** ../vim-7.4.2306/src/testdir/test_charsearch.vim 2016-09-02
19:49:01.544668891 +0200
--- src/testdir/test_charsearch.vim 2016-09-02 19:39:33.929523113 +0200
***************
*** 0 ****
--- 1,62 ----
+
+ function! Test_charsearch()
+ enew!
+ call append(0, ['Xabcdefghijkemnopqretuvwxyz',
+ \ 'Yabcdefghijkemnopqretuvwxyz',
+ \ 'Zabcdefghijkemnokqretkvwxyz'])
+ " check that "fe" and ";" work
+ 1
+ normal! ylfep;;p,,p
+ call assert_equal('XabcdeXfghijkeXmnopqreXtuvwxyz', getline(1))
+ " check that save/restore works
+ 2
+ normal! ylfep
+ let csave = getcharsearch()
+ normal! fip
+ call setcharsearch(csave)
+ normal! ;p;p
+ call assert_equal('YabcdeYfghiYjkeYmnopqreYtuvwxyz', getline(2))
+
+ " check that setcharsearch() changes the settings.
+ 3
+ normal! ylfep
+ call setcharsearch({'char': 'k'})
+ normal! ;p
+ call setcharsearch({'forward': 0})
+ normal! $;p
+ call setcharsearch({'until': 1})
+ set cpo-=;
+ normal! ;;p
+ call assert_equal('ZabcdeZfghijkZZemnokqretkZvwxyz', getline(3))
+ enew!
+ endfunction
+
+ " Test for t,f,F,T movement commands and 'cpo-;' setting
+ function! Test_search_cmds()
+ enew!
+ call append(0, ["aaa two three four", " zzz", "yyy ",
+ \ "bbb yee yoo four", "ccc two three four",
+ \ "ddd yee yoo four"])
+ set cpo-=;
+ 1
+ normal! 0tt;D
+ 2
+ normal! 0fz;D
+ 3
+ normal! $Fy;D
+ 4
+ normal! $Ty;D
+ set cpo+=;
+ 5
+ normal! 0tt;;D
+ 6
+ normal! $Ty;;D
+
+ call assert_equal('aaa two', getline(1))
+ call assert_equal(' z', getline(2))
+ call assert_equal('y', getline(3))
+ call assert_equal('bbb y', getline(4))
+ call assert_equal('ccc', getline(5))
+ call assert_equal('ddd yee y', getline(6))
+ enew!
+ endfunction
*** ../vim-7.4.2306/src/testdir/test_fnameescape.vim 2016-09-02
19:49:01.552668822 +0200
--- src/testdir/test_fnameescape.vim 2016-09-02 19:39:33.929523113 +0200
***************
*** 0 ****
--- 1,21 ----
+
+ " Test if fnameescape is correct for special chars like !
+ function! Test_fnameescape()
+ let fname = 'Xspa ce'
+ let status = v:false
+ try
+ exe "w! " . fnameescape(fname)
+ let status = v:true
+ endtry
+ call assert_true(status, "Space")
+ call delete(fname)
+
+ let fname = 'Xemark!'
+ let status = v:false
+ try
+ exe "w! " . fnameescape(fname)
+ let status = v:true
+ endtry
+ call assert_true(status, "ExclamationMark")
+ call delete(fname)
+ endfunction
*** ../vim-7.4.2306/src/testdir/test_substitute.vim 2016-09-02
19:49:01.556668789 +0200
--- src/testdir/test_substitute.vim 2016-09-02 19:39:33.929523113 +0200
***************
*** 0 ****
--- 1,41 ----
+ " Tests for multi-line regexps with ":s".
+
+ function! Test_multiline_subst()
+ enew!
+ call append(0, ["1 aa",
+ \ "bb",
+ \ "cc",
+ \ "2 dd",
+ \ "ee",
+ \ "3 ef",
+ \ "gh",
+ \ "4 ij",
+ \ "5 a8",
+ \ "8b c9",
+ \ "9d",
+ \ "6 e7",
+ \ "77f",
+ \ "xxxxx"])
+
+ 1
+ " 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/
+ call assert_equal('1 aa bb cc 2 dd ee', getline(1))
+ call assert_equal('3 e', getline(2))
+ call assert_equal('f', getline(3))
+ call assert_equal('g', getline(4))
+ call assert_equal('h', getline(5))
+ call assert_equal('4 i', getline(6))
+ call assert_equal('j', getline(7))
+ call assert_equal('5 ax8', getline(8))
+ call assert_equal('8xb cx9', getline(9))
+ call assert_equal('9xd', getline(10))
+ call assert_equal('6 ex7', getline(11))
+ call assert_equal('7x7f', getline(12))
+ call assert_equal('xxxxx', getline(13))
+ enew!
+ endfunction
*** ../vim-7.4.2306/src/Makefile 2016-09-01 22:19:22.544165975 +0200
--- src/Makefile 2016-09-02 19:42:26.528045607 +0200
***************
*** 2027,2033 ****
test_autoformat_join \
test_breakindent \
test_changelist \
- test_charsearch \
test_close_count \
test_command_count \
test_comparators \
--- 2027,2032 ----
***************
*** 2046,2058 ****
test11 test12 test13 test14 test15 test17 test18 test19 \
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
! test40 test41 test42 test43 test44 test45 test46 test48 test49 \
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
test60 test64 test65 test66 test67 test68 test69 \
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
! test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
! test100 test101 test102 test103 test104 test107 test108:
cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected]
VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
# Run individual NEW style test, assuming that Vim was already compiled.
--- 2045,2057 ----
test11 test12 test13 test14 test15 test17 test18 test19 \
test20 test21 test22 test23 test24 test25 test26 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 test58 test59 \
test60 test64 test65 test66 test67 test68 test69 \
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
! test80 test82 test83 test84 test85 test86 test87 test88 test89 \
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
! test100 test101 test103 test104 test107 test108:
cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected]
VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
# Run individual NEW style test, assuming that Vim was already compiled.
***************
*** 2065,2070 ****
--- 2064,2070 ----
test_bufwintabinfo \
test_cdo \
test_channel \
+ test_charsearch \
test_cmdline \
test_cscope \
test_cursor_func \
***************
*** 2082,2087 ****
--- 2082,2088 ----
test_file_perm \
test_filter_cmd \
test_filter_map \
+ test_fnameescape \
test_fnamemodify \
test_glob2regpat \
test_gn \
***************
*** 2130,2135 ****
--- 2131,2137 ----
test_startup_utf8 \
test_stat \
test_statusline \
+ test_substitute \
test_syn_attr \
test_syntax \
test_tabline \
*** ../vim-7.4.2306/src/version.c 2016-09-02 19:34:06.764327506 +0200
--- src/version.c 2016-09-02 19:42:34.019981503 +0200
***************
*** 765,766 ****
--- 765,768 ----
{ /* Add new patch number below this line */
+ /**/
+ 2307,
/**/
--
hundred-and-one symptoms of being an internet addict:
134. You consider bandwidth to be more important than carats.
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.