texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sat, 15 Jul 2023 10:11:15 -0400 (EDT)

branch: master
commit 426cfc5265929ea8709c159b9bce850c31b83d6b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Jul 15 16:11:01 2023 +0200

    * tp/Makefile.tres, tp/t/formats_encodings.t: add
    accent_argument_non_ascii test.  Set it to be skipped as the result is
    incorrect with the XS parser for now.
---
 ChangeLog                     | 6 ++++++
 tp/Makefile.tres              | 1 +
 tp/Texinfo/Convert/Unicode.pm | 2 ++
 tp/t/accents.t                | 2 +-
 tp/t/formats_encodings.t      | 9 +++++++++
 5 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index ea515a264a..379d088f49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-07-15  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Makefile.tres, tp/t/formats_encodings.t: add
+       accent_argument_non_ascii test.  Set it to be skipped as the result is
+       incorrect with the XS parser for now.
+
 2023-07-15  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/Plaintext.pm (_convert): avoid undef warning
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index 9e3ef98707..6feb24da43 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -484,6 +484,7 @@ test_files_generated_list = 
$(test_tap_files_generated_list) \
   t/results/float/simple.pl \
   t/results/float/special_characters_in_float_type.pl \
   t/results/formats_encodings/accent.pl \
+  t/results/formats_encodings/accent_argument_non_ascii.pl \
   t/results/formats_encodings/accent_enable_encoding.pl \
   t/results/formats_encodings/accentenc.pl \
   t/results/formats_encodings/accentenc_enable_encoding.pl \
diff --git a/tp/Texinfo/Convert/Unicode.pm b/tp/Texinfo/Convert/Unicode.pm
index c5e902ba41..18341f8fd9 100644
--- a/tp/Texinfo/Convert/Unicode.pm
+++ b/tp/Texinfo/Convert/Unicode.pm
@@ -1300,6 +1300,8 @@ sub unicode_accent($$)
   if (defined($unicode_diacritics{$accent})) {
     my $diacritic = chr(hex($unicode_diacritics{$accent}));
     if ($accent ne 'tieaccent') {
+      # FIXME with a malformed string, there can be an infinite loop
+      # in Unicode::Normalize::NFC.
       return Unicode::Normalize::NFC($text . $diacritic);
     } else {
       # tieaccent diacritic is naturally and correctly composed
diff --git a/tp/t/accents.t b/tp/t/accents.t
index c18d183659..8cccc715d7 100644
--- a/tp/t/accents.t
+++ b/tp/t/accents.t
@@ -151,7 +151,7 @@ sub chrx(@)
   return $result;
 }
 
-# some come from encodings/weird_accents.texi
+# some come from t/formats_encodings.t weird_accents
 # the results correspond to:
 #  8bit, XML named entity fallback to numeric, XML numeric entity, utf8
 foreach my $test (
diff --git a/tp/t/formats_encodings.t b/tp/t/formats_encodings.t
index 4e0b129d22..8ba91c845b 100644
--- a/tp/t/formats_encodings.t
+++ b/tp/t/formats_encodings.t
@@ -326,6 +326,15 @@ $accents_text
 ['accent_enable_encoding',
 $accents_text, {'ENABLE_ENCODING' => 1}, {'OUTPUT_CHARACTERS' => 1}
 ],
+['accent_argument_non_ascii',
+'@node Top
+@top top
+
+@node chap
+@chapter Chapter
+'."\@'{\x{00EA}}
+\@'\x{00EA}
+", {'skip' => 'without braces malformed utf8 in XS parser see FIXME what if 
the next character is not ASCII?'}],
 # numerous LaTeX formatting errors
 ['at_commands_in_refs',
 $at_commands_in_refs_text, 



reply via email to

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