texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/TextContent.pm (_convert): u


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/TextContent.pm (_convert): use a fixed string for @today if TEST is set.
Date: Fri, 10 Sep 2021 03:21:46 -0400

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 fa85ebb  * tp/Texinfo/Convert/TextContent.pm (_convert): use a fixed 
string for @today if TEST is set.
fa85ebb is described below

commit fa85ebb4b2509259cb9b2038fa5603aec4352f69
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Sep 10 09:21:37 2021 +0200

    * tp/Texinfo/Convert/TextContent.pm (_convert): use a fixed string for
    @today if TEST is set.
---
 ChangeLog                                                |  5 +++++
 tp/Texinfo/Convert/TextContent.pm                        |  3 +++
 .../layout/res_parser/formatting_textcontent/formatting  | 16 ++++++++--------
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 97ea384..5b980ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2021-09-10  Patrice Dumas  <pertusus@free.fr>
 
+       * tp/Texinfo/Convert/TextContent.pm (_convert): use a fixed string for
+       @today if TEST is set.
+
+2021-09-10  Patrice Dumas  <pertusus@free.fr>
+
        * tp/Texinfo/Common.pm (debug_print_element_short,
        debug_print_element, debug_print_element_details),
        tp/Texinfo/Convert/Converter.pm (present_bug_message):
diff --git a/tp/Texinfo/Convert/TextContent.pm 
b/tp/Texinfo/Convert/TextContent.pm
index 859e24e..4bbb8b8 100644
--- a/tp/Texinfo/Convert/TextContent.pm
+++ b/tp/Texinfo/Convert/TextContent.pm
@@ -122,6 +122,9 @@ sub _convert($$)
     if (exists($Texinfo::Common::no_brace_commands{$element->{'cmdname'}})) {
       return $Texinfo::Common::no_brace_commands{$element->{'cmdname'}};
     } elsif ($element->{'cmdname'} eq 'today') {
+      if ($self->get_conf('TEST')) {
+        return 'a sunny day';
+      }
       my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
         = localtime(time);
       $year += ($year < 70) ? 2000 : 1900;
diff --git a/tp/tests/layout/res_parser/formatting_textcontent/formatting 
b/tp/tests/layout/res_parser/formatting_textcontent/formatting
index 15b2c1c..69c9e05 100644
--- a/tp/tests/layout/res_parser/formatting_textcontent/formatting
+++ b/tp/tests/layout/res_parser/formatting_textcontent/formatting
@@ -87,7 +87,7 @@ but , ,
 @point -!-
 @print -|
 @result =>
-@today September 9, 2021
+@today a sunny day
 
 @aa aa
 @AA AA
@@ -228,7 +228,7 @@ u" U" n~ a^ e' o= i` e' i j E=`
 a( a_ .a a< a; ahl
 
         ! ? . @ } { 
-September 9, 2021
+a sunny day
 
 ->
 0075
@@ -807,7 +807,7 @@ but , ,
 @point -!-
 @print -|
 @result =>
-@today September 9, 2021
+@today a sunny day
 
 @aa aa
 @AA AA
@@ -948,7 +948,7 @@ u" U" n~ a^ e' o= i` e' i j E=`
 a( a_ .a a< a; ahl
 
         ! ? . @ } { 
-September 9, 2021
+a sunny day
 
 ->
 0075
@@ -1549,7 +1549,7 @@ but , ,
 @point -!-
 @print -|
 @result =>
-@today September 9, 2021
+@today a sunny day
 
 @aa aa
 @AA AA
@@ -1690,7 +1690,7 @@ u" U" n~ a^ e' o= i` e' i j E=`
 a( a_ .a a< a; ahl
 
         ! ? . @ } { 
-September 9, 2021
+a sunny day
 
 ->
 0075
@@ -2269,7 +2269,7 @@ but , ,
 @point -!-
 @print -|
 @result =>
-@today September 9, 2021
+@today a sunny day
 
 @aa aa
 @AA AA
@@ -2410,7 +2410,7 @@ u" U" n~ a^ e' o= i` e' i j E=`
 a( a_ .a a< a; ahl
 
         ! ? . @ } { 
-September 9, 2021
+a sunny day
 
 ->
 0075



reply via email to

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