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.256 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  5.8 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.256
  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.256
  11. Problem:    Javascript indenting not sufficiently tested.
  12. Solution:   Add more tests. (Luc Deschenaux)  Mark the lines that are indented
  13.         wrong.
  14. Files:        src/testdir/test3.in, src/testdir/test3.ok
  15.  
  16.  
  17. *** ../vim-7.3.255/src/testdir/test3.in    2011-07-15 14:12:25.000000000 +0200
  18. --- src/testdir/test3.in    2011-07-15 21:05:49.000000000 +0200
  19. ***************
  20. *** 1592,1598 ****
  21.   
  22.   
  23.   STARTTEST
  24. ! :set cino=J1
  25.   /^JSSTART
  26.   =/^JSEND
  27.   ENDTEST
  28. --- 1592,1598 ----
  29.   
  30.   
  31.   STARTTEST
  32. ! :set cino=j1,J1
  33.   /^JSSTART
  34.   =/^JSEND
  35.   ENDTEST
  36. ***************
  37. *** 1613,1618 ****
  38. --- 1613,1757 ----
  39.   JSEND
  40.   
  41.   STARTTEST
  42. + :set cino=j1,J1
  43. + /^JSSTART
  44. + =/^JSEND
  45. + ENDTEST
  46. + JSSTART
  47. + var foo = [
  48. + 1,  // indent 8 more
  49. + 2,
  50. + 3
  51. + ];  // indent 8 less
  52. + JSEND
  53. + STARTTEST
  54. + :set cino=j1,J1
  55. + /^JSSTART
  56. + =/^JSEND
  57. + ENDTEST
  58. + JSSTART
  59. + function bar() {
  60. + var foo = [
  61. + 1,
  62. + 2,
  63. + 3
  64. + ];  // indent 16 less
  65. + }
  66. + JSEND
  67. + STARTTEST
  68. + :set cino=j1,J1
  69. + /^JSSTART
  70. + =/^JSEND
  71. + ENDTEST
  72. + JSSTART
  73. + (function($){
  74. + var class_name='myclass';
  75. + function private_method() {
  76. + }
  77. + var public_method={
  78. + method: function(options,args){
  79. + private_method();
  80. + }
  81. + }
  82. + function init(options) {
  83. + $(this).data(class_name+'_public',$.extend({},{
  84. + foo: 'bar',
  85. + bar: 2,  // indent 8 more
  86. + foobar: [  // indent 8 more
  87. + 1,  // indent 8 more
  88. + 2,  // indent 16 more
  89. + 3   // indent 16 more
  90. + ],
  91. + callback: function(){  // indent 8 more
  92. + return true;  // indent 8 more
  93. + }  // indent 8 more
  94. + }, options||{}));
  95. + }
  96. + $.fn[class_name]=function() {
  97. + var _arguments=arguments;
  98. + return this.each(function(){
  99. + var options=$(this).data(class_name+'_public');
  100. + if (!options) {
  101. + init.apply(this,_arguments);
  102. + } else {
  103. + var method=public_method[_arguments[0]];
  104. + if (typeof(method)!='function') {
  105. + console.log(class_name+' has no method "'+_arguments[0]+'"');
  106. + return false;
  107. + }
  108. + _arguments[0]=options;
  109. + method.apply(this,_arguments);
  110. + }
  111. + });
  112. + }
  113. + })(jQuery);
  114. + JSEND
  115. + STARTTEST
  116. + :set cino=j1,J1
  117. + /^JSSTART
  118. + =/^JSEND
  119. + ENDTEST
  120. + JSSTART
  121. + function init(options) {
  122. + $(this).data(class_name+'_public',$.extend({},{
  123. + foo: 'bar',
  124. + bar: 2,
  125. + foobar: [
  126. + 1,  // indent 8 more
  127. + 2,  // indent 8 more
  128. + 3   // indent 8 more
  129. + ],
  130. + callback: function(){
  131. + return true;
  132. + }
  133. + }, options||{}));
  134. + }
  135. + JSEND
  136. + STARTTEST
  137. + :set cino=j1,J1
  138. + /^JSSTART
  139. + =/^JSEND
  140. + ENDTEST
  141. + JSSTART
  142. + (function($){
  143. + function init(options) {
  144. + $(this).data(class_name+'_public',$.extend({},{
  145. + foo: 'bar',
  146. + bar: 2,  // indent 8 more
  147. + foobar: [  // indent 8 more
  148. + 1,  // indent 8 more
  149. + 2,  // indent 16 more
  150. + 3  // indent 16 more
  151. + ],
  152. + callback: function(){  // indent 8 more
  153. + return true;  // indent 8 more
  154. + }  // indent 8 more
  155. + }, options||{}));
  156. + }
  157. + })(jQuery);
  158. + JSEND
  159. + STARTTEST
  160.   :g/^STARTTEST/.,/^ENDTEST/d
  161.   :1;/start of AUTO/,$wq! test.out
  162.   ENDTEST
  163. *** ../vim-7.3.255/src/testdir/test3.ok    2011-07-15 14:12:25.000000000 +0200
  164. --- src/testdir/test3.ok    2011-07-15 21:06:38.000000000 +0200
  165. ***************
  166. *** 1443,1445 ****
  167. --- 1443,1559 ----
  168.   }
  169.   JSEND
  170.   
  171. + JSSTART
  172. + var foo = [
  173. + 1,  // indent 8 more
  174. +     2,
  175. +     3
  176. +     ];  // indent 8 less
  177. + JSEND
  178. + JSSTART
  179. + function bar() {
  180. +     var foo = [
  181. +         1,
  182. +         2,
  183. +         3
  184. +             ];  // indent 16 less
  185. + }
  186. + JSEND
  187. + JSSTART
  188. + (function($){
  189. +     var class_name='myclass';
  190. +     function private_method() {
  191. +     }
  192. +     var public_method={
  193. +         method: function(options,args){
  194. +             private_method();
  195. +         }
  196. +     }
  197. +     function init(options) {
  198. +         $(this).data(class_name+'_public',$.extend({},{
  199. +             foo: 'bar',
  200. +         bar: 2,  // indent 8 more
  201. +         foobar: [  // indent 8 more
  202. +             1,  // indent 8 more
  203. +         2,  // indent 16 more
  204. +         3   // indent 16 more
  205. +             ],
  206. +         callback: function(){  // indent 8 more
  207. +             return true;  // indent 8 more
  208. +         }  // indent 8 more
  209. +         }, options||{}));
  210. +     }
  211. +     $.fn[class_name]=function() {
  212. +         var _arguments=arguments;
  213. +         return this.each(function(){
  214. +             var options=$(this).data(class_name+'_public');
  215. +             if (!options) {
  216. +                 init.apply(this,_arguments);
  217. +             } else {
  218. +                 var method=public_method[_arguments[0]];
  219. +                 if (typeof(method)!='function') {
  220. +                     console.log(class_name+' has no method "'+_arguments[0]+'"');
  221. +                     return false;
  222. +                 }
  223. +                 _arguments[0]=options;
  224. +                 method.apply(this,_arguments);
  225. +             }
  226. +         });
  227. +     }
  228. + })(jQuery);
  229. + JSEND
  230. + JSSTART
  231. + function init(options) {
  232. +     $(this).data(class_name+'_public',$.extend({},{
  233. +         foo: 'bar',
  234. +         bar: 2,
  235. +         foobar: [
  236. +         1,  // indent 8 more
  237. +         2,  // indent 8 more
  238. +         3   // indent 8 more
  239. +         ],
  240. +         callback: function(){
  241. +             return true;
  242. +         }
  243. +     }, options||{}));
  244. + }
  245. + JSEND
  246. + JSSTART
  247. + (function($){
  248. +     function init(options) {
  249. +         $(this).data(class_name+'_public',$.extend({},{
  250. +             foo: 'bar',
  251. +         bar: 2,  // indent 8 more
  252. +         foobar: [  // indent 8 more
  253. +             1,  // indent 8 more
  254. +         2,  // indent 16 more
  255. +         3  // indent 16 more
  256. +             ],
  257. +         callback: function(){  // indent 8 more
  258. +             return true;  // indent 8 more
  259. +         }  // indent 8 more
  260. +         }, options||{}));
  261. +     }
  262. + })(jQuery);
  263. + JSEND
  264. *** ../vim-7.3.255/src/version.c    2011-07-20 15:04:52.000000000 +0200
  265. --- src/version.c    2011-07-20 15:08:13.000000000 +0200
  266. ***************
  267. *** 711,712 ****
  268. --- 711,714 ----
  269.   {   /* Add new patch number below this line */
  270. + /**/
  271. +     256,
  272.   /**/
  273.  
  274. -- 
  275. Not too long ago, a keyboard was something to make music with...
  276.  
  277.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  278. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  279. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  280.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  281.