texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Mon, 28 Nov 2022 06:11:55 -0500 (EST)

branch: master
commit 6160e216dcf8e193de1cd8c1613eade3b248f942
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Nov 28 11:57:56 2022 +0100

    * maintain/check_back_xml_forth_texi_t.sh: script to test conversion
    of tp/t/*.t Texinfo code to Texinfo XML and back to Texinfo to detect
    issues with Texinfo XML conversion and conversion back to Texinfo.
---
 ChangeLog                                  |  6 +++++
 tp/maintain/check_back_xml_forth_texi_t.sh | 37 ++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 64be250273..9dd1c2646d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,12 @@
        It's not needed, and it triggers an eslint complaint,
        because parameter default values were new in EcmaScript 6 (2015).
 
+2022-11-27  Patrice Dumas  <pertusus@free.fr>
+
+       * maintain/check_back_xml_forth_texi_t.sh: script to test conversion
+       of tp/t/*.t Texinfo code to Texinfo XML and back to Texinfo to detect
+       issues with Texinfo XML conversion and conversion back to Texinfo.
+
 2022-11-27  Patrice Dumas  <pertusus@free.fr>
 
        * util/txixml2texi.pl: skip a comment after <columnfractions> as
diff --git a/tp/maintain/check_back_xml_forth_texi_t.sh 
b/tp/maintain/check_back_xml_forth_texi_t.sh
new file mode 100755
index 0000000000..a7ded4d057
--- /dev/null
+++ b/tp/maintain/check_back_xml_forth_texi_t.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+
+#set -e
+
+mdir=check_back_xml_forth_texi
+
+echo "generate t directory Texinfo files"
+./maintain/all_tests.sh texis > $mdir/all_tests_texis.log
+export XML_CATALOG_FILES=./maintain/catalog.xml
+rm -rf $mdir/backforth_xmltexi $mdir/backforth_checktexi 
$mdir/backforth_plaintexi $mdir/backforth_logs
+mkdir -p $mdir/backforth_logs
+for dir in `find t_texis/ -type d` ; do
+  bdir=`echo $dir | sed 's;t_texis/;;'`
+  if test z"$bdir" = 'z' ; then
+    # for the t_texis/ directory
+    continue
+  fi
+  echo "doing $bdir"
+  mkdir -p $mdir/backforth_plaintexi/$bdir $mdir/backforth_xmltexi/$bdir 
$mdir/backforth_checktexi/$bdir
+  (
+  for file in $dir/*.texi; do
+    echo "    -> $file: plaintexinfo"
+    bfile=`basename $file .texi`
+    ./texi2any.pl -c TEXINFO_OUTPUT_FORMAT=plaintexinfo --ifxml --no-ifinfo 
--force --error=100000 -o $mdir/backforth_plaintexi/$bdir/$bfile.texi $file
+    echo "              Texinfo XML"
+    ./texi2any.pl --xml --force --error=100000 -o 
$mdir/backforth_xmltexi/$bdir/ $file
+    echo "              Back"
+    ../util/txixml2texi.pl $mdir/backforth_xmltexi/$bdir/$bfile.xml > 
$mdir/backforth_checktexi/$bdir/$bfile.texi
+  done
+  ) > $mdir/backforth_logs/$bdir.log 2>&1 
+done
+
+diff -u -r t_texis/ $mdir/backforth_checktexi/ > $mdir/orig_texi.diff
+diff -u -r $mdir/backforth_plaintexi/ $mdir/backforth_checktexi/ > 
$mdir/plain_texi.diff
+
+# grep --color 'parser error' check_back_xml_forth_texi/backforth_logs/*
+



reply via email to

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