texinfo-commits
[Top][All Lists]
Advanced

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

[5572] * tp/Texinfo/Convert/Converter.pm (output): warn about


From: Patrice Dumas
Subject: [5572] * tp/Texinfo/Convert/Converter.pm (output): warn about
Date: Sun, 18 May 2014 11:20:44 +0000

Revision: 5572
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5572
Author:   pertusus
Date:     2014-05-18 11:20:42 +0000 (Sun, 18 May 2014)
Log Message:
-----------
        * tp/Texinfo/Convert/Converter.pm (output): warn about 
        incompatibilities between output and split only if split.
        * tp/tests/Makefile.am, tp/tests/reference/, tp/tests/t/: add tests
        for stdout.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/tp/Texinfo/Convert/Converter.pm
    trunk/tp/tests/Makefile.am
    trunk/tp/tests/run_parser_all.sh

Added Paths:
-----------
    trunk/tp/tests/reference/
    trunk/tp/tests/reference/stdout.txt
    trunk/tp/tests/reference/stdout_split.txt
    trunk/tp/tests/t/
    trunk/tp/tests/t/stdout.sh
    trunk/tp/tests/t/stdout_split.sh

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2014-05-17 23:59:53 UTC (rev 5571)
+++ trunk/ChangeLog     2014-05-18 11:20:42 UTC (rev 5572)
@@ -1,3 +1,10 @@
+2014-05-18  Patrice Dumas  <address@hidden>
+
+       * tp/Texinfo/Convert/Converter.pm (output): warn about 
+       incompatibilities between output and split only if split.
+       * tp/tests/Makefile.am, tp/tests/reference/, tp/tests/t/: add tests
+       for stdout.
+
 2014-05-17  Gavin Smith  <address@hidden>
 
        * info/window.c (process_node_text): Formatting and tweaks to

Modified: trunk/tp/Texinfo/Convert/Converter.pm
===================================================================
--- trunk/tp/Texinfo/Convert/Converter.pm       2014-05-17 23:59:53 UTC (rev 
5571)
+++ trunk/tp/Texinfo/Convert/Converter.pm       2014-05-18 11:20:42 UTC (rev 
5572)
@@ -789,9 +789,11 @@
       and ($Texinfo::Common::null_device_file{$self->get_conf('OUTFILE')}
            or $self->get_conf('OUTFILE') eq '-'
            or $self->get_conf('OUTFILE') eq '')) {
-    $self->document_warn(sprintf($self->__("%s: output incompatible with 
split"),
-                                 $self->get_conf('OUTFILE')));
-    $self->force_conf('SPLIT', 0);
+    if ($self->get_conf('SPLIT')) {
+      $self->document_warn(sprintf($self->__("%s: output incompatible with 
split"),
+                                   $self->get_conf('OUTFILE')));
+      $self->force_conf('SPLIT', 0);
+    }
   }
   if ($self->get_conf('SPLIT')) {
     $self->set_conf('NODE_FILES', 1);

Modified: trunk/tp/tests/Makefile.am
===================================================================
--- trunk/tp/tests/Makefile.am  2014-05-17 23:59:53 UTC (rev 5571)
+++ trunk/tp/tests/Makefile.am  2014-05-18 11:20:42 UTC (rev 5572)
@@ -43,9 +43,13 @@
 clean-tests:
        $(srcdir)/parser_tests.sh -clean $(base_tests) $(long_tests) 
$(tex_html_tests)
 
+other_tests = \
+       t/stdout.sh \
+       t/stdout_split.sh
+
 old_test_scripts = parser_base_tests long_tests.sh tex_html_tests.sh
 #TESTS = $(old_test_scripts)
-TESTS = $(one_test_files_generated_list)
+TESTS = $(one_test_files_generated_list) $(other_tests)
 
 long-checks long-check: all
        $(MAKE) $(AM_MAKEFLAGS) check LONG_TESTS=yes
@@ -91,4 +95,7 @@
 
 EXTRA_DIST = run_parser_all.sh parser_tests.sh \
  $(old_test_scripts) $(one_test_files_generated_list) coverage_macro.texi \
- coverage_macro-cr.texi
+ coverage_macro-cr.texi $(other_tests) reference
+
+dist-hook:
+       rm -rf `find $(distdir)/reference -name .svn`

Added: trunk/tp/tests/reference/stdout.txt
===================================================================
--- trunk/tp/tests/reference/stdout.txt                         (rev 0)
+++ trunk/tp/tests/reference/stdout.txt 2014-05-18 11:20:42 UTC (rev 5572)
@@ -0,0 +1,2 @@
+This is a very simple texi manual   <>.
+

Added: trunk/tp/tests/reference/stdout_split.txt
===================================================================
--- trunk/tp/tests/reference/stdout_split.txt                           (rev 0)
+++ trunk/tp/tests/reference/stdout_split.txt   2014-05-18 11:20:42 UTC (rev 
5572)
@@ -0,0 +1,3 @@
+texi2any: warning: -: output incompatible with split
+This is a very simple texi manual   <>.
+

Modified: trunk/tp/tests/run_parser_all.sh
===================================================================
--- trunk/tp/tests/run_parser_all.sh    2014-05-17 23:59:53 UTC (rev 5571)
+++ trunk/tp/tests/run_parser_all.sh    2014-05-18 11:20:42 UTC (rev 5572)
@@ -84,6 +84,9 @@
   logfile="$one_test_logs_dir/$test_name.log"
 fi
 
+# The script is always run in a test directory.  If srcdir_test is
+# set, it should be set to the test directory name.  In this case
+# testdir is the test directory parent, in srcdir.
 if [ "z$srcdir_test" = 'z' ]; then
   testdir=.
   srcdir_test=.
@@ -95,6 +98,8 @@
   fi
 fi
 
+#echo "testdir $testdir srcdir_test $srcdir_test" 1>&2
+
 base_results_dir="$testdir/$srcdir_test"
 #test_file='tests.txt'
 test_file='tests-parser.txt'

Added: trunk/tp/tests/t/stdout.sh
===================================================================
--- trunk/tp/tests/t/stdout.sh                          (rev 0)
+++ trunk/tp/tests/t/stdout.sh  2014-05-18 11:20:42 UTC (rev 5572)
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+# Get error messages in English
+LC_ALL=C; export LC_ALL
+
+srcdir=${srcdir:-.}
+
+# to regenerate the reference:
+# ../texi2any.pl -o - --plaintext formatting/simplest.texi > 
reference/stdout.txt 2>&1
+
+$srcdir/../texi2any.pl -o - --plaintext formatting/simplest.texi 2>&1 | diff - 
$srcdir/reference/stdout.txt
+


Property changes on: trunk/tp/tests/t/stdout.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/tp/tests/t/stdout_split.sh
===================================================================
--- trunk/tp/tests/t/stdout_split.sh                            (rev 0)
+++ trunk/tp/tests/t/stdout_split.sh    2014-05-18 11:20:42 UTC (rev 5572)
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+# Get error messages in English
+LC_ALL=C; export LC_ALL
+
+srcdir=${srcdir:-.}
+
+# to regenerate the reference:
+# ../texi2any.pl -o - --plaintext --split chapter formatting/simplest.texi > 
reference/stdout_split.txt 2>&1
+
+$srcdir/../texi2any.pl -o - --plaintext --split chapter 
formatting/simplest.texi 2>&1 | diff - reference/stdout_split.txt
+


Property changes on: trunk/tp/tests/t/stdout_split.sh
___________________________________________________________________
Added: svn:executable
   + *




reply via email to

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