Patch 7.4.1951
Problem: Ruby test is old style.
Solution: Convert to a new style test. (Ken Takata)
Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/test_ruby.in,
src/testdir/test_ruby.ok, src/testdir/test_ruby.vim
*** ../vim-7.4.1950/src/Makefile 2016-05-28 13:40:06.582644700 +0200
--- src/Makefile 2016-06-21 22:52:55.251943485 +0200
***************
*** 1986,1992 ****
test_marks \
test_nested_function \
test_options \
- test_ruby \
test_search_mbyte \
test_signs \
test_tagcase \
--- 1986,1991 ----
***************
*** 2015,2020 ****
--- 2014,2020 ----
test_backspace_opt \
test_cdo \
test_channel \
+ test_cmdline \
test_cursor_func \
test_delete \
test_ex_undo \
***************
*** 2035,2040 ****
--- 2035,2041 ----
test_json \
test_langmap \
test_lispwords \
+ test_man \
test_matchadd_conceal \
test_matchadd_conceal_utf8 \
test_matchstrpos \
***************
*** 2047,2058 ****
--- 2048,2061 ----
test_regexp_latin \
test_regexp_utf8 \
test_reltime \
+ test_ruby \
test_searchpos \
test_set \
test_sort \
test_statusline \
test_syn_attr \
test_syntax \
+ test_usercommands \
test_tabline \
test_tagjump \
test_timers \
*** ../vim-7.4.1950/src/testdir/Make_all.mak 2016-06-20 11:21:37.052520886
+0200
--- src/testdir/Make_all.mak 2016-06-21 22:53:17.495706870 +0200
***************
*** 106,112 ****
test_marks.out \
test_nested_function.out \
test_options.out \
- test_ruby.out \
test_search_mbyte.out \
test_signs.out \
test_tagcase.out \
--- 106,111 ----
***************
*** 180,185 ****
--- 179,185 ----
test_packadd.res \
test_perl.res \
test_quickfix.res \
+ test_ruby.res \
test_syntax.res \
test_usercommands.res \
test_viminfo.res \
*** ../vim-7.4.1950/src/testdir/test_ruby.in 2015-06-19 15:45:13.005889121
+0200
--- src/testdir/test_ruby.in 1970-01-01 01:00:00.000000000 +0100
***************
*** 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
--- 0 ----
*** ../vim-7.4.1950/src/testdir/test_ruby.ok 2015-06-19 15:45:13.005889121
+0200
--- src/testdir/test_ruby.ok 1970-01-01 01:00:00.000000000 +0100
***************
*** 1,3 ****
- 1 changed line 1
- 2 line 2
- abc/def
--- 0 ----
*** ../vim-7.4.1950/src/testdir/test_ruby.vim 2016-06-21 22:57:51.764789607
+0200
--- src/testdir/test_ruby.vim 2016-06-21 22:46:47.467844770 +0200
***************
*** 0 ****
--- 1,34 ----
+ " Tests for ruby interface
+
+ if !has('ruby')
+ finish
+ end
+
+ func Test_ruby_change_buffer()
+ call setline(line('$'), ['1 line 1'])
+ ruby Vim.command("normal /^1\n")
+ ruby $curbuf.line = "1 changed line 1"
+ call assert_equal('1 changed line 1', getline('$'))
+ endfunc
+
+ func Test_ruby_evaluate_list()
+ call setline(line('$'), ['2 line 2'])
+ 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/, '/')
+ call assert_equal('abc/def', getline('$'))
+ endfunc
+
+ func Test_ruby_evaluate_dict()
+ let d = {'a': 'foo', 'b': 123}
+ redir => l:out
+ ruby d = Vim.evaluate("d"); print d
+ redir END
+ call assert_equal(['{"a"=>"foo", "b"=>123}'], split(l:out, "\n"))
+ endfunc
*** ../vim-7.4.1950/src/version.c 2016-06-21 21:33:30.102325245 +0200
--- src/version.c 2016-06-21 22:51:30.028848719 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1951,
/**/
--
Would you care for a drink? I mean, if it were, like,
disabled and you had to look after it?
/// 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.