Skip to content

Commit 021b593

Browse files
committed
patch 7.4.1127
Problem: Both old and new style tests for Perl. Solution: Merge the old tests with the new style tests.
1 parent c970330 commit 021b593

File tree

6 files changed

+28
-34
lines changed

6 files changed

+28
-34
lines changed

src/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ unittest unittests: $(UNITTEST_TARGETS)
19311931
./$$t || exit 1; echo $$t passed; \
19321932
done
19331933

1934-
# Run individual test, assuming that Vim was already compiled.
1934+
# Run individual OLD style test, assuming that Vim was already compiled.
19351935
test1 \
19361936
test_argument_0count \
19371937
test_argument_count \
@@ -1956,7 +1956,6 @@ test1 \
19561956
test_match_conceal \
19571957
test_nested_function \
19581958
test_options \
1959-
test_perl \
19601959
test_qf_title \
19611960
test_ruby \
19621961
test_search_mbyte \
@@ -1979,7 +1978,9 @@ test1 \
19791978
test100 test101 test102 test103 test104 test105 test106 test107 test108:
19801979
cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected] VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
19811980

1982-
test_assert \
1981+
# Run individual NEW style test, assuming that Vim was already compiled.
1982+
test_arglist \
1983+
test_assert \
19831984
test_backspace_opt \
19841985
test_cdo \
19851986
test_cursor_func \
@@ -1989,6 +1990,7 @@ test_assert \
19891990
test_increment \
19901991
test_lispwords \
19911992
test_menu \
1993+
test_perl \
19921994
test_quickfix \
19931995
test_searchpos \
19941996
test_set \

src/testdir/Make_all.mak

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ SCRIPTS_ALL = \
113113
test_match_conceal.out \
114114
test_nested_function.out \
115115
test_options.out \
116-
test_perl.out \
117116
test_qf_title.out \
118117
test_ruby.out \
119118
test_search_mbyte.out \

src/testdir/test_perl.in

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/testdir/test_perl.ok

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/testdir/test_perl.vim

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,27 @@ if !has('perl')
44
finish
55
end
66

7-
set nocp viminfo+=nviminfo
7+
func Test_change_buffer()
8+
call setline(line('$'), ['1 line 1'])
9+
perl VIM::DoCommand("normal /^1\n")
10+
perl $curline = VIM::Eval("line('.')")
11+
perl $curbuf->Set($curline, "1 changed line 1")
12+
call assert_equal('1 changed line 1', getline('$'))
13+
endfunc
14+
15+
func Test_evaluate_list()
16+
call setline(line('$'), ['2 line 2'])
17+
perl VIM::DoCommand("normal /^2\n")
18+
perl $curline = VIM::Eval("line('.')")
19+
let l = ["abc", "def"]
20+
perl << EOF
21+
$l = VIM::Eval("l");
22+
$curbuf->Append($curline, $l);
23+
EOF
24+
normal j
25+
.perldo s|\n|/|g
26+
call assert_equal('abc/def/', getline('$'))
27+
endfunc
828

929
fu <SID>catch_peval(expr)
1030
try

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1127,
744746
/**/
745747
1126,
746748
/**/

0 commit comments

Comments
 (0)