On Mon, May 30, 2022 at 11:48:22AM +0200, Patrice Dumas wrote: > On Sun, May 29, 2022 at 02:08:42PM +0100, Gavin Smith wrote: > > On Fri, Mar 4, 2022 at 7:22 AM Patrice Dumas <[email protected]> wrote: > > > Also do not hesitate to propose other names for those customization > > > variables. > > > > Another issue (I can't remember if I emailed you before about this) is > > the locale settings to run the test suites. You changed it from "C" to > > "C.UTF-8", but the latter encoding doesn't exist everywhere. I changed > > it to "en_US.UTF-8" (see ChangeLog entries on 2022-04-14) but this > > won't exist everywhere either. Perhaps we should find some way of > > keeping the test suite under the "C" locale, perhaps disabling or > > conditionalizing tests that require a UTF-8 locale. > > Some tests need this either to have expected error messages, or > more fundamentaly for input file names decoding. I can propose > something similar with 'Need recoded file names' with a dummy set > on the test command line.
Could some of this be fixed with customization variables added to the tests? For example, when I change the test locale from en_US.UTF-8 to C I get a test failure D: formatting//diffs/cpp_lines.diff (printed below) diff -a -u -r ./formatting//res_parser/cpp_lines/cpp_lines.2 formatting//out_parser/cpp_lines/cpp_lines.2 --- ./formatting//res_parser/cpp_lines/cpp_lines.2 2022-05-08 12:15:31.299018608 +0100 +++ formatting//out_parser/cpp_lines/cpp_lines.2 2022-05-30 18:40:08.891160191 +0100 @@ -1,3 +1,3 @@ g_f:74: @include: could not find file_with_cpp_lines.texi -accentêd:7: warning: làng is not a valid language code +accentêd:7: warning: l?ng is not a valid language code cpp_lines.texi: warning: must specify a title with a title command or @top D: formatting//diffs/cpp_lines.diff (printed above) but the test passes with the following change: diff --git a/tp/tests/formatting/list-of-tests b/tp/tests/formatting/list-of-tests index 8965ca597c..a9a7df1555 100644 --- a/tp/tests/formatting/list-of-tests +++ b/tp/tests/formatting/list-of-tests @@ -12,7 +12,7 @@ documentlanguage_cmdline documentlanguage.texi --document-language=fr # already tested in t/*.t, but here want to have a result with # accented characters in error messages -cpp_lines ../../t/input_files/cpp_lines.texi +cpp_lines ../../t/input_files/cpp_lines.texi -c MESSAGE_ENCODING=UTF-8 # some command-line arguments when incorrect cause texi2any to die. # easily tested by calling directly ./texi2any.pl and checking visually: diff --git a/tp/tests/run_parser_all.sh b/tp/tests/run_parser_all.sh index 3054ba010f..e29a89ee1f 100755 --- a/tp/tests/run_parser_all.sh +++ b/tp/tests/run_parser_all.sh @@ -126,8 +126,8 @@ post_process_output () fi } -LC_ALL=en_US.UTF-8; export LC_ALL -LANGUAGE=en_US.UTF-8; export LANGUAGE +LC_ALL=C; export LC_ALL +LANGUAGE=en; export LANGUAGE prepended_command= #prepended_command=time I'm going to try to see if some of the other tests can be made to pass the same way. > > How can the existence of "en_US.UTF-8" be tested? > > -- > Pat
