texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp Texinfo/Convert/Text.pm Texinfo/Conv...


From: Patrice Dumas
Subject: texinfo/tp Texinfo/Convert/Text.pm Texinfo/Conv...
Date: Thu, 29 Sep 2011 22:07:01 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/09/29 22:07:01

Modified files:
        tp/Texinfo/Convert: Text.pm Unicode.pm 
        tp/t           : accents.t html_tests.t 
        tp/t/results/coverage: accents_errors.pl 
                               at_after_accent_command.pl 
        tp/t/results/plaintext_tests: invalid_accent_punctuation.pl 
        tp/t/results/value: value_after_accent.pl 

Log message:
        Format accent command without arguments.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Text.pm?cvsroot=texinfo&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Unicode.pm?cvsroot=texinfo&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/accents.t?cvsroot=texinfo&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/html_tests.t?cvsroot=texinfo&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/accents_errors.pl?cvsroot=texinfo&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/coverage/at_after_accent_command.pl?cvsroot=texinfo&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/plaintext_tests/invalid_accent_punctuation.pl?cvsroot=texinfo&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/t/results/value/value_after_accent.pl?cvsroot=texinfo&r1=1.18&r2=1.19

Patches:
Index: Texinfo/Convert/Text.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Text.pm,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- Texinfo/Convert/Text.pm     29 Sep 2011 20:13:07 -0000      1.69
+++ Texinfo/Convert/Text.pm     29 Sep 2011 22:06:59 -0000      1.70
@@ -196,8 +196,6 @@
   my $encoding = shift;
   my $in_upper_case = shift;
   
-  return '' if (!$accent->{'args'});
-
   my ($contents, $stack)
       = Texinfo::Common::find_innermost_accent_contents($accent);
 

Index: Texinfo/Convert/Unicode.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Unicode.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- Texinfo/Convert/Unicode.pm  29 Sep 2011 20:13:07 -0000      1.19
+++ Texinfo/Convert/Unicode.pm  29 Sep 2011 22:06:59 -0000      1.20
@@ -1334,8 +1334,10 @@
       my $command = 'TEXT';
       $command = $results_stack[0]->[1]->{'cmdname'} 
         if ($results_stack[0]->[1]);
+      my $new_eight_bit_txt = 'UNDEF';
+      $new_eight_bit_txt = $new_eight_bit if (defined($new_eight_bit));
       print STDERR "" . Encode::encode('utf8', $char) 
-        . " ($command) new_codepoint: $new_codepoint 8bit: $new_eight_bit old: 
$eight_bit\n";
+        . " ($command) new_codepoint: $new_codepoint 8bit: $new_eight_bit_txt 
old: $eight_bit\n";
     }
 
     # no corresponding eight bit character found for a composed character

Index: t/accents.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/accents.t,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- t/accents.t 29 Sep 2011 20:13:07 -0000      1.15
+++ t/accents.t 29 Sep 2011 22:06:59 -0000      1.16
@@ -92,9 +92,9 @@
     Texinfo::Common::find_innermost_accent_contents($tree);
   $text = Texinfo::Convert::Text::convert({'contents' => $contents},
                                {'enabled_encoding' => 'utf-8'});
-
   my $result_unicode = Texinfo::Convert::Unicode::unicode_accents($text, 
               $commands_stack, \&Texinfo::Convert::Text::ascii_accent);
+
   if (defined($reference)) {
     #ok (Encode::decode('iso-8859-1', $reference) eq $result, $name);
     #ok ($reference eq Encode::encode('iso-8859-1', $result), $name);

Index: t/html_tests.t
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/html_tests.t,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- t/html_tests.t      16 Aug 2011 22:07:20 -0000      1.7
+++ t/html_tests.t      29 Sep 2011 22:07:00 -0000      1.8
@@ -112,6 +112,21 @@
 ],
 );
 
