Patch 7.4.1127
Problem:    Both old and new style tests for Perl.
Solution:   Merge the old tests with the new style tests.
Files:      src/Makefile, src/testdir/Make_all.mak, src/testdir/test_perl.in,
            src/testdir/test_perl.ok, src/testdir/test_perl.vim


*** ../vim-7.4.1126/src/Makefile        2016-01-17 21:48:55.837086369 +0100
--- src/Makefile        2016-01-17 21:51:19.903500471 +0100
***************
*** 1931,1937 ****
                ./$$t || exit 1; echo $$t passed; \
        done
  
! # Run individual test, assuming that Vim was already compiled.
  test1 \
        test_argument_0count \
        test_argument_count \
--- 1931,1937 ----
                ./$$t || exit 1; echo $$t passed; \
        done
  
! # Run individual OLD style test, assuming that Vim was already compiled.
  test1 \
        test_argument_0count \
        test_argument_count \
***************
*** 1956,1962 ****
        test_match_conceal \
        test_nested_function \
        test_options \
-       test_perl \
        test_qf_title \
        test_ruby \
        test_search_mbyte \
--- 1956,1961 ----
***************
*** 1979,1985 ****
        test100 test101 test102 test103 test104 test105 test106 test107 test108:
        cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected] 
VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
  
! test_assert \
        test_backspace_opt \
        test_cdo \
        test_cursor_func \
--- 1978,1986 ----
        test100 test101 test102 test103 test104 test105 test106 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.
! test_arglist \
!       test_assert \
        test_backspace_opt \
        test_cdo \
        test_cursor_func \
***************
*** 1989,1994 ****
--- 1990,1996 ----
        test_increment \
        test_lispwords \
        test_menu \
+       test_perl \
        test_quickfix \
        test_searchpos \
        test_set \
*** ../vim-7.4.1126/src/testdir/Make_all.mak    2016-01-17 21:48:55.837086369 
+0100
--- src/testdir/Make_all.mak    2016-01-17 22:00:52.637197846 +0100
***************
*** 113,119 ****
        test_match_conceal.out \
        test_nested_function.out \
        test_options.out \
-       test_perl.out \
        test_qf_title.out \
        test_ruby.out \
        test_search_mbyte.out \
--- 113,118 ----
*** ../vim-7.4.1126/src/testdir/test_perl.in    2015-06-19 15:45:13.005889121 
+0200
--- src/testdir/test_perl.in    1970-01-01 01:00:00.000000000 +0100
***************
*** 1,26 ****
- Tests for perl interface.     vim: set ft=vim :
- 
- STARTTEST
- :so small.vim
- :set nocompatible viminfo+=nviminfo
- :if !has('perl') | e! test.ok | wq! test.out | endif
- :" change buffer contents
- :perl VIM::DoCommand("normal /^1\n")
- :perl $curline = VIM::Eval("line('.')")
- :perl $curbuf->Set($curline, "1 changed line 1")
- :" evaluate a List
- :perl VIM::DoCommand("normal /^2\n")
- :perl $curline = VIM::Eval("line('.')")
- :let l = ["abc", "def"]
- :perl << EOF
- $l = VIM::Eval("l");
- $curbuf->Append($curline, $l);
- EOF
- :normal j
- :.perldo s|\n|/|g
- :?^1?,$w! test.out
- :qa!
- ENDTEST
- 
- 1 line 1
- 2 line 2
--- 0 ----
*** ../vim-7.4.1126/src/testdir/test_perl.ok    2015-06-19 15:45:13.005889121 
+0200
--- src/testdir/test_perl.ok    1970-01-01 01:00:00.000000000 +0100
***************
*** 1,3 ****
- 1 changed line 1
- 2 line 2
- abc/def/
--- 0 ----
*** ../vim-7.4.1126/src/testdir/test_perl.vim   2016-01-17 21:15:17.843322552 
+0100
--- src/testdir/test_perl.vim   2016-01-17 21:59:52.697857298 +0100
***************
*** 4,10 ****
    finish
  end
  
! set nocp viminfo+=nviminfo
  
  fu <SID>catch_peval(expr)
    try
--- 4,30 ----
    finish
  end
  
! func Test_change_buffer()
!   call setline(line('$'), ['1 line 1'])
!   perl VIM::DoCommand("normal /^1\n")
!   perl $curline = VIM::Eval("line('.')")
!   perl $curbuf->Set($curline, "1 changed line 1")
!   call assert_equal('1 changed line 1', getline('$'))
! endfunc
! 
! func Test_evaluate_list()
!   call setline(line('$'), ['2 line 2'])
!   perl VIM::DoCommand("normal /^2\n")
!   perl $curline = VIM::Eval("line('.')")
!   let l = ["abc", "def"]
!   perl << EOF
!   $l = VIM::Eval("l");
!   $curbuf->Append($curline, $l);
! EOF
!   normal j
!   .perldo s|\n|/|g
!   call assert_equal('abc/def/', getline('$'))
! endfunc
  
  fu <SID>catch_peval(expr)
    try
*** ../vim-7.4.1126/src/version.c       2016-01-17 21:48:55.841086326 +0100
--- src/version.c       2016-01-17 22:03:11.299672881 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     1127,
  /**/

-- 
Every engineer dreams about saving the universe and having sex with aliens.
This is much more glamorous than the real life of an engineer, which consists
of hiding from the universe and having sex without the participation of other
life forms.                     (Scott Adams - The Dilbert principle)

 /// 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.

Raspunde prin e-mail lui