iliaa           Mon Aug 18 18:57:50 2003 EDT

  Modified files:              
    /php-src/ext/bz2/tests      with_strings.phpt 
    /php-src/ext/mcrypt/tests   blowfish.phpt 
    /php-src/ext/posix  posix.c 
    /php-src/ext/standard       parsedate.y 
    /php-src/ext/standard/tests/array   001.phpt 002.phpt 003.phpt 
                                        array_search.phpt 
    /php-src/ext/standard/tests/file    bug20424.phpt 
    /php-src/ext/standard/tests/math    abs.phpt pow.phpt round.phpt 
    /php-src/ext/standard/tests/strings trim.phpt wordwrap.phpt 
  Log:
  Fixed paths in various tests. In certain conditions usage of partial file
  paths results in test failures.
  
  
Index: php-src/ext/bz2/tests/with_strings.phpt
diff -u php-src/ext/bz2/tests/with_strings.phpt:1.1 
php-src/ext/bz2/tests/with_strings.phpt:1.2
--- php-src/ext/bz2/tests/with_strings.phpt:1.1 Sat May 17 10:27:07 2003
+++ php-src/ext/bz2/tests/with_strings.phpt     Mon Aug 18 18:57:49 2003
@@ -5,7 +5,7 @@
 --POST--
 --GET--
 --FILE--
-<?php // $Id: with_strings.phpt,v 1.1 2003/05/17 14:27:07 sterling Exp $
+<?php // $Id: with_strings.phpt,v 1.2 2003/08/18 22:57:49 iliaa Exp $
 
 error_reporting(E_ALL);
 
@@ -23,7 +23,7 @@
  \$blaat === \$blaat2
 TESTS;
 
- include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../tests/quicktester.inc');
 
 --EXPECT--
 OK
Index: php-src/ext/mcrypt/tests/blowfish.phpt
diff -u php-src/ext/mcrypt/tests/blowfish.phpt:1.1 
php-src/ext/mcrypt/tests/blowfish.phpt:1.2
--- php-src/ext/mcrypt/tests/blowfish.phpt:1.1  Tue Oct  8 06:00:52 2002
+++ php-src/ext/mcrypt/tests/blowfish.phpt      Mon Aug 18 18:57:49 2003
@@ -13,7 +13,7 @@
 
 print "key               plain             crypt             guess             
stat\n";
 $null = "\0\0\0\0\0\0\0\0";
-$vectors = file("ext/mcrypt/tests/vectors.txt");
+$vectors = file(dirname(__FILE__) . "/vectors.txt");
 
 $td = mcrypt_module_open ("blowfish", "", MCRYPT_MODE_ECB, "");
 
Index: php-src/ext/posix/posix.c
diff -u php-src/ext/posix/posix.c:1.57 php-src/ext/posix/posix.c:1.58
--- php-src/ext/posix/posix.c:1.57      Sat Jul 19 15:23:32 2003
+++ php-src/ext/posix/posix.c   Mon Aug 18 18:57:49 2003
@@ -16,24 +16,25 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: posix.c,v 1.57 2003/07/19 19:23:32 andrey Exp $ */
+/* $Id: posix.c,v 1.58 2003/08/18 22:57:49 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include "php.h"
+#include <unistd.h>
 #include "ext/standard/info.h"
 #include "ext/standard/php_string.h"
 #include "php_posix.h"
 
+
 #if HAVE_POSIX
 
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 
-#include <unistd.h>
 #include <sys/resource.h>
 #include <sys/utsname.h>
 #include <sys/types.h>
@@ -130,7 +131,7 @@
 static PHP_MINFO_FUNCTION(posix)
 {
        php_info_print_table_start();
-       php_info_print_table_row(2, "Revision", "$Revision: 1.57 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.58 $");
        php_info_print_table_end();
 }
 /* }}} */
Index: php-src/ext/standard/parsedate.y
diff -u php-src/ext/standard/parsedate.y:1.39 php-src/ext/standard/parsedate.y:1.40
--- php-src/ext/standard/parsedate.y:1.39       Sun Aug 17 07:49:18 2003
+++ php-src/ext/standard/parsedate.y    Mon Aug 18 18:57:49 2003
@@ -8,7 +8,7 @@
 **  This code is in the public domain and has no copyright.
 */
 
-/* $Id: parsedate.y,v 1.39 2003/08/17 11:49:18 derick Exp $ */
+/* $Id: parsedate.y,v 1.40 2003/08/18 22:57:49 iliaa Exp $ */
 
 #include "php.h"
 
@@ -419,6 +419,9 @@
            ((struct date_yy *)parm)->yyRelSeconds += $1;
        }
        ;