+# problem is that the result is code with accented letters,
+# it may not come out right.  So this test is left unused for now.
+# Also could be in converters_tests
+my @todo = (
+['enable_encoding',
+'@documentencoding utf-8
+
address@hidden
address@hidden
address@hidden @address@hidden @dotless{i}.
address@hidden
address@hidden@AA{} @address@hidden @dotless{i}}.
+',{}, {'ENABLE_ENCODING' => 1}]
+);
+
 foreach my $test (@test_cases) {
   $test->[2]->{'test_formats'} = ['html'];
 }

Index: t/results/coverage/accents_errors.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/coverage/accents_errors.pl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- t/results/coverage/accents_errors.pl        9 Jul 2011 06:35:39 -0000       
1.8
+++ t/results/coverage/accents_errors.pl        29 Sep 2011 22:07:00 -0000      
1.9
@@ -177,13 +177,13 @@
 ';
 
 
-$result_texts{'accents_errors'} = 'accent at end of line 
-accent at end of line and spaces 
-accent followed by @ .
+$result_texts{'accents_errors'} = 'accent at end of line *
+accent at end of line and spaces *
+accent followed by @ *.
 
-accent character with spaces  following.
-accent character at end of line 
-accent character followed by @ .
+accent character with spaces ~ following.
+accent character at end of line ~
+accent character followed by @ ~.
 ';
 
 $result_errors{'accents_errors'} = [

Index: t/results/coverage/at_after_accent_command.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/coverage/at_after_accent_command.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- t/results/coverage/at_after_accent_command.pl       12 Sep 2011 23:39:15 
-0000      1.5
+++ t/results/coverage/at_after_accent_command.pl       29 Sep 2011 22:07:00 
-0000      1.6
@@ -58,7 +58,7 @@
 ';
 
 
-$result_texts{'at_after_accent_command'} = '@. @.
+$result_texts{'at_after_accent_command'} = 'address@hidden address@hidden
 ';
 
 $result_errors{'at_after_accent_command'} = [
@@ -84,7 +84,7 @@
 
 
 
-$result_converted{'plaintext'}->{'at_after_accent_command'} = '@.  @.
+$result_converted{'plaintext'}->{'at_after_accent_command'} = 'address@hidden  
address@hidden
 ';
 
 

Index: t/results/plaintext_tests/invalid_accent_punctuation.pl
===================================================================
RCS file: 
/sources/texinfo/texinfo/tp/t/results/plaintext_tests/invalid_accent_punctuation.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- t/results/plaintext_tests/invalid_accent_punctuation.pl     3 Jul 2011 
14:51:01 -0000       1.4
+++ t/results/plaintext_tests/invalid_accent_punctuation.pl     29 Sep 2011 
22:07:00 -0000      1.5
@@ -37,7 +37,7 @@
 $result_texis{'invalid_accent_punctuation'} = 'a. @^@@';
 
 
-$result_texts{'invalid_accent_punctuation'} = 'a. @';
+$result_texts{'invalid_accent_punctuation'} = 'a. ^@';
 
 $result_errors{'invalid_accent_punctuation'} = [
   {
@@ -53,7 +53,7 @@
 
 
 
-$result_converted{'plaintext'}->{'invalid_accent_punctuation'} = 'a.  @
+$result_converted{'plaintext'}->{'invalid_accent_punctuation'} = 'a.  ^@
 ';
 
 1;

Index: t/results/value/value_after_accent.pl
===================================================================
RCS file: /sources/texinfo/texinfo/tp/t/results/value/value_after_accent.pl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- t/results/value/value_after_accent.pl       3 Jul 2011 14:51:03 -0000       
1.18
+++ t/results/value/value_after_accent.pl       29 Sep 2011 22:07:00 -0000      
1.19
@@ -72,8 +72,8 @@
 @~a';
 
 
-$result_texts{'value_after_accent'} = 'a
-a';
+$result_texts{'value_after_accent'} = '*a
+~a';
 
 $result_errors{'value_after_accent'} = [
   {



reply via email to

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