texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/t/test_utils.pl (run_all), tp/t/README: proc


From: Patrice Dumas
Subject: branch master updated: * tp/t/test_utils.pl (run_all), tp/t/README: process all the tests given in argument.
Date: Sun, 05 Feb 2023 16:56:26 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 20eec901ad * tp/t/test_utils.pl (run_all), tp/t/README: process all 
the tests given in argument.
20eec901ad is described below

commit 20eec901ad0829a370d4e612532748d316ea1878
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Feb 5 22:56:16 2023 +0100

    * tp/t/test_utils.pl (run_all), tp/t/README: process all the tests
    given in argument.
---
 ChangeLog          |  5 +++++
 tp/t/README        | 10 +++++-----
 tp/t/test_utils.pl | 15 ++++++++-------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 02c8a18618..b8ab30a623 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-02-05  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/t/test_utils.pl (run_all), tp/t/README: process all the tests
+       given in argument.
+
 2023-02-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/parsetexi/parser.c (read_comment): check string
diff --git a/tp/t/README b/tp/t/README
index a52e6d0a20..9bf12991c5 100644
--- a/tp/t/README
+++ b/tp/t/README
@@ -30,8 +30,8 @@ Another way to run a test out-source is:
   s=../../tp
   srcdir=$s ../pre-inst-env perl -w $s/t/92formatting.t empty
 
-where s is the path to the srcdir.  This allows you to run a single
-sub-test, here the sub-test with name "empty".
+where s is the path to the srcdir.  This allows you to run specific
+sub-tests, here the sub-test with name "empty".
 
 Most test files use a testing infrastructure from t/test_utils.pl.
 The run_all function from that file runs the tests that have been
@@ -83,7 +83,7 @@ file, as in
 
   perl -w t/03coverage_braces.t -g
 
-To regenerate a specific test reference file, the test name should be
+To regenerate specific tests reference files, the test names should be
 given as an argument.  For example, to just regenerate the reference
 files for the "test_image" test within t/03.coverage_braces.t, run
 
@@ -115,8 +115,8 @@ tests in t_texis/$test_category/ by running something along 
the lines of:
 
   perl -w t/60macro.t -c
 
-to create a Texinfo file for each of the tests in t/60macro.t, or for a
-specific test, here arg_body_expansion_order:
+to create a Texinfo file for each of the tests in t/60macro.t, or for
+specific tests, here arg_body_expansion_order:
 
   perl -w t/60macro.t -c arg_body_expansion_order
 
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 112e5d0cc4..3286654e32 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -204,8 +204,6 @@ Getopt::Long::Configure("gnu_getopt");
 GetOptions('g|generate' => \$arg_generate, 'd|debug=i' => \$arg_debug,
            'c|complete' => \$arg_complete, 'o|output' => \$arg_output);
 
-my $arg_test_case = shift @ARGV;
-
 sub protect_perl_string($)
 {
   my $string = shift;
@@ -1617,11 +1615,14 @@ sub run_all($$)
 
   my $test = new_test($name, $arg_generate, $arg_debug);
   my $ran_tests;
-  if (defined($arg_test_case)) {
-    foreach my $test_case (@$test_cases) {
-      if ($test_case->[0] eq $arg_test_case) {
-        $ran_tests = [ $test_case ];
-        last;
+  if (scalar(@ARGV)) {
+    $ran_tests = [];
+    foreach my $arg_test_case (@ARGV) {
+      foreach my $test_case (@$test_cases) {
+        if ($test_case->[0] eq $arg_test_case) {
+          push @$ran_tests, $test_case;
+          last;
+        }
       }
     }
   } else {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]