+number : tUNUMBER tUNUMBER {
+       printf("%d %d\n", $1, $2);
+}
 
 number : tUNUMBER
           {
@@ -428,12 +431,25 @@
              ((struct date_yy *)parm)->yyYear = $1;
            else
              {
+               printf("%ull\n", $1);
                if ($1>10000)
                  {
-                   ((struct date_yy *)parm)->yyHaveDate++;
-                   ((struct date_yy *)parm)->yyDay= ($1)%100;
-                   ((struct date_yy *)parm)->yyMonth= ($1/100)%100;
-                   ((struct date_yy *)parm)->yyYear = $1/10000;
+                       if ($1 > 99999999) {
+                               /* YYYYMMDDHHMMSS */
+                               ((struct date_yy *)parm)->yySeconds = ($1)%100;
+                               ((struct date_yy *)parm)->yyMinutes = ($1/100)%100;
+                               ((struct date_yy *)parm)->yyHour = ($1/10000)%10000;
+                               ((struct date_yy *)parm)->yyDay = ($1/1000000)%1000000;
+                               ((struct date_yy *)parm)->yyMonth = 
($1/100000000)%10000000;
+                               printf("%d:%d:%d", ((struct date_yy *)parm)->yyHour, 
((struct date_yy *)parm)->yyMinutes, ((struct date_yy *)parm)->yySeconds);
+/*                             ((struct date_yy *)parm)->yyYear = $1/10000000000; */
+                               ((struct date_yy *)parm)->yyHaveDate++;
+                       } else {
+                           ((struct date_yy *)parm)->yyHaveDate++;
+                           ((struct date_yy *)parm)->yyDay= ($1)%100;
+                           ((struct date_yy *)parm)->yyMonth= ($1/100)%100;
+                           ((struct date_yy *)parm)->yyYear = $1/10000;
+                       }
                  }
                else
                  {
Index: php-src/ext/standard/tests/array/001.phpt
diff -u php-src/ext/standard/tests/array/001.phpt:1.7 
php-src/ext/standard/tests/array/001.phpt:1.8
--- php-src/ext/standard/tests/array/001.phpt:1.7       Wed Aug 13 06:40:28 2003
+++ php-src/ext/standard/tests/array/001.phpt   Mon Aug 18 18:57:49 2003
@@ -6,7 +6,7 @@
 precision=14
 --FILE--
 <?php
-require('ext/standard/tests/array/data.inc');
+require(dirname(__FILE__) . '/data.inc');
 /*
 ** Create sample arrays
 ** Test alpha, numeric (decimal, hex, octal) and special data
Index: php-src/ext/standard/tests/array/002.phpt
diff -u php-src/ext/standard/tests/array/002.phpt:1.5 
php-src/ext/standard/tests/array/002.phpt:1.6
--- php-src/ext/standard/tests/array/002.phpt:1.5       Mon Aug 11 19:55:46 2003
+++ php-src/ext/standard/tests/array/002.phpt   Mon Aug 18 18:57:49 2003
@@ -4,7 +4,7 @@
 precision=14
 --FILE--
 <?php
-require('ext/standard/tests/array/data.inc');
+require(dirname(__FILE__) . '/data.inc');
 
 function test_sort ($sort_function, $data) {
     echo "\n -- Testing $sort_function() -- \n";
Index: php-src/ext/standard/tests/array/003.phpt
diff -u php-src/ext/standard/tests/array/003.phpt:1.6 
php-src/ext/standard/tests/array/003.phpt:1.7
--- php-src/ext/standard/tests/array/003.phpt:1.6       Mon Aug 11 19:55:46 2003
+++ php-src/ext/standard/tests/array/003.phpt   Mon Aug 18 18:57:49 2003
@@ -4,7 +4,7 @@
 precision=14
 --FILE--
 <?php
-require('ext/standard/tests/array/data.inc');
+require(dirname(__FILE__) . '/data.inc');
 
 function cmp ($a, $b) {
     is_array ($a)
Index: php-src/ext/standard/tests/array/array_search.phpt
diff -u php-src/ext/standard/tests/array/array_search.phpt:1.3 
php-src/ext/standard/tests/array/array_search.phpt:1.4
--- php-src/ext/standard/tests/array/array_search.phpt:1.3      Sat Nov 16 12:26:52 
2002
+++ php-src/ext/standard/tests/array/array_search.phpt  Mon Aug 18 18:57:49 2003
@@ -17,7 +17,7 @@
 'key'=== array_search('d', \$arr4)
 TESTS;
 
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
 
 --EXPECT--
 OK
Index: php-src/ext/standard/tests/file/bug20424.phpt
diff -u php-src/ext/standard/tests/file/bug20424.phpt:1.2 
php-src/ext/standard/tests/file/bug20424.phpt:1.3
--- php-src/ext/standard/tests/file/bug20424.phpt:1.2   Thu Nov 14 05:56:35 2002
+++ php-src/ext/standard/tests/file/bug20424.phpt       Mon Aug 18 18:57:49 2003
@@ -4,7 +4,7 @@
 --GET--
 --FILE--
 <?php
-$f = fopen("run-tests.php", "r");
+$f = fopen(dirname(__FILE__) . "/../../../../run-tests.php", "r");
 $dummy = var_export(stream_get_meta_data($f), TRUE);
 echo "I'm alive!\n";
 ?>
Index: php-src/ext/standard/tests/math/abs.phpt
diff -u php-src/ext/standard/tests/math/abs.phpt:1.2 
php-src/ext/standard/tests/math/abs.phpt:1.3
--- php-src/ext/standard/tests/math/abs.phpt:1.2        Tue Mar  5 04:00:56 2002
+++ php-src/ext/standard/tests/math/abs.phpt    Mon Aug 18 18:57:49 2003
@@ -3,7 +3,7 @@
 --POST--
 --GET--
 --FILE--
-<?php // $Id: abs.phpt,v 1.2 2002/03/05 09:00:56 derick Exp $
+<?php // $Id: abs.phpt,v 1.3 2003/08/18 22:57:49 iliaa Exp $
 
 define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF);
 define('LONG_MIN', -LONG_MAX - 1);
@@ -20,7 +20,7 @@
 -(LONG_MIN+1) === abs(LONG_MIN+1)
 TESTS;
 
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
 --EXPECT--
 1,1,0,0
 OK
Index: php-src/ext/standard/tests/math/pow.phpt
diff -u php-src/ext/standard/tests/math/pow.phpt:1.12 
php-src/ext/standard/tests/math/pow.phpt:1.13
--- php-src/ext/standard/tests/math/pow.phpt:1.12       Thu Mar 21 09:18:30 2002
+++ php-src/ext/standard/tests/math/pow.phpt    Mon Aug 18 18:57:49 2003
@@ -3,7 +3,7 @@
 --POST--
 --GET--
 --FILE--
-<?php // $Id: pow.phpt,v 1.12 2002/03/21 14:18:30 sander Exp $
+<?php // $Id: pow.phpt,v 1.13 2003/08/18 22:57:49 iliaa Exp $
 
 define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF);
 define('LONG_MIN', -LONG_MAX - 1);
@@ -143,7 +143,7 @@
 TESTS;
 
  echo "On failure, please mail result to [EMAIL PROTECTED]";
- include('tests/quicktester.inc');
+ include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
 
 --EXPECT--
 1,1,0,0
Index: php-src/ext/standard/tests/math/round.phpt
diff -u php-src/ext/standard/tests/math/round.phpt:1.2 
php-src/ext/standard/tests/math/round.phpt:1.3
--- php-src/ext/standard/tests/math/round.phpt:1.2      Tue Mar  5 04:00:56 2002
+++ php-src/ext/standard/tests/math/round.phpt  Mon Aug 18 18:57:49 2003
@@ -3,7 +3,7 @@
 --POST--
 --GET--
 --FILE--
-<?php // $Id: round.phpt,v 1.2 2002/03/05 09:00:56 derick Exp $
+<?php // $Id: round.phpt,v 1.3 2003/08/18 22:57:49 iliaa Exp $
 
 define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF);
 define('LONG_MIN', -LONG_MAX - 1);
@@ -33,7 +33,7 @@
  LONG_MAX   ~== floor(LONG_MAX + 0.5)
 TESTS;
 
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
 --EXPECT--
 1,1,0,0
 OK
Index: php-src/ext/standard/tests/strings/trim.phpt
diff -u php-src/ext/standard/tests/strings/trim.phpt:1.4 
php-src/ext/standard/tests/strings/trim.phpt:1.5
--- php-src/ext/standard/tests/strings/trim.phpt:1.4    Sun Oct  6 15:12:22 2002
+++ php-src/ext/standard/tests/strings/trim.phpt        Mon Aug 18 18:57:49 2003
@@ -23,7 +23,7 @@
 "ABC" === trim("ABC\\x50\\xC1\\x60\\x90","\\x50..\\xC1")
 TESTS;
 
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
 
 --EXPECT--
 OK
Index: php-src/ext/standard/tests/strings/wordwrap.phpt
diff -u php-src/ext/standard/tests/strings/wordwrap.phpt:1.5 
php-src/ext/standard/tests/strings/wordwrap.phpt:1.6
--- php-src/ext/standard/tests/strings/wordwrap.phpt:1.5        Sun Mar 17 21:00:57 
2002
+++ php-src/ext/standard/tests/strings/wordwrap.phpt    Mon Aug 18 18:57:49 2003
@@ -31,7 +31,7 @@
 
 TESTS;
 
-include('tests/quicktester.inc');
+include(dirname(__FILE__) . '/../../../../tests/quicktester.inc');
 
 --EXPECT--
 OK

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to