You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2016/11/15 09:50:39 UTC

svn commit: r1769764 - in /tcl/rivet/trunk: ./ rivet/ rivet/rivet-tcl/ src/mod_rivet_ng/ tests/ tests/apachetest/

Author: mxmanghi
Date: Tue Nov 15 09:50:39 2016
New Revision: 1769764

URL: http://svn.apache.org/viewvc?rev=1769764&view=rev
Log:
    * rivet/init.tcl.in: trimming error buffer
    to make test message matching easier
    * rivet/rivet-tcl/catch.tcl|try.tcl: better
    script evaluation is catch/try construct, complete
    error codes in case ::rivet::abort_page is to be
    handled
    * src/mod_rivet_ng/rivetCore.c: direct
    result object handling in [::rivet::inspect script]
    * try.rvt: changed test expression matching



Modified:
    tcl/rivet/trunk/ChangeLog
    tcl/rivet/trunk/rivet/init.tcl
    tcl/rivet/trunk/rivet/init.tcl.in
    tcl/rivet/trunk/rivet/rivet-tcl/catch.tcl
    tcl/rivet/trunk/rivet/rivet-tcl/try.tcl
    tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
    tcl/rivet/trunk/tests/apachetest/template.conf.2.tcl
    tcl/rivet/trunk/tests/bailout.test
    tcl/rivet/trunk/tests/checkfails.tcl
    tcl/rivet/trunk/tests/failtest.test
    tcl/rivet/trunk/tests/try.rvt

Modified: tcl/rivet/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/ChangeLog?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/ChangeLog (original)
+++ tcl/rivet/trunk/ChangeLog Tue Nov 15 09:50:39 2016
@@ -1,3 +1,14 @@
+2016-11-15 Massimo Manghi <mx...@apache.org>
+    * rivet/init.tcl.in: trimming error buffer
+    to make test message matching easier
+    * rivet/rivet-tcl/catch.tcl|try.tcl: better
+    script evaluation is catch/try construct, complete
+    error codes in case ::rivet::abort_page is to be
+    handled
+    * src/mod_rivet_ng/rivetCore.c: direct
+    result object handling in [::rivet::inspect script]
+    * try.rvt: changed test expression matching
+
 2016-11-12 Massimo Manghi <mx...@apache.org>
     * rivet/init.tcl.in: removed debugging messages,
     request handling made much simpler after

Modified: tcl/rivet/trunk/rivet/init.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl (original)
+++ tcl/rivet/trunk/rivet/init.tcl Tue Nov 15 09:50:39 2016
@@ -14,279 +14,277 @@
 
 package provide Rivet 3.0
 
