[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/tests/many_input_files/Makefile.am (EXTRA_DI
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/tests/many_input_files/Makefile.am (EXTRA_DIST, TESTS) (tests_dirs), tp/tests/many_input_files/first_file_not_found.sh: add a test with two files with the first one not existing. |
Date: |
Sat, 16 Nov 2024 10:00:44 -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 50173be418 * tp/tests/many_input_files/Makefile.am (EXTRA_DIST, TESTS)
(tests_dirs), tp/tests/many_input_files/first_file_not_found.sh: add a test
with two files with the first one not existing.
50173be418 is described below
commit 50173be418abef246e1083610a01f3e2bec6ae5d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Nov 16 16:00:37 2024 +0100
* tp/tests/many_input_files/Makefile.am (EXTRA_DIST, TESTS)
(tests_dirs), tp/tests/many_input_files/first_file_not_found.sh: add a
test with two files with the first one not existing.
---
.gitignore | 1 +
ChangeLog | 6 ++
tp/tests/many_input_files/Makefile.am | 7 +-
tp/tests/many_input_files/first_file_not_found.sh | 75 ++++++++++++++++++++++
.../first_file_not_found.2 | 1 +
.../first_file_not_found_res/simplest.info | 23 +++++++
.../stdout_first_file_not_found.out | 0
7 files changed, 110 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index 99e926052f..e432257e75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -278,6 +278,7 @@ tp/tests/built_input
tp/tests/many_input_files/different_encodings
tp/tests/many_input_files/different_languages_gen_master_menu
+tp/tests/many_input_files/first_file_not_found
tp/tests/many_input_files/for_nbspaces_different_encodings
tp/tests/many_input_files/input_dir_non_ascii
tp/tests/many_input_files/output_dir_non_ascii
diff --git a/ChangeLog b/ChangeLog
index 0a259bcd00..2bcb4dc8f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-16 Patrice Dumas <pertusus@free.fr>
+
+ * tp/tests/many_input_files/Makefile.am (EXTRA_DIST, TESTS)
+ (tests_dirs), tp/tests/many_input_files/first_file_not_found.sh: add a
+ test with two files with the first one not existing.
+
2024-11-16 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/parsetexi/indices.c (init_index_commands),
diff --git a/tp/tests/many_input_files/Makefile.am
b/tp/tests/many_input_files/Makefile.am
index d31ab408d8..1c65da40d6 100644
--- a/tp/tests/many_input_files/Makefile.am
+++ b/tp/tests/many_input_files/Makefile.am
@@ -10,7 +10,8 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
EXTRA_DIST = $(TESTS) \
- tex_l2h_res tex_t4ht_res different_encodings_res
different_languages_gen_master_menu_res \
+ first_file_not_found_res tex_l2h_res tex_t4ht_res \
+ different_encodings_res different_languages_gen_master_menu_res \
input_dir_non_ascii_res output_dir_non_ascii_res \
output_dir_file_non_ascii_res tex_t4ht_output_dir_non_ascii_res \
tex_l2h_output_dir_non_ascii_res \
@@ -18,7 +19,7 @@ EXTRA_DIST = $(TESTS) \
input_files/no_master_menu_no_documentlanguage.texi \
input_files/simple_including_file.texi
-TESTS = tex_l2h.sh tex_t4ht.sh \
+TESTS = first_file_not_found.sh tex_l2h.sh tex_t4ht.sh \
different_encodings.sh different_languages_gen_master_menu.sh \
for_nbspaces_different_encodings.sh \
input_dir_non_ascii.sh output_dir_non_ascii.sh \
@@ -31,7 +32,7 @@ tex_html_dirs = tex_l2h tex_t4ht
tex_t4ht_output_dir_non_ascii \
tex_l2h_output_dir_non_ascii
tests_dirs = different_encodings different_languages_gen_master_menu \
- for_nbspaces_different_encodings \
+ first_file_not_found for_nbspaces_different_encodings \
input_dir_non_ascii output_dir_non_ascii output_dir_file_non_ascii
tex-html-checks: all
diff --git a/tp/tests/many_input_files/first_file_not_found.sh
b/tp/tests/many_input_files/first_file_not_found.sh
new file mode 100755
index 0000000000..e1621b1301
--- /dev/null
+++ b/tp/tests/many_input_files/first_file_not_found.sh
@@ -0,0 +1,75 @@
+#! /bin/sh
+#
+# Copyright 2022-2024 Free Software Foundation, Inc.
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Originally written by Patrice Dumas.
+
+LC_ALL=C; export LC_ALL
+
+basename=first_file_not_found
+diffs_dir=diffs
+raw_output_dir=raw_out
+logfile=$basename.log
+stdout_file=stdout_$basename.out
+prepended_command=
+
+[ "z$srcdir" = 'z' ] && srcdir=.
+
+. ../../defs || exit 1
+
+[ -d $diffs_dir ] || mkdir $diffs_dir
+staging_dir=$diffs_dir/staging
+[ -d $staging_dir ] || mkdir $staging_dir
+[ -d $raw_output_dir ] || mkdir $raw_output_dir
+
+echo "$basename" > $logfile
+
+[ -d $basename ] && rm -rf $basename
+raw_outdir=$raw_output_dir/$basename
+[ -d $raw_outdir ] && rm -rf $raw_outdir
+mkdir $basename
+: > $basename/$stdout_file
+set -x
+cmd="$prepended_command $PERL -I $srcdir/../.. -w $srcdir/../../texi2any.pl
--set-customization-variable 'TEST 1' --out $basename/ file_not_existing.texi
$srcdir/../formatting/simplest.texi --force >> $basename/$stdout_file
2>$basename/${basename}.2"
+echo "$cmd" >> $logfile
+eval $cmd
+
+return_code=0
+ret=$?
+if [ $ret != 0 ]; then
+ echo "F: $basename/$basename.2"
+ return_code=1
+else
+ outdir=$basename
+ cp -pr $outdir $raw_output_dir
+ find "${outdir}" | $PERL ${srcdir}/../escape_file_names.pl
+
+ dir=$basename
+ if [ -d "$srcdir/${dir}_res" ]; then
+ rm -rf $staging_dir/${dir}_res
+ cp -pr "$srcdir/${dir}_res" $staging_dir
+ chmod -R u+w "$staging_dir/${dir}_res"
+ diff $DIFF_OPTIONS -r "$staging_dir/${dir}_res" "$outdir" 2>>$logfile >
"$diffs_dir/$dir.diff"
+ dif_ret=$?
+ if [ $dif_ret != 0 ]; then
+ echo "D: $diffs_dir/$dir.diff"
+ return_code=1
+ else
+ rm "$diffs_dir/$dir.diff"
+ fi
+ else
+ echo "no res: ${dir}_res"
+ fi
+fi
+
+rm -rf $tmp_dir
+
+exit $return_code
diff --git
a/tp/tests/many_input_files/first_file_not_found_res/first_file_not_found.2
b/tp/tests/many_input_files/first_file_not_found_res/first_file_not_found.2
new file mode 100644
index 0000000000..14f6947990
--- /dev/null
+++ b/tp/tests/many_input_files/first_file_not_found_res/first_file_not_found.2
@@ -0,0 +1 @@
+could not open file_not_existing.texi: No such file or directory
diff --git a/tp/tests/many_input_files/first_file_not_found_res/simplest.info
b/tp/tests/many_input_files/first_file_not_found_res/simplest.info
new file mode 100644
index 0000000000..53e0248258
--- /dev/null
+++ b/tp/tests/many_input_files/first_file_not_found_res/simplest.info
@@ -0,0 +1,23 @@
+This is simplest.info, produced by texi2any version from simplest.texi.
+
+
+File: simplest.info, Node: Top, Up: (dir)
+
+top section
+***********
+
+1 Chapter
+*********
+
+This is a very simple texi manual <>.
+
+
+Tag Table:
+Node: Top73
+
+End Tag Table
+
+
+Local Variables:
+coding: utf-8
+End:
diff --git
a/tp/tests/many_input_files/first_file_not_found_res/stdout_first_file_not_found.out
b/tp/tests/many_input_files/first_file_not_found_res/stdout_first_file_not_found.out
new file mode 100644
index 0000000000..e69de29bb2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/tests/many_input_files/Makefile.am (EXTRA_DIST, TESTS) (tests_dirs), tp/tests/many_input_files/first_file_not_found.sh: add a test with two files with the first one not existing.,
Patrice Dumas <=