This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git


The following commit(s) were added to refs/heads/master by this push:
     new b0e1a2f  fixed regression bug in tests/rivet.test
b0e1a2f is described below

commit b0e1a2f7a63592c019ff6933b17af5466792fceb
Author: Massimo Manghi <mxman...@apache.org>
AuthorDate: Tue Oct 3 16:50:59 2023 +0200

    fixed regression bug in tests/rivet.test
---
 ChangeLog                  | 7 +++++--
 doc/xml/commands.xml       | 8 ++++++--
 rivet/init.tcl             | 4 ++--
 rivet/rivet-tcl/parray.tcl | 2 +-
 tests/rivet.test           | 9 ++++++---
 5 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e7abfe5..ac08800 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2023-10-03 Massimo Manghi <mxman...@apache.org>
+       * tests/rivet.tcl: fixed regression bug in the controlling environment 
variables
+
 2023-09-12 Massimo Manghi <mxman...@apache.org>
        * rivet/packages/formbroker/formbroker.tcl: expanded comments
        * doc/xml/formbroker.xml: documenting variable type validators error 
codes
@@ -5,7 +8,7 @@
 2023-06-14 Massimo Manghi <mxman...@apache.org>
        * tests/channel.test: indenting code for improved readability
        * src/mod_rivet_ng/mod_rivet.c,mod_rivet_generator.c: Removed unused 
code that
-       ha been commented out long ago
+       has been commented out long ago
        * rivet/rivet-tcl/parray.tcl: ::rivet::parray now accepting alternative 
way to
        return output.
 
@@ -36,7 +39,7 @@
        provided by Scott Pitcher <sco...@svptechnicalservices.com.au>)
 
 2023-01-11 Massimo Manghi <mxman...@apache.org>
-       * src/TclWeb.h: also this include file had a CONST84 specifier that 
needed to
+       * src/TclWeb.h: also this headers file had a CONST84 specifier that 
needed to
        be converted as CONST86
 
 2023-01-09 Massimo Manghi <mxman...@apache.org>
diff --git a/doc/xml/commands.xml b/doc/xml/commands.xml
index a52cbcc..8641060 100644
--- a/doc/xml/commands.xml
+++ b/doc/xml/commands.xml
@@ -1394,7 +1394,8 @@ bab</programlisting>
                <cmdsynopsis>
                    <command>::rivet::parray</command>
                    <arg><replaceable>arrayName</replaceable></arg>
-                   
<arg><replaceable><optional>pattern</optional></replaceable></arg>
+                   <arg><replaceable><optional>pattern 
[*]</optional></replaceable></arg>
+                   <arg><replaceable><optional>command [puts 
stdout]</optional></replaceable></arg>
                </cmdsynopsis>
            </refsynopsisdiv>
 
@@ -1404,7 +1405,10 @@ bab</programlisting>
                    An html version of the standard Tcl
                    <command>parray</command> command.  Displays the entire
                    contents of an array in a sorted, nicely-formatted way.
-                   Mostly used for debugging purposes.
+                   Mostly used for debugging purposes. Rivet's 
<command>parray</command>
+                   accepts 2 optional parameters: an array name selection 
pattern (like the
+                   pattern accepted by Tcl's [array names &lt;array&gt; -glob 
&lt;pattern&gt;]) and
+                   an output command (default: 'puts stdout').
                </para>
            </refsect1>
        </refentry>
diff --git a/rivet/init.tcl b/rivet/init.tcl
index 657ffc7..7577516 100644
--- a/rivet/init.tcl
+++ b/rivet/init.tcl
@@ -235,8 +235,8 @@ proc ::Rivet::tcl_commands_export_list {tclpath} {
         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
+        # 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
diff --git a/rivet/rivet-tcl/parray.tcl b/rivet/rivet-tcl/parray.tcl
index b9f2582..877c6f2 100644
--- a/rivet/rivet-tcl/parray.tcl
+++ b/rivet/rivet-tcl/parray.tcl
@@ -28,8 +28,8 @@ namespace eval ::rivet {
             set nameString [format "%s(%s)" $arrayName 
[::rivet::escape_sgml_chars $name]]
             lappend html_text [format "%-*s = %s" $maxl $nameString 
[::rivet::escape_sgml_chars $array($name)]]
         }
+        eval [list {*}$outputcmd [join [list <pre> [join $html_text "\n"] 
</pre>] "\n"]]
 
-        eval $outputcmd [list <pre>[join $html_text "\n"]</pre>]
     }
 
 }
diff --git a/tests/rivet.test b/tests/rivet.test
index dbda8b8..a928fac 100755
--- a/tests/rivet.test
+++ b/tests/rivet.test
@@ -44,9 +44,12 @@ if {[info exists ::env(TestList)]} {
 # with the desired result, which is placed after the block of code.
 # See man tcltest for more information.
 
-set testgroup1 [expr [info exists ::env(testgroup1)] ? $::env(testgroup1) : 1]
-set testgroup2 [expr [info exists ::env(testgroup2)] ? $::env(testgroup2) : 1]
-set testgroup3 [expr [info exists ::env(testgroup3)] ? $::env(testgroup3) : 1]
+foreach tgroup {1 2 3} {
+    set testgroup${tgroup} 1
+    if {[info exists ::env(testgroup${tgroup})]} {
+        set testgroup${tgroup} $::env(testgroup${tgroup})
+    }
+}
 
 # Run all tests against one server process.
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@tcl.apache.org
For additional commands, e-mail: commits-h...@tcl.apache.org

Reply via email to