-namespace eval ::Rivet {
+namespace eval ::Rivet {} ; ## create the namespace
 
-    ###
-    ## -- tcl_commands_export_list
-    #
-    ## this is temporary hack to export names of Tcl commands in rivet-tcl/.
-    ## This function will be removed in future versions of Rivet and it's
-    ## meant to provide a basic way to guarantee compatibility with older
-    ## versions of Rivet (see code in ::Rivet::init)
-    ##
+###
+## -- tcl_commands_export_list
+#
+## this is temporary hack to export names of Tcl commands in rivet-tcl/.
+## This function will be removed in future versions of Rivet and it's
+## meant to provide a basic way to guarantee compatibility with older
+## versions of Rivet (see code in ::Rivet::init)
+##
 
-    proc tcl_commands_export_list {tclpath} {
+proc ::Rivet::tcl_commands_export_list {tclpath} {
 
-        # we collect the commands in rivet-tcl by reading the tclIndex
-        # file and then we extract the command list from auto_index
+    # we collect the commands in rivet-tcl by reading the tclIndex
+    # file and then we extract the command list from auto_index
 
-        namespace eval ::rivet_temp { }
-        set ::rivet_temp::tclpath $tclpath
+    namespace eval ::rivet_temp { }
+    set ::rivet_temp::tclpath $tclpath
 
-        namespace eval ::rivet_temp {
-            variable auto_index
-            array set auto_index {}
+    namespace eval ::rivet_temp {
+        variable auto_index
+        array set auto_index {}
 
-            # the auto_index in ${tclpath}/tclIndex is loaded
-            # this array is used to fetch a list of Rivet commands
-            # implemented in Rivet
+        # the auto_index in ${tclpath}/tclIndex is loaded
+        # this array is used to fetch a list of Rivet commands
+        # implemented in Rivet
 
-            set dir $tclpath
-            source [file join $tclpath tclIndex]
+        set dir $tclpath
+        source [file join $tclpath tclIndex]
 
-            # Rivet Tcl commands not meant to go onto the export list must
-            # be unset from auto_index here
+        # Rivet Tcl commands not meant to go onto the export list must
+        # be unset from auto_index here
 
-            unset auto_index(::rivet::catch)
-            unset auto_index(::rivet::try)
-        }
+        unset auto_index(::rivet::catch)
+        unset auto_index(::rivet::try)
+    }
 
-        set command_list [namespace eval ::rivet_temp {array names auto_index}]
+    set command_list [namespace eval ::rivet_temp {array names auto_index}]
 
-        # we won't leave anything behind
-        namespace delete ::rivet_temp
+    # we won't leave anything behind
+    namespace delete ::rivet_temp
 
-        return $command_list
-    }
+    return $command_list
+}
 
-    ###
-    ## This routine gets called each time a new request comes in.
-    ## It sets up the request namespace and creates a global command
-    ## to replace the default global.  This ensures that when a user
-    ## uses global variables, they're actually contained within the
-    ## namespace.  So, everything gets deleted when the request is finished.
-    ###
-    proc initialize_request {} {
-        catch { namespace delete ::request }
-
-        namespace eval ::request { }
-
-        proc ::request::global {args} {
-            foreach arg $args {
-                uplevel "::global ::request::$arg"
-            }
+###
+## This routine gets called each time a new request comes in.
+## It sets up the request namespace and creates a global command
+## to replace the default global.  This ensures that when a user
+## uses global variables, they're actually contained within the
+## namespace.  So, everything gets deleted when the request is finished.
+###
+proc ::Rivet::initialize_request {} {
+    catch { namespace delete ::request }
+
+    namespace eval ::request { }
+
+    proc ::request::global {args} {
+        foreach arg $args {
+            uplevel "::global ::request::$arg"
         }
     }
+}
 
-    ###
-    ## The default error handler for Rivet.  Any time a page runs into an
-    ## error, this routine will be called to handle the error information.
-    ## If an ErrorScript has been specified, this routine will not be called.
-    ###
-    proc handle_error {} {
-        global errorInfo
-        global errorOutbuf
-
-        puts <PRE>
-        puts "<HR>$errorInfo<HR>"
-        puts "<P><B>OUTPUT BUFFER:</B></P>"
-        puts $errorOutbuf
-        puts </PRE>
+###
+## The default error handler for Rivet.  Any time a page runs into an
+## error, this routine will be called to handle the error information.
+## If an ErrorScript has been specified, this routine will not be called.
+###
+proc ::Rivet::handle_error {} {
+    global errorInfo
+    global errorOutbuf
+
+    puts <PRE>
+    puts "<HR>$errorInfo<HR>"
+    puts "<P><B>OUTPUT BUFFER:</B></P>"
+    puts $errorOutbuf
+    puts </PRE>
+}
+
+###
+## This routine gets called each time a request is finished.  Any kind
+## of special cleanup can be placed here.
+###
+proc ::Rivet::cleanup_request {} { }
+
+
+######## mod_rivet_ng specific ++++++++
+
+### 
+# -- error_message
+#
+# this message should be transparently equivalent
+# to the Rivet_PrintErrorMessage function in mod_rivet_generator.c
+#
+
+proc ::Rivet::print_error_message {error_header} {
+    global errorInfo
+
+    puts "$error_header <br/>"
+    puts "<pre> $errorInfo </pre>"
+
+}
+
+
+###
+## -- error_handler
+##
+###
+
+proc ::Rivet::error_handler {script err_code err_options} {
+    global errorOutbuf
+
+    set error_script [::rivet::inspect ErrorScript]
+    if {$error_script != ""} {
+        if {[catch {namespace eval :: $error_script} err_code err_info]} {
+            ::rivet::apache_log_err err "error script failed ($errorInfo)"
+            print_error_message "<b>Rivet ErrorScript failed</b>"
+        }
+    } else {
+        set errorOutbuf [string trim $script]
+        ::Rivet::handle_error
     }
+}
 
-    ###
-    ## This routine gets called each time a request is finished.  Any kind
-    ## of special cleanup can be placed here.
-    ###
-    proc cleanup_request {} { }
-
-
-    ######## mod_rivet_ng specific ++++++++
-
-    ### 
-    # -- error_message
-    #
-    # this message should be transparently equivalent
-    # to the Rivet_PrintErrorMessage function in mod_rivet_generator.c
-    #
+###
+## -- url_handler
+##
+### 
 
-    proc print_error_message {error_header} {
-        global errorInfo
+proc ::Rivet::url_handler {} {
 
-        puts "$error_header <br/>"
-        puts "<pre> $errorInfo </pre>"
+    set script [join [list  [::rivet::inspect BeforeScript]     \
+                            [::rivet::url_script]               \
+                            [::rivet::inspect AfterScript]] "\n"]
 
-    }
+    #set fp [open "/tmp/script-[pid].tcl" w+]
+    #puts $fp $script
+    #close $fp
 
+    return $script
 
-    ###
-    ## -- error_handler
-    ##
-    ###
-
-    proc error_handler {script err_code err_options} {
-        global errorOutbuf
-
-        set error_script [::rivet::inspect ErrorScript]
-        if {$error_script != ""} {
-            if {[catch {namespace eval :: $error_script} err_code err_info]} {
-                ::rivet::apache_log_err err "error script failed ($errorInfo)"
-                print_error_message "<b>Rivet ErrorScript failed</b>"
-            }
-        } else {
-            set errorOutbuf $script
-            ::Rivet::handle_error
-        }
-    }
-
-    ###
-    ## -- url_handler
-    ##
-    ### 
-
-    proc url_handler {} {
-
-        set script [join [list  [::rivet::inspect BeforeScript]     \
-                                [::rivet::url_script]               \
-                                [::rivet::inspect AfterScript]] "\n"]
-
-        #set fp [open "/tmp/script-[pid].tcl" w+]
-        #puts $fp $script
-        #close $fp
-
-        return $script
-
-    }
+}
 
-    ###
-    ## -- Default request processing
-    ##
-    ## a request will handled by this procedure
+###
+## -- Default request processing
+##
+## a request will handled by this procedure
 
-    proc request_handling {} {
-     
-        set script [::Rivet::url_handler]
+proc ::Rivet::request_handling {} {
+ 
+    set script [::Rivet::url_handler]
 
-        ::try {
+    ::try {
 
-            namespace eval :: $script
+        namespace eval :: $script
 
-        } trap {RIVET ABORTPAGE} {::Rivet::error_code ::Rivet::error_options} {
+    } trap {RIVET ABORTPAGE} {::Rivet::error_code ::Rivet::error_options} {
 
-            set abort_script [::rivet::inspect AbortScript]
-            if {[catch {namespace eval :: $abort_script} ::Rivet::error_code ::Rivet::error_options]} {
-                ::rivet::apache_log_err err "abort script failed ($errorInfo)"
-                print_error_message "<b>Rivet AbortScript failed</b>"
+        set abort_script [::rivet::inspect AbortScript]
+        if {[catch {namespace eval :: $abort_script} ::Rivet::error_code ::Rivet::error_options]} {
+            ::rivet::apache_log_err err "abort script failed ($errorInfo)"
+            print_error_message "<b>Rivet AbortScript failed</b>"
 
-                ::Rivet::error_handler $abort_script $::Rivet::error_code $::Rivet::error_options
-            }
+            ::Rivet::error_handler $abort_script $::Rivet::error_code $::Rivet::error_options
+        }
 
 
-        } trap {RIVET THREAD_EXIT} {::Rivet::error_code ::Rivet::error_options} {
+    } trap {RIVET THREAD_EXIT} {::Rivet::error_code ::Rivet::error_options} {
 
-            set abort_script [::rivet::inspect AbortScript]
-            if {[catch {namespace eval :: $abort_script} ::Rivet::error_code ::Rivet::error_options]} {
-                ::rivet::apache_log_err err "abort script failed ($errorInfo)"
-                print_error_message "<b>Rivet AbortScript failed</b>"
+        set abort_script [::rivet::inspect AbortScript]
+        if {[catch {namespace eval :: $abort_script} ::Rivet::error_code ::Rivet::error_options]} {
+            ::rivet::apache_log_err err "abort script failed ($errorInfo)"
+            print_error_message "<b>Rivet AbortScript failed</b>"
 
-                ::Rivet::error_handler $abort_script $::Rivet::error_code $::Rivet::error_options
-            }
+            ::Rivet::error_handler $abort_script $::Rivet::error_code $::Rivet::error_options
+        }
 
-            #<sudden-exit-script>
+        #<sudden-exit-script>
 
-        } on error {::Rivet::error_code ::Rivet::error_options} {
+    } on error {::Rivet::error_code ::Rivet::error_options} {
 
-            ::Rivet::error_handler $script $::Rivet::error_code $::Rivet::error_options
+        ::Rivet::error_handler $script $::Rivet::error_code $::Rivet::error_options
 
-        } finally {
+    } finally {
 
-            set after_every_script [::rivet::inspect AfterEveryScript]
-            if {[catch {namespace eval :: $after_every_script} ::Rivet::error_code ::Rivet::error_options]} {
-                ::rivet::apache_log_err err "AfterEveryScript failed ($errorInfo)"
-                print_error_message "<b>Rivet AfterEveryScript failed</b>"
+        set after_every_script [::rivet::inspect AfterEveryScript]
+        if {[catch {namespace eval :: $after_every_script} ::Rivet::error_code ::Rivet::error_options]} {
+            ::rivet::apache_log_err err "AfterEveryScript failed ($errorInfo)"
+            print_error_message "<b>Rivet AfterEveryScript failed</b>"
 
-                ::Rivet::error_handler $after_every_script $::Rivet::error_code $::Rivet::error_options
-            }
-            #<after-every-script>
+            ::Rivet::error_handler $after_every_script $::Rivet::error_code $::Rivet::error_options
         }
- 
-        namespace eval :: ::Rivet::cleanup_request  
+        #<after-every-script>
     }
 
-    ######## mod_rivet_ng specific ---------
+    namespace eval :: ::Rivet::cleanup_request  
+}
 
-    ###
-    ## The main initialization procedure for Rivet.
-    ###
-
-    proc init {} {
-        global auto_path
-        global server
-
-        ## Add the rivet-tcl directory to Tcl's auto search path.
-        ## We insert it at the head of the list because we want any of
-        ## our procs named the same as Tcl's procs to be overridden.
-        ## Example: parray
-        set tclpath [file join [file dirname [info script]] rivet-tcl]
-        set auto_path [linsert $auto_path 0 $tclpath]
-
-        ## As we moved the commands set to ::rivet namespace we
-        ## we want to guarantee the commands are still accessible
-        ## at global level by putting them on the export list.
-        ## Importing the ::rivet namespace is deprecated and we should
-        ## make it clear in the manual
-
-        ## we keep in ::rivet::export_list a list of importable commands
-
-        namespace eval ::rivet [list set cmd_export_list [tcl_commands_export_list $tclpath]]
-        namespace eval ::rivet {
-
-        ## init.tcl is run by mod_rivet (which creates the ::rivet namespace) but it gets run
-        ## standalone by mkPkgindex during the installation phase. We have to make sure the
-        ## procedure won't fail in this case, so we check for the existence of the variable.
-
-            if {[info exists module_conf(export_namespace_commands)] && \
-                 $module_conf(export_namespace_commands)} {
-
-                # commands in 'command_list' are prefixed with ::rivet, so we have to
-                # remove it to build an export list 
-                
-                set export_list {}
-                foreach c $cmd_export_list {
-                    lappend export_list [namespace tail $c]
-                }
-
-                #puts stderr "exporting $export_list"
-                eval namespace export $export_list
+######## mod_rivet_ng specific ---------
 
+###
+## The main initialization procedure for Rivet.
+###
+
+proc ::Rivet::init {} {
+    global auto_path
+    global server
+
+    ## Add the rivet-tcl directory to Tcl's auto search path.
+    ## We insert it at the head of the list because we want any of
+    ## our procs named the same as Tcl's procs to be overridden.
+    ## Example: parray
+    set tclpath [file join [file dirname [info script]] rivet-tcl]
+    set auto_path [linsert $auto_path 0 $tclpath]
+
+    ## As we moved the commands set to ::rivet namespace we
+    ## we want to guarantee the commands are still accessible
+    ## at global level by putting them on the export list.
+    ## Importing the ::rivet namespace is deprecated and we should
+    ## make it clear in the manual
+
+    ## we keep in ::rivet::export_list a list of importable commands
+
+    namespace eval ::rivet [list set cmd_export_list [tcl_commands_export_list $tclpath]]
+    namespace eval ::rivet {
+
+    ## init.tcl is run by mod_rivet (which creates the ::rivet namespace) but it gets run
+    ## standalone by mkPkgindex during the installation phase. We have to make sure the
+    ## procedure won't fail in this case, so we check for the existence of the variable.
+
+        if {[info exists module_conf(export_namespace_commands)] && \
+             $module_conf(export_namespace_commands)} {
+
+            # commands in 'command_list' are prefixed with ::rivet, so we have to
+            # remove it to build an export list 
+            
+            set export_list {}
+            foreach c $cmd_export_list {
+                lappend export_list [namespace tail $c]
             }
-        }
-        ## Add the packages directory to the auto_path.
-        ## If we have a packages$tcl_version directory
-        ## (IE: packages8.3, packages8.4) append that as well.
-
-        ## The packages directory come right after the rivet-tcl directory.
-        set pkgpath [file join [file dirname [info script]] packages]
-        set auto_path [linsert $auto_path 1 $pkgpath]
-        set auto_path [linsert $auto_path 2 ${pkgpath}-local]
 
-        if { [file exists ${pkgpath}$::tcl_version] } {
-            lappend auto_path ${pkgpath}$::tcl_version
+            #puts stderr "exporting $export_list"
+            eval namespace export $export_list
+
         }
+    }
+    ## Add the packages directory to the auto_path.
+    ## If we have a packages$tcl_version directory
+    ## (IE: packages8.3, packages8.4) append that as well.
+
+    ## The packages directory come right after the rivet-tcl directory.
+    set pkgpath [file join [file dirname [info script]] packages]
+    set auto_path [linsert $auto_path 1 $pkgpath]
+    set auto_path [linsert $auto_path 2 ${pkgpath}-local]
 
-        ## Likewise we have also to add to auto_path the directory containing 
-        ## this script since it holds the pkgIndex.tcl file for package Rivet. 
+    if { [file exists ${pkgpath}$::tcl_version] } {
+        lappend auto_path ${pkgpath}$::tcl_version
+    }
 
-        set auto_path [linsert $auto_path 0 [file dirname [info script]]]
+    ## Likewise we have also to add to auto_path the directory containing 
+    ## this script since it holds the pkgIndex.tcl file for package Rivet. 
 
-        ## This will allow users to create proc libraries and tclIndex files
-        ## in the local directory that can be autoloaded.
-        ## Perhaps this must go to the front of the list to allow the user
-        ## to override even Rivet's procs.
-        lappend auto_path .
-    }
+    set auto_path [linsert $auto_path 0 [file dirname [info script]]]
 
-} ;## namespace eval ::Rivet
+    ## This will allow users to create proc libraries and tclIndex files
+    ## in the local directory that can be autoloaded.
+    ## Perhaps this must go to the front of the list to allow the user
+    ## to override even Rivet's procs.
+    lappend auto_path .
+}
 
 ## eventually we have to divert Tcl ::exit to ::rivet::exit
 

Modified: tcl/rivet/trunk/rivet/init.tcl.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/init.tcl.in?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/init.tcl.in (original)
+++ tcl/rivet/trunk/rivet/init.tcl.in Tue Nov 15 09:50:39 2016
@@ -134,7 +134,7 @@ proc ::Rivet::error_handler {script err_
             print_error_message "<b>Rivet ErrorScript failed</b>"
         }
     } else {
-        set errorOutbuf $script
+        set errorOutbuf [string trim $script]
         ::Rivet::handle_error
     }
 }

Modified: tcl/rivet/trunk/rivet/rivet-tcl/catch.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/rivet-tcl/catch.tcl?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/rivet-tcl/catch.tcl (original)
+++ tcl/rivet/trunk/rivet/rivet-tcl/catch.tcl Tue Nov 15 09:50:39 2016
@@ -12,15 +12,15 @@ namespace eval ::rivet {
 
     proc catch {script args} {
 
-        set catch_ret [uplevel [list ::catch $script] $args]
+        set catch_ret [uplevel [list ::catch $script {*}$args]]
 
         if {$catch_ret && [::rivet::abort_page -aborting]} {
 
-            return -code error -errorcode ABORTPAGE 
+            return -code error -errorcode {RIVET ABORTPAGE} "Page abort"
 
         } elseif {$catch_ret && [::rivet::abort_page -exiting]} {
 
-            return -code error -errorcode THREAD_EXIT 
+            return -code error -errorcode {RIVET THREAD_EXIT} "Thread exit"
 
         } else {
 

Modified: tcl/rivet/trunk/rivet/rivet-tcl/try.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/rivet/rivet-tcl/try.tcl?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/rivet/rivet-tcl/try.tcl (original)
+++ tcl/rivet/trunk/rivet/rivet-tcl/try.tcl Tue Nov 15 09:50:39 2016
@@ -10,9 +10,9 @@ namespace eval ::rivet {
     proc try {script args} {
 
         uplevel [list ::try $script trap {RIVET ABORTPAGE} {} {
-            return -errorcode ABORTPAGE -code error
+            return -errorcode {RIVET ABORTPAGE} -code error
         } trap {RIVET THREAD_EXIT} {} {
-            return -errorcode THREAD_EXIT -code error
+            return -errorcode {RIVET THREAD_EXIT} -code error
         } {*}$args]
 
     }

Modified: tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c (original)
+++ tcl/rivet/trunk/src/mod_rivet_ng/rivetCore.c Tue Nov 15 09:50:39 2016
@@ -1544,7 +1544,7 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
         {
             if (private->r == NULL)
             {
-                Tcl_Obj* cmd = Tcl_NewStringObj("return [info script]",-1);
+                Tcl_Obj* cmd = Tcl_NewStringObj("info script",-1);
 
                 Tcl_IncrRefCount(cmd); 
                 status = Tcl_EvalObjEx(interp,cmd,TCL_EVAL_DIRECT);
@@ -1553,6 +1553,7 @@ TCL_CMD_HEADER( Rivet_InspectCmd )
             else
             {
                 Tcl_SetObjResult(interp,Tcl_NewStringObj(private->r->filename,-1));
+                status = TCL_OK;
             }
         } 
         else if (STRNEQU(cmd_arg,"-all"))

Modified: tcl/rivet/trunk/tests/apachetest/template.conf.2.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/tests/apachetest/template.conf.2.tcl?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/tests/apachetest/template.conf.2.tcl (original)
+++ tcl/rivet/trunk/tests/apachetest/template.conf.2.tcl Tue Nov 15 09:50:39 2016
@@ -1,4 +1,4 @@
-# \$Id\$
+# \$Id: \$
 # Minimal config file for testing
 
 # Parsed by makeconf.tcl

Modified: tcl/rivet/trunk/tests/bailout.test
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/tests/bailout.test?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/tests/bailout.test (original)
+++ tcl/rivet/trunk/tests/bailout.test Tue Nov 15 09:50:39 2016
@@ -113,7 +113,7 @@
     }
     set r [string trim $r]
     set r
-} {try 3 finalize}
+} {break try 3 finalize}
 
 ::tcltest::test bailout-3.2 {::rivet::try handling error return code} {
     apachetest::start {} {
@@ -125,7 +125,7 @@
     }
     set r [string trim $r]
     set r
-} {try 1 finalize}
+} {error try 1 finalize}
 
 ::tcltest::test bailout-3.3 {::rivet::try handling continue return code} {
     apachetest::start {} {
@@ -137,7 +137,7 @@
     }
     set r [string trim $r]
     set r
-} {try 4 finalize}
+} {continue try 4 finalize}
 
 ::tcltest::test bailout-3.4 {::rivet::try abort_page handling} {
     apachetest::start {} {
@@ -154,7 +154,7 @@
     set r
 } {finalize 1 arg1}
 
-::tcltest::test bailout-3.4 {::rivet::try handling ::rivet::exit} {
+::tcltest::test bailout-3.5 {::rivet::try handling ::rivet::exit} {
     apachetest::start {} {
         RivetServerConf AbortScript "::rivet::apache_log_error err \\\"catching abort condition\\\""
         RivetServerConf AbortScript "set abcode \[::rivet::abort_code\]"

Modified: tcl/rivet/trunk/tests/checkfails.tcl
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/tests/checkfails.tcl?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/tests/checkfails.tcl (original)
+++ tcl/rivet/trunk/tests/checkfails.tcl Tue Nov 15 09:50:39 2016
@@ -9,7 +9,9 @@ proc check_inspect { cmd_form args } {
     set ::failtest(inspect${cmd_form}) 0
     
     set cmdeval [list ::rivet::inspect {*}$args]
-    if {[catch {eval $cmdeval}]} { set ::failtest(inspect${cmd_form}) 1 }
+    if {[::catch $cmdeval e opts]} { 
+        set ::failtest(inspect${cmd_form}) 1 
+    }
 
 }
 

Modified: tcl/rivet/trunk/tests/failtest.test
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/tests/failtest.test?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/tests/failtest.test (original)
+++ tcl/rivet/trunk/tests/failtest.test Tue Nov 15 09:50:39 2016
@@ -1,6 +1,7 @@
 # This test is for those commands that must not run outside of a request processing
-# Also command ::rivet::inspect is tested in either forms, those that allow a call from
-# outside request processing and those that must denied it.
+# and return an error if called outside of that context (child process/thread initialization or
+# termination). Command ::rivet::inspect can be called various forms and depending 
+# on its arguments
 
 ::tcltest::test failtest-1.1 {commands that must refuse to run in child init or exit} {
     apachetest::start { 

Modified: tcl/rivet/trunk/tests/try.rvt
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/tests/try.rvt?rev=1769764&r1=1769763&r2=1769764&view=diff
==============================================================================
--- tcl/rivet/trunk/tests/try.rvt (original)
+++ tcl/rivet/trunk/tests/try.rvt Tue Nov 15 09:50:39 2016
@@ -28,11 +28,11 @@
     ::rivet::try {
         failproc [::rivet::var_qs get cond]
     } on continue {er opt} {
-        dict with opt { puts -nonewline "$cmd $condition " }
+        dict with opt { puts -nonewline "continue $cmd $condition " }
     } on error {er opt} {
-        dict with opt { puts -nonewline "$cmd $condition " }
+        dict with opt { puts -nonewline "error $cmd $condition " }
     } on break {er opt} {
-        dict with opt { puts -nonewline "$cmd $condition " }
+        dict with opt { puts -nonewline "break $cmd $condition " }
     } finally {
         puts -nonewline "finalize"
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org