home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.491 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  7.6 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.491
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.491
  11. Problem:    No tests for Lua.
  12. Solution:   Add some simple tests for Lua. (Luis Carvalho)
  13. Files:      src/testdir/test1.in, src/testdir/test85.in, src/testdir/test85.ok
  14.             src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak,
  15.             src/testdir/Make_ming.mak, src/testdir/Make_os2.mak,
  16.             src/testdir/Make_vms.mms, src/testdir/Makefile
  17.  
  18.  
  19. *** ../vim-7.3.490/src/testdir/test1.in    2010-08-15 21:57:29.000000000 +0200
  20. --- src/testdir/test1.in    2012-04-05 16:37:37.000000000 +0200
  21. ***************
  22. *** 15,20 ****
  23. --- 15,21 ----
  24.   be set like small.vim above.  mbyte.vim is sourced by tests that require the
  25.   +multi_byte feature.
  26.   Similar logic is applied to the +mzscheme feature, using mzscheme.vim.
  27. + Similar logic is applied to the +lua feature, using lua.vim.
  28.   
  29.   STARTTEST
  30.   :" Write a single line to test.out to check if testing works at all.
  31. ***************
  32. *** 28,37 ****
  33. --- 29,45 ----
  34.   qa!
  35.   :w! mbyte.vim
  36.   :w! mzscheme.vim
  37. + :w! lua.vim
  38. + :"
  39.   :" If +multi_byte feature supported, make mbyte.vim empty.
  40.   :if has("multi_byte") | sp another | w! mbyte.vim | q | endif
  41. + :"
  42.   :" If +mzscheme feature supported, make mzscheme.vim empty.
  43.   :if has("mzscheme") | sp another | w! mzscheme.vim | q | endif
  44. + :"
  45. + :" If +lua feature supported, make lua.vim empty.
  46. + :if has("lua") | sp another | w! lua.vim | q | endif
  47. + :"
  48.   :" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.
  49.   :" Otherwise write small.vim to skip the test.
  50.   :if 1 | q! | endif
  51. *** ../vim-7.3.490/src/testdir/test85.in    2012-04-05 16:56:12.000000000 +0200
  52. --- src/testdir/test85.in    2012-04-05 16:44:00.000000000 +0200
  53. ***************
  54. *** 0 ****
  55. --- 1,42 ----
  56. + Test for Lua interface and luaeval() function
  57. + STARTTEST
  58. + :so small.vim
  59. + :so lua.vim
  60. + :set nocompatible viminfo+=nviminfo
  61. + :lua l = vim.list():add"item0":add"dictionary with list OK":add"item2"
  62. + :lua h = vim.dict(); h.list = l
  63. + :call garbagecollect()
  64. + /^1
  65. + :" change buffer contents
  66. + :lua curbuf = vim.buffer()
  67. + :lua curline = vim.eval"line('.')"
  68. + :lua curbuf[curline] = "1 changed line 1"
  69. + :" scalar test
  70. + :let tmp_string = luaeval('"string"')
  71. + :let tmp_1000 = luaeval('1000')
  72. + :if printf("%s%.0f", tmp_string, tmp_1000) == "string1000"
  73. + :let scalar_res = "OK"
  74. + :else
  75. + :let scalar_res = "FAILED"
  76. + :endif
  77. + :call append(search("^1"), "scalar test " . scalar_res)
  78. + :" dictionary containing a list
  79. + :let tmp = luaeval("h").list[1]
  80. + :/^2/put =tmp
  81. + :" circular list (at the same time test lists containing lists)
  82. + :lua l[2] = l
  83. + :let l2 = luaeval("h").list
  84. + :if l2[2] == l2
  85. + :let res = "OK"
  86. + :else
  87. + :let res = "FAILED"
  88. + :endif
  89. + :call setline(search("^3"), "circular test " . res)
  90. + :?^1?,$w! test.out
  91. + :qa!
  92. + ENDTEST
  93. + 1 line 1
  94. + 2 line 2
  95. + 3 line 3
  96. *** ../vim-7.3.490/src/testdir/test85.ok    2012-04-05 16:56:12.000000000 +0200
  97. --- src/testdir/test85.ok    2012-04-05 16:18:56.000000000 +0200
  98. ***************
  99. *** 0 ****
  100. --- 1,5 ----
  101. + 1 changed line 1
  102. + scalar test OK
  103. + 2 line 2
  104. + dictionary with list OK
  105. + circular test OK
  106. *** ../vim-7.3.490/src/testdir/Make_amiga.mak    2012-03-28 19:58:34.000000000 +0200
  107. --- src/testdir/Make_amiga.mak    2012-04-05 16:21:55.000000000 +0200
  108. ***************
  109. *** 13,18 ****
  110. --- 13,19 ----
  111.   # test25    uses symbolic link
  112.   # test27    can't edit file with "*"
  113.   # test52    only for Win32
  114. + # test85    no Lua interface
  115.   
  116.   SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
  117.           test7.out test8.out test9.out \
  118. *** ../vim-7.3.490/src/testdir/Make_dos.mak    2012-03-28 19:58:34.000000000 +0200
  119. --- src/testdir/Make_dos.mak    2012-04-05 16:22:16.000000000 +0200
  120. ***************
  121. *** 30,36 ****
  122.           test68.out test69.out test71.out test72.out test73.out \
  123.           test74.out test75.out test76.out test77.out test78.out \
  124.           test79.out test80.out test81.out test82.out test83.out \
  125. !         test84.out
  126.   
  127.   SCRIPTS32 =    test50.out test70.out
  128.   
  129. --- 30,36 ----
  130.           test68.out test69.out test71.out test72.out test73.out \
  131.           test74.out test75.out test76.out test77.out test78.out \
  132.           test79.out test80.out test81.out test82.out test83.out \
  133. !         test84.out test85.out
  134.   
  135.   SCRIPTS32 =    test50.out test70.out
  136.   
  137. *** ../vim-7.3.490/src/testdir/Make_ming.mak    2012-03-28 19:58:34.000000000 +0200
  138. --- src/testdir/Make_ming.mak    2012-04-05 16:22:25.000000000 +0200
  139. ***************
  140. *** 50,56 ****
  141.           test68.out test69.out test71.out test72.out test73.out \
  142.           test74.out test75.out test76.out test77.out test78.out \
  143.           test79.out test80.out test81.out test82.out test83.out \
  144. !         test84.out
  145.   
  146.   SCRIPTS32 =    test50.out test70.out
  147.   
  148. --- 50,56 ----
  149.           test68.out test69.out test71.out test72.out test73.out \
  150.           test74.out test75.out test76.out test77.out test78.out \
  151.           test79.out test80.out test81.out test82.out test83.out \
  152. !         test84.out test85.out
  153.   
  154.   SCRIPTS32 =    test50.out test70.out
  155.   
  156. *** ../vim-7.3.490/src/testdir/Make_os2.mak    2012-03-28 19:58:34.000000000 +0200
  157. --- src/testdir/Make_os2.mak    2012-04-05 16:22:38.000000000 +0200
  158. ***************
  159. *** 13,18 ****
  160. --- 13,19 ----
  161.   # test25    uses symbolic link
  162.   # test27    can't edit file with "*" in file name
  163.   # test52    only for Win32
  164. + # test85    no Lua interface
  165.   
  166.   SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
  167.           test7.out test8.out test9.out \
  168. *** ../vim-7.3.490/src/testdir/Make_vms.mms    2012-03-28 19:58:34.000000000 +0200
  169. --- src/testdir/Make_vms.mms    2012-04-05 16:23:08.000000000 +0200
  170. ***************
  171. *** 4,10 ****
  172.   # Authors:    Zoltan Arpadffy, <arpadffy@polarhome.com>
  173.   #        Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
  174.   #
  175. ! # Last change:  2012 Mar 28
  176.   #
  177.   # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
  178.   # Edit the lines in the Configuration section below to select.
  179. --- 4,10 ----
  180.   # Authors:    Zoltan Arpadffy, <arpadffy@polarhome.com>
  181.   #        Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
  182.   #
  183. ! # Last change:  2012 Apr 05
  184.   #
  185.   # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
  186.   # Edit the lines in the Configuration section below to select.
  187. ***************
  188. *** 89,94 ****
  189. --- 89,95 ----
  190.   # with too many dots).
  191.   #
  192.   # Test 72: unknown reason
  193. + # Test 85: no Lua interface
  194.   
  195.   .IFDEF WANT_GUI
  196.   SCRIPT_GUI = test16.out
  197. *** ../vim-7.3.490/src/testdir/Makefile    2012-03-28 19:58:34.000000000 +0200
  198. --- src/testdir/Makefile    2012-04-05 16:21:13.000000000 +0200
  199. ***************
  200. *** 27,33 ****
  201.           test69.out test70.out test71.out test72.out test73.out \
  202.           test74.out test75.out test76.out test77.out test78.out \
  203.           test79.out test80.out test81.out test82.out test83.out \
  204. !         test84.out
  205.   
  206.   SCRIPTS_GUI = test16.out
  207.   
  208. --- 27,33 ----
  209.           test69.out test70.out test71.out test72.out test73.out \
  210.           test74.out test75.out test76.out test77.out test78.out \
  211.           test79.out test80.out test81.out test82.out test83.out \
  212. !         test84.out test85.out
  213.   
  214.   SCRIPTS_GUI = test16.out
  215.   
  216. *** ../vim-7.3.490/src/version.c    2012-04-05 16:53:56.000000000 +0200
  217. --- src/version.c    2012-04-05 16:55:27.000000000 +0200
  218. ***************
  219. *** 716,717 ****
  220. --- 716,719 ----
  221.   {   /* Add new patch number below this line */
  222. + /**/
  223. +     491,
  224.   /**/
  225.  
  226. -- 
  227. You had connectors?  Eeee, when I were a lad we 'ad to carry the
  228. bits between the computer and the terminal with a spoon...
  229.  
  230.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  231. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  232. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  233.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  234.