]> granicus.if.org Git - vim/commitdiff
patch 7.4.744 v7.4.744
authorBram Moolenaar <Bram@vim.org>
Fri, 19 Jun 2015 13:45:29 +0000 (15:45 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 19 Jun 2015 13:45:29 +0000 (15:45 +0200)
Problem:    No tests for Ruby and Perl.
Solution:   Add minimal tests. (Ken Takata)

src/testdir/Make_amiga.mak
src/testdir/Make_dos.mak
src/testdir/Make_ming.mak
src/testdir/Make_os2.mak
src/testdir/Make_vms.mms
src/testdir/Makefile
src/testdir/test_perl.in [new file with mode: 0644]
src/testdir/test_perl.ok [new file with mode: 0644]
src/testdir/test_ruby.in [new file with mode: 0644]
src/testdir/test_ruby.ok [new file with mode: 0644]
src/version.c

index e7c94c7e906d14f15497474a2d1feeb5dfb09909..d9385b214d20438c2da255fce3e8ef7cfddcad36 100644 (file)
@@ -53,7 +53,9 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_marks.out \
                test_nested_function.out \
                test_options.out \
+               test_perl.out \
                test_qf_title.out \
+               test_ruby.out \
                test_set.out \
                test_signs.out \
                test_textobjects.out \
@@ -198,7 +200,9 @@ test_mapping.out: test_mapping.in
 test_marks.out: test_marks.in
 test_nested_function.out: test_nested_function.in
 test_options.out: test_options.in
+test_perl.out: test_perl.in
 test_qf_title.out: test_qf_title.in
+test_ruby.out: test_ruby.in
 test_set.out: test_set.in
 test_signs.out: test_signs.in
 test_textobjects.out: test_textobjects.in
index 1eec9d70518ad918f774aa7c7dd5d2b43e31707a..931784f1b91159082b3e4e32570df364b2a38a89 100644 (file)
@@ -52,7 +52,9 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_marks.out \
                test_nested_function.out \
                test_options.out \
+               test_perl.out \
                test_qf_title.out \
+               test_ruby.out \
                test_set.out \
                test_signs.out \
                test_textobjects.out \
index 1d0fd36465f2e802c05b0260b64f5d1f5c6867e3..fde59fe85d07f03c2b8efaeffa44f9d867d5c00b 100644 (file)
@@ -74,7 +74,9 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_marks.out \
                test_nested_function.out \
                test_options.out \
+               test_perl.out \
                test_qf_title.out \
+               test_ruby.out \
                test_set.out \
                test_signs.out \
                test_textobjects.out \
index 7b5775c895b3b41a36f7d44a9bead72efe82601d..5a59cf5df92e575f0afd583884e69ef9856c969d 100644 (file)
@@ -54,7 +54,9 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_marks.out \
                test_nested_function.out \
                test_options.out \
+               test_perl.out \
                test_qf_title.out \
+               test_ruby.out \
                test_set.out \
                test_signs.out \
                test_textobjects.out \
index f0742c74fae99d76b79ef058686a9192c6fa3187..427954e6cabbb414b0f4827a127d6b6dac65a125 100644 (file)
@@ -113,7 +113,9 @@ SCRIPT = test1.out  test2.out  test3.out  test4.out  test5.out  \
         test_marks.out \
         test_nested_function.out \
         test_options.out \
+        test_perl.out \
         test_qf_title.out \
+        test_ruby.out \
         test_set.out \
         test_signs.out \
         test_textobjects.out \
index 8e542470ae5982ea1aa8714a0a558e50a4ce80c1..420ed6a9e0ef0e6344c8f868c6b21df5a6193f56 100644 (file)
@@ -50,7 +50,9 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
                test_marks.out \
                test_nested_function.out \
                test_options.out \
+               test_perl.out \
                test_qf_title.out \
+               test_ruby.out \
                test_set.out \
                test_signs.out \
                test_textobjects.out \
diff --git a/src/testdir/test_perl.in b/src/testdir/test_perl.in
new file mode 100644 (file)
index 0000000..c028606
--- /dev/null
@@ -0,0 +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
diff --git a/src/testdir/test_perl.ok b/src/testdir/test_perl.ok
new file mode 100644 (file)
index 0000000..432cdd9
--- /dev/null
@@ -0,0 +1,3 @@
+1 changed line 1
+2 line 2
+abc/def/
diff --git a/src/testdir/test_ruby.in b/src/testdir/test_ruby.in
new file mode 100644 (file)
index 0000000..71d21eb
--- /dev/null
@@ -0,0 +1,25 @@
+Tests for ruby interface.     vim: set ft=vim :
+
+STARTTEST
+:so small.vim
+:set nocompatible viminfo+=nviminfo
+:if !has('ruby') | e! test.ok | wq! test.out | endif
+:" change buffer contents
+:ruby VIM.command("normal /^1\n")
+:ruby $curbuf.line = "1 changed line 1"
+:" evaluate a List
+:ruby VIM.command("normal /^2\n")
+:let l = ["abc", "def"]
+:ruby << EOF
+curline = $curbuf.line_number
+l = VIM.evaluate("l");
+$curbuf.append(curline, l.join("\n"))
+EOF
+:normal j
+:.rubydo $_ = $_.gsub(/\n/, '/')
+:?^1?,$w! test.out
+:qa!
+ENDTEST
+
+1 line 1
+2 line 2
diff --git a/src/testdir/test_ruby.ok b/src/testdir/test_ruby.ok
new file mode 100644 (file)
index 0000000..a217efd
--- /dev/null
@@ -0,0 +1,3 @@
+1 changed line 1
+2 line 2
+abc/def
index 1dcdf71ee2f6e6d533ed10eb5e8322366df1b2cf..75a5810e4a482ac208ba9f7f99c51eebec66d0cd 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    744,
 /**/
     743,
 /**/