texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp .cvsignore maintain/all_tests.sh t/0...


From: Patrice Dumas
Subject: texinfo/tp .cvsignore maintain/all_tests.sh t/0...
Date: Sun, 20 May 2012 18:50:41 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        12/05/20 18:50:41

Modified files:
        tp             : .cvsignore 
        tp/maintain    : all_tests.sh 
        tp/t           : 06columnfractions.t test_utils.pl 

Log message:
        Improve support for outputting texi files for all the tests.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/.cvsignore?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/maintain/all_tests.sh?cvsroot=texinfo&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/06columnfractions.t?cvsroot=texinfo&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/test_utils.pl?cvsroot=texinfo&r1=1.117&r2=1.118

Patches:
Index: .cvsignore
===================================================================
RCS file: /sources/texinfo/texinfo/tp/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- .cvsignore  9 Feb 2012 23:51:50 -0000       1.8
+++ .cvsignore  20 May 2012 18:50:40 -0000      1.9
@@ -11,3 +11,4 @@
 po
 po_document
 texi2any-perl
+t_texis

Index: maintain/all_tests.sh
===================================================================
RCS file: /sources/texinfo/texinfo/tp/maintain/all_tests.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- maintain/all_tests.sh       23 Jan 2012 23:28:32 -0000      1.3
+++ maintain/all_tests.sh       20 May 2012 18:50:40 -0000      1.4
@@ -18,11 +18,11 @@
   rm -rf t/results/*/*/out_*/
 elif [ "$command" = 'generate' ]; then
   for file in t/*.t; do
-    perl $file -g
+    perl -w $file -g
   done
 elif [ "$command" = 'output' ]; then
   for file in t/*.t; do
-    perl $file -o
+    perl -w $file -o
   done
 elif [ "$command" = 'diff' ]; then
   if [ z"$test_name" = 'z' ]; then
@@ -34,6 +34,10 @@
       diff -u $result $result.new
     done
   fi 
+elif [ "$command" = 'texis' ]; then
+  for file in t/*.t; do
+    perl -w $file -c
+  done
 else
   echo "Unknown command"
   exit 1

Index: t/06columnfractions.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/06columnfractions.t,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- t/06columnfractions.t       30 Oct 2010 18:31:49 -0000      1.14
+++ t/06columnfractions.t       20 May 2012 18:50:40 -0000      1.15
@@ -24,6 +24,7 @@
 );
 
 our $arg_generate;
+our $arg_complete;
 our $arg_test_case;
 our $arg_debug;
 our $nr_comparisons;
@@ -36,11 +37,15 @@
 
 foreach my $test_case (@test_cases) {
   next if ($arg_test_case and $arg_test_case ne $test_case->[0]);
+  if ($arg_complete) {
+    $test->output_texi_file($test_case);
+  } else {
   $test->test($test_case);
   push @done_tests, $test_case;
+  }
 }
 
-if ($arg_generate) {
+if ($arg_generate or $arg_complete) {
   plan tests => 2;
 }
 else {

Index: t/test_utils.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/test_utils.pl,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- t/test_utils.pl     14 Apr 2012 16:10:17 -0000      1.117
+++ t/test_utils.pl     20 May 2012 18:50:41 -0000      1.118
@@ -61,6 +61,8 @@
 }
 Locale::Messages::bindtextdomain ('texinfo_document', $localesdir);
 
+my $generated_texis_dir = 't_texis';
+
 my $input_files_dir = $srcdir."t/input_files/";
 
 our $output_files_dir = 't/output_files/';
@@ -999,7 +1001,7 @@
 
   foreach my $test_case (@$ran_tests) {
     if ($arg_complete) {
-      $test->output_texi_file($test_case)
+      $test->output_texi_file($test_case);
     } else {
       $test_nrs += $test->test($test_case);
     }
@@ -1019,9 +1021,9 @@
   my $test_text = shift @$test_case;
   my $test_options = shift @$test_case;
 
-  my $dir = "texi/$self->{'name'}/";
-  mkdir "texi/" or die 
-     unless (-d "texi/");
+  my $dir = "$generated_texis_dir/$self->{'name'}/";
+  mkdir "$generated_texis_dir/" or die 
+     unless (-d "$generated_texis_dir/");
   mkdir $dir or die 
      unless (-d $dir);
   my $file = "${dir}$test_name.texi";



reply via email to

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