To: vim-dev@vim.org Subject: Patch 6.2f.003 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2f.003 Problem: Test49 doesn't properly test the behavior of ":catch" without an argument. Solution: Update test49. (Servatius Brandt) Files: src/testdir/test49.ok, src/testdir/test49.vim *** ../vim-6.2f.002/src/testdir/test49.ok Mon May 26 22:15:05 2003 --- src/testdir/test49.ok Mon May 26 20:29:03 2003 *************** *** 42,48 **** *** Test 40: OK (3076095) *** Test 41: OK (1505155949) *** Test 42: OK (1157763329) ! *** Test 43: OK (67071487) *** Test 44: OK (1157763329) *** Test 45: OK (739407) *** Test 46: OK (371213935) --- 42,48 ---- *** Test 40: OK (3076095) *** Test 41: OK (1505155949) *** Test 42: OK (1157763329) ! *** Test 43: OK (1031761407) *** Test 44: OK (1157763329) *** Test 45: OK (739407) *** Test 46: OK (371213935) *** ../vim-6.2f.002/src/testdir/test49.vim Mon May 26 22:15:05 2003 --- src/testdir/test49.vim Mon May 26 20:29:03 2003 *************** *** 1,6 **** " Vim script language tests " Author: Servatius Brandt ! " Last Change: 2003 May 24 "------------------------------------------------------------------------------- " Test environment {{{1 --- 1,6 ---- " Vim script language tests " Author: Servatius Brandt ! " Last Change: 2003 May 26 "------------------------------------------------------------------------------- " Test environment {{{1 *************** *** 3576,3588 **** "------------------------------------------------------------------------------- ! " Test 43: Empty or missing :catch patterns {{{1 " ! " An empty or missing :catch pattern means the same as /.*/, that is, " catches everything. To catch only empty exceptions, /^$/ must be ! " used. A :catch with empty or /.*/ argument also works when followed ! " by another command separated by a bar on the same line. :catch ! " patterns can also be specified between ||. "------------------------------------------------------------------------------- XpathINIT --- 3576,3589 ---- "------------------------------------------------------------------------------- ! " Test 43: Missing or empty :catch patterns {{{1 " ! " A missing or empty :catch pattern means the same as /.*/, that is, " catches everything. To catch only empty exceptions, /^$/ must be ! " used. A :catch with missing, empty, or /.*/ argument also works ! " when followed by another command separated by a bar on the same ! " line. :catch patterns cannot be specified between ||. But other ! " pattern separators can be used instead of //. "------------------------------------------------------------------------------- XpathINIT *************** *** 3649,3674 **** try | Xpath 524288 | throw "y" | catch // | Xpath 1048576 | endtry " X: 524288 + 1048576 ! try | Xpath 2097152 | throw "try and endtry" | catch | endtry ! " Here begins a catch clause catching / endtry/ ! " X: 2097152 ! Xpath 4194304 " X: 4194304 ! " endtry try ! Xpath 8388608 " X: 8388608 ! throw "bars" ! catch +bars+ ! Xpath 16777216 " X: 16777216 endtry ! Xpath 33554432 " X: 33554432 catch /.*/ ! Xpath 67108864 " X: 0 Xout v:exception "in" v:throwpoint endtry ! Xcheck 67071487 "------------------------------------------------------------------------------- --- 3650,3709 ---- try | Xpath 524288 | throw "y" | catch // | Xpath 1048576 | endtry " X: 524288 + 1048576 ! while 1 ! try ! let caught = 0 ! let v:errmsg = "" ! " Extra try level: if ":catch" without arguments below raises ! " a syntax error because it misinterprets the "Xpath" as a pattern, ! " let it be caught by the ":catch /.*/" below. ! try ! try | Xpath 2097152 | throw "z" | catch | Xpath 4194304 | : ! endtry " X: 2097152 + 4194304 ! endtry ! catch /.*/ ! let caught = 1 ! Xout v:exception "in" v:throwpoint ! finally ! if $VIMNOERRTHROW && v:errmsg != "" ! Xout v:errmsg ! endif ! if caught || $VIMNOERRTHROW && v:errmsg != "" ! Xpath 8388608 " X: 0 ! endif ! break " discard error for $VIMNOERRTHROW ! endtry ! endwhile + let cologne = 4711 try ! try ! Xpath 16777216 " X: 16777216 ! throw "throw cologne" ! " Next lines catches all and throws 4711: ! catch |throw cologne| ! Xpath 33554432 " X: 0 ! endtry ! catch /4711/ ! Xpath 67108864 " X: 67108864 endtry ! try ! Xpath 134217728 " X: 134217728 ! throw "plus" ! catch +plus+ ! Xpath 268435456 " X: 268435456 ! endtry ! ! Xpath 536870912 " X: 536870912 catch /.*/ ! Xpath 1073741824 " X: 0 Xout v:exception "in" v:throwpoint endtry ! unlet! caught cologne ! ! Xcheck 1031761407 "------------------------------------------------------------------------------- *** ../vim-6.2f.002/src/version.c Mon May 26 22:50:33 2003 --- src/version.c Mon May 26 22:54:32 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 3, /**/ -- A village. Sound of chanting of Latin canon, punctuated by short, sharp cracks. It comes nearer. We see it is a line of MONKS ala SEVENTH SEAL flagellation scene, chanting and banging themselves on the foreheads with wooden boards. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///