You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2019/01/25 23:09:00 UTC

svn commit: r1852189 - /httpd/test/framework/trunk/t/modules/include.t

Author: rjung
Date: Fri Jan 25 23:09:00 2019
New Revision: 1852189

URL: http://svn.apache.org/viewvc?rev=1852189&view=rev
Log:
Fix mod_include test on systems that do not
support strftime format '%s' (eg. Solaris 10).

Modified:
    httpd/test/framework/trunk/t/modules/include.t

Modified: httpd/test/framework/trunk/t/modules/include.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/include.t?rev=1852189&r1=1852188&r2=1852189&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/include.t (original)
+++ httpd/test/framework/trunk/t/modules/include.t Fri Jan 25 23:09:00 2019
@@ -311,6 +311,10 @@ unless(eval "require POSIX") {
 else {
     # use DateTime and avoid the system locale messing things up
     use DateTime;
+    # Only for checking, whether system strftime supports %s
+    use POSIX;
+    my $strftime_gnu = (POSIX::strftime("%s", gmtime()) eq '%s' ? 0 : 1);
+
     my $result = super_chomp(GET_BODY "${dir}file.shtml");
     $result = single_space($result);
 
@@ -325,8 +329,8 @@ else {
     my $expected = join ' ' =>
         $dt->strftime("%A, %B %e, %G"),
         $dt->strftime("%A, %B %e, %G"),
-        $dt->strftime("%s"),
-        $dt->strftime("%s");
+        $strftime_gnu ? $dt->strftime("%s") : '%s',
+        $strftime_gnu ? $dt->strftime("%s") : '%s';
 
     # trim output
     $expected = single_space($expected);