[PHP-CVS] cvs: php-src /ext/standard/tests/file is_executable_variation1.phpt is_executable_variation2.phpt is_executable_variation3.phpt is_readable_variation1.phpt is_readable_variation2.phpt is_rea

2007-07-06 Thread Raghubansh Kumar
kraghubaFri Jul  6 18:28:33 2007 UTC

  Added files: 
/php-src/ext/standard/tests/fileis_writable_variation1.phpt 
is_readable_variation1.phpt 
is_writable_variation2.phpt 
is_readable_variation2.phpt 
is_writable_variation3.phpt 
is_readable_variation3.phpt 
is_executable_variation1.phpt 
is_executable_variation2.phpt 
is_executable_variation3.phpt 
  Log:
  Fix and smaller testcases for is_executable_variation.phpt, 
is_readable_variation.phpt  is_writable_variation.phpt
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_writable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_writable_variation1.phpt
--TEST--
Test is_writable() and its alias is_writeable() function: usage variations - 
diff. path notations
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only on LINUX');
}
?
--FILE--
?php
/* Prototype: bool is_writable ( string $filename );
   Description: Tells whether the filename is writable.

   is_writeable() is an alias of is_writable()
*/
/* test is_writable()  is_writeable() with file having different filepath 
notation */
require dirname(__FILE__).'/file.inc';
echo *** Testing is_writable(): usage variations ***\n;

$file_path = dirname(__FILE__);
mkdir($file_path/is_writable_variation1);

// create a new temporary file
$fp = fopen($file_path/is_writable_variation1/bar.tmp, w);
fclose($fp);

/* array of files to be tested to check if they are writable
   using is_writable() function */
$files_arr = array(
  $file_path/is_writable_variation1/bar.tmp,

  /* Testing a file trailing slash */
  $file_path/is_writable_variation1/bar.tmp/,

  /* Testing file with double slashes */
  $file_path/is_writable_variation1//bar.tmp,
  $file_path//is_writable_variation1//bar.tmp,
  $file_path/is_writable_variation1/*.tmp,
  $file_path/is_writable_variation1/b*.tmp, 

  /* Testing Binary safe */
  $file_path/is_writable_variation1.chr(0).bar.tmp,
  $file_path.chr(0).is_writable_variation1/bar.tmp,
  $file_path.chr(0).is_writable_variation1/bar.tmp,
  
  /* Testing directories */
  .,  // current directory, exp: bool(true)
  $file_path/is_writable_variation1  // temp directory, exp: bool(true)
);
$counter = 1;
/* loop through to test each element in the above array 
   is a writable file */
foreach($files_arr as $file) {
  echo -- Iteration $counter --\n;
  var_dump( is_writable($file) );
  var_dump( is_writeable($file) );
  $counter++;
  clearstatcache();
}

echo Done\n;
?
--CLEAN--
?php
unlink(dirname(__FILE__)./is_writable_variation1/bar.tmp);
rmdir(dirname(__FILE__)./is_writable_variation1/);
?
--EXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done
--UEXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_readable_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_readable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_readable_variation1.phpt
--TEST--
Test is_readable() function: usage variations - diff. file notations
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only for LINUX');
}
?
--FILE--
?php
/* Prototype: bool is_readable ( string $filename );
   Description: Tells whether the filename is readable.
*/

/* test is_readable() with file having different filepath notation */

require dirname(__FILE__).'/file.inc';
echo *** Testing is_readable(): usage variations ***\n;

$file_path = dirname(__FILE__);
mkdir($file_path/is_readable_variation1);

// create a new temporary file
$fp = fopen($file_path/is_readable_variation1/bar.tmp, w);
fclose($fp);

/* array of files to be tested if they are readable by using
   

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file is_executable_variation1.phpt is_executable_variation2.phpt is_executable_variation3.phpt is_readable_variation1.phpt is_readable_variation2.ph

2007-07-06 Thread Raghubansh Kumar
kraghubaFri Jul  6 18:30:46 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileis_writable_variation1.phpt 
is_readable_variation1.phpt 
is_writable_variation2.phpt 
is_readable_variation2.phpt 
is_writable_variation3.phpt 
is_readable_variation3.phpt 
is_executable_variation1.phpt 
is_executable_variation2.phpt 
is_executable_variation3.phpt 
  Log:
  Fix and smaller testcases for is_readable_variation.phpt, 
is_executable_variation.phpt  is_writable_variation.phpt
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_writable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_writable_variation1.phpt
--TEST--
Test is_writable() and its alias is_writeable() function: usage variations - 
diff. path notations
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only on LINUX');
}
?
--FILE--
?php
/* Prototype: bool is_writable ( string $filename );
   Description: Tells whether the filename is writable.

   is_writeable() is an alias of is_writable()
*/
/* test is_writable()  is_writeable() with file having different filepath 
notation */
require dirname(__FILE__).'/file.inc';
echo *** Testing is_writable(): usage variations ***\n;

$file_path = dirname(__FILE__);
mkdir($file_path/is_writable_variation1);

// create a new temporary file
$fp = fopen($file_path/is_writable_variation1/bar.tmp, w);
fclose($fp);

/* array of files to be tested to check if they are writable
   using is_writable() function */
$files_arr = array(
  $file_path/is_writable_variation1/bar.tmp,

  /* Testing a file trailing slash */
  $file_path/is_writable_variation1/bar.tmp/,

  /* Testing file with double slashes */
  $file_path/is_writable_variation1//bar.tmp,
  $file_path//is_writable_variation1//bar.tmp,
  $file_path/is_writable_variation1/*.tmp,
  $file_path/is_writable_variation1/b*.tmp, 

  /* Testing Binary safe */
  $file_path/is_writable_variation1.chr(0).bar.tmp,
  $file_path.chr(0).is_writable_variation1/bar.tmp,
  $file_path.chr(0).is_writable_variation1/bar.tmp,
  
  /* Testing directories */
  .,  // current directory, exp: bool(true)
  $file_path/is_writable_variation1  // temp directory, exp: bool(true)
);
$counter = 1;
/* loop through to test each element in the above array 
   is a writable file */
foreach($files_arr as $file) {
  echo -- Iteration $counter --\n;
  var_dump( is_writable($file) );
  var_dump( is_writeable($file) );
  $counter++;
  clearstatcache();
}

echo Done\n;
?
--CLEAN--
?php
unlink(dirname(__FILE__)./is_writable_variation1/bar.tmp);
rmdir(dirname(__FILE__)./is_writable_variation1/);
?
--EXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done
--UEXPECTF--
*** Testing is_writable(): usage variations ***
-- Iteration 1 --
bool(true)
bool(true)
-- Iteration 2 --
bool(%s)
bool(%s)
-- Iteration 3 --
bool(true)
bool(true)
-- Iteration 4 --
bool(true)
bool(true)
-- Iteration 5 --
bool(false)
bool(false)
-- Iteration 6 --
bool(false)
bool(false)
-- Iteration 7 --
bool(true)
bool(true)
-- Iteration 8 --
bool(true)
bool(true)
-- Iteration 9 --
bool(true)
bool(true)
-- Iteration 10 --
bool(true)
bool(true)
-- Iteration 11 --
bool(true)
bool(true)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_readable_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_readable_variation1.phpt
+++ php-src/ext/standard/tests/file/is_readable_variation1.phpt
--TEST--
Test is_readable() function: usage variations - diff. file notations
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only for LINUX');
}
?
--FILE--
?php
/* Prototype: bool is_readable ( string $filename );
   Description: Tells whether the filename is readable.
*/

/* test is_readable() with file having different filepath notation */

require dirname(__FILE__).'/file.inc';
echo *** Testing is_readable(): usage variations ***\n;

$file_path = dirname(__FILE__);
mkdir($file_path/is_readable_variation1);

// create a new temporary file
$fp = fopen($file_path/is_readable_variation1/bar.tmp, w);
fclose($fp);

/* array of files to be tested if they are readable by 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file 006_variation.phpt file_get_contents_file_put_contents_variation.phpt filesize_variation-win32.phpt filesize_variation.phpt fwrite_variation-wi

2007-07-08 Thread Raghubansh Kumar
kraghubaSun Jul  8 12:41:44 2007 UTC

  Removed files:   (Branch: PHP_5_2)
/php-src/ext/standard/tests/file

symlink_link_linkinfo_is_link_variation.phpt 
is_executable_variation.phpt 
fwrite_variation-win32.phpt 
fwrite_variation.phpt 
filesize_variation-win32.phpt 

symlink_link_linkinfo_is_link_error.phpt 

file_get_contents_file_put_contents_variation.phpt 
is_writable_variation.phpt 
is_readable_variation.phpt 
filesize_variation.phpt 
006_variation.phpt 

symlink_link_linkinfo_is_link_basic.phpt 
  Log:
  These files are now split into one or more smaller testcases, hence being 
deleted.
  

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file 006_variation.phpt file_get_contents_file_put_contents_variation.phpt filesize_variation-win32.phpt filesize_variation.phpt fwrite_variation-win32.phpt

2007-07-08 Thread Raghubansh Kumar
kraghubaSun Jul  8 12:51:03 2007 UTC

  Removed files:   
/php-src/ext/standard/tests/file

symlink_link_linkinfo_is_link_basic.phpt 
fwrite_variation-win32.phpt 

symlink_link_linkinfo_is_link_variation.phpt 
is_executable_variation.phpt 
fwrite_variation.phpt 
filesize_variation-win32.phpt 
filesize_variation.phpt 

symlink_link_linkinfo_is_link_error.phpt 

file_get_contents_file_put_contents_variation.phpt 
is_writable_variation.phpt 
is_readable_variation.phpt 
006_variation.phpt 
  Log:
  These files are now split into one or more smaller testcases, hence being 
deleted.
  

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file mkdir_rmdir_variation1.phpt mkdir_rmdir_variation2.phpt popen_pclose_error-sunos.phpt popen_pclose_error.phpt readlink_realpath_basic1.phpt rea

2007-07-09 Thread Raghubansh Kumar
kraghubaMon Jul  9 17:38:33 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filepopen_pclose_error-sunos.phpt 
readlink_realpath_variation1.phpt 
mkdir_rmdir_variation1.phpt 
readlink_realpath_variation2.phpt 
mkdir_rmdir_variation2.phpt 
readlink_realpath_variation3.phpt 
readlink_realpath_basic1.phpt 
readlink_realpath_basic2.phpt 

  Modified files:  
/php-src/ext/standard/tests/filereadlink_realpath_error.phpt 
popen_pclose_error.phpt 
  Log:
  Fix and smaller testcases for mkdir_rmdir_variation.phpt, 
popen_pclose_error.phpt, readlink_realpath_basic.phpt, 
readlink_realpath_error.phpt  readlink_realpath_variation.phpt
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_error.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/readlink_realpath_error.phpt
diff -u php-src/ext/standard/tests/file/readlink_realpath_error.phpt:1.1.2.1 
php-src/ext/standard/tests/file/readlink_realpath_error.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/readlink_realpath_error.phpt:1.1.2.1
Mon Jun 11 16:14:59 2007
+++ php-src/ext/standard/tests/file/readlink_realpath_error.phptMon Jul 
 9 17:38:33 2007
@@ -69,5 +69,5 @@
 NULL
 
 *** Testing realpath() on a non-existent file ***
-bool(false)
+%s
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/popen_pclose_error.phpt
diff -u php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.1.2.1 
php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.1.2.1 Mon Jun 
11 16:14:59 2007
+++ php-src/ext/standard/tests/file/popen_pclose_error.phpt Mon Jul  9 
17:38:33 2007
@@ -2,8 +2,8 @@
 Test popen() and pclose function: error conditions
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == 'WIN' )
-  die(skip Not Valid for Windows);
+if(substr(PHP_OS, 0, 3) == 'WIN' || substr(PHP_OS, 0, 3) == 'Sun')
+  die(skip Not Valid for Windows and Sun Solaris);
 ?
 
 --FILE--
@@ -41,7 +41,7 @@
 Warning: Wrong parameter count for popen() in %s on line %d
 NULL
 
-Warning: popen(abc.txt,rw): Invalid argument in %s on line %d
+Warning: popen(abc.txt,rw): %s on line %d
 bool(false)
 
 Warning: Wrong parameter count for pclose() in %s on line %d

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt
+++ php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt
+++ php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_rmdir_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/mkdir_rmdir_variation1.phpt
+++ php-src/ext/standard/tests/file/mkdir_rmdir_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt
+++ php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt
+++ php-src/ext/standard/tests/file/mkdir_rmdir_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readlink_realpath_variation3.phpt
+++ php-src/ext/standard/tests/file/readlink_realpath_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt
+++ php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_basic2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readlink_realpath_basic2.phpt
+++ php-src/ext/standard/tests/file/readlink_realpath_basic2.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file mkdir_rmdir_variation.phpt readlink_realpath_basic.phpt readlink_realpath_variation.phpt

2007-07-09 Thread Raghubansh Kumar
kraghubaMon Jul  9 17:52:42 2007 UTC

  Removed files:   
/php-src/ext/standard/tests/filereadlink_realpath_basic.phpt 
readlink_realpath_variation.phpt 
mkdir_rmdir_variation.phpt 
  Log:
  These testcases are now split into smaller testcases, hence being deleted
  

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file mkdir_rmdir_variation.phpt readlink_realpath_basic.phpt readlink_realpath_variation.phpt

2007-07-09 Thread Raghubansh Kumar
kraghubaMon Jul  9 17:55:34 2007 UTC

  Removed files:   (Branch: PHP_5_2)
/php-src/ext/standard/tests/filereadlink_realpath_basic.phpt 
readlink_realpath_variation.phpt 
mkdir_rmdir_variation.phpt 
  Log:
  These testcases are now split into smaller testcases, hence being deleted
  

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file popen_pclose_error-sunos.phpt popen_pclose_error.phpt

2007-07-10 Thread Raghubansh Kumar
kraghubaTue Jul 10 07:26:32 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filepopen_pclose_error-sunos.phpt 
popen_pclose_error.phpt 
  Log:
  fix and new test for sunos
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt
diff -u /dev/null 
php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.2
--- /dev/null   Tue Jul 10 07:26:32 2007
+++ php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt   Tue Jul 
10 07:26:31 2007
@@ -0,0 +1,74 @@
+--TEST--
+Test popen() and pclose function: error conditions
+--SKIPIF--
+?php
+if( strtoupper( substr(PHP_OS, 0, 3) ) != 'SUN' )
+  die(skip Only Valid for Sun Solaris);
+?
+
+--FILE--
+?php
+/*
+ * Prototype: resource popen ( string command, string mode )
+ * Description: Opens process file pointer.
+
+ * Prototype: int pclose ( resource handle );
+ * Description: Closes process file pointer.
+ */
+$file_path = dirname(__FILE__);
+echo *** Testing for error conditions ***\n;
+var_dump( popen() );  // Zero Arguments
+var_dump( popen(abc.txt) );   // Single Argument
+var_dump( popen(abc.txt, rw) );   // Invalid mode Argument
+var_dump( pclose() );
+$file_handle = fopen($file_path./popen.tmp, w);
+var_dump( pclose($file_handle, $file_handle) );
+fclose($file_handle);
+var_dump( pclose(1) );
+echo \n--- Done ---;
+?
+--CLEAN--
+?php
+$file_path = dirname(__FILE__);
+unlink($file_path./popen.tmp);
+?
+--EXPECTF--
+*** Testing for error conditions ***
+
+Warning: popen() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+resource(%d) of type (stream)
+sh: abc.txt: not found
+Warning: Wrong parameter count for pclose() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for pclose() in %s on line %d
+NULL
+
+Warning: pclose(): supplied argument is not a valid stream resource in %s on 
line %d
+bool(false)
+
+--- Done ---
+--UEXPECTF--
+*** Testing for error conditions ***
+
+Warning: popen() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+resource(%d) of type (stream)
+sh: abc.txt: not found
+Warning: Wrong parameter count for pclose() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for pclose() in %s on line %d
+NULL
+
+Warning: pclose(): supplied argument is not a valid stream resource in %s on 
line %d
+bool(false)
+
+--- Done ---
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/popen_pclose_error.phpt
diff -u php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.2 
php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.3
--- php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.2 Mon Jun 11 
16:40:27 2007
+++ php-src/ext/standard/tests/file/popen_pclose_error.phpt Tue Jul 10 
07:26:31 2007
@@ -2,8 +2,8 @@
 Test popen() and pclose function: error conditions
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == 'WIN' )
-  die(skip Not Valid for Windows);
+if(substr(PHP_OS, 0, 3) == 'WIN' || strtoupper( substr(PHP_OS, 0, 3) ) == 
'SUN')
+  die(skip Not Valid for Windows  Sun Solaris);
 ?
 
 --FILE--
@@ -41,7 +41,7 @@
 Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d
 NULL
 
-Warning: popen(abc.txt,rw): Invalid argument in %s on line %d
+Warning: popen(abc.txt,rw): %s on line %d
 bool(false)
 
 Warning: Wrong parameter count for pclose() in %s on line %d
@@ -63,7 +63,7 @@
 Warning: popen() expects exactly 2 parameters, 1 given in %s on line %d
 NULL
 
-Warning: popen(abc.txt,rw): Invalid argument in %s on line %d
+Warning: popen(abc.txt,rw): %s on line %d
 bool(false)
 
 Warning: Wrong parameter count for pclose() in %s on line %d

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file popen_pclose_error-sunos.phpt popen_pclose_error.phpt

2007-07-11 Thread Raghubansh Kumar
kraghubaWed Jul 11 09:13:47 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filepopen_pclose_error-sunos.phpt 
popen_pclose_error.phpt 
  Log:
  better check for skip
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt
diff -u php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.1.2.1 
php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.1.2.1   
Mon Jul  9 17:38:32 2007
+++ php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt   Wed Jul 
11 09:13:47 2007
@@ -2,10 +2,9 @@
 Test popen() and pclose function: error conditions
 --SKIPIF--
 ?php
-if( substr(PHP_OS, 0, 3) != 'Sun')
-  die(skip Only valid for Sun Solaris);
+if( strtoupper( substr(PHP_OS, 0, 3) ) != 'SUN' )
+  die(skip Only Valid for Sun Solaris);
 ?
-
 --FILE--
 ?php
 /*
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/popen_pclose_error.phpt
diff -u php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.1.2.2 
php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/popen_pclose_error.phpt:1.1.2.2 Mon Jul 
 9 17:38:33 2007
+++ php-src/ext/standard/tests/file/popen_pclose_error.phpt Wed Jul 11 
09:13:47 2007
@@ -2,10 +2,9 @@
 Test popen() and pclose function: error conditions
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == 'WIN' || substr(PHP_OS, 0, 3) == 'Sun')
-  die(skip Not Valid for Windows and Sun Solaris);
+if(substr(PHP_OS, 0, 3) == 'WIN' || strtoupper( substr(PHP_OS, 0, 3) ) == 
'SUN')
+  die(skip Not Valid for Windows  Sun Solaris);
 ?
-
 --FILE--
 ?php
 /*

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file disk_free_space_error-win32.phpt disk_free_space_error.phpt disk_total_space_error-win32.phpt disk_total_space_error.phpt

2007-07-16 Thread Raghubansh Kumar
kraghubaMon Jul 16 17:34:45 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filedisk_total_space_error-win32.phpt 
disk_total_space_error.phpt 
disk_free_space_error-win32.phpt 
disk_free_space_error.phpt 
  Log:
  New testcases 
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_error-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/disk_total_space_error-win32.phpt
+++ php-src/ext/standard/tests/file/disk_total_space_error-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/disk_total_space_error.phpt
+++ php-src/ext/standard/tests/file/disk_total_space_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_error-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/disk_free_space_error-win32.phpt
+++ php-src/ext/standard/tests/file/disk_free_space_error-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/disk_free_space_error.phpt
+++ php-src/ext/standard/tests/file/disk_free_space_error.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file symlink_link_linkinfo_is_link_error1.phpt symlink_link_linkinfo_is_link_error2.phpt

2007-07-16 Thread Raghubansh Kumar
kraghubaMon Jul 16 17:55:39 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/file

symlink_link_linkinfo_is_link_error1.phpt 

symlink_link_linkinfo_is_link_error2.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
diff -u 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt:1.1.2.2
 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt:1.1.2.3
--- 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt:1.1.2.2
   Tue Jul 10 13:21:11 2007
+++ php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt   
Mon Jul 16 17:55:39 2007
@@ -87,13 +87,13 @@
 Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
 *** Testing linkinfo() for error conditions ***
@@ -104,12 +104,12 @@
 Warning: Wrong parameter count for linkinfo() in %s on line %d
 NULL
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
diff -u 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.1.2.1
 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.1.2.2
--- 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.1.2.1
   Thu Jul  5 18:53:33 2007
+++ php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt   
Mon Jul 16 17:55:39 2007
@@ -75,22 +75,22 @@
 Warning: Wrong parameter count for link() in %s on line %d
 NULL
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
 *** Testing is_link() for error conditions ***

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file symlink_link_linkinfo_is_link_error1.phpt symlink_link_linkinfo_is_link_error2.phpt

2007-07-16 Thread Raghubansh Kumar
kraghubaMon Jul 16 18:02:11 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/file

symlink_link_linkinfo_is_link_error2.phpt 

symlink_link_linkinfo_is_link_error1.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt
diff -u 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.2 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.3
--- 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt:1.2   
Thu Jul  5 18:59:20 2007
+++ php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt   
Mon Jul 16 18:02:11 2007
@@ -75,22 +75,22 @@
 Warning: link() expects exactly 2 parameters, 3 given in %s on line %d
 NULL
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
 *** Testing is_link() for error conditions ***
@@ -114,22 +114,22 @@
 Warning: link() expects exactly 2 parameters, 3 given in %s on line %d
 NULL
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
-Warning: link(): No such file or directory in %s on line %d
+Warning: link(): %s in %s on line %d
 bool(false)
 
 *** Testing is_link() for error conditions ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt
diff -u 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt:1.3 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt:1.4
--- 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt:1.3   
Tue Jul 10 13:21:31 2007
+++ php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt   
Mon Jul 16 18:02:11 2007
@@ -87,13 +87,13 @@
 Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
 *** Testing linkinfo() for error conditions ***
@@ -104,13 +104,13 @@
 Warning: linkinfo() expects exactly 1 parameter, 2 given in %s on line %d
 NULL
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 Done
 --UEXPECTF--
@@ -131,13 +131,13 @@
 Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
-Warning: symlink(): No such file or directory in %s on line %d
+Warning: symlink(): %s in %s on line %d
 bool(false)
 
 *** Testing linkinfo() for error conditions ***
@@ -148,12 +148,12 @@
 Warning: linkinfo() expects exactly 1 parameter, 2 given in %s on line %d
 NULL
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
-Warning: linkinfo(): No such file or directory in %s on line %d
+Warning: linkinfo(): %s in %s on line %d
 int(-1)
 
-Warning: linkinfo(): No such 

[PHP-CVS] cvs: php-src /ext/standard/tests/file disk_free_space_error-win32.phpt disk_free_space_error.phpt disk_total_space_error-win32.phpt disk_total_space_error.phpt

2007-07-16 Thread Raghubansh Kumar
kraghubaMon Jul 16 17:36:33 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filedisk_free_space_error-win32.phpt 
disk_free_space_error.phpt 
disk_total_space_error-win32.phpt 
disk_total_space_error.phpt 
  Log:
  New testcases 
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_error-win32.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/disk_free_space_error-win32.phpt
diff -u /dev/null 
php-src/ext/standard/tests/file/disk_free_space_error-win32.phpt:1.2
--- /dev/null   Mon Jul 16 17:36:33 2007
+++ php-src/ext/standard/tests/file/disk_free_space_error-win32.phptMon Jul 
16 17:36:33 2007
@@ -0,0 +1,109 @@
+--TEST--
+Test disk_free_space and its alias diskfreespace() functions : error conditions
+--SKIPIF--
+?php
+if(substr(PHP_OS, 0, 3) != 'WIN' )
+  die(skip Valid only for Windows);
+?
+--FILE--
+?php
+/*
+ *  Prototype: float disk_free_space( string directory )
+ *  Description: Given a string containing a directory, this function will
+ *   return the number of bytes available on the corresponding 
+ *   filesystem or disk partition
+ */
+
+echo *** Testing error conditions ***\n;
+$file_path = dirname(__FILE__);
+var_dump( disk_free_space() ); // Zero Arguments
+var_dump( diskfreespace() );
+
+var_dump( disk_free_space( $file_path, extra argument) ); // More than valid 
number of arguments
+var_dump( diskfreespace( $file_path, extra argument) );
+
+
+var_dump( disk_free_space( $file_path./dir1 )); // Invalid directory
+var_dump( diskfreespace( $file_path./dir1 ));
+
+$fh = fopen( $file_path./disk_free_space.tmp, w );
+fwrite( $fh,  Garbage data for the temporary file );
+var_dump( disk_free_space( $file_path./disk_free_space.tmp )); // file input 
instead of directory
+var_dump( diskfreespace( $file_path./disk_free_space.tmp ));
+fclose($fh);
+
+echo\n-- Done --;
+?
+--CLEAN--
+?php
+$file_path = dirname(__FILE__);
+unlink($file_path./disk_free_space.tmp);
+
+?
+--EXPECTF--
+*** Testing error conditions ***
+
+Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line 
%d
+NULL
+
+Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line 
%d
+NULL
+
+Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Warning: disk_free_space(): The system cannot find the path specified.
+ in %s on line %d
+bool(false)
+
+Warning: diskfreespace(): The system cannot find the path specified.
+ in %s on line %d
+bool(false)
+
+Warning: disk_free_space(): The directory name is invalid.
+ in %s on line %d
+bool(false)
+
+Warning: diskfreespace(): The directory name is invalid.
+ in %s on line %d
+bool(false)
+
+-- Done --
+
+--UEXPECTF--
+*** Testing error conditions ***
+
+Warning: disk_free_space() expects exactly 1 parameter, 0 given in %s on line 
%d
+NULL
+
+Warning: diskfreespace() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: disk_free_space() expects exactly 1 parameter, 2 given in %s on line 
%d
+NULL
+
+Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Warning: disk_free_space(): The system cannot find the path specified.
+ in %s on line %d
+bool(false)
+
+Warning: diskfreespace(): The system cannot find the path specified.
+ in %s on line %d
+bool(false)
+
+Notice: fwrite(): 36 character unicode buffer downcoded for binary stream 
runtime_encoding in %s on line %d
+
+Warning: disk_free_space(): The directory name is invalid.
+ in %s on line %d
+bool(false)
+
+Warning: diskfreespace(): The directory name is invalid.
+ in %s on line %d
+bool(false)
+
+-- Done --
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_error.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/disk_free_space_error.phpt
diff -u /dev/null php-src/ext/standard/tests/file/disk_free_space_error.phpt:1.2
--- /dev/null   Mon Jul 16 17:36:33 2007
+++ php-src/ext/standard/tests/file/disk_free_space_error.phpt  Mon Jul 16 
17:36:33 2007
@@ -0,0 +1,91 @@
+--TEST--
+Test disk_free_space and its alias diskfreespace() functions : error 
conditions.
+--SKIPIF--
+?php
+if(substr(PHP_OS, 0, 3) == 'WIN')
+  die(skip Not valid on Windows);
+?
+--FILE--
+?php
+/*
+ *  Prototype: float disk_free_space( string directory )
+ *  Description: Given a string containing a directory, this function will 
+ *   return the number of bytes available on the corresponding 
+ *   filesystem or disk partition
+ */
+
+echo *** Testing error conditions ***\n;
+$file_path = dirname(__FILE__);
+var_dump( disk_free_space() ); // Zero Arguments
+var_dump( diskfreespace() );
+
+var_dump( disk_free_space( $file_path, extra argument) ); // More than 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file file.inc readfile_basic-win32.phpt readfile_basic.phpt readfile_error.phpt readfile_variation1.phpt readfile_variation2.phpt readfile_variation

2007-07-20 Thread Raghubansh Kumar
kraghubaFri Jul 20 18:07:02 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileumask_basic.phpt 
readfile_error.phpt 
readfile_basic-win32.phpt 
readfile_basic.phpt 
umask_error.phpt 
readfile_variation1.phpt 
readfile_variation2.phpt 
readfile_variation3.phpt 

  Modified files:  
/php-src/ext/standard/tests/filefile.inc 
  Log:
  Fix for fill_file() in file.inc
  New testcases for readfile() and umask() functions 
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file.inc?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/standard/tests/file/file.inc
diff -u php-src/ext/standard/tests/file/file.inc:1.1.2.4 
php-src/ext/standard/tests/file/file.inc:1.1.2.5
--- php-src/ext/standard/tests/file/file.inc:1.1.2.4Thu Jun 21 21:06:47 2007
+++ php-src/ext/standard/tests/file/file.incFri Jul 20 18:07:02 2007
@@ -138,7 +138,7 @@
   } else {
 $num_values = str_repeat($data, ($chunk_size/$size_divider) + $add_value );
 $bytes_written = fwrite($file_handle, $num_values, $file_size);
-if ( $bytes_written != $chunk_size ) {
+if ( $bytes_written != $file_size ) {
   return false;
 }
   }

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/umask_basic.phpt
+++ php-src/ext/standard/tests/file/umask_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readfile_error.phpt
+++ php-src/ext/standard/tests/file/readfile_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_basic-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readfile_basic-win32.phpt
+++ php-src/ext/standard/tests/file/readfile_basic-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readfile_basic.phpt
+++ php-src/ext/standard/tests/file/readfile_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/umask_error.phpt
+++ php-src/ext/standard/tests/file/umask_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readfile_variation1.phpt
+++ php-src/ext/standard/tests/file/readfile_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readfile_variation2.phpt
+++ php-src/ext/standard/tests/file/readfile_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readfile_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/readfile_variation3.phpt
+++ php-src/ext/standard/tests/file/readfile_variation3.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fgetc_variation1.phpt fgetc_variation2.phpt fgetc_variation3.phpt fgetc_variation4.phpt fgets_basic.phpt fgets_error.phpt fgets_variation1.phpt

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 07:55:07 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefgets_error.phpt 
fgets_variation4.phpt 
fgets_basic.phpt 
fgetc_variation4.phpt 
fgets_variation1.phpt 
fgets_variation5.phpt 
fgets_variation2.phpt 
fgets_variation6-win32.phpt 
fgetc_variation1.phpt 
fgetc_variation2.phpt 
fgets_variation6.phpt 
fgets_variation3.phpt 
fgets_variation4-win32.phpt 
fgetc_variation3.phpt 
  Log:
  New testcases for fgetc() and fgets() functions
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_error.phpt
+++ php-src/ext/standard/tests/file/fgets_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation4.phpt
+++ php-src/ext/standard/tests/file/fgets_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_basic.phpt
+++ php-src/ext/standard/tests/file/fgets_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetc_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetc_variation4.phpt
+++ php-src/ext/standard/tests/file/fgetc_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation1.phpt
+++ php-src/ext/standard/tests/file/fgets_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation5.phpt
+++ php-src/ext/standard/tests/file/fgets_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation2.phpt
+++ php-src/ext/standard/tests/file/fgets_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation6-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation6-win32.phpt
+++ php-src/ext/standard/tests/file/fgets_variation6-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetc_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetc_variation1.phpt
+++ php-src/ext/standard/tests/file/fgetc_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetc_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetc_variation2.phpt
+++ php-src/ext/standard/tests/file/fgetc_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation6.phpt
+++ php-src/ext/standard/tests/file/fgets_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation3.phpt
+++ php-src/ext/standard/tests/file/fgets_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation4-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgets_variation4-win32.phpt
+++ php-src/ext/standard/tests/file/fgets_variation4-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetc_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetc_variation3.phpt
+++ php-src/ext/standard/tests/file/fgetc_variation3.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fflush_basic.phpt fflush_error.phpt fflush_variation1-win32.phpt fflush_variation1.phpt fflush_variation2.phpt fflush_variation3.phpt fflush_va

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 17:14:50 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefflush_error.phpt 
fflush_variation1.phpt 
fflush_variation2.phpt 
fflush_variation3.phpt 
fflush_variation4.phpt 
fflush_variation1-win32.phpt 
fflush_basic.phpt 
  Log:
  New testcases for fflush() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fflush_error.phpt
+++ php-src/ext/standard/tests/file/fflush_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fflush_variation1.phpt
+++ php-src/ext/standard/tests/file/fflush_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fflush_variation2.phpt
+++ php-src/ext/standard/tests/file/fflush_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fflush_variation3.phpt
+++ php-src/ext/standard/tests/file/fflush_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fflush_variation4.phpt
+++ php-src/ext/standard/tests/file/fflush_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_variation1-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fflush_variation1-win32.phpt
+++ php-src/ext/standard/tests/file/fflush_variation1-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fflush_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fflush_basic.phpt
+++ php-src/ext/standard/tests/file/fflush_basic.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file lstat_stat_variation1.phpt lstat_stat_variation2.phpt lstat_stat_variation3.phpt lstat_stat_variation4.phpt lstat_stat_variation5.phpt lstat_st

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 17:35:37 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filelstat_stat_variation1.phpt 
lstat_stat_variation2.phpt 
lstat_stat_variation3.phpt 
lstat_stat_variation4.phpt 
lstat_stat_variation5.phpt 
lstat_stat_variation6.phpt 
  Log:
  New testcases for lstat() and stat() functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/lstat_stat_variation1.phpt
+++ php-src/ext/standard/tests/file/lstat_stat_variation1.phpt
--TEST--
Test lstat() and stat() functions: usage variations - effects of rename()
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. lstat() not available on Windows');
}
?
--FILE--
?php
/* Prototype: array lstat ( string $filename );
   Description: Gives information about a file or symbolic link

   Prototype: array stat ( string $filename );
   Description: Gives information about a file
*/

/* test the effects of rename() on stats of dir/file/link */

$file_path = dirname(__FILE__);
require $file_path/file.inc;

/* create temp file, link and directory */
mkdir($file_path/lstat_stat_variation1/);  // temp dir
$fp = fopen($file_path/lstat_stat_variation1.tmp, w);  // temp file
fclose($fp);

// temp link
symlink($file_path/lstat_stat_variation1.tmp, 
$file_path/lstat_stat_variation_link1.tmp);

echo *** Checking lstat() and stat() on file, link and directory ater renaming 
them ***\n;

// renaming a file
echo -- Testing stat() for files after being renamed --\n;
$file_path = dirname(__FILE__);
$old_filename = $file_path/lstat_stat_variation1.tmp;
$new_filename = $file_path/lstat_stat_variation1a.tmp;
$old_stat = stat($old_filename);
clearstatcache();
var_dump( rename($old_filename, $new_filename) );
$new_stat = stat($new_filename);

// compare the self stat 
var_dump( compare_self_stat($old_stat) );
var_dump( compare_self_stat($new_stat) );

// compare the two stats 
var_dump( compare_stats($old_stat, $old_stat, $all_stat_keys) );
// clear the cache
clearstatcache();

// renaming a directory
echo -- Testing stat() for directory after being renamed --\n;
$old_dirname = $file_path/lstat_stat_variation1;
$new_dirname = $file_path/lstat_stat_variation1a;
$old_stat = stat($old_dirname);
clearstatcache();
var_dump( rename($old_dirname, $new_dirname) );
$new_stat = stat($new_dirname);

// compare self stats
var_dump( compare_self_stat($old_stat) );
var_dump( compare_self_stat($new_stat) );

// compare the two stats
var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys) );
// clear the cache
clearstatcache();

// renaming a link
echo -- Testing lstat() for link after being renamed --\n;
$old_linkname = $file_path/lstat_stat_variation_link1.tmp;
$new_linkname = $file_path/lstat_stat_variation_link1a.tmp;
$old_stat = lstat($old_linkname);
clearstatcache();
var_dump( rename($old_linkname, $new_linkname) );
$new_stat = lstat($new_linkname);

// compare self stats
var_dump( compare_self_stat($old_stat) );
var_dump( compare_self_stat($new_stat) );

// compare the two stats
var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys) );

echo \n--- Done ---;
?

--CLEAN--
?php
$file_path = dirname(__FILE__);
unlink($file_path/lstat_stat_variation1a.tmp);
rmdir($file_path/lstat_stat_variation1a);
unlink($file_path/lstat_stat_variation_link1a.tmp);
?
--EXPECTF--
*** Checking lstat() and stat() on file, link and directory ater renaming them 
***
-- Testing stat() for files after being renamed --
bool(true)
bool(true)
bool(true)
bool(true)
-- Testing stat() for directory after being renamed --
bool(true)
bool(true)
bool(true)
bool(true)
-- Testing lstat() for link after being renamed --
bool(true)
bool(true)
bool(true)
bool(true)

--- Done ---
--UEXPECTF--
*** Checking lstat() and stat() on file, link and directory ater renaming them 
***
-- Testing stat() for files after being renamed --
bool(true)
bool(true)
bool(true)
bool(true)
-- Testing stat() for directory after being renamed --
bool(true)
bool(true)
bool(true)
bool(true)
-- Testing lstat() for link after being renamed --
bool(true)
bool(true)
bool(true)
bool(true)

--- Done ---

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/lstat_stat_variation2.phpt
+++ php-src/ext/standard/tests/file/lstat_stat_variation2.phpt
--TEST--
Test lstat() and stat() functions: usage variations - effects of touch()
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. lstat() not available on Windows');
}
?
--FILE--
?php
/* Prototype: array lstat ( string $filename );
   Description: Gives information about a file or symbolic link

   Prototype: array stat 

[PHP-CVS] cvs: php-src /ext/standard/tests/file is_dir_variation1.phpt is_dir_variation2.phpt is_dir_variation3.phpt is_dir_variation4.phpt

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 17:24:29 2007 UTC

  Added files: 
/php-src/ext/standard/tests/fileis_dir_variation4.phpt 
is_dir_variation3.phpt 
is_dir_variation2.phpt 
is_dir_variation1.phpt 
  Log:
  New testcases for is_dir() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_dir_variation4.phpt
+++ php-src/ext/standard/tests/file/is_dir_variation4.phpt
--TEST--
Test is_dir() function: usage variations - diff. path notations
--FILE--
?php
/* Prototype: bool is_dir ( string $dirname );
   Description: Tells whether the dirname is a directory
 Returns TRUE if the dirname exists and is a directory, FALSE  otherwise.
*/

/* Passing dir names with different notations, using slashes, wild-card chars */

$file_path = dirname(__FILE__);

echo *** Testing is_dir() with different notations of dir names ***;
$dir_name = /is_dir_variation4;
mkdir($file_path.$dir_name);

$dirs_arr = array(
  is_dir_variation4,
  ./is_dir_variation4,

  /* Testing a file trailing slash */
  is_dir_variation4/,
  ./is_dir_variation4/,

  /* Testing file with double trailing slashes */
  is_dir_variation4//,
  ./is_dir_variation4//,
  .//is_dir_variation4//,
  is_dir_vari*,

  /* Testing Binary safe */
  ./is_dir_variation4/.chr(0),
  is_dir_variation4\0
);

$count = 1;
/* loop through to test each element the above array */
foreach($dirs_arr as $dir) {
  echo \n-- Iteration $count --\n;
  var_dump( is_dir($file_path./.$dir ) );
  $count++;
}

echo \n*** Done ***;
?
--CLEAN--
?php
$file_path = dirname(__FILE__);
$dir_name = $file_path./is_dir_variation4;
rmdir($dir_name);
?
--EXPECTF--
*** Testing is_dir() with different notations of dir names ***
-- Iteration 1 --
bool(true)

-- Iteration 2 --
bool(true)

-- Iteration 3 --
bool(true)

-- Iteration 4 --
bool(true)

-- Iteration 5 --
bool(true)

-- Iteration 6 --
bool(true)

-- Iteration 7 --
bool(true)

-- Iteration 8 --
bool(false)

-- Iteration 9 --
bool(true)

-- Iteration 10 --
bool(true)

*** Done ***
--UEXPECTF--
*** Testing is_dir() with different notations of dir names ***
-- Iteration 1 --
bool(true)

-- Iteration 2 --
bool(true)

-- Iteration 3 --
bool(true)

-- Iteration 4 --
bool(true)

-- Iteration 5 --
bool(true)

-- Iteration 6 --
bool(true)

-- Iteration 7 --
bool(true)

-- Iteration 8 --
bool(false)

-- Iteration 9 --
bool(true)

-- Iteration 10 --
bool(true)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_dir_variation3.phpt
+++ php-src/ext/standard/tests/file/is_dir_variation3.phpt
--TEST--
Test is_dir() function: usage variations - invalid arguments
--FILE--
?php
/* Prototype: bool is_dir ( string $dirname );
   Description: Tells whether the dirname is a directory
 Returns TRUE if the dirname exists and is a directory, FALSE  otherwise.
*/

/* Passing invalid arguments to is_dir() */

$dir_handle = opendir( dirname(__FILE__) );

echo *** Testing is_dir() with Invalid arguments: expected bool(false) ***\n;
$dirnames = array(
  /* Invalid dirnames */
  -2.34555,
  TRUE,
  FALSE,
  NULL,
  $dir_handle,

  /* Non-existing dirnames */
  0,
  1234
);

/* loop through to test each element the above array */
foreach($dirnames as $dirname) {
  var_dump( is_dir($dirname) );
}
closedir($dir_handle);

echo \n*** Done ***;
?
--EXPECTF--
*** Testing is_dir() with Invalid arguments: expected bool(false) ***
bool(false)
bool(false)
bool(false)
bool(false)

Warning: is_dir() expects parameter 1 to be string (Unicode or binary), 
resource given in %s on line %d
NULL
bool(false)
bool(false)

*** Done ***
--UEXPECTF--
*** Testing is_dir() with Invalid arguments: expected bool(false) ***
bool(false)
bool(false)
bool(false)
bool(false)

Warning: is_dir() expects parameter 1 to be string (Unicode or binary), 
resource given in %s on line %d
NULL
bool(false)
bool(false)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_dir_variation2.phpt
+++ php-src/ext/standard/tests/file/is_dir_variation2.phpt
--TEST--
Test is_dir() function: usage variations - links
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Do not run on Windows');
}
--FILE--
?php
/* Prototype: bool is_dir ( string $dirname );
   Description: Tells whether the dirname is a directory
 Returns TRUE if the dirname exists and is a directory, FALSE  otherwise.
*/

/* Testing is_dir() with dir, soft  hard link to dir,
 and with file, soft  hard link to file */

$file_path = dirname(__FILE__);

echo *** Testing is_dir() with dir and links to dir ***\n;
echo -- With dir --\n;
$dirname = $file_path./is_dir_variation2;

[PHP-CVS] cvs: php-src /ext/standard/tests/file is_file_variation1.phpt is_file_variation2.phpt is_file_variation3.phpt is_file_variation4.phpt

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 17:25:59 2007 UTC

  Added files: 
/php-src/ext/standard/tests/fileis_file_variation1.phpt 
is_file_variation2.phpt 
is_file_variation3.phpt 
is_file_variation4.phpt 
  Log:
  New testcases for is_file() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_file_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_file_variation1.phpt
+++ php-src/ext/standard/tests/file/is_file_variation1.phpt
--TEST--
Test is_file() function: usage variations - diff. files
--FILE--
?php
/* Prototype: bool is_file ( string $filename );
   Description: Tells whether the filename is a regular file
 Returns TRUE if the filename exists and is a regular file
*/

/* Testing is_file() with file containing data, truncating its size 
 and the file created by touch() */

$file_path = dirname(__FILE__);

echo -- Testing is_file() with file containing data --\n;
$filename = $file_path./is_file_variation1.tmp;
$file_handle = fopen($filename, w );
fwrite( $file_handle, Hello, world. ); // exptected true
fclose($file_handle);
var_dump( is_file($filename) );
clearstatcache();

echo \n-- Testing is_file() after truncating filesize to zero bytes --\n;
$file_handle = fopen( $file_path./is_file_variation1.tmp, r);
ftruncate($file_handle, 0);
fclose($file_handle);
var_dump( is_file($file_path./is_file_variation1.tmp) ); // expected true
clearstatcache();
unlink($file_path./is_file_variation1.tmp);

echo \n-- Testing is_file() with an empty file --\n;
/* created by fopen() */
fclose( fopen($file_path./is_file_variation1.tmp, w) );
var_dump( is_file($file_path./is_file_variation1.tmp) );  //expected true
clearstatcache();
unlink($file_path./is_file_variation1.tmp);

/* created by touch() */
touch($file_path./is_file_variation1.tmp);
var_dump( is_file($file_path./is_file_variation1.tmp) ); // expected true
clearstatcache();
unlink($file_path./is_file_variation1.tmp);

echo \n*** Done ***;
?
--EXPECTF--
-- Testing is_file() with file containing data --
bool(true)

-- Testing is_file() after truncating filesize to zero bytes --
bool(true)

-- Testing is_file() with an empty file --
bool(true)
bool(true)

*** Done ***
--UEXPECTF--
-- Testing is_file() with file containing data --

Notice: fwrite(): 17 character unicode buffer downcoded for binary stream 
runtime_encoding in %s on line %d
bool(true)

-- Testing is_file() after truncating filesize to zero bytes --
bool(true)

-- Testing is_file() with an empty file --
bool(true)
bool(true)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_file_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_file_variation2.phpt
+++ php-src/ext/standard/tests/file/is_file_variation2.phpt
--TEST--
Test is_file() function: usage variations - links
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Do not run on Windows');
}
--FILE--
?php
/* Prototype: bool is_file ( string $filename );
   Description: Tells whether the filename is a regular file
 Returns TRUE if the filename exists and is a regular file
*/

/* Creating soft and hard links to a file and applying is_file() on links */ 

$file_path = dirname(__FILE__);
fclose( fopen($file_path./is_file_variation2.tmp, w) );

echo *** Testing is_file() with links ***\n;
/* With symlink */
symlink($file_path./is_file_variation2.tmp, 
$file_path./is_file_variation2_symlink.tmp);
var_dump( is_file($file_path./is_file_variation2_symlink.tmp) ); //expected 
true
clearstatcache();

/* With hardlink */
link($file_path./is_file_variation2.tmp, 
$file_path./is_file_variation2_link.tmp);
var_dump( is_file($file_path./is_file_variation2_link.tmp) );  // expected: 
true
clearstatcache();

echo \n*** Done ***;
?
--CLEAN--
?php
$file_path = dirname(__FILE__);
unlink($file_path./is_file_variation2_symlink.tmp);
unlink($file_path./is_file_variation2_link.tmp);
unlink($file_path./is_file_variation2.tmp);
?

--EXPECTF--
*** Testing is_file() with links ***
bool(true)
bool(true)

*** Done ***
--UEXPECTF--
*** Testing is_file() with links ***
bool(true)
bool(true)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_file_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_file_variation3.phpt
+++ php-src/ext/standard/tests/file/is_file_variation3.phpt
--TEST--
Test is_file() function: usage variations - invalid arguments
--FILE--
?php
/* Prototype: bool is_file ( string $filename );
   Description: Tells whether the filename is a regular file
 Returns TRUE if the filename exists and is a regular file
*/

/* Testing is_file() with invalid arguments -int, float, bool, NULL, resource */

$file_path = dirname(__FILE__);
$file_handle = fopen($file_path./is_file_variation3.tmp, w);

echo *** Testing Invalid file types ***\n;

[PHP-CVS] cvs: php-src /ext/standard/tests/file lstat_stat_variation1.phpt lstat_stat_variation2.phpt lstat_stat_variation3.phpt lstat_stat_variation4.phpt lstat_stat_variation5.phpt lstat_stat_variat

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 17:27:46 2007 UTC

  Added files: 
/php-src/ext/standard/tests/filelstat_stat_variation6.phpt 
lstat_stat_variation1.phpt 
lstat_stat_variation5.phpt 
lstat_stat_variation4.phpt 
lstat_stat_variation3.phpt 
lstat_stat_variation2.phpt 
  Log:
  New testcases for lstat() and stat() functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/lstat_stat_variation6.phpt
+++ php-src/ext/standard/tests/file/lstat_stat_variation6.phpt
--TEST--
Test lstat() and stat() functions: usage variations - dir/file/link names 
stored in objects
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. lstat() not available on Windows');
}
?
--FILE--
?php
/* Prototype: array lstat ( string $filename );
   Description: Gives information about a file or symbolic link

   Prototype: array stat ( string $filename );
   Description: Gives information about a file
*/

/* test for stats when names of dir/file/link are stored in objects */

$file_path = dirname(__FILE__);
require $file_path/file.inc;


/* create temp file, link and directory */
mkdir($file_path/lstat_stat_variation6/);  // temp dir

$fp = fopen($file_path/lstat_stat_variation6.tmp, w);  // temp file
fclose($fp);

// temp link
symlink($file_path/lstat_stat_variation6.tmp, 
$file_path/lstat_stat_variation6_link.tmp);

/* Checking lstat() and stat() on file/link/directory where filenames,
   linknames and directory names are stored in object and array */

echo \n*** Testing lstat() and stat() with filename, linkname
and directory name stored inside a object ***\n;

// creating object with members as numeric and non-numeric filename, linkname 
and directory name
class object_temp {
  public $var_name;
  public function object_temp($name) {
$this-var_name = $name;
  }
}
// directory as member
$obj1 = new object_temp($file_path/lstat_stat_variation6/);
$obj2 = new object_temp($file_path/lstat_stat_variation6a/);

// file as member
$obj3 = new object_temp($file_path/lstat_stat_variation6.tmp);
$obj4 = new object_temp($file_path/lstat_stat_variation6a.tmp);

// link as member
$obj5 = new object_temp($file_path/lstat_stat_variation6_link.tmp);
$obj6 = new object_temp($file_path/lstat_stat_variation6a_link.tmp);

echo \n-- Testing lstat() and stat() with softlink, linkname stored inside an 
object --\n;

var_dump( lstat($obj5-var_name) );

var_dump( symlink($obj5-var_name, $obj6-var_name) );
var_dump( lstat($obj6-var_name) );

echo \n-- Testing stat() on filename stored inside an object --\n;
var_dump( stat($obj3-var_name) );

$fp = fopen($file_path/lstat_stat_variation6a.tmp, w);
fclose($fp);
var_dump( stat($obj4-var_name) );

echo \n-- Testing stat() on directory name stored inside an object --\n;
var_dump( stat($obj1-var_name) );

mkdir($file_path/lstat_stat_variation6a/);
var_dump( stat($obj2-var_name) );

echo \n--- Done ---;
?

--CLEAN--
?php
$file_path = dirname(__FILE__);
unlink($file_path/lstat_stat_variation6_link.tmp);
unlink($file_path/lstat_stat_variation6.tmp);
rmdir($file_path/lstat_stat_variation6);
unlink($file_path/lstat_stat_variation6a_link.tmp);
unlink($file_path/lstat_stat_variation6a.tmp);
rmdir($file_path/lstat_stat_variation6a/);
?

--EXPECTF--
*** Testing lstat() and stat() with filename, linkname
and directory name stored inside a object ***

-- Testing lstat() and stat() with softlink, linkname stored inside an object --
array(26) {
  [0]=
  int(%d)
  [1]=
  int(%d)
  [2]=
  int(%d)
  [3]=
  int(%d)
  [4]=
  int(%d)
  [5]=
  int(%d)
  [6]=
  int(%d)
  [7]=
  int(%d)
  [8]=
  int(%d)
  [9]=
  int(%d)
  [10]=
  int(%d)
  [11]=
  int(%d)
  [12]=
  int(%d)
  [dev]=
  int(%d)
  [ino]=
  int(%d)
  [mode]=
  int(%d)
  [nlink]=
  int(%d)
  [uid]=
  int(%d)
  [gid]=
  int(%d)
  [rdev]=
  int(%d)
  [size]=
  int(%d)
  [atime]=
  int(%d)
  [mtime]=
  int(%d)
  [ctime]=
  int(%d)
  [blksize]=
  int(%d)
  [blocks]=
  int(%d)
}
bool(true)
array(26) {
  [0]=
  int(%d)
  [1]=
  int(%d)
  [2]=
  int(%d)
  [3]=
  int(%d)
  [4]=
  int(%d)
  [5]=
  int(%d)
  [6]=
  int(%d)
  [7]=
  int(%d)
  [8]=
  int(%d)
  [9]=
  int(%d)
  [10]=
  int(%d)
  [11]=
  int(%d)
  [12]=
  int(%d)
  [dev]=
  int(%d)
  [ino]=
  int(%d)
  [mode]=
  int(%d)
  [nlink]=
  int(%d)
  [uid]=
  int(%d)
  [gid]=
  int(%d)
  [rdev]=
  int(%d)
  [size]=
  int(%d)
  [atime]=
  int(%d)
  [mtime]=
  int(%d)
  [ctime]=
  int(%d)
  [blksize]=
  int(%d)
  [blocks]=
  int(%d)
}

-- Testing stat() on filename stored inside an object --
array(26) {
  [0]=
  int(%d)
  [1]=
  int(%d)
  [2]=
  int(%d)
  [3]=
  int(%d)
  [4]=
  int(%d)
  [5]=
  int(%d)
  [6]=
  int(%d)
  [7]=
  int(%d)
  [8]=
  int(%d)
  [9]=
  int(%d)
  

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file is_dir_variation1.phpt is_dir_variation2.phpt is_dir_variation3.phpt is_dir_variation4.phpt

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 17:31:43 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileis_dir_variation4.phpt 
is_dir_variation3.phpt 
is_dir_variation2.phpt 
is_dir_variation1.phpt 
  Log:
  New testcases for is_dir() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_dir_variation4.phpt
+++ php-src/ext/standard/tests/file/is_dir_variation4.phpt
--TEST--
Test is_dir() function: usage variations - diff. path notations
--FILE--
?php
/* Prototype: bool is_dir ( string $dirname );
   Description: Tells whether the dirname is a directory
 Returns TRUE if the dirname exists and is a directory, FALSE  otherwise.
*/

/* Passing dir names with different notations, using slashes, wild-card chars */

$file_path = dirname(__FILE__);

echo *** Testing is_dir() with different notations of dir names ***;
$dir_name = /is_dir_variation4;
mkdir($file_path.$dir_name);

$dirs_arr = array(
  is_dir_variation4,
  ./is_dir_variation4,

  /* Testing a file trailing slash */
  is_dir_variation4/,
  ./is_dir_variation4/,

  /* Testing file with double trailing slashes */
  is_dir_variation4//,
  ./is_dir_variation4//,
  .//is_dir_variation4//,
  is_dir_vari*,

  /* Testing Binary safe */
  ./is_dir_variation4/.chr(0),
  is_dir_variation4\0
);

$count = 1;
/* loop through to test each element the above array */
foreach($dirs_arr as $dir) {
  echo \n-- Iteration $count --\n;
  var_dump( is_dir($file_path./.$dir ) );
  $count++;
}

echo \n*** Done ***;
?
--CLEAN--
?php
$file_path = dirname(__FILE__);
$dir_name = $file_path./is_dir_variation4;
rmdir($dir_name);
?
--EXPECTF--
*** Testing is_dir() with different notations of dir names ***
-- Iteration 1 --
bool(true)

-- Iteration 2 --
bool(true)

-- Iteration 3 --
bool(true)

-- Iteration 4 --
bool(true)

-- Iteration 5 --
bool(true)

-- Iteration 6 --
bool(true)

-- Iteration 7 --
bool(true)

-- Iteration 8 --
bool(false)

-- Iteration 9 --
bool(true)

-- Iteration 10 --
bool(true)

*** Done ***
--UEXPECTF--
*** Testing is_dir() with different notations of dir names ***
-- Iteration 1 --
bool(true)

-- Iteration 2 --
bool(true)

-- Iteration 3 --
bool(true)

-- Iteration 4 --
bool(true)

-- Iteration 5 --
bool(true)

-- Iteration 6 --
bool(true)

-- Iteration 7 --
bool(true)

-- Iteration 8 --
bool(false)

-- Iteration 9 --
bool(true)

-- Iteration 10 --
bool(true)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_dir_variation3.phpt
+++ php-src/ext/standard/tests/file/is_dir_variation3.phpt
--TEST--
Test is_dir() function: usage variations - invalid arguments
--FILE--
?php
/* Prototype: bool is_dir ( string $dirname );
   Description: Tells whether the dirname is a directory
 Returns TRUE if the dirname exists and is a directory, FALSE  otherwise.
*/

/* Passing invalid arguments to is_dir() */

$dir_handle = opendir( dirname(__FILE__) );

echo *** Testing is_dir() with Invalid arguments: expected bool(false) ***\n;
$dirnames = array(
  /* Invalid dirnames */
  -2.34555,
  TRUE,
  FALSE,
  NULL,
  $dir_handle,

  /* Non-existing dirnames */
  0,
  1234
);

/* loop through to test each element the above array */
foreach($dirnames as $dirname) {
  var_dump( is_dir($dirname) );
}
closedir($dir_handle);

echo \n*** Done ***;
?
--EXPECTF--
*** Testing is_dir() with Invalid arguments: expected bool(false) ***
bool(false)
bool(false)
bool(false)
bool(false)

Warning: is_dir() expects parameter 1 to be string (Unicode or binary), 
resource given in %s on line %d
NULL
bool(false)
bool(false)

*** Done ***
--UEXPECTF--
*** Testing is_dir() with Invalid arguments: expected bool(false) ***
bool(false)
bool(false)
bool(false)
bool(false)

Warning: is_dir() expects parameter 1 to be string (Unicode or binary), 
resource given in %s on line %d
NULL
bool(false)
bool(false)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/is_dir_variation2.phpt
+++ php-src/ext/standard/tests/file/is_dir_variation2.phpt
--TEST--
Test is_dir() function: usage variations - links
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Do not run on Windows');
}
--FILE--
?php
/* Prototype: bool is_dir ( string $dirname );
   Description: Tells whether the dirname is a directory
 Returns TRUE if the dirname exists and is a directory, FALSE  otherwise.
*/

/* Testing is_dir() with dir, soft  hard link to dir,
 and with file, soft  hard link to file */

$file_path = dirname(__FILE__);

echo *** Testing is_dir() with dir and links to dir ***\n;
echo -- With dir --\n;
$dirname = 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file umask_variation1.phpt umask_variation2.phpt

2007-07-21 Thread Raghubansh Kumar
kraghubaSat Jul 21 18:16:17 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileumask_variation1.phpt 
umask_variation2.phpt 
  Log:
  New testcases for umask() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/umask_variation1.phpt
+++ php-src/ext/standard/tests/file/umask_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/umask_variation2.phpt
+++ php-src/ext/standard/tests/file/umask_variation2.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file umask_basic.phpt umask_error.phpt

2007-07-22 Thread Raghubansh Kumar
kraghubaSun Jul 22 12:26:18 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileumask_basic.phpt umask_error.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_basic.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/umask_basic.phpt
diff -u php-src/ext/standard/tests/file/umask_basic.phpt:1.1.2.1 
php-src/ext/standard/tests/file/umask_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/umask_basic.phpt:1.1.2.1Fri Jul 20 
18:07:02 2007
+++ php-src/ext/standard/tests/file/umask_basic.phptSun Jul 22 12:26:18 2007
@@ -7,7 +7,7 @@
 }
 ?
 --FILE--
-?
+?php
 /* Prototype: int umask ( [int $mask] );
Description: Changes the current umask
 */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_error.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/umask_error.phpt
diff -u php-src/ext/standard/tests/file/umask_error.phpt:1.1.2.1 
php-src/ext/standard/tests/file/umask_error.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/umask_error.phpt:1.1.2.1Fri Jul 20 
18:07:02 2007
+++ php-src/ext/standard/tests/file/umask_error.phptSun Jul 22 12:26:18 2007
@@ -7,7 +7,7 @@
 }
 ?
 --FILE--
-?
+?php
 /* Prototype: int umask ( [int $mask] );
Description: Changes the current umask
 */

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file umask_basic.phpt umask_error.phpt

2007-07-22 Thread Raghubansh Kumar
kraghubaSun Jul 22 12:28:31 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/fileumask_basic.phpt umask_error.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_basic.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/umask_basic.phpt
diff -u php-src/ext/standard/tests/file/umask_basic.phpt:1.2 
php-src/ext/standard/tests/file/umask_basic.phpt:1.3
--- php-src/ext/standard/tests/file/umask_basic.phpt:1.2Fri Jul 20 
18:09:11 2007
+++ php-src/ext/standard/tests/file/umask_basic.phptSun Jul 22 12:28:31 2007
@@ -7,7 +7,7 @@
 }
 ?
 --FILE--
-?
+?php
 /* Prototype: int umask ( [int $mask] );
Description: Changes the current umask
 */
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/umask_error.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/umask_error.phpt
diff -u php-src/ext/standard/tests/file/umask_error.phpt:1.2 
php-src/ext/standard/tests/file/umask_error.phpt:1.3
--- php-src/ext/standard/tests/file/umask_error.phpt:1.2Fri Jul 20 
18:09:11 2007
+++ php-src/ext/standard/tests/file/umask_error.phptSun Jul 22 12:28:31 2007
@@ -7,7 +7,7 @@
 }
 ?
 --FILE--
-?
+?php
 /* Prototype: int umask ( [int $mask] );
Description: Changes the current umask
 */

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file stat_variation1-win32.phpt stat_variation2-win32.phpt stat_variation3-win32.phpt stat_variation4-win32.phpt stat_variation5-win32.phpt stat_variation6-w

2007-07-22 Thread Raghubansh Kumar
kraghubaSun Jul 22 12:32:45 2007 UTC

  Added files: 
/php-src/ext/standard/tests/filestat_variation5-win32.phpt 
stat_variation2-win32.phpt 
stat_variation7-win32.phpt 
stat_variation4-win32.phpt 
stat_variation1-win32.phpt 
stat_variation6-win32.phpt 
stat_variation3-win32.phpt 
stat_variation8-win32.phpt 
  Log:
  smaller testcases for stat() function on Windows
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation5-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/stat_variation5-win32.phpt
+++ php-src/ext/standard/tests/file/stat_variation5-win32.phpt
--TEST--
Test stat() functions: usage variations - file opened in read/write mode
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?
--FILE--
?php

/*
 *  Prototype: array stat ( string $filename );
 *  Description: Gives information about a file
 */

/* test the stats of file opened in write mode and then same in read mode */

$file_path = dirname(__FILE__);
require $file_path/file.inc;


$file_handle = fopen($file_path/stat_variation5.tmp, w);  // temp file
fclose($file_handle);


echo \n*** Testing stat(): on a file with read/write permission ***\n;

$filename = $file_path/stat_variation5.tmp;
$file_handle = fopen($filename, w);  // create file
fclose($file_handle);
$old_stat = stat($filename);
// clear the stat
clearstatcache();
sleep(2);
// opening file again in read mode
$file_handle = fopen($filename, r);  // read file
fclose($file_handle);
$new_stat = stat($filename);
// compare self stats
var_dump( compare_self_stat($old_stat) );
var_dump( compare_self_stat($new_stat) );
// compare the stat
$affected_members = array(10, 'ctime');
var_dump( compare_stats($old_stat, $new_stat, $affected_members, =) );
// clear the stat
clearstatcache();


echo \n*** Done ***;
?

--CLEAN--
?php
$file_path = dirname(__FILE__);
unlink($file_path/stat_variation5.tmp);
?
--EXPECTF--

*** Testing stat(): on a file with read/write permission ***
bool(true)
bool(true)
bool(true)

*** Done ***

--UEXPECTF--

*** Testing stat(): on a file with read/write permission ***
bool(true)
bool(true)
bool(true)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation2-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/stat_variation2-win32.phpt
+++ php-src/ext/standard/tests/file/stat_variation2-win32.phpt
--TEST--
Test stat() functions: usage variations - effects of writing to file
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?
--FILE--
?php

/*
 *  Prototype: array stat ( string $filename );
 *  Description: Gives information about a file
 */

/* test the effects of writing to a file on the stats of the file */


$file_path = dirname(__FILE__);
require $file_path/file.inc;


$filename = $file_path/stat_variation2.tmp;
$file_handle = fopen($filename, w);  // temp file
fclose($file_handle);


echo *** Testing stat(): writing to a file ***\n;

// writing to an empty file
echo -- Testing stat() on file after data is written in it --\n;
$old_stat = stat($filename);
clearstatcache();
sleep(2);
$file_handle = fopen($filename, w);  // temp file
fwrite($file_handle, Hello World);
fclose($file_handle);
$new_stat = stat($filename);

// compare self stats
var_dump( compare_self_stat($old_stat) );
var_dump( compare_self_stat($new_stat) );
// compare the stats
$comp_arr = array(7, 'size');
var_dump(compare_stats($old_stat, $new_stat, $comp_arr, ));
clearstatcache();

echo \n*** Done ***;
?

--CLEAN--
?php
$file_path = dirname(__FILE__);
unlink($file_path/stat_variation2.tmp);
?
--EXPECTF--
*** Testing stat(): writing to a file ***
-- Testing stat() on file after data is written in it --
bool(true)
bool(true)
bool(true)

*** Done ***

--UEXPECTF--
*** Testing stat(): writing to a file ***
-- Testing stat() on file after data is written in it --

Notice: fwrite(): 11 character unicode buffer downcoded for binary stream 
runtime_encoding in %s on line %d
bool(true)
bool(true)
bool(true)

*** Done ***


http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation7-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/stat_variation7-win32.phpt
+++ php-src/ext/standard/tests/file/stat_variation7-win32.phpt
--TEST--
Test stat() functions: usage variations - names of dir/file stored in objects
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?
--FILE--
?php

/*
 *  Prototype: array stat ( string $filename );
 *  Description: Gives information about a file
 */

/* test the stats of dir/file when their names are stored in objects */


[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file stat_variation1-win32.phpt stat_variation2-win32.phpt stat_variation3-win32.phpt stat_variation4-win32.phpt stat_variation5-win32.phpt stat_var

2007-07-22 Thread Raghubansh Kumar
kraghubaSun Jul 22 12:37:09 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filestat_variation8-win32.phpt 
stat_variation5-win32.phpt 
stat_variation2-win32.phpt 
stat_variation7-win32.phpt 
stat_variation4-win32.phpt 
stat_variation6-win32.phpt 
stat_variation1-win32.phpt 
stat_variation3-win32.phpt 
  Log:
  New testcases for stat() function on windows
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation8-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/stat_variation8-win32.phpt
+++ php-src/ext/standard/tests/file/stat_variation8-win32.phpt
--TEST--
Test stat() functions: usage variations - effects of truncate()
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?
--FILE--
?php

/*
 *  Prototype: array stat ( string $filename );
 *  Description: Gives information about a file
 */

/* test the effects of truncate() on stats of file */


$file_path = dirname(__FILE__);
require $file_path/file.inc;


/* create temp file and directory */

$filename = $file_path/stat_variation8.tmp;
$file_handle = fopen($filename, w);  // temp file
fclose($file_handle);


echo \n*** Testing stat(): on file by truncating it to given size ***\n;

// create temp file
$file_handle = fopen($filename, w);
fclose($file_handle);

clearstatcache();
$old_stat = stat($filename);
// clear the cache
sleep(2);

// opening file in r/w mode
$file_handle = fopen($filename, r+);
var_dump( ftruncate($file_handle, 512) );  // truncate it
fclose($file_handle);

clearstatcache();
$new_stat = stat($filename);

// compare self stats
var_dump( compare_self_stat($old_stat) );
var_dump( compare_self_stat($new_stat) );

// compare the stat
$affected_members = array(7, 8, 9, 'size', 'atime', 'mtime');
var_dump( compare_stats($old_stat, $new_stat, $affected_members, '!=') );

// clear the stat
clearstatcache();  // clear previous size value in cache

echo \n*** Done ***;
?

--CLEAN--
?php
$file_path = dirname(__FILE__);
unlink($file_path/stat_variation8.tmp);
?
--EXPECTF--
*** Testing stat(): on file by truncating it to given size ***
bool(true)
bool(true)
bool(true)
bool(true)

*** Done ***

--UEXPECTF--
*** Testing stat(): on file by truncating it to given size ***
bool(true)
bool(true)
bool(true)
bool(true)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation5-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/stat_variation5-win32.phpt
+++ php-src/ext/standard/tests/file/stat_variation5-win32.phpt
--TEST--
Test stat() functions: usage variations - file opened in read/write mode
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?
--FILE--
?php

/*
 *  Prototype: array stat ( string $filename );
 *  Description: Gives information about a file
 */

/* test the stats of file opened in write mode and then same in read mode */

$file_path = dirname(__FILE__);
require $file_path/file.inc;


$file_handle = fopen($file_path/stat_variation5.tmp, w);  // temp file
fclose($file_handle);


echo \n*** Testing stat(): on a file with read/write permission ***\n;

$filename = $file_path/stat_variation5.tmp;
$file_handle = fopen($filename, w);  // create file
fclose($file_handle);
$old_stat = stat($filename);
// clear the stat
clearstatcache();
sleep(2);
// opening file again in read mode
$file_handle = fopen($filename, r);  // read file
fclose($file_handle);
$new_stat = stat($filename);
// compare self stats
var_dump( compare_self_stat($old_stat) );
var_dump( compare_self_stat($new_stat) );
// compare the stat
$affected_members = array(10, 'ctime');
var_dump( compare_stats($old_stat, $new_stat, $affected_members, =) );
// clear the stat
clearstatcache();


echo \n*** Done ***;
?

--CLEAN--
?php
$file_path = dirname(__FILE__);
unlink($file_path/stat_variation5.tmp);
?
--EXPECTF--

*** Testing stat(): on a file with read/write permission ***
bool(true)
bool(true)
bool(true)

*** Done ***

--UEXPECTF--

*** Testing stat(): on a file with read/write permission ***
bool(true)
bool(true)
bool(true)

*** Done ***

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/stat_variation2-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/stat_variation2-win32.phpt
+++ php-src/ext/standard/tests/file/stat_variation2-win32.phpt
--TEST--
Test stat() functions: usage variations - effects of writing to file
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?
--FILE--
?php

/*
 *  Prototype: array stat ( string $filename );
 *  Description: Gives information about a file
 */

/* test the effects of 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fread_variation1.phpt fread_variation2.phpt fread_variation3.phpt fread_variation4.phpt

2007-07-22 Thread Raghubansh Kumar
kraghubaSun Jul 22 17:27:35 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefread_variation1.phpt 
fread_variation2.phpt 
fread_variation3.phpt 
fread_variation4.phpt 
  Log:
  New testcases for fread() functions
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fread_variation1.phpt
+++ php-src/ext/standard/tests/file/fread_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fread_variation2.phpt
+++ php-src/ext/standard/tests/file/fread_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fread_variation3.phpt
+++ php-src/ext/standard/tests/file/fread_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fread_variation4.phpt
+++ php-src/ext/standard/tests/file/fread_variation4.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file fread_variation3-win32.phpt fread_variation4-win32.phpt

2007-07-22 Thread Raghubansh Kumar
kraghubaSun Jul 22 17:38:48 2007 UTC

  Added files: 
/php-src/ext/standard/tests/filefread_variation4-win32.phpt 
fread_variation3-win32.phpt 
  Log:
  More new testcases for fread() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation4-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fread_variation4-win32.phpt
+++ php-src/ext/standard/tests/file/fread_variation4-win32.phpt
--TEST--
Test fread() function : usage variations - read beyond file size, write only 
mode
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
  die('skip...only valid for Windows');
}
?
--FILE--
?php
/*
 Prototype: string fread ( resource $handle [, int $length] );
 Description: reads up to length bytes from the file pointer referenced by 
handle. 
   Reading stops when up to length bytes have been read, EOF (end of file) is 
   reached, (for network streams) when a packet becomes available, or (after 
   opening userspace stream) when 8192 bytes have been read whichever comes 
first.
*/

// include the file.inc for common functions for test
include (file.inc);

/* Function : function check_read(resource $file_handle, int $read_size, int 
$expect_size)
   Description : Read data from file of size $read_size and verifies that 
$expected_size no. of 
 bytes are read. 
 $file_handle : File Handle
 $read_size   : No. of bytes to be read.
 $expect_size : Expected data length
   Returns: returns the data read
*/
function check_read($file_handle, $read_size, $expect_size) {
  // print file pointer position before read
  var_dump( ftell($file_handle) );
  var_dump( feof($file_handle) );
  
  // read the data of size $read_size
  echo Reading $read_size bytes from file, expecting $expect_size bytes ... ;
  $data_from_file = fread($file_handle, $read_size);

  // check if data read is of expected size
  if ( strlen($data_from_file) == $expect_size)
echo OK\n;
  else
echo Error reading file, total number of bytes read = 
.strlen($data_from_file).\n;

  // file pointer position after read
  var_dump( ftell($file_handle) );
  // check if file pointer at eof()
  var_dump( feof($file_handle) );

  return $data_from_file;
}
 
echo *** Testing fread() : usage variations ***\n;

$file_modes = array(a,ab,at,
w,wb,wt,
x,xb,xt );

$file_content_types = array(numeric,text,text_with_new_line);

foreach($file_content_types as $file_content_type) {
  echo \n-- Testing fread() with file having content of type . 
$file_content_type . --\n;

  /* open the file using $files_modes and perform fread() on it */
  foreach($file_modes as $file_mode) {
if(!strstr($file_mode,x)){
   /* create files with $file_content_type */
   create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, w, 
fread_variation, 4);
}

$filename = dirname(__FILE__)./fread_variation4.tmp; // this is name of 
the file created by create_files()
echo -- File opened in mode .$file_mode. --\n;
$file_handle = fopen($filename, $file_mode);
if (!$file_handle) {
   echo Error: failed to fopen() file: $filename!;
   exit();
}

if(strstr($file_mode,w) || strstr($file_mode,x) ) {
  fill_file($file_handle, $file_content_type, 1024);
}

rewind($file_handle);
echo -- Reading beyond filesize, expeceted : 1024 bytes --\n;
// read file by giving size more than its size
rewind($file_handle);
$data_from_file = check_read($file_handle, 1030, ( strstr($file_mode, +) 
? 1024 : 0) );
if ( $data_from_file != false)
  var_dump( md5($data_from_file) );

echo -- Reading beyond filesize when file pointer pointing to EOF, 
expeceted : 0 bytes --\n;
rewind($file_handle);
// try fread when file pointer at end
fseek($file_handle, 0, SEEK_END);
//reading file when file pointer at end
$data_from_file = check_read($file_handle, 10, 0);
if ( $data_from_file != false)
  var_dump( md5($data_from_file) );

// now close the file
fclose($file_handle);

// delete the file created
delete_file($filename); // delete file
  } // end of inner foreach loop
}// end of outer foreach loop

echoDone\n;
?
--EXPECTF--
*** Testing fread() : usage variations ***

-- Testing fread() with file having content of type numeric --
-- File opened in mode a --
-- Reading beyond filesize, expeceted : 1024 bytes --
int(0)
bool(false)
Reading 1030 bytes from file, expecting 0 bytes ... OK
int(0)
bool(true)
-- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 
bytes --
int(1024)
bool(false)
Reading 10 bytes from file, expecting 0 bytes ... OK
int(1024)
bool(true)
-- File opened in mode ab --
-- Reading beyond filesize, expeceted : 1024 bytes --
int(0)
bool(false)
Reading 1030 bytes from file, expecting 0 bytes ... OK
int(0)
bool(true)
-- Reading beyond filesize when file pointer 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fread_variation3-win32.phpt fread_variation4-win32.phpt

2007-07-22 Thread Raghubansh Kumar
kraghubaSun Jul 22 17:41:25 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefread_variation4-win32.phpt 
fread_variation3-win32.phpt 
  Log:
  More new testcases for fread() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation4-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fread_variation4-win32.phpt
+++ php-src/ext/standard/tests/file/fread_variation4-win32.phpt
--TEST--
Test fread() function : usage variations - read beyond file size, write only 
mode
--SKIPIF--
?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
  die('skip...only valid for Windows');
}
?
--FILE--
?php
/*
 Prototype: string fread ( resource $handle [, int $length] );
 Description: reads up to length bytes from the file pointer referenced by 
handle. 
   Reading stops when up to length bytes have been read, EOF (end of file) is 
   reached, (for network streams) when a packet becomes available, or (after 
   opening userspace stream) when 8192 bytes have been read whichever comes 
first.
*/

// include the file.inc for common functions for test
include (file.inc);

/* Function : function check_read(resource $file_handle, int $read_size, int 
$expect_size)
   Description : Read data from file of size $read_size and verifies that 
$expected_size no. of 
 bytes are read. 
 $file_handle : File Handle
 $read_size   : No. of bytes to be read.
 $expect_size : Expected data length
   Returns: returns the data read
*/
function check_read($file_handle, $read_size, $expect_size) {
  // print file pointer position before read
  var_dump( ftell($file_handle) );
  var_dump( feof($file_handle) );
  
  // read the data of size $read_size
  echo Reading $read_size bytes from file, expecting $expect_size bytes ... ;
  $data_from_file = fread($file_handle, $read_size);

  // check if data read is of expected size
  if ( strlen($data_from_file) == $expect_size)
echo OK\n;
  else
echo Error reading file, total number of bytes read = 
.strlen($data_from_file).\n;

  // file pointer position after read
  var_dump( ftell($file_handle) );
  // check if file pointer at eof()
  var_dump( feof($file_handle) );

  return $data_from_file;
}
 
echo *** Testing fread() : usage variations ***\n;

$file_modes = array(a,ab,at,
w,wb,wt,
x,xb,xt );

$file_content_types = array(numeric,text,text_with_new_line);

foreach($file_content_types as $file_content_type) {
  echo \n-- Testing fread() with file having content of type . 
$file_content_type . --\n;

  /* open the file using $files_modes and perform fread() on it */
  foreach($file_modes as $file_mode) {
if(!strstr($file_mode,x)){
   /* create files with $file_content_type */
   create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, w, 
fread_variation, 4);
}

$filename = dirname(__FILE__)./fread_variation4.tmp; // this is name of 
the file created by create_files()
echo -- File opened in mode .$file_mode. --\n;
$file_handle = fopen($filename, $file_mode);
if (!$file_handle) {
   echo Error: failed to fopen() file: $filename!;
   exit();
}

if(strstr($file_mode,w) || strstr($file_mode,x) ) {
  fill_file($file_handle, $file_content_type, 1024);
}

rewind($file_handle);
echo -- Reading beyond filesize, expeceted : 1024 bytes --\n;
// read file by giving size more than its size
rewind($file_handle);
$data_from_file = check_read($file_handle, 1030, ( strstr($file_mode, +) 
? 1024 : 0) );
if ( $data_from_file != false)
  var_dump( md5($data_from_file) );

echo -- Reading beyond filesize when file pointer pointing to EOF, 
expeceted : 0 bytes --\n;
rewind($file_handle);
// try fread when file pointer at end
fseek($file_handle, 0, SEEK_END);
//reading file when file pointer at end
$data_from_file = check_read($file_handle, 10, 0);
if ( $data_from_file != false)
  var_dump( md5($data_from_file) );

// now close the file
fclose($file_handle);

// delete the file created
delete_file($filename); // delete file
  } // end of inner foreach loop
}// end of outer foreach loop

echoDone\n;
?
--EXPECTF--
*** Testing fread() : usage variations ***

-- Testing fread() with file having content of type numeric --
-- File opened in mode a --
-- Reading beyond filesize, expeceted : 1024 bytes --
int(0)
bool(false)
Reading 1030 bytes from file, expecting 0 bytes ... OK
int(0)
bool(true)
-- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 
bytes --
int(1024)
bool(false)
Reading 10 bytes from file, expecting 0 bytes ... OK
int(1024)
bool(true)
-- File opened in mode ab --
-- Reading beyond filesize, expeceted : 1024 bytes --
int(0)
bool(false)
Reading 1030 bytes from file, expecting 0 bytes ... OK
int(0)
bool(true)
-- Reading beyond filesize when 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file glob_basic.phpt glob_error.phpt glob_variation.phpt

2007-07-22 Thread Raghubansh Kumar
kraghubaMon Jul 23 05:22:59 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileglob_variation.phpt 
glob_basic.phpt glob_error.phpt 
  Log:
  New testcases for glob() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/glob_variation.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/glob_variation.phpt
+++ php-src/ext/standard/tests/file/glob_variation.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/glob_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/glob_basic.phpt
+++ php-src/ext/standard/tests/file/glob_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/glob_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/glob_error.phpt
+++ php-src/ext/standard/tests/file/glob_error.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file glob_basic.phpt glob_error.phpt glob_variation.phpt

2007-07-22 Thread Raghubansh Kumar
kraghubaMon Jul 23 05:25:19 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/fileglob_basic.phpt glob_error.phpt 
glob_variation.phpt 
  Log:
  New testcases for glob() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/glob_basic.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/glob_basic.phpt
diff -u /dev/null php-src/ext/standard/tests/file/glob_basic.phpt:1.2
--- /dev/null   Mon Jul 23 05:25:19 2007
+++ php-src/ext/standard/tests/file/glob_basic.phpt Mon Jul 23 05:25:19 2007
@@ -0,0 +1,110 @@
+--TEST--
+Test glob() function: basic functions
+--FILE--
+?php
+/* Prototype: array glob ( string $pattern [, int $flags] );
+   Description: Find pathnames matching a pattern
+*/
+
+echo *** Testing glob() : basic functions ***\n;
+
+$file_path = dirname(__FILE__);
+
+// temp dirname used here
+$dirname = $file_path/glob_basic;
+
+// temp dir created
+mkdir($dirname);
+
+// temp files created
+$fp = fopen($dirname/wonder12345, w);
+fclose($fp);
+$fp = fopen($dirname/wonder.txt, w);
+fclose($fp);
+$fp = fopen($dirname/file.text, w);
+fclose($fp);
+
+// glob() with default arguments
+var_dump( glob($dirname./*) );
+var_dump( glob($dirname./*.txt) );
+var_dump( glob($dirname./*.t?t) );
+var_dump( glob($dirname./*.t*t) );
+var_dump( glob($dirname./*.?) );
+var_dump( glob($dirname./*.*) );
+
+echo Done\n;
+?
+--CLEAN--
+?php
+$file_path = dirname(__FILE__);
+unlink($file_path/glob_basic/wonder12345);
+unlink($file_path/glob_basic/wonder.txt);
+unlink($file_path/glob_basic/file.text);
+rmdir($file_path/glob_basic/);
+?
+--EXPECTF--
+*** Testing glob() : basic functions ***
+array(3) {
+  [0]=
+  string(%d) %s/glob_basic/file.text
+  [1]=
+  string(%d) %s/glob_basic/wonder.txt
+  [2]=
+  string(%d) %s/glob_basic/wonder12345
+}
+array(1) {
+  [0]=
+  string(%d) %s/glob_basic/wonder.txt
+}
+array(1) {
+  [0]=
+  string(%d) %s/glob_basic/wonder.txt
+}
+array(2) {
+  [0]=
+  string(%d) %s/glob_basic/file.text
+  [1]=
+  string(%d) %s/glob_basic/wonder.txt
+}
+array(0) {
+}
+array(2) {
+  [0]=
+  string(%d) %s/glob_basic/file.text
+  [1]=
+  string(%d) %s/glob_basic/wonder.txt
+}
+Done
+--UEXPECTF--
+*** Testing glob() : basic functions ***
+array(3) {
+  [0]=
+  unicode(%d) %s/glob_basic/file.text
+  [1]=
+  unicode(%d) %s/glob_basic/wonder.txt
+  [2]=
+  unicode(%d) %s/glob_basic/wonder12345
+}
+array(1) {
+  [0]=
+  unicode(%d) %s/glob_basic/wonder.txt
+}
+array(1) {
+  [0]=
+  unicode(%d) %s/glob_basic/wonder.txt
+}
+array(2) {
+  [0]=
+  unicode(%d) %s/glob_basic/file.text
+  [1]=
+  unicode(%d) %s/glob_basic/wonder.txt
+}
+array(0) {
+}
+array(2) {
+  [0]=
+  unicode(%d) %s/glob_basic/file.text
+  [1]=
+  unicode(%d) %s/glob_basic/wonder.txt
+}
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/glob_error.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/glob_error.phpt
diff -u /dev/null php-src/ext/standard/tests/file/glob_error.phpt:1.2
--- /dev/null   Mon Jul 23 05:25:19 2007
+++ php-src/ext/standard/tests/file/glob_error.phpt Mon Jul 23 05:25:19 2007
@@ -0,0 +1,71 @@
+--TEST--
+Test glob() function: error conditions
+--FILE--
+?php
+/* Prototype: array glob ( string $pattern [, int $flags] );
+   Description: Find pathnames matching a pattern
+*/
+
+$file_path = dirname(__FILE__);
+
+// temp dir created
+mkdir($file_path/glob_error);
+// temp file created
+$fp = fopen($file_path/glob_error/wonder12345, w);
+fclose($fp);
+
+echo *** Testing glob() : error conditions ***\n;
+
+echo -- Testing glob() with unexpected no. of arguments --\n;
+var_dump( glob() );  // args  expected
+var_dump( glob(dirname(__FILE__)./glob_error/wonder12345, GLOB_ERR, 3) );  
// args  expected
+
+echo \n-- Testing glob() with invalid arguments --\n;
+var_dump( glob(dirname(__FILE__)./glob_error/wonder12345, '') );
+var_dump( glob(dirname(__FILE__)./glob_error/wonder12345, string) );
+
+echo Done\n;
+?
+--CLEAN--
+?php
+// temp file deleted
+unlink(dirname(__FILE__)./glob_error/wonder12345);
+// temp dir deleted
+rmdir(dirname(__FILE__)./glob_error);
+?
+--EXPECTF--
+*** Testing glob() : error conditions ***
+-- Testing glob() with unexpected no. of arguments --
+
+Warning: glob() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: glob() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
+-- Testing glob() with invalid arguments --
+
+Warning: glob() expects parameter 2 to be long, string given in %s on line %d
+NULL
+
+Warning: glob() expects parameter 2 to be long, string given in %s on line %d
+NULL
+Done
+--UEXPECTF--
+*** Testing glob() : error conditions ***
+-- Testing glob() with unexpected no. of arguments --
+
+Warning: glob() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: glob() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
+-- Testing glob() with invalid arguments --
+
+Warning: 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file glob_variation-win32.phpt

2007-07-23 Thread Raghubansh Kumar
kraghubaMon Jul 23 07:32:08 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileglob_variation-win32.phpt 
  Log:
  more testcases for glob() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/glob_variation-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/glob_variation-win32.phpt
+++ php-src/ext/standard/tests/file/glob_variation-win32.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file glob_variation-win32.phpt

2007-07-23 Thread Raghubansh Kumar
kraghubaMon Jul 23 10:45:11 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/fileglob_variation-win32.phpt 
  Log:
  More new testcases for glob()
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/glob_variation-win32.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/glob_variation-win32.phpt
diff -u /dev/null php-src/ext/standard/tests/file/glob_variation-win32.phpt:1.2
--- /dev/null   Mon Jul 23 10:45:11 2007
+++ php-src/ext/standard/tests/file/glob_variation-win32.phpt   Mon Jul 23 
10:45:11 2007
@@ -0,0 +1,833 @@
+--TEST--
+Test glob() function: usage variations
+--SKIPIF--
+?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+die('skip.. only for Windows');
+}
+?
+--FILE--
+?php
+/* Prototype: array glob ( string $pattern [, int $flags] );
+   Description: Find pathnames matching a pattern
+*/
+
+echo *** Testing glob() : usage variations ***\n;
+
+$file_path = dirname(__FILE__);
+
+// temp dir created
+mkdir($file_path/glob_variation);
+mkdir($file_path/glob_variation/wonder);
+
+// temp files created
+$fp = fopen($file_path/glob_variation/wonder12345, w);
+fclose($fp);
+$fp = fopen($file_path/glob_variation/wonder;123456, w);
+fclose($fp);
+
+$patterns = array (
+  $file_path/glob_variation/*der*,
+  $file_path/glob_variation/?onder*,
+  $file_path/glob_variation/w*der?*,
+  $file_path/glob_variation/*der5,
+  $file_path/glob_variation/??onder*,
+  $file_path/glob_variation/***der***,
+  $file_path/glob_variation/++onder*,
+  $file_path/glob_variation/WONDER5\0,
+  '$file_path/glob_variation/wonder5',
+  $file_path/glob_variation/?wonder?,
+  $file_path/glob_variation/wonder?,
+  TRUE  // boolean true
+);
+$counter = 1;
+/* loop through $patterns to match each $pattern with the files created
+   using glob() */
+foreach($patterns as $pattern) {
+  echo \n-- Iteration $counter --\n;
+  var_dump( glob($pattern) );  // default arguments
+  var_dump( glob($pattern, GLOB_MARK) );
+  var_dump( glob($pattern, GLOB_NOSORT) );
+  var_dump( glob($pattern, GLOB_NOCHECK) );
+  var_dump( glob($pattern, GLOB_NOESCAPE) );
+  var_dump( glob($pattern, GLOB_ERR) );
+  $counter++;
+}
+
+echo \n*** Testing glob() with pattern within braces ***\n;
+var_dump( glob($file_path/glob_variation/*{5}, GLOB_BRACE) );
+
+// delete temp files and dir
+unlink($file_path/glob_variation/wonder12345);
+unlink($file_path/glob_variation/wonder;123456);
+rmdir($file_path/glob_variation/wonder);
+rmdir($file_path/glob_variation);
+
+echo \n*** Testing glob() on directories ***\n;
+// temp dir created to check for pattern matching the sub dir created in it
+mkdir($file_path/glob_variation/wonder1/wonder2, 0777, true);
+
+$counter = 1;
+/* loop through $patterns to match each $pattern with the directories created
+   using glob() */
+foreach($patterns as $pattern) {
+  echo -- Iteration $counter --\n;
+  var_dump( glob($pattern, GLOB_ONLYDIR) );
+  $counter++;
+}
+
+echo Done\n;
+?
+--CLEAN--
+?php
+$file_path = dirname(__FILE__);
+rmdir($file_path/glob_variation/wonder1/wonder2);
+rmdir($file_path/glob_variation/wonder1/);
+rmdir($file_path/glob_variation/);
+?
+--EXPECTF--
+*** Testing glob() : usage variations ***
+
+-- Iteration 1 --
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder12345
+  [1]=
+  string(%d) %s/glob_variation/wonder;123456
+  [2]=
+  string(%d) %s/glob_variation/wonder\
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+
+-- Iteration 2 --
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder12345
+  [1]=
+  string(%d) %s/glob_variation/wonder;123456
+  [2]=
+  string(%d) %s/glob_variation/wonder\
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder
+  [1]=
+  string(%d) %s/glob_variation/wonder12345
+  [2]=
+  string(%d) %s/glob_variation/wonder;123456
+}
+array(3) {
+  [0]=
+  string(%d) %s/glob_variation/wonder

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file file.inc lstat_stat_variation1.phpt lstat_stat_variation10.phpt lstat_stat_variation11.phpt lstat_stat_variation12.phpt lstat_stat_variation13.

2007-07-26 Thread Raghubansh Kumar
kraghubaThu Jul 26 13:38:24 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filelstat_stat_variation13.phpt 
lstat_stat_variation14.phpt 
lstat_stat_variation15.phpt 
lstat_stat_variation21.phpt 
lstat_stat_variation16.phpt 
lstat_stat_variation20.phpt 
lstat_stat_variation17.phpt 
lstat_stat_variation10.phpt 
lstat_stat_variation9.phpt 
lstat_stat_variation18.phpt 
lstat_stat_variation11.phpt 
lstat_stat_variation8.phpt 
lstat_stat_variation19.phpt 
lstat_stat_variation12.phpt 
lstat_stat_variation7.phpt 

  Modified files:  
/php-src/ext/standard/tests/filelstat_stat_variation6.phpt 
lstat_stat_variation5.phpt 
lstat_stat_variation4.phpt 
lstat_stat_variation3.phpt 
lstat_stat_variation2.phpt 
file.inc 
lstat_stat_variation1.phpt 
  Log:
  file.inc : Added dumping of stat array in functions (compare_self_stat()  
compare_stats() )
  Smaller testcases for lstat_stat_variation[1-7].phpt files
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation6.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/lstat_stat_variation6.phpt
diff -u php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.1.2.2 
php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.1.2.2  Sat Jul 
21 17:35:37 2007
+++ php-src/ext/standard/tests/file/lstat_stat_variation6.phpt  Thu Jul 26 
13:38:24 2007
@@ -1,6 +1,5 @@
 --TEST--
-Test lstat() and stat() functions: usage variations - dir/file/link names in 
objects
-
+Test lstat() and stat() functions: usage variations - effects of touch() on 
link 
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
@@ -16,65 +15,38 @@
Description: Gives information about a file
 */
 
-/* test for stats of dir/file/link when their names are stored in objects */
+/* test the effects of touch() on stats of link */
 
 $file_path = dirname(__FILE__);
 require $file_path/file.inc;
 
 
 /* create temp file, link and directory */
-mkdir($file_path/lstat_stat_variation6/);  // temp dir
-
-$fp = fopen($file_path/lstat_stat_variation6.tmp, w);  // temp file
-fclose($fp);
-
-// temp link
-symlink($file_path/lstat_stat_variation6.tmp, 
$file_path/lstat_stat_variation6_link.tmp);
-
-/* Checking lstat() and stat() on file/link/directory where filenames,
-   linknames and directory names are stored in object and array */
-
-echo \n*** Testing lstat() and stat() with filename, linkname
-and directory name stored inside a object ***\n;
-
-// creating object with members as numeric and non-numeric filename, linkname 
and directory name
-class object_temp {
-  public $var_name;
-  public function object_temp($name) {
-$this-var_name = $name;
-  }
-}
-// directory as member
-$obj1 = new object_temp($file_path/lstat_stat_variation6/);
-$obj2 = new object_temp($file_path/lstat_stat_variation6a/);
-
-// file as member
-$obj3 = new object_temp($file_path/lstat_stat_variation6.tmp);
-$obj4 = new object_temp($file_path/lstat_stat_variation6a.tmp);
-
-// link as member
-$obj5 = new object_temp($file_path/lstat_stat_variation6_link.tmp);
-$obj6 = new object_temp($file_path/lstat_stat_variation6a_link.tmp);
-
-echo \n-- Testing lstat() and stat() with softlink, linkname stored inside an 
object --\n;
-
-var_dump( lstat($obj5-var_name) );
-
-var_dump( symlink($obj5-var_name, $obj6-var_name) );
-var_dump( lstat($obj6-var_name) );
-
-echo \n-- Testing stat() on filename stored inside an object --\n;
-var_dump( stat($obj3-var_name) );
 
-$fp = fopen($file_path/lstat_stat_variation6a.tmp, w);
+$file_name = $file_path/lstat_stat_variation6.tmp;
+$fp = fopen($file_name, w);  // temp file
 fclose($fp);
-var_dump( stat($obj4-var_name) );
+$link_name = $file_path/lstat_stat_variation_link6.tmp;
+symlink($file_name, $link_name);  // temp link
 
-echo \n-- Testing stat() on directory name stored inside an object --\n;
-var_dump( stat($obj1-var_name) );
-
-mkdir($file_path/lstat_stat_variation6a/);
-var_dump( stat($obj2-var_name) );
+// touch a link, check stat, there should be difference in atime
+echo *** Testing lstat() 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fputcsv_error.phpt fputcsv_variation1.phpt fputcsv_variation10.phpt fputcsv_variation11.phpt fputcsv_variation12.phpt fputcsv_variation13.phpt

2007-08-07 Thread Raghubansh Kumar
kraghubaWed Aug  8 03:53:07 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefputcsv_variation8.phpt 
fputcsv_variation9.phpt 
fputcsv_variation10.phpt 
fputcsv_variation11.phpt 
fputcsv_variation12.phpt 
fputcsv_variation13.phpt 
fputcsv_variation14.phpt 
fputcsv_error.phpt 
fputcsv_variation1.phpt 
fputcsv_variation2.phpt 
fputcsv_variation3.phpt 
fputcsv_variation4.phpt 
fputcsv_variation5.phpt 
fputcsv_variation7.phpt 
  Log:
  New testcases for fputcsv() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation8.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation8.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation8.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation9.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation9.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation9.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation10.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation10.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation10.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation11.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation11.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation11.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation12.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation12.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation12.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation13.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation13.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation13.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation14.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation14.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation14.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_error.phpt
+++ php-src/ext/standard/tests/file/fputcsv_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation1.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation2.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation3.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation4.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation5.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation7.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation7.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation7.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fputcsv_variation6.phpt

2007-08-08 Thread Raghubansh Kumar
kraghubaWed Aug  8 13:08:18 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefputcsv_variation6.phpt 
  Log:
  More testcases for fputcsv() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fputcsv_variation6.phpt
+++ php-src/ext/standard/tests/file/fputcsv_variation6.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file fputcsv_variation6.phpt

2007-08-08 Thread Raghubansh Kumar
kraghubaWed Aug  8 13:09:42 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filefputcsv_variation6.phpt 
  Log:
  More testcases for fputcsv() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fputcsv_variation6.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/fputcsv_variation6.phpt
diff -u /dev/null php-src/ext/standard/tests/file/fputcsv_variation6.phpt:1.2
--- /dev/null   Wed Aug  8 13:09:42 2007
+++ php-src/ext/standard/tests/file/fputcsv_variation6.phpt Wed Aug  8 
13:09:42 2007
@@ -0,0 +1,1596 @@
+--TEST--
+Test fputcsv() : usage variations - with different delimiter and enclosure 
+--FILE--
+?php
+/* 
+ Prototype: array fputcsv ( resource $handle , array $fields [, string 
$delimiter [, string $enclosure]]] );
+ Description: Format line as CSV and write to the file pointer 
+*/
+
+/*
+   Testing fputcsv() to write to a file when delimiter are different from those
+   present in the field to be written to the file
+ */
+
+echo *** Testing fputcsv() : with different delimiter and enclosure ***\n;
+
+/* the array is with three elements in it. Each element should be read as 
+   1st element is delimiter, 2nd element is enclosure 
+   and 3rd element is csv fields
+*/
+$csv_lists = array (
+  array(',', '', array('water,fruit') ),
+  array(',', '', array('water,fruit') ),
+  array(',', '', array('water,fruit') ),
+  array(' ', '^', array('^water^ ^fruit^')),
+  array(':', '', array('water:fruit')),
+  array('=', '=', array('=water===fruit=')),
+  array('-', '-', array('-water--fruit-air')),
+  array('-', '-', array('-water---fruit---air-')),
+  array(':', '', array('::,::,:'))
+
+);
+$file_path = dirname(__FILE__);
+$filename = $file_path/fputcsv_variation6.tmp;
+
+$file_modes = array (r+, r+b, r+t,
+ a+, a+b, a+t,
+ w+, w+b, w+t,
+ x+, x+b, x+t); 
+
+$loop_counter = 1;
+foreach ($csv_lists as $csv_list) {
+  for($mode_counter = 0; $mode_counter  count($file_modes); $mode_counter++) {
+
+echo \n-- file opened in $file_modes[$mode_counter] --\n;  
+// create the file and add the content with has csv fields
+if ( strstr($file_modes[$mode_counter], r) ) {
+  $file_handle = fopen($filename, w);
+} else {
+  $file_handle = fopen($filename, $file_modes[$mode_counter] );
+}
+if ( !$file_handle ) {
+  echo Error: failed to create file $filename!\n;
+  exit();
+}
+$delimiter = $csv_list[0];
+$enclosure = $csv_list[1];
+$csv_field = $csv_list[2];
+
+// write to a file in csv format
+var_dump( fputcsv($file_handle, $csv_field, '+', '%') );
+// check the file pointer position and eof
+var_dump( ftell($file_handle) );
+var_dump( feof($file_handle) );
+//close the file
+fclose($file_handle);
+
+// print the file contents 
+var_dump( file_get_contents($filename) );
+
+//delete file
+unlink($filename);
+  } //end of mode loop 
+} // end of foreach
+
+echo Done\n;
+?
+--EXPECTF--
+*** Testing fputcsv() : with different delimiter and enclosure ***
+
+-- file opened in r+ --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in r+b --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in r+t --
+int(12)
+int(12)
+bool(false)
+string(%d) water,fruit
+
+
+-- file opened in a+ --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in a+b --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in a+t --
+int(12)
+int(12)
+bool(false)
+string(%d) water,fruit
+
+
+-- file opened in w+ --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in w+b --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in w+t --
+int(12)
+int(12)
+bool(false)
+string(%d) water,fruit
+
+
+-- file opened in x+ --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in x+b --
+int(12)
+int(12)
+bool(false)
+string(12) water,fruit
+
+
+-- file opened in x+t --
+int(12)
+int(12)
+bool(false)
+string(%d) water,fruit
+
+
+-- file opened in r+ --
+int(15)
+int(15)
+bool(false)
+string(15) water,fruit
+
+
+-- file opened in r+b --
+int(15)
+int(15)
+bool(false)
+string(15) water,fruit
+
+
+-- file opened in r+t --
+int(15)
+int(15)
+bool(false)
+string(%d) water,fruit
+
+
+-- file opened in a+ --
+int(15)
+int(15)
+bool(false)
+string(15) water,fruit
+
+
+-- file opened in a+b --
+int(15)
+int(15)
+bool(false)
+string(15) water,fruit
+
+
+-- file opened in a+t --
+int(15)
+int(15)
+bool(false)
+string(%d) water,fruit
+
+
+-- file opened in w+ --
+int(15)
+int(15)
+bool(false)
+string(15) water,fruit
+
+
+-- file opened in w+b --
+int(15)
+int(15)
+bool(false)
+string(15) water,fruit
+
+
+-- file opened in w+t --
+int(15)
+int(15)
+bool(false)
+string(%d) water,fruit
+
+
+-- file opened in x+ --
+int(15)
+int(15)
+bool(false)

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fgetcsv_error.phpt fgetcsv_variation1.phpt fgetcsv_variation10.phpt fgetcsv_variation11.phpt fgetcsv_variation12.phpt fgetcsv_variation13.phpt

2007-08-08 Thread Raghubansh Kumar
kraghubaWed Aug  8 13:13:18 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefgetcsv_variation27.phpt 
fgetcsv_variation2.phpt 
fgetcsv_variation17.phpt 
fgetcsv_variation29.phpt 
fgetcsv_variation4.phpt 
fgetcsv_variation19.phpt 
fgetcsv_variation6.phpt 
fgetcsv_variation8.phpt 
fgetcsv_variation30.phpt 
fgetcsv_variation20.phpt 
fgetcsv_variation10.phpt 
fgetcsv_variation22.phpt 
fgetcsv_variation12.phpt 
fgetcsv_variation24.phpt 
fgetcsv_variation14.phpt 
fgetcsv_variation26.phpt 
fgetcsv_variation16.phpt 
fgetcsv_variation1.phpt 
fgetcsv_variation28.phpt 
fgetcsv_variation18.phpt 
fgetcsv_variation3.phpt 
fgetcsv_variation5.phpt 
fgetcsv_variation7.phpt 
fgetcsv_variation9.phpt 
fgetcsv_error.phpt 
fgetcsv_variation31.phpt 
fgetcsv_variation21.phpt 
fgetcsv_variation11.phpt 
fgetcsv_variation23.phpt 
fgetcsv_variation13.phpt 
fgetcsv_variation25.phpt 
fgetcsv_variation15.phpt 
  Log:
  New Testcases for fgetcsv() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation27.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation27.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation27.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation2.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation17.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation17.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation17.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation29.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation29.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation29.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation4.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation19.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation19.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation19.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation6.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation8.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation8.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation8.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation30.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation30.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation30.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation20.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation20.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation20.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation10.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation10.phpt
+++ php-src/ext/standard/tests/file/fgetcsv_variation10.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetcsv_variation22.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetcsv_variation22.phpt
+++ 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file tempnam_variation1-win32.phpt tempnam_variation1.phpt tempnam_variation2-win32.phpt tempnam_variation2.phpt tempnam_variation3-win32.phpt tempn

2007-08-08 Thread Raghubansh Kumar
kraghubaThu Aug  9 03:34:00 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filetempnam_variation3-win32.phpt 
tempnam_variation1.phpt 
tempnam_variation2.phpt 
tempnam_variation3.phpt 
tempnam_variation4.phpt 
tempnam_variation7-win32.phpt 
tempnam_variation5.phpt 
tempnam_variation6.phpt 
tempnam_variation7.phpt 
tempnam_variation1-win32.phpt 
tempnam_variation2-win32.phpt 
  Log:
  New testcases for tempnam() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation3-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation1.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation2.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation3.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation4.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation7-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation7-win32.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation7-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation5.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation6.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation7.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation7.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation7.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation1-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation1-win32.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation1-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation2-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_variation2-win32.phpt
+++ php-src/ext/standard/tests/file/tempnam_variation2-win32.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file tempnam_variation1-win32.phpt tempnam_variation1.phpt tempnam_variation2-win32.phpt tempnam_variation2.phpt tempnam_variation3-win32.phpt tempnam_variat

2007-08-08 Thread Raghubansh Kumar
kraghubaThu Aug  9 03:35:23 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filetempnam_variation2.phpt 
tempnam_variation3.phpt 
tempnam_variation4.phpt 
tempnam_variation7-win32.phpt 
tempnam_variation5.phpt 
tempnam_variation6.phpt 
tempnam_variation7.phpt 
tempnam_variation1-win32.phpt 
tempnam_variation2-win32.phpt 
tempnam_variation3-win32.phpt 
tempnam_variation1.phpt 
  Log:
  New testcases for tempnam() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation2.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/tempnam_variation2.phpt
diff -u /dev/null php-src/ext/standard/tests/file/tempnam_variation2.phpt:1.2
--- /dev/null   Thu Aug  9 03:35:22 2007
+++ php-src/ext/standard/tests/file/tempnam_variation2.phpt Thu Aug  9 
03:35:22 2007
@@ -0,0 +1,132 @@
+--TEST--
+Test tempnam() function: usage variations - relative paths
+--SKIPIF--
+?php
+if(substr(PHP_OS, 0, 3) == WIN)
+  die(skip Do not run on Windows);
+?
+--FILE--
+?php
+/* Prototype:  string tempnam ( string $dir, string $prefix );
+   Description: Create file with unique file name.
+*/
+
+/* Creating unique files in various dirs by passing relative paths to $dir arg 
*/
+
+echo *** Testing tempnam() with relative paths ***\n;
+$dir_name = dirname(__FILE__)./tempnam_variation2;
+mkdir($dir_name);
+$dir_path = $dir_name./tempnam_variation2_sub;
+mkdir($dir_path);
+
+$old_dir_path = getcwd();
+chdir(dirname(__FILE__));
+
+$dir_paths = array(
+  $dir_path,
+  $dir_path/,
+  $dir_path/..,
+  $dir_path//../,
+  $dir_path/../.././tempnam_variation2,
+  $dir_path/..///tempnam_variation2_sub//..//../tempnam_variation2,
+  .,
+  ./tempnam_variation2/../tempnam_variation2/tempnam_variation2_sub
+);
+
+for($i = 0; $icount($dir_paths); $i++) {
+  $j = $i+1;
+  echo \n-- Iteration $j --\n;
+  $file_name = tempnam($dir_paths[$i], tempnam_variation2.tmp);
+  
+  if( file_exists($file_name) ){
+
+echo File name is = ;
+print(realpath($file_name));
+echo \n;
+
+echo File permissions are = ;
+printf(%o, fileperms($file_name) );
+echo \n;
+  }
+  else
+echo -- File is not created --;
+unlink($file_name);
+}
+
+chdir($old_dir_path);
+rmdir($dir_path);
+rmdir($dir_name);
+
+echo \n*** Done ***\n;
+--EXPECTF--
+*** Testing tempnam() with relative paths ***
+
+-- Iteration 1 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 2 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 3 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 4 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 5 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 6 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 7 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 8 --
+File name is = %s
+File permissions are = 100600
+
+*** Done ***
+--UEXPECTF--
+*** Testing tempnam() with relative paths ***
+
+-- Iteration 1 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 2 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 3 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 4 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 5 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 6 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 7 --
+File name is = %s
+File permissions are = 100600
+
+-- Iteration 8 --
+File name is = %s
+File permissions are = 100600
+
+*** Done ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_variation3.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/tempnam_variation3.phpt
diff -u /dev/null php-src/ext/standard/tests/file/tempnam_variation3.phpt:1.2
--- /dev/null   Thu Aug  9 03:35:22 2007
+++ php-src/ext/standard/tests/file/tempnam_variation3.phpt Thu Aug  9 
03:35:22 2007
@@ -0,0 +1,123 @@
+--TEST--
+Test tempnam() function: usage variations - invalid/non-existing file
+--SKIPIF--
+?php
+if(substr(PHP_OS, 0, 3) == WIN)
+  die(skip DO not run on Windows);
+?
+--FILE--
+?php
+/* Prototype:  string tempnam ( string $dir, string $prefix );
+   Description: Create file with unique file name.
+*/
+
+/* Passing invalid/non-existing args for $prefix */
+
+echo *** Testing tempnam() with invalid/non-existing file names ***\n;
+$file_path = dirname(__FILE__);
+
+/* An array of names, which will be passed as a file name */ 
+$names_arr = array(
+  /* Invalid args */ 
+  -1,
+  TRUE,

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file copy_variation1.phpt copy_variation10.phpt copy_variation11.phpt copy_variation12-win32.phpt copy_variation12.phpt copy_variation13.phpt copy_v

2007-08-09 Thread Raghubansh Kumar
kraghubaFri Aug 10 02:57:30 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filecopy_variation9.phpt 
copy_variation11.phpt 
copy_variation13.phpt 
copy_variation15.phpt 
copy_variation2-win32.phpt 
copy_variation17.phpt 
copy_variation4-win32.phpt 
copy_variation6-win32.phpt 
copy_variation12-win32.phpt 
copy_variation16-win32.phpt 
copy_variation2.phpt 
copy_variation4.phpt 
copy_variation6.phpt 
copy_variation8.phpt 
copy_variation10.phpt 
copy_variation12.phpt 
copy_variation14.phpt 
copy_variation16.phpt 
copy_variation18.phpt 
copy_variation3-win32.phpt 
copy_variation5-win32.phpt 
copy_variation1.phpt 
copy_variation3.phpt 
copy_variation5.phpt 
copy_variation7.phpt 
  Log:
  More new testcases for copy() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
+++ php-src/ext/standard/tests/file/copy_variation9.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation11.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation11.phpt
+++ php-src/ext/standard/tests/file/copy_variation11.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation13.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation13.phpt
+++ php-src/ext/standard/tests/file/copy_variation13.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
+++ php-src/ext/standard/tests/file/copy_variation15.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation2-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation2-win32.phpt
+++ php-src/ext/standard/tests/file/copy_variation2-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation17.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation17.phpt
+++ php-src/ext/standard/tests/file/copy_variation17.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation4-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation4-win32.phpt
+++ php-src/ext/standard/tests/file/copy_variation4-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation6-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation6-win32.phpt
+++ php-src/ext/standard/tests/file/copy_variation6-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation12-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation12-win32.phpt
+++ php-src/ext/standard/tests/file/copy_variation12-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation16-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation16-win32.phpt
+++ php-src/ext/standard/tests/file/copy_variation16-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation2.phpt
+++ php-src/ext/standard/tests/file/copy_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation4.phpt
+++ php-src/ext/standard/tests/file/copy_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation6.phpt
+++ php-src/ext/standard/tests/file/copy_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation8.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/copy_variation8.phpt
+++ php-src/ext/standard/tests/file/copy_variation8.phpt


[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings strtolower-win32.phpt strtolower.phpt strtoupper1-win32.phpt strtoupper1.phpt

2007-08-09 Thread Raghubansh Kumar
kraghubaFri Aug 10 03:03:49 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings strtoupper1-win32.phpt 
strtoupper1.phpt 
strtolower-win32.phpt 
strtolower.phpt 
  Log:
  New testcases for strtolower() and strtoupper() functions
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtoupper1-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strtoupper1-win32.phpt
+++ php-src/ext/standard/tests/strings/strtoupper1-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtoupper1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strtoupper1.phpt
+++ php-src/ext/standard/tests/strings/strtoupper1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtolower-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strtolower-win32.phpt
+++ php-src/ext/standard/tests/strings/strtolower-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtolower.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strtolower.phpt
+++ php-src/ext/standard/tests/strings/strtolower.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings strtolower-win32.phpt strtolower.phpt strtoupper1-win32.phpt strtoupper1.phpt

2007-08-09 Thread Raghubansh Kumar
kraghubaFri Aug 10 03:05:01 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings strtoupper1-win32.phpt 
strtoupper1.phpt 
strtolower-win32.phpt 
strtolower.phpt 
  Log:
  New testcases for strtolower() and strtoupper() functions
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strtoupper1-win32.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/strtoupper1-win32.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/strtoupper1-win32.phpt:1.2
--- /dev/null   Fri Aug 10 03:05:00 2007
+++ php-src/ext/standard/tests/strings/strtoupper1-win32.phpt   Fri Aug 10 
03:05:00 2007
@@ -0,0 +1,672 @@
+--TEST--
+Test strtoupper() function
+--SKIPIF--
+?php
+if( (substr(PHP_OS, 0, 3) != WIN)  (@setlocale(LC_CTYPE, ) != 
English_United States.1252) )
+  die('skip Run only on Windows with locale as English_United States.1252');
+?
+--FILE--
+?php
+/* Prototype: 
+ string strtoupper ( string $string );
+   Description: 
+ Returns string with all alphabetic characters converted to uppercase
+*/ 
+
+echo *** Testing strtoupper() with all 256 chars ***\n;
+for ($i=0; $i=255; $i++){
+  $char = chr($i);
+  print(bin2hex(b$char)). = .(bin2hex(strtoupper(b$char))).\n;
+}
+
+echo \n*** Testing strtoupper() with basic strings ***\n;
+$str = Mary Had A liTTle LAmb and ShE loveD IT So\n;
+var_dump(strtoupper($str));
+
+echo \n*** Testing strtoupper() with various strings ***;
+/* strings to pass strtoupper() */ 
+$strings = array (
+  ,
+  string,
+  stRINg0234,
+  1.233.344StrinG12333,
+  $$@@@ ABCDEF !!!***,
+  ABCD\0abcdABCD, 
+  NULL,
+  TRUE,
+  FALSE,
+  array()
+);
+
+$count = 0;
+/* loop through to check possible variations */
+foreach ($strings as $string) {
+  echo \n-- Iteration $count --\n;
+  var_dump( strtoupper($string) );
+  $count++;
+}
+
+echo \n*** Testing strtoupper() with two different case strings ***\n;
+if (strtoupper(HeLLo woRLd) === strtoupper(hEllo WORLD))
+  echo strings are same, with Case Insensitive\n;
+else
+  echo strings are not same\n;
+
+echo \n*** Testing error conditions ***;
+var_dump( strtoupper() ); /* Zero arguments */
+var_dump( strtoupper(a, b) ); /* Arguments  Expected */
+
+echo *** Done ***;
+?
+--EXPECTF--
+*** Testing strtoupper() with all 256 chars ***
+00 = 00
+01 = 01
+02 = 02
+03 = 03
+04 = 04
+05 = 05
+06 = 06
+07 = 07
+08 = 08
+09 = 09
+0a = 0a
+0b = 0b
+0c = 0c
+0d = 0d
+0e = 0e
+0f = 0f
+10 = 10
+11 = 11
+12 = 12
+13 = 13
+14 = 14
+15 = 15
+16 = 16
+17 = 17
+18 = 18
+19 = 19
+1a = 1a
+1b = 1b
+1c = 1c
+1d = 1d
+1e = 1e
+1f = 1f
+20 = 20
+21 = 21
+22 = 22
+23 = 23
+24 = 24
+25 = 25
+26 = 26
+27 = 27
+28 = 28
+29 = 29
+2a = 2a
+2b = 2b
+2c = 2c
+2d = 2d
+2e = 2e
+2f = 2f
+30 = 30
+31 = 31
+32 = 32
+33 = 33
+34 = 34
+35 = 35
+36 = 36
+37 = 37
+38 = 38
+39 = 39
+3a = 3a
+3b = 3b
+3c = 3c
+3d = 3d
+3e = 3e
+3f = 3f
+40 = 40
+41 = 41
+42 = 42
+43 = 43
+44 = 44
+45 = 45
+46 = 46
+47 = 47
+48 = 48
+49 = 49
+4a = 4a
+4b = 4b
+4c = 4c
+4d = 4d
+4e = 4e
+4f = 4f
+50 = 50
+51 = 51
+52 = 52
+53 = 53
+54 = 54
+55 = 55
+56 = 56
+57 = 57
+58 = 58
+59 = 59
+5a = 5a
+5b = 5b
+5c = 5c
+5d = 5d
+5e = 5e
+5f = 5f
+60 = 60
+61 = 41
+62 = 42
+63 = 43
+64 = 44
+65 = 45
+66 = 46
+67 = 47
+68 = 48
+69 = 49
+6a = 4a
+6b = 4b
+6c = 4c
+6d = 4d
+6e = 4e
+6f = 4f
+70 = 50
+71 = 51
+72 = 52
+73 = 53
+74 = 54
+75 = 55
+76 = 56
+77 = 57
+78 = 58
+79 = 59
+7a = 5a
+7b = 7b
+7c = 7c
+7d = 7d
+7e = 7e
+7f = 7f
+80 = 80
+81 = 81
+82 = 82
+83 = 83
+84 = 84
+85 = 85
+86 = 86
+87 = 87
+88 = 88
+89 = 89
+8a = 8a
+8b = 8b
+8c = 8c
+8d = 8d
+8e = 8e
+8f = 8f
+90 = 90
+91 = 91
+92 = 92
+93 = 93
+94 = 94
+95 = 95
+96 = 96
+97 = 97
+98 = 98
+99 = 99
+9a = 8a
+9b = 9b
+9c = 8c
+9d = 9d
+9e = 8e
+9f = 9f
+a0 = a0
+a1 = a1
+a2 = a2
+a3 = a3
+a4 = a4
+a5 = a5
+a6 = a6
+a7 = a7
+a8 = a8
+a9 = a9
+aa = aa
+ab = ab
+ac = ac
+ad = ad
+ae = ae
+af = af
+b0 = b0
+b1 = b1
+b2 = b2
+b3 = b3
+b4 = b4
+b5 = b5
+b6 = b6
+b7 = b7
+b8 = b8
+b9 = b9
+ba = ba
+bb = bb
+bc = bc
+bd = bd
+be = be
+bf = bf
+c0 = c0
+c1 = c1
+c2 = c2
+c3 = c3
+c4 = c4
+c5 = c5
+c6 = c6
+c7 = c7
+c8 = c8
+c9 = c9
+ca = ca
+cb = cb
+cc = cc
+cd = cd
+ce = ce
+cf = cf
+d0 = d0
+d1 = d1
+d2 = d2
+d3 = d3
+d4 = d4
+d5 = d5
+d6 = d6
+d7 = d7
+d8 = d8
+d9 = d9
+da = da
+db = db
+dc = dc
+dd = dd
+de = de
+df = df
+e0 = c0
+e1 = c1
+e2 = c2
+e3 = c3
+e4 = c4
+e5 = c5
+e6 = c6
+e7 = c7
+e8 = c8
+e9 = c9
+ea = ca
+eb = cb
+ec = cc
+ed = cd
+ee = ce
+ef = cf
+f0 = d0
+f1 = d1
+f2 = d2
+f3 = d3
+f4 = d4
+f5 = d5
+f6 = d6
+f7 = f7
+f8 = d8
+f9 = d9
+fa = da
+fb = db
+fc = dc
+fd = dd
+fe = de
+ff = 9f
+
+*** Testing strtoupper() with basic strings ***
+string(43) MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
+
+
+*** Testing strtoupper() with various strings ***
+-- Iteration 0 --
+string(0) 
+
+-- Iteration 1 --
+string(6) STRING
+
+-- Iteration 2 --

[PHP-CVS] cvs: php-src /ext/standard/tests/file tempnam_error.phpt

2007-08-09 Thread Raghubansh Kumar
kraghubaFri Aug 10 03:33:00 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filetempnam_error.phpt 
  Log:
  more new testcases for tempnam() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_error.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/tempnam_error.phpt
diff -u /dev/null php-src/ext/standard/tests/file/tempnam_error.phpt:1.2
--- /dev/null   Fri Aug 10 03:33:00 2007
+++ php-src/ext/standard/tests/file/tempnam_error.phpt  Fri Aug 10 03:33:00 2007
@@ -0,0 +1,72 @@
+--TEST--
+Test tempnam() function: error conditions
+--FILE--
+?php
+/* Prototype:  string tempnam ( string $dir, string $prefix );
+   Description: Create file with unique file name.
+*/
+
+echo *** Testing tempnam() error conditions ***\n;
+$file_path = dirname(__FILE__);
+
+/* More number of arguments than expected */
+var_dump( tempnam($file_path, tempnam_error.tmp, ) ); //Two Valid  One 
Invalid
+var_dump( tempnam($file_path, tempnam_error.tmp, TRUE) );
+
+/* Less number of arguments than expected */
+var_dump( tempnam(tempnam_error) );  //One Valid arg
+var_dump( tempnam($file_path) );  //One Valid arg
+var_dump( tempnam() );  //Empty string
+var_dump( tempnam(NULL) );  //NULL as arg
+var_dump( tempnam() );  //Zero args
+
+echo *** Done ***\n;
+?
+--EXPECTF--
+*** Testing tempnam() error conditions ***
+
+Warning: tempnam() expects exactly 2 parameters, 3 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 3 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+*** Done ***
+--UEXPECTF--
+*** Testing tempnam() error conditions ***
+
+Warning: tempnam() expects exactly 2 parameters, 3 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 3 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: tempnam() expects exactly 2 parameters, 0 given in %s on line %d
+NULL
+*** Done ***

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fscanf_error.phpt fscanf_variation1.phpt fscanf_variation10.phpt fscanf_variation11.phpt fscanf_variation12.phpt fscanf_variation13.phpt fscanf

2007-08-10 Thread Raghubansh Kumar
kraghubaFri Aug 10 17:54:49 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefscanf_variation1.phpt 
fscanf_variation50.phpt 
fscanf_variation30.phpt 
fscanf_variation42.phpt 
fscanf_variation54.phpt 
fscanf_variation10.phpt 
fscanf_variation5.phpt 
fscanf_variation22.phpt 
fscanf_variation34.phpt 
fscanf_variation46.phpt 
fscanf_variation9.phpt 
fscanf_variation14.phpt 
fscanf_variation26.phpt 
fscanf_variation38.phpt 
fscanf_variation18.phpt 
fscanf_variation41.phpt 
fscanf_variation53.phpt 
fscanf_variation4.phpt 
fscanf_variation21.phpt 
fscanf_variation33.phpt 
fscanf_variation45.phpt 
fscanf_variation8.phpt 
fscanf_variation13.phpt 
fscanf_variation25.phpt 
fscanf_variation37.phpt 
fscanf_variation49.phpt 
fscanf_variation17.phpt 
fscanf_variation29.phpt 
fscanf_variation40.phpt 
fscanf_variation3.phpt 
fscanf_variation52.phpt 
fscanf_variation20.phpt 
fscanf_variation32.phpt 
fscanf_variation44.phpt 
fscanf_variation7.phpt 
fscanf_variation12.phpt 
fscanf_variation24.phpt 
fscanf_variation36.phpt 
fscanf_variation48.phpt 
fscanf_variation16.phpt 
fscanf_variation28.phpt 
fscanf_error.phpt 
fscanf_variation2.phpt 
fscanf_variation51.phpt 
fscanf_variation31.phpt 
fscanf_variation43.phpt 
fscanf_variation6.phpt 
fscanf_variation55.phpt 
fscanf_variation11.phpt 
fscanf_variation23.phpt 
fscanf_variation35.phpt 
fscanf_variation47.phpt 
fscanf_variation15.phpt 
fscanf_variation27.phpt 
fscanf_variation39.phpt 
fscanf_variation19.phpt 
  Log:
  New testcases for fscanf() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fscanf_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fscanf_variation1.phpt
+++ php-src/ext/standard/tests/file/fscanf_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fscanf_variation50.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fscanf_variation50.phpt
+++ php-src/ext/standard/tests/file/fscanf_variation50.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fscanf_variation30.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fscanf_variation30.phpt
+++ php-src/ext/standard/tests/file/fscanf_variation30.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fscanf_variation42.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fscanf_variation42.phpt
+++ php-src/ext/standard/tests/file/fscanf_variation42.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fscanf_variation54.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fscanf_variation54.phpt
+++ php-src/ext/standard/tests/file/fscanf_variation54.phpt


[PHP-CVS] cvs: php-src /ext/standard/tests/file htmlentities19.phpt htmlspecialchars.phpt

2007-08-10 Thread Raghubansh Kumar
kraghubaFri Aug 10 15:08:45 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filehtmlspecialchars.phpt 
htmlentities19.phpt 
  Log:
  New testcases for htmlentities()  htmlspecialchars()
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/htmlspecialchars.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/htmlspecialchars.phpt
diff -u /dev/null php-src/ext/standard/tests/file/htmlspecialchars.phpt:1.2
--- /dev/null   Fri Aug 10 15:08:45 2007
+++ php-src/ext/standard/tests/file/htmlspecialchars.phpt   Fri Aug 10 
15:08:45 2007
@@ -0,0 +1,615 @@
+--TEST--
+Test htmlspecialchars() function
+--FILE--
+?php
+/* Prototype: string htmlspecialchars ( string $string [, int $quote_style [, 
string $charset]] );
+   Description: Convert special characters to HTML entities
+*/
+
+/* retrieving htmlspecialchars from the ANSI character table */
+echo *** Retrieving htmlspecialchars for 256 characters ***\n;
+for($i=0; $i256; $i++)
+var_dump( bin2hex( htmlspecialchars(bchr($i)) ) );
+
+/* giving NULL as the argument */
+echo \n*** Testing htmlspecialchars() with NULL as first, second and third 
argument ***\n;
+var_dump( htmlspecialchars(br, NULL, 'iso-8859-1') );
+var_dump( htmlspecialchars(br, ENT_NOQUOTES, NULL) );
+var_dump( htmlspecialchars(br, ENT_QUOTES, NULL) );
+var_dump( htmlspecialchars(br, ENT_COMPAT, NULL) );
+var_dump( htmlspecialchars(NULL, NULL, NULL) );
+
+/* giving long string to check for proper memory re-allocation */
+echo \n*** Checking a long string for proper memory allocation ***\n;
+var_dump( htmlspecialchars(brTestingpNew file./ppbrFile 
biuWORKS!!!/i/u/b/pbrpEnd of file!!!/p, ENT_QUOTES, 
'iso-8859-1' ) );
+
+/* Giving a normal string */
+echo \n*** Testing a normal string with htmlspecialchars() ***\n;
+var_dump( htmlspecialchars(brTestingpNew file./p , ENT_QUOTES, 
'iso-8859-1' ) );
+
+/* checking behavior of quote */
+echo \n*** Testing htmlspecialchars() on a quote...\n;
+$str = A 'quote' is bbold/b;
+var_dump( htmlspecialchars($str) );
+var_dump( htmlspecialchars($str, ENT_QUOTES) );
+var_dump( htmlspecialchars($str, ENT_NOQUOTES) );
+var_dump( htmlspecialchars($str, ENT_COMPAT) );
+
+echo \n*** Testing error conditions ***\n;
+/* zero argument */
+var_dump( htmlspecialchars() );
+
+/* giving arguments more than expected */
+var_dump( htmlspecialchars(br,ENT_QUOTES,'iso-8859-1', test2) );
+
+echo Done\n
+?
+--EXPECTF--
+*** Retrieving htmlspecialchars for 256 characters ***
+string(12) 636872283029
+string(12) 636872283129
+string(12) 636872283229
+string(12) 636872283329
+string(12) 636872283429
+string(12) 636872283529
+string(12) 636872283629
+string(12) 636872283729
+string(12) 636872283829
+string(12) 636872283929
+string(14) 63687228313029
+string(14) 63687228313129
+string(14) 63687228313229
+string(14) 63687228313329
+string(14) 63687228313429
+string(14) 63687228313529
+string(14) 63687228313629
+string(14) 63687228313729
+string(14) 63687228313829
+string(14) 63687228313929
+string(14) 63687228323029
+string(14) 63687228323129
+string(14) 63687228323229
+string(14) 63687228323329
+string(14) 63687228323429
+string(14) 63687228323529
+string(14) 63687228323629
+string(14) 63687228323729
+string(14) 63687228323829
+string(14) 63687228323929
+string(14) 63687228333029
+string(14) 63687228333129
+string(14) 63687228333229
+string(14) 6368722829
+string(14) 63687228333429
+string(14) 63687228333529
+string(14) 63687228333629
+string(14) 63687228333729
+string(14) 63687228333829
+string(14) 63687228333929
+string(14) 63687228343029
+string(14) 63687228343129
+string(14) 63687228343229
+string(14) 63687228343329
+string(14) 63687228343429
+string(14) 63687228343529
+string(14) 63687228343629
+string(14) 63687228343729
+string(14) 63687228343829
+string(14) 63687228343929
+string(14) 63687228353029
+string(14) 63687228353129
+string(14) 63687228353229
+string(14) 63687228353329
+string(14) 63687228353429
+string(14) 63687228353529
+string(14) 63687228353629
+string(14) 63687228353729
+string(14) 63687228353829
+string(14) 63687228353929
+string(14) 63687228363029
+string(14) 63687228363129
+string(14) 63687228363229
+string(14) 63687228363329
+string(14) 63687228363429
+string(14) 63687228363529
+string(14) 63687228363629
+string(14) 63687228363729
+string(14) 63687228363829
+string(14) 63687228363929
+string(14) 63687228373029
+string(14) 63687228373129
+string(14) 63687228373229
+string(14) 63687228373329
+string(14) 63687228373429
+string(14) 63687228373529
+string(14) 63687228373629
+string(14) 63687228373729
+string(14) 63687228373829
+string(14) 63687228373929
+string(14) 63687228383029
+string(14) 63687228383129
+string(14) 63687228383229
+string(14) 63687228383329
+string(14) 63687228383429
+string(14) 63687228383529
+string(14) 63687228383629
+string(14) 63687228383729
+string(14) 63687228383829
+string(14) 63687228383929
+string(14) 63687228393029

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file tempnam_error.phpt

2007-08-10 Thread Raghubansh Kumar
kraghubaFri Aug 10 03:31:57 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filetempnam_error.phpt 
  Log:
  more new testcases for tempnam() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/tempnam_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/tempnam_error.phpt
+++ php-src/ext/standard/tests/file/tempnam_error.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file htmlentities19.phpt htmlspecialchars.phpt

2007-08-10 Thread Raghubansh Kumar
kraghubaFri Aug 10 15:06:17 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filehtmlspecialchars.phpt 
htmlentities19.phpt 
  Log:
  New testcases for htmlentities() and htmlspecialchars()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/htmlspecialchars.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/htmlspecialchars.phpt
+++ php-src/ext/standard/tests/file/htmlspecialchars.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/htmlentities19.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/htmlentities19.phpt
+++ php-src/ext/standard/tests/file/htmlentities19.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fgetss_basic1.phpt fgetss_basic2-win32.phpt fgetss_basic2.phpt fgetss_error.phpt fgetss_variation1-win32.phpt fgetss_variation1.phpt fgetss_var

2007-08-12 Thread Raghubansh Kumar
kraghubaSun Aug 12 06:53:04 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefgetss_variation5-win32.phpt 
fgetss_variation3.phpt 
fgetss_variation4.phpt 
fgetss_variation5.phpt 
fgetss_error.phpt 
fgetss_basic2-win32.phpt 
fgetss_basic1.phpt 
fgetss_basic2.phpt 
fgetss_variation1-win32.phpt 
fgetss_variation3-win32.phpt 
fgetss_variation1.phpt 
fgetss_variation2.phpt 
  Log:
  New testcases for fgetss() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation5-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation5-win32.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation5-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation3.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation4.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation5.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_error.phpt
+++ php-src/ext/standard/tests/file/fgetss_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_basic2-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_basic2-win32.phpt
+++ php-src/ext/standard/tests/file/fgetss_basic2-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_basic1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_basic1.phpt
+++ php-src/ext/standard/tests/file/fgetss_basic1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_basic2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_basic2.phpt
+++ php-src/ext/standard/tests/file/fgetss_basic2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation1-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation1-win32.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation1-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation3-win32.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation3-win32.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation3-win32.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation1.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgetss_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/fgetss_variation2.phpt
+++ php-src/ext/standard/tests/file/fgetss_variation2.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file parse_ini_file.phpt

2007-08-13 Thread Raghubansh Kumar
kraghubaMon Aug 13 11:34:42 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileparse_ini_file.phpt 
  Log:
  New testcase for parse_ini_file() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/parse_ini_file.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/parse_ini_file.phpt
+++ php-src/ext/standard/tests/file/parse_ini_file.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file clearstatcache_error.phpt

2007-08-13 Thread Raghubansh Kumar
kraghubaMon Aug 13 11:50:47 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/fileclearstatcache_error.phpt 
  Log:
  New testcase for clearstatcache() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/clearstatcache_error.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/clearstatcache_error.phpt
diff -u /dev/null php-src/ext/standard/tests/file/clearstatcache_error.phpt:1.2
--- /dev/null   Mon Aug 13 11:50:47 2007
+++ php-src/ext/standard/tests/file/clearstatcache_error.phpt   Mon Aug 13 
11:50:47 2007
@@ -0,0 +1,23 @@
+--TEST--
+Test clearstatcache() function: error conditions(bug#42072)
+--FILE--
+?php
+/*
+   Prototype: void clearstatcache (void);
+   Description: clears files status cache
+*/
+
+echo *** Testing clearstatcache() function: error conditions ***\n;
+var_dump( clearstatcache(file) );  //No.of args more than expected
+echo *** Done ***\n;
+?
+--EXPECTF--
+*** Testing clearstatcache() function: error conditions ***
+Warning: clearstatcache() expects 0 parameter, 1 given in %s on line %d
+NULL
+*** Done ***
+--UEXPECTF--
+*** Testing clearstatcache() function: error conditions ***
+Warning: clearstatcache() expects 0 parameter, 1 given in %s on line %d
+NULL
+*** Done ***

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file clearstatcache_error.phpt

2007-08-13 Thread Raghubansh Kumar
kraghubaMon Aug 13 11:40:57 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileclearstatcache_error.phpt 
  Log:
  New testcase for clearstatcache() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/clearstatcache_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/clearstatcache_error.phpt
+++ php-src/ext/standard/tests/file/clearstatcache_error.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file parse_ini_file.phpt

2007-08-13 Thread Raghubansh Kumar
kraghubaMon Aug 13 11:37:11 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/fileparse_ini_file.phpt 
  Log:
  New testcase for parse_ini_file() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/parse_ini_file.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/parse_ini_file.phpt
diff -u /dev/null php-src/ext/standard/tests/file/parse_ini_file.phpt:1.2
--- /dev/null   Mon Aug 13 11:37:11 2007
+++ php-src/ext/standard/tests/file/parse_ini_file.phpt Mon Aug 13 11:37:11 2007
@@ -0,0 +1,764 @@
+--TEST--
+Test parse_ini_file() function
+--FILE--
+?php
+/* Prototype: array parse_ini_file(string $filename [,bool $process_sections]);
+   Description: parse_ini_file() loads in the ini file specified in filename,
+ and returns the settings in it in an associative array. 
+*/
+
+$file_path = dirname(__FILE__);
+
+$parse_string = EOD
+; Comment starts with semi-colon(;)
+; Section starts with [section name]
+
+; start of ini file
+
+[Constans]
+one = 1
+five = 5
+animal = BIRD
+Language = PHP
+PHP_CONSTANT = 1.2345678
+10 = Ten
+HELLO = HELLO
+
+[date]
+date = 
+time =
+
+[paths]
+path = /usr/local/bin
+URL = http://www.php.net
+
+[Decimal]
+Decimal_value1 = 100
+Decimal_value2 = -100
+Decimal_value3 = -2147483647
+Decimal_value4 = 2147483647
+Decimal_value5 = -2147483648
+Decimal_value6 = 2147483648
+
+[Octal]
+Octal_value = 0100
+
+[Hex]
+Hex_value1 = 0x101
+Hex_Value2 = 0x102
+Hex_Value2 = 0x103
+
+[Non-alphanumerics_as_values]
+;Non-alpha numeric chars without quotes
+Non-alpha1 = ;
+Non-alpha2 = +
+Non-alpha3 = *
+Non-alpha4 = %
+Non-alpha5 = 
+Non-alpha6 = @
+Non-alpha7 = #
+Non-alpha8 = ^
+non-alpha9 = -
+Non-alpha10 = :
+Non-alpha11 = ?
+Non-alpha12 = /
+Non-alpha13 = \
+;These chars have a special meaning when used in the value,
+;  hence parser throws an error
+;Non-alpha14 =  
+;Non-alpha15 = {}
+;Non-alpha16 = |
+;Non-alpha17 = ~
+;Non-alpha18 = !
+;Non-alpha19 = $
+;Non-alpha20 = () 
+
+Non-alpha1_quotes = ;
+Non-alpha2_quotes = +
+Non-alpha3_quotes = *
+Non-alpha4_quotes = %
+Non-alpha5_quotes = 
+Non-alpha6_quotes = @
+Non-alpha7_quotes = #
+Non-alpha8_quotes = ^
+Non-alpha9_quotes = -
+Non-alpha10_quotes = =
+Non-alpha11_quotes = :
+Non-alpha12_quotes = ?
+Non-alpha13_quotes = /
+Non-alpha14_quotes = \
+Non-alpha15_quotes = 
+Non-alpha16_quotes = {}
+Non-alpha17_quotes = |
+Non-alpha18_quotes = ~
+Non-alpha19_quotes = !
+non-alpha20_quotes = $
+non-alpha21_quotes = ()
+
+[Non-alpha numerics in strings]
+;expected error, as the non-alphanumeric chars not enclosed in double 
quotes()
+Non-alpha_string1 = [EMAIL PROTECTED]
+;Non-alpha_string2 = Hello!world
+;Non-alpha_string3 = Hello#world
+;Non-alpha_string4 = Hello%world
+;Non-alpha_string5 = Helloworld
+;Non-alpha_string6 = Hello*world
+;Non-alpha_string7 = Hello+world
+;Non-alpha_string8 = Hello-world
+;Non-alpha_string9 = Hello'world
+;Non-alpha_string10 = Hello:world
+;Non-alpha_string11 = Hello;world
+;Non-alpha_string12 = Helloworld
+;Non-alpha_string13 = Helloworld
+;Non-alpha_string14 = Helloworld
+;Non-alpha_string15 = Hello?world
+;Non-alpha_string16 = Hello\world
+;Non-alpha_string17 = Hello^world
+;Non-alpha_string18 = Hello_world
+;Non-alpha_string19 = Hello|world
+;Non-alpha_string20 = Hello~world
+;Non-alpha_string21 = Hello`world
+;Non-alpha_string22 = Hello(world)
+
+[Non-alpha numerics in strings -with quotes]
+Non-alpha_string1_quotes = [EMAIL PROTECTED]
+Non-alpha_string2_quotes = Hello!world
+Non-alpha_string3_quotes = Hello#world
+Non-alpha_string4_quotes = Helloworld
+Non-alpha_string5_quotes = Hello*world
+Non-alpha_string6_quotes = Hello+world
+Non-alpha_string7_quotes = Hello-world
+Non-alpha_string8_quotes = Hello'world
+Non-alpha_string9_quotes = Hello:world
+Non-alpha_string10_quotes = Hello;world
+Non-alpha_string11_quotes = Helloworld
+Non-alpha_string12_quotes = Helloworld
+Non-alpha_string13_quotes = Helloworld
+Non-alpha_string14_quotes = Hello?world
+Non-alpha_string15_quotes = Hello\world
+Non-alpha_string16_quotes = Hello^world
+Non-alpha_string17_quotes = Hello_world
+Non-alpha_string18_quotes = Hello|world
+Non-alpha_string19_quotes = Hello~world
+Non-alpha_string20_quotes = Hello`world
+Non-alpha_string21_quotes = Hello(world)
+
+[Newlines_in_Values]
+String1 = Hello, world\nGood Morning
+String2 = \nHello, world
+ Good Morning\n
+String3 = 'Hello, world\tGood Morning'
+String4 = \n
+String5 = \n\n
+String3 = Hello, world\tGood Morning
+
+[ReservedKeys_as_Values]
+Key1 = YES
+Key2 = Yes
+Key3 = yEs
+Key4 = NO
+Key5 = No
+Key6 = nO
+Key7 = TRUE
+Key8 = True
+Key9 = tRUE
+Key10 = true
+Key11 = FALSE
+Key12 = False
+Key13 = false
+Key14 = fAlSE
+Key15 = NULL
+Key16 = Null
+Key17 = nuLL
+Key18 = null
+
+[ReservedKeys_as_Keys] 
+; Expected:error, reserved key words must not be used as keys for ini file
+;YES = 1
+;Yes = 2
+;yEs = 1.2
+;YES = YES
+;NO = 
+;No = string
+;nO = \0
+;TRUE = 1.1
+;True = 1
+;tRUE = 5

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file popen_pclose_error-sunos.phpt

2007-08-16 Thread Raghubansh Kumar
kraghubaThu Aug 16 16:31:25 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filepopen_pclose_error-sunos.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt
diff -u php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.1.2.2 
php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.1.2.2   
Wed Jul 11 09:13:47 2007
+++ php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt   Thu Aug 
16 16:31:25 2007
@@ -2,9 +2,10 @@
 Test popen() and pclose function: error conditions
 --SKIPIF--
 ?php
-if( strtoupper( substr(PHP_OS, 0, 3) ) != 'SUN' )
-  die(skip Only Valid for Sun Solaris);
+if( substr(PHP_OS, 0, 3) != 'Sun')
+  die(skip Only valid for Sun Solaris);
 ?
+
 --FILE--
 ?php
 /*
@@ -41,6 +42,7 @@
 NULL
 resource(%d) of type (stream)
 sh: abc.txt: not found
+
 Warning: Wrong parameter count for pclose() in %s on line %d
 NULL
 

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file popen_pclose_error-sunos.phpt

2007-08-16 Thread Raghubansh Kumar
kraghubaThu Aug 16 16:33:16 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filepopen_pclose_error-sunos.phpt 
  Log:
  fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt
diff -u php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.2 
php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.3
--- php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt:1.2   Tue Jul 
10 07:26:31 2007
+++ php-src/ext/standard/tests/file/popen_pclose_error-sunos.phpt   Thu Aug 
16 16:33:16 2007
@@ -2,7 +2,7 @@
 Test popen() and pclose function: error conditions
 --SKIPIF--
 ?php
-if( strtoupper( substr(PHP_OS, 0, 3) ) != 'SUN' )
+if(substr(PHP_OS, 0, 3) != 'Sun' )
   die(skip Only Valid for Sun Solaris);
 ?
 
@@ -42,6 +42,7 @@
 NULL
 resource(%d) of type (stream)
 sh: abc.txt: not found
+
 Warning: Wrong parameter count for pclose() in %s on line %d
 NULL
 
@@ -62,6 +63,7 @@
 NULL
 resource(%d) of type (stream)
 sh: abc.txt: not found
+
 Warning: Wrong parameter count for pclose() in %s on line %d
 NULL
 

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file symlink_link_linkinfo_is_link_variation6.phpt

2007-08-19 Thread Raghubansh Kumar
kraghubaMon Aug 20 03:12:36 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/file

symlink_link_linkinfo_is_link_variation6.phpt 
  Log:
  fix test: skip if user is root
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt
diff -u 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt:1.1.2.2
 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt:1.1.2.3
--- 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt:1.1.2.2
   Sun Jul  8 05:01:11 2007
+++ 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt   
Mon Aug 20 03:12:36 2007
@@ -11,6 +11,17 @@
 if (PHP_INT_SIZE != 4) {
   die(skip this test is for 32bit platform only);
 }
+
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./symlink_link_linkinfo_is_link6_check_root.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+
+unlink($filename);
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file symlink_link_linkinfo_is_link_variation6.phpt

2007-08-19 Thread Raghubansh Kumar
kraghubaMon Aug 20 03:14:58 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/file

symlink_link_linkinfo_is_link_variation6.phpt 
  Log:
  fix test: skip if user is root
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt?r1=1.2r2=1.3diff_format=u
Index: 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt
diff -u 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt:1.2
 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt:1.3
--- 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt:1.2
   Thu Jul  5 18:59:20 2007
+++ 
php-src/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt   
Mon Aug 20 03:14:58 2007
@@ -8,6 +8,17 @@
 if (substr(PHP_OS, 0, 3) == 'MAC') {
 die('skip not valid for MacOS');
 }
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./symlink_link_linkinfo_is_link6_check_root.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+
+unlink($filename);
+
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file copy_variation12.phpt copy_variation15.phpt copy_variation4.phpt copy_variation5.phpt copy_variation9.phpt fileowner_basic.phpt

2007-08-19 Thread Raghubansh Kumar
kraghubaMon Aug 20 03:37:39 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filecopy_variation9.phpt 
copy_variation12.phpt 
copy_variation15.phpt 
fileowner_basic.phpt 
copy_variation4.phpt 
copy_variation5.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.1 
php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.1Fri Aug 
10 02:57:30 2007
+++ php-src/ext/standard/tests/file/copy_variation9.phptMon Aug 20 
03:37:39 2007
@@ -2,10 +2,9 @@
 Test copy() function: usage variations - destination file access perms 
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN)
-  die(skip Invalid for Windows);
+if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
+  die(skip do not run on Win/MacOS);
 ?
-
 --FILE--
 ?php
 /* Prototype: bool copy ( string $source, string $dest );
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation12.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation12.phpt
diff -u php-src/ext/standard/tests/file/copy_variation12.phpt:1.1.2.2 
php-src/ext/standard/tests/file/copy_variation12.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/copy_variation12.phpt:1.1.2.2   Sun Aug 
12 17:09:59 2007
+++ php-src/ext/standard/tests/file/copy_variation12.phpt   Mon Aug 20 
03:37:39 2007
@@ -45,7 +45,7 @@
 Warning: copy(): The first argument to copy() function cannot be a directory 
in %s/copy_variation12.php on line %d
 bool(false)
 bool(false)
-int(4096)
+int(%d)
 
 Warning: filesize(): stat failed for %s/copy_copy_variation12 in 
%s/copy_variation12.php on line %d
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.1 
php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.1   Fri Aug 
10 02:57:30 2007
+++ php-src/ext/standard/tests/file/copy_variation15.phpt   Mon Aug 20 
03:37:39 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination dir access perms
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN)
-  die(skip Invalid for Windows);
+if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
+  die(skip do not run on Win/MacOS);
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileowner_basic.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/fileowner_basic.phpt
diff -u php-src/ext/standard/tests/file/fileowner_basic.phpt:1.1.2.1 
php-src/ext/standard/tests/file/fileowner_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/fileowner_basic.phpt:1.1.2.1Wed Jun 
13 22:38:49 2007
+++ php-src/ext/standard/tests/file/fileowner_basic.phptMon Aug 20 
03:37:39 2007
@@ -57,7 +57,7 @@
   [name]=
   string(%d) %s
   [passwd]=
-  string(1) x
+  string(%d) %s
   [uid]=
   int(%d)
   [gid]=
@@ -75,8 +75,8 @@
 int(%d)
 
 -- Testing with the standard file or directory --
-int(0)
-int(0)
-int(0)
+int(%d)
+int(%d)
+int(%d)
 
 *** Done ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation4.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation4.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation5.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation5.phpt
diff -u php-src/ext/standard/tests/file/copy_variation5.phpt:1.1.2.1 
php-src/ext/standard/tests/file/copy_variation5.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/copy_variation5.phpt:1.1.2.1Fri Aug 
10 02:57:30 2007
+++ php-src/ext/standard/tests/file/copy_variation5.phptMon Aug 20 
03:37:39 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file names(case sensitive)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN)
-  die(skip do not run on Windows);
+if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
+  die(skip do not run on Win/MacOS);
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file copy_variation12.phpt copy_variation15.phpt copy_variation4.phpt copy_variation5.phpt copy_variation9.phpt fileowner_basic.phpt

2007-08-19 Thread Raghubansh Kumar
kraghubaMon Aug 20 03:40:42 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filecopy_variation9.phpt 
copy_variation12.phpt 
copy_variation15.phpt 
fileowner_basic.phpt 
copy_variation4.phpt 
copy_variation5.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.2 
php-src/ext/standard/tests/file/copy_variation9.phpt:1.3
--- php-src/ext/standard/tests/file/copy_variation9.phpt:1.2Fri Aug 10 
02:58:50 2007
+++ php-src/ext/standard/tests/file/copy_variation9.phptMon Aug 20 
03:40:41 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file access perms 
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN)
-  die(skip Invalid for Windows);
+if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
+  die(skip do not run on Win/MacOS);
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation12.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation12.phpt
diff -u php-src/ext/standard/tests/file/copy_variation12.phpt:1.3 
php-src/ext/standard/tests/file/copy_variation12.phpt:1.4
--- php-src/ext/standard/tests/file/copy_variation12.phpt:1.3   Mon Aug 13 
08:14:03 2007
+++ php-src/ext/standard/tests/file/copy_variation12.phpt   Mon Aug 20 
03:40:41 2007
@@ -45,7 +45,7 @@
 Warning: copy(): The first argument to copy() function cannot be a directory 
in %s/copy_variation12.php on line %d
 bool(false)
 bool(false)
-int(4096)
+int(%d)
 
 Warning: filesize(): stat failed for %s/copy_copy_variation12 in 
%s/copy_variation12.php on line %d
 bool(false)
@@ -56,7 +56,7 @@
 Warning: copy(): The first argument to copy() function cannot be a directory 
in %s/copy_variation12.php on line %d
 bool(false)
 bool(false)
-int(4096)
+int(%d)
 
 Warning: filesize(): stat failed for %s/copy_copy_variation12 in 
%s/copy_variation12.php on line %d
 bool(false)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.2 
php-src/ext/standard/tests/file/copy_variation15.phpt:1.3
--- php-src/ext/standard/tests/file/copy_variation15.phpt:1.2   Fri Aug 10 
02:58:50 2007
+++ php-src/ext/standard/tests/file/copy_variation15.phpt   Mon Aug 20 
03:40:41 2007
@@ -1,11 +1,11 @@
 --TEST--
 Test copy() function: usage variations - destination dir access perms
 --SKIPIF--
+--SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN)
-  die(skip Invalid for Windows);
+if( (substr(PHP_OS, 0, 3) == WIN) || (stristr(PHP_OS, Mac)) )
+  die(skip do not run on Win/MacOS);
 ?
-
 --FILE--
 ?php
 /* Prototype: bool copy ( string $source, string $dest );
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileowner_basic.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/fileowner_basic.phpt
diff -u php-src/ext/standard/tests/file/fileowner_basic.phpt:1.2 
php-src/ext/standard/tests/file/fileowner_basic.phpt:1.3
--- php-src/ext/standard/tests/file/fileowner_basic.phpt:1.2Wed Jun 13 
22:46:37 2007
+++ php-src/ext/standard/tests/file/fileowner_basic.phptMon Aug 20 
03:40:41 2007
@@ -56,7 +56,7 @@
   [name]=
   string(%d) %s
   [passwd]=
-  string(1) x
+  string(%d) %s
   [uid]=
   int(%d)
   [gid]=
@@ -74,9 +74,9 @@
 int(%d)
 
 -- Testing with the standard file or directory --
-int(0)
-int(0)
-int(0)
+int(%d)
+int(%d)
+int(%d)
 
 *** Done ***
 
@@ -87,7 +87,7 @@
   [name]=
   string(%d) %s
   [passwd]=
-  string(1) x
+  string(%d) %s
   [uid]=
   int(%d)
   [gid]=
@@ -107,8 +107,8 @@
 int(%d)
 
 -- Testing with the standard file or directory --
-int(0)
-int(0)
-int(0)
+int(%d)
+int(%d)
+int(%d)
 
 *** Done ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation4.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation4.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation5.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation5.phpt
diff -u php-src/ext/standard/tests/file/copy_variation5.phpt:1.2 
php-src/ext/standard/tests/file/copy_variation5.phpt:1.3
--- php-src/ext/standard/tests/file/copy_variation5.phpt:1.2Fri Aug 10 
02:58:50 2007
+++ php-src/ext/standard/tests/file/copy_variation5.phptMon Aug 20 
03:40:41 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file names(case sensitive)
 --SKIPIF--
 ?php
-if(substr(PHP_OS, 0, 3) == WIN)
-  die(skip do not run 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file unlink_variation1.phpt

2007-08-19 Thread Raghubansh Kumar
kraghubaMon Aug 20 04:07:02 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileunlink_variation1.phpt 
  Log:
  fix test : skip if user is root
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/unlink_variation1.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/unlink_variation1.phpt
diff -u php-src/ext/standard/tests/file/unlink_variation1.phpt:1.1.2.2 
php-src/ext/standard/tests/file/unlink_variation1.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/unlink_variation1.phpt:1.1.2.2  Wed Jul 
18 04:59:46 2007
+++ php-src/ext/standard/tests/file/unlink_variation1.phpt  Mon Aug 20 
04:07:02 2007
@@ -5,6 +5,16 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip only on Linux');
 }
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./unlink_root_check.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+
+unlink($filename);
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file unlink_variation1.phpt

2007-08-19 Thread Raghubansh Kumar
kraghubaMon Aug 20 04:08:15 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/fileunlink_variation1.phpt 
  Log:
  fix test: skip if user is root
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/unlink_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/file/unlink_variation1.phpt
diff -u php-src/ext/standard/tests/file/unlink_variation1.phpt:1.1 
php-src/ext/standard/tests/file/unlink_variation1.phpt:1.2
--- php-src/ext/standard/tests/file/unlink_variation1.phpt:1.1  Wed Jul 18 
04:57:25 2007
+++ php-src/ext/standard/tests/file/unlink_variation1.phpt  Mon Aug 20 
04:08:15 2007
@@ -5,6 +5,16 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip only on Linux');
 }
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./unlink_root_check.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+
+unlink($filename);
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file copy_variation15.phpt copy_variation9.phpt

2007-08-23 Thread Raghubansh Kumar
kraghubaThu Aug 23 09:32:37 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filecopy_variation9.phpt 
copy_variation15.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.2 
php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.2Mon Aug 
20 03:37:39 2007
+++ php-src/ext/standard/tests/file/copy_variation9.phptThu Aug 23 
09:32:37 2007
@@ -4,6 +4,16 @@
 ?php
 if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
   die(skip do not run on Win/MacOS);
+
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./copy_variation9_root_check.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+unlink($filename);
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.2 
php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.2   Mon Aug 
20 03:37:39 2007
+++ php-src/ext/standard/tests/file/copy_variation15.phpt   Thu Aug 23 
09:32:37 2007
@@ -4,6 +4,15 @@
 ?php
 if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
   die(skip do not run on Win/MacOS);
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./copy_variation15_root_check.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+unlink($filename);
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file copy_variation15.phpt copy_variation9.phpt

2007-08-23 Thread Raghubansh Kumar
kraghubaThu Aug 23 09:34:15 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filecopy_variation9.phpt 
copy_variation15.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.3 
php-src/ext/standard/tests/file/copy_variation9.phpt:1.4
--- php-src/ext/standard/tests/file/copy_variation9.phpt:1.3Mon Aug 20 
03:40:41 2007
+++ php-src/ext/standard/tests/file/copy_variation9.phptThu Aug 23 
09:34:15 2007
@@ -4,6 +4,16 @@
 ?php
 if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
   die(skip do not run on Win/MacOS);
+
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./copy_variation9_root_check.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+unlink($filename);
 ?
 --FILE--
 ?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.3 
php-src/ext/standard/tests/file/copy_variation15.phpt:1.4
--- php-src/ext/standard/tests/file/copy_variation15.phpt:1.3   Mon Aug 20 
03:40:41 2007
+++ php-src/ext/standard/tests/file/copy_variation15.phpt   Thu Aug 23 
09:34:15 2007
@@ -1,10 +1,18 @@
 --TEST--
 Test copy() function: usage variations - destination dir access perms
 --SKIPIF--
---SKIPIF--
 ?php
-if( (substr(PHP_OS, 0, 3) == WIN) || (stristr(PHP_OS, Mac)) )
+if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
   die(skip do not run on Win/MacOS);
+// Skip if being run by root (files are always readable, writeable and 
executable)
+$filename = dirname(__FILE__)./copy_variation15_root_check.tmp;
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+unlink ($filename);
+die('skip...cannot be run as root\n');
+}
+unlink($filename);
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions gettype_settype_variation2.phpt

2007-08-28 Thread Raghubansh Kumar
kraghubaWed Aug 29 04:37:17 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   

gettype_settype_variation2.phpt 
  Log:
  fix test, do not run on macos
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt?r1=1.3r2=1.4diff_format=u
Index: 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
diff -u 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt:1.3
 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt:1.4
--- 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt:1.3
Tue May 22 16:56:47 2007
+++ 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
Wed Aug 29 04:37:17 2007
@@ -4,6 +4,9 @@
 ?php
 if (PHP_INT_SIZE != 4) die(skip this test is for 32bit platform only);
 ?
+if ( strtoupper( substr(PHP_OS, 0, 3) ) == 'MAC' ) {
+die('skip Do not run on MacOS');
+}
 --INI--
 precision=14
 --FILE--

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions gettype_settype_variation2.phpt

2007-08-28 Thread Raghubansh Kumar
kraghubaWed Aug 29 04:38:10 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/general_functions   

gettype_settype_variation2.phpt 
  Log:
  fix test, do not run on macos
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
diff -u 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt:1.1.2.2
 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt:1.1.2.3
--- 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt:1.1.2.2
Tue May 22 16:58:33 2007
+++ 
php-src/ext/standard/tests/general_functions/gettype_settype_variation2.phpt
Wed Aug 29 04:38:09 2007
@@ -4,6 +4,9 @@
 ?php
 if (PHP_INT_SIZE != 4) die(skip this test is for 32bit platform only);
 ?
+if ( strtoupper( substr(PHP_OS, 0, 3) ) == 'MAC' ) {
+die('skip Do not run on MacOS');
+}
 --INI--
 precision=14
 --FILE--

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt

2007-08-29 Thread Raghubansh Kumar
kraghubaWed Aug 29 10:11:40 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filefnmatch_variation.phpt 
fnmatch_error.phpt 
fnmatch_basic.phpt 
  Log:
  fix test: do not run on MACOS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.1 
php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.1.2.1  Fri May 
25 13:44:23 2007
+++ php-src/ext/standard/tests/file/fnmatch_variation.phpt  Wed Aug 29 
10:11:40 2007
@@ -2,9 +2,9 @@
 Test fnmatch() function: Variations
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip no fnmatch() on Windows');
-}
+if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) 
+  die(skip do not run on MacOS/Windows);
+?
 --FILE--
 ?php
 /* Prototype: bool fnmatch ( string $pattern, string $string [, int $flags] )
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_error.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.1 
php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.1.2.1  Fri May 25 
13:44:23 2007
+++ php-src/ext/standard/tests/file/fnmatch_error.phpt  Wed Aug 29 10:11:40 2007
@@ -2,9 +2,9 @@
 Test fnmatch() function: Error conditions
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip no fnmatch() on Windows');
-}
+if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) ) 
+  die(skip do not run on MacOS/Windows);
+?
 --FILE--
 ?php
 /* Prototype: bool fnmatch ( string $pattern, string $string [, int $flags] )
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.1 
php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.1.2.1  Fri May 25 
13:44:23 2007
+++ php-src/ext/standard/tests/file/fnmatch_basic.phpt  Wed Aug 29 10:11:40 2007
@@ -2,9 +2,9 @@
 Test fnmatch() function: Basic functionality
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip no fnmatch() on Windows');
-}
+if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
+?
 --FILE--
 ?php
 /* Prototype: bool fnmatch ( string $pattern, string $string [, int $flags] )

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file fnmatch_basic.phpt fnmatch_error.phpt fnmatch_variation.phpt

2007-08-29 Thread Raghubansh Kumar
kraghubaWed Aug 29 10:13:25 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filefnmatch_variation.phpt 
fnmatch_error.phpt 
fnmatch_basic.phpt 
  Log:
  fix tests: do not run on MACOS
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_variation.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_variation.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.2 
php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.3
--- php-src/ext/standard/tests/file/fnmatch_variation.phpt:1.2  Fri May 25 
13:50:05 2007
+++ php-src/ext/standard/tests/file/fnmatch_variation.phpt  Wed Aug 29 
10:13:25 2007
@@ -2,9 +2,9 @@
 Test fnmatch() function: Variations
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip no fnmatch() on Windows');
-}
+if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
+?
 --FILE--
 ?php
 /* Prototype: bool fnmatch ( string $pattern, string $string [, int $flags] )
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_error.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_error.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_error.phpt:1.2 
php-src/ext/standard/tests/file/fnmatch_error.phpt:1.3
--- php-src/ext/standard/tests/file/fnmatch_error.phpt:1.2  Fri May 25 
13:50:05 2007
+++ php-src/ext/standard/tests/file/fnmatch_error.phpt  Wed Aug 29 10:13:25 2007
@@ -2,9 +2,9 @@
 Test fnmatch() function: Error conditions
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip no fnmatch() on Windows');
-}
+if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
+?
 --FILE--
 ?php
 /* Prototype: bool fnmatch ( string $pattern, string $string [, int $flags] )
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fnmatch_basic.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/fnmatch_basic.phpt
diff -u php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.2 
php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.3
--- php-src/ext/standard/tests/file/fnmatch_basic.phpt:1.2  Fri May 25 
13:50:05 2007
+++ php-src/ext/standard/tests/file/fnmatch_basic.phpt  Wed Aug 29 10:13:25 2007
@@ -2,9 +2,9 @@
 Test fnmatch() function: Basic functionality
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip no fnmatch() on Windows');
-}
+if( (stristr(PHP_OS, Mac)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
+?
 --FILE--
 ?php
 /* Prototype: bool fnmatch ( string $pattern, string $string [, int $flags] )

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file lstat_stat_variation6.phpt

2007-08-29 Thread Raghubansh Kumar
kraghubaThu Aug 30 04:02:57 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filelstat_stat_variation6.phpt 
  Log:
  fix tests: do not run when noatime set
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation6.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/lstat_stat_variation6.phpt
diff -u php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.2 
php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.3
--- php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.2  Thu Jul 
26 13:55:42 2007
+++ php-src/ext/standard/tests/file/lstat_stat_variation6.phpt  Thu Aug 30 
04:02:57 2007
@@ -5,6 +5,14 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
 die('skip.. lstat() not available on Windows');
 }
+
+// checking for atime update whether it is enabled or disabled
+exec(mount, $mount_output);
+foreach( $mount_output as $out )  {
+  if( stristr($out, noatime) )
+ die('skip.. atime update is disabled, hence skip the test');
+}
+
 ?
 --FILE--
 ?php

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file copy_variation15.phpt copy_variation5.phpt copy_variation9.phpt fileowner_basic.phpt

2007-09-04 Thread Raghubansh Kumar
kraghubaTue Sep  4 08:37:52 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filecopy_variation9.phpt 
copy_variation15.phpt 
fileowner_basic.phpt 
copy_variation5.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.3 
php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.4
--- php-src/ext/standard/tests/file/copy_variation9.phpt:1.1.2.3Thu Aug 
23 09:32:37 2007
+++ php-src/ext/standard/tests/file/copy_variation9.phptTue Sep  4 
08:37:51 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file access perms 
 --SKIPIF--
 ?php
-if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
-  die(skip do not run on Win/MacOS);
+if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
 
 // Skip if being run by root (files are always readable, writeable and 
executable)
 $filename = dirname(__FILE__)./copy_variation9_root_check.tmp;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.3 
php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.4
--- php-src/ext/standard/tests/file/copy_variation15.phpt:1.1.2.3   Thu Aug 
23 09:32:37 2007
+++ php-src/ext/standard/tests/file/copy_variation15.phpt   Tue Sep  4 
08:37:51 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination dir access perms
 --SKIPIF--
 ?php
-if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
-  die(skip do not run on Win/MacOS);
+if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
 // Skip if being run by root (files are always readable, writeable and 
executable)
 $filename = dirname(__FILE__)./copy_variation15_root_check.tmp;
 $fp = fopen($filename, 'w');
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileowner_basic.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/fileowner_basic.phpt
diff -u php-src/ext/standard/tests/file/fileowner_basic.phpt:1.1.2.2 
php-src/ext/standard/tests/file/fileowner_basic.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/fileowner_basic.phpt:1.1.2.2Mon Aug 
20 03:37:39 2007
+++ php-src/ext/standard/tests/file/fileowner_basic.phptTue Sep  4 
08:37:51 2007
@@ -1,11 +1,5 @@
 --TEST--
 Test fileowner() function: basic functionality
---SKIPIF--
-?php
-if (!function_exists(posix_getpwuid)) {
-   die(skip no posix_getpwuid);
-}
-?
 --FILE--
 ?php
 /* Prototype: int fileowner ( string $filename )
@@ -16,7 +10,7 @@
 echo *** Testing fileowner(): basic functionality ***\n; 
 
 echo -- Testing with the file or directory created by owner --\n;
-var_dump( posix_getpwuid ( fileowner(__FILE__) ) );
+var_dump( fileowner(__FILE__) );
 var_dump( fileowner(.) );
 var_dump( fileowner(./..) );
 
@@ -33,12 +27,7 @@
 mkdir($dir_name);
 var_dump( fileowner($dir_name) );
 
-echo \n-- Testing with the standard file or directory --\n;
-var_dump( fileowner(/etc/passwd) );
-var_dump( fileowner(/etc) );
-var_dump( fileowner(/) );
-
-echo \n*** Done ***\n;
+echo *** Done ***\n;
 ?
 
 --CLEAN--
@@ -53,30 +42,9 @@
 --EXPECTF--
 *** Testing fileowner(): basic functionality ***
 -- Testing with the file or directory created by owner --
-array(7) {
-  [name]=
-  string(%d) %s
-  [passwd]=
-  string(%d) %s
-  [uid]=
-  int(%d)
-  [gid]=
-  int(%d)
-  [gecos]=
-  string(%d) %s
-  [dir]=
-  string(%d) %s
-  [shell]=
-  string(%d) %s
-}
 int(%d)
 int(%d)
 int(%d)
 int(%d)
-
--- Testing with the standard file or directory --
 int(%d)
-int(%d)
-int(%d)
-
 *** Done ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation5.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation5.phpt
diff -u php-src/ext/standard/tests/file/copy_variation5.phpt:1.1.2.2 
php-src/ext/standard/tests/file/copy_variation5.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/copy_variation5.phpt:1.1.2.2Mon Aug 
20 03:37:39 2007
+++ php-src/ext/standard/tests/file/copy_variation5.phptTue Sep  4 
08:37:51 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file names(case sensitive)
 --SKIPIF--
 ?php
-if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
-  die(skip do not run on Win/MacOS);
+if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
 ?
 --FILE--
 ?php

-- 
PHP CVS Mailing List (http://www.php.net/)
To 

[PHP-CVS] cvs: php-src /ext/standard/tests/file copy_variation15.phpt copy_variation5.phpt copy_variation9.phpt fileowner_basic.phpt

2007-09-04 Thread Raghubansh Kumar
kraghubaTue Sep  4 08:39:40 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filecopy_variation9.phpt 
copy_variation15.phpt 
fileowner_basic.phpt 
copy_variation5.phpt 
  Log:
  fix tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation9.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation9.phpt
diff -u php-src/ext/standard/tests/file/copy_variation9.phpt:1.4 
php-src/ext/standard/tests/file/copy_variation9.phpt:1.5
--- php-src/ext/standard/tests/file/copy_variation9.phpt:1.4Thu Aug 23 
09:34:15 2007
+++ php-src/ext/standard/tests/file/copy_variation9.phptTue Sep  4 
08:39:40 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination file access perms 
 --SKIPIF--
 ?php
-if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
-  die(skip do not run on Win/MacOS);
+if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
 
 // Skip if being run by root (files are always readable, writeable and 
executable)
 $filename = dirname(__FILE__)./copy_variation9_root_check.tmp;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation15.phpt?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation15.phpt
diff -u php-src/ext/standard/tests/file/copy_variation15.phpt:1.4 
php-src/ext/standard/tests/file/copy_variation15.phpt:1.5
--- php-src/ext/standard/tests/file/copy_variation15.phpt:1.4   Thu Aug 23 
09:34:15 2007
+++ php-src/ext/standard/tests/file/copy_variation15.phpt   Tue Sep  4 
08:39:40 2007
@@ -2,8 +2,8 @@
 Test copy() function: usage variations - destination dir access perms
 --SKIPIF--
 ?php
-if( (stristr(PHP_OS, Mac)) || (substr(PHP_OS, 0, 3) == WIN) )
-  die(skip do not run on Win/MacOS);
+if( (stristr(PHP_OS, Darwin)) || (stristr(PHP_OS, Win)) )
+  die(skip do not run on MacOS/Windows);
 // Skip if being run by root (files are always readable, writeable and 
executable)
 $filename = dirname(__FILE__)./copy_variation15_root_check.tmp;
 $fp = fopen($filename, 'w');
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fileowner_basic.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/fileowner_basic.phpt
diff -u php-src/ext/standard/tests/file/fileowner_basic.phpt:1.3 
php-src/ext/standard/tests/file/fileowner_basic.phpt:1.4
--- php-src/ext/standard/tests/file/fileowner_basic.phpt:1.3Mon Aug 20 
03:40:41 2007
+++ php-src/ext/standard/tests/file/fileowner_basic.phptTue Sep  4 
08:39:40 2007
@@ -1,10 +1,5 @@
 --TEST--
 Test fileowner() function: basic functionality
---SKIPIF--
-?php
-if (!function_exists(posix_getpwuid)) {
-   die(skip no posix_getpwuid);
-}
 --FILE--
 ?php
 /* Prototype: int fileowner ( string $filename )
@@ -15,7 +10,7 @@
 echo *** Testing fileowner(): basic functionality ***\n; 
 
 echo -- Testing with the file or directory created by owner --\n;
-var_dump( posix_getpwuid ( fileowner(__FILE__) ) );
+var_dump( fileowner(__FILE__) );
 var_dump( fileowner(.) );
 var_dump( fileowner(./..) );
 
@@ -32,12 +27,7 @@
 mkdir($dir_name);
 var_dump( fileowner($dir_name) );
 
-echo \n-- Testing with the standard file or directory --\n;
-var_dump( fileowner(/etc/passwd) );
-var_dump( fileowner(/etc) );
-var_dump( fileowner(/) );
-
-echo \n*** Done ***\n;
+echo *** Done ***\n;
 ?
 
 --CLEAN--
@@ -52,63 +42,21 @@
 --EXPECTF--
 *** Testing fileowner(): basic functionality ***
 -- Testing with the file or directory created by owner --
-array(7) {
-  [name]=
-  string(%d) %s
-  [passwd]=
-  string(%d) %s
-  [uid]=
-  int(%d)
-  [gid]=
-  int(%d)
-  [gecos]=
-  string(%d) %s
-  [dir]=
-  string(%d) %s
-  [shell]=
-  string(%d) %s
-}
-int(%d)
 int(%d)
 int(%d)
 int(%d)
-
--- Testing with the standard file or directory --
-int(%d)
 int(%d)
 int(%d)
-
 *** Done ***
 
 --UEXPECTF--
 *** Testing fileowner(): basic functionality ***
 -- Testing with the file or directory created by owner --
-array(7) {
-  [name]=
-  string(%d) %s
-  [passwd]=
-  string(%d) %s
-  [uid]=
-  int(%d)
-  [gid]=
-  int(%d)
-  [gecos]=
-  string(%d) %s
-  [dir]=
-  string(%d) %s
-  [shell]=
-  string(%d) %s
-}
 int(%d)
 int(%d)
-
-Notice: fwrite(): 26 character unicode buffer downcoded for binary stream 
runtime_encoding in %s on line %d
-int(%d)
 int(%d)
 
--- Testing with the standard file or directory --
-int(%d)
+Notice: fwrite(): 26 character unicode buffer downcoded for binary stream 
runtime_encoding in %s on line %d
 int(%d)
 int(%d)
-
 *** Done ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/copy_variation5.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/copy_variation5.phpt
diff -u php-src/ext/standard/tests/file/copy_variation5.phpt:1.3 
php-src/ext/standard/tests/file/copy_variation5.phpt:1.4
--- 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings addslashes_basic.phpt addslashes_error.phpt addslashes_variation1.phpt addslashes_variation2.phpt addslashes_variation3.phpt

2007-09-05 Thread Raghubansh Kumar
kraghubaThu Sep  6 04:01:25 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings addslashes_error.phpt 
addslashes_basic.phpt 
addslashes_variation1.phpt 
addslashes_variation2.phpt 
addslashes_variation3.phpt 
  Log:
  New testcases for addslashes() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/addslashes_error.phpt
+++ php-src/ext/standard/tests/strings/addslashes_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/addslashes_basic.phpt
+++ php-src/ext/standard/tests/strings/addslashes_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/addslashes_variation1.phpt
+++ php-src/ext/standard/tests/strings/addslashes_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/addslashes_variation2.phpt
+++ php-src/ext/standard/tests/strings/addslashes_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/addslashes_variation3.phpt
+++ php-src/ext/standard/tests/strings/addslashes_variation3.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings addslashes_basic.phpt addslashes_error.phpt addslashes_variation1.phpt addslashes_variation2.phpt

2007-09-05 Thread Raghubansh Kumar
kraghubaThu Sep  6 04:02:56 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings addslashes_error.phpt 
addslashes_variation1.phpt 
addslashes_basic.phpt 
addslashes_variation2.phpt 
  Log:
  New testcases for addslashes() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_error.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/addslashes_error.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/addslashes_error.phpt:1.2
--- /dev/null   Thu Sep  6 04:02:56 2007
+++ php-src/ext/standard/tests/strings/addslashes_error.phptThu Sep  6 
04:02:56 2007
@@ -0,0 +1,59 @@
+--TEST--
+Test addslashes() function : error conditions 
+--INI--
+--FILE--
+?php
+/* Prototype  : string addslashes ( string $str )
+ * Description: Returns a string with backslashes before characters that need 
to be quoted in database queries etc.
+ * Source code: ext/standard/string.c
+*/
+
+/*
+ * Testing addslashes() for error conditions
+*/
+
+echo *** Testing addslashes() : error conditions ***\n;
+
+// Zero argument
+echo \n-- Testing addslashes() function with Zero arguments --\n;
+var_dump( addslashes() );
+
+// More than expected number of arguments
+echo \n-- Testing addslashes() function with more than expected no. of 
arguments --\n;
+$str = 'hello\world';
+$extra_arg = 10;
+
+var_dump( addslashes($str, $extra_arg) );
+var_dump( $str );
+
+echo Done\n;
+?
+--EXPECTF--
+*** Testing addslashes() : error conditions ***
+
+-- Testing addslashes() function with Zero arguments --
+
+Warning: Wrong parameter count for addslashes() in %s on line %d
+NULL
+
+-- Testing addslashes() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for addslashes() in %s on line %d
+NULL
+string(15) hello\world
+Done
+
+--UEXPECTF--
+*** Testing addslashes() : error conditions ***
+
+-- Testing addslashes() function with Zero arguments --
+
+Warning: Wrong parameter count for addslashes() in %s on line %d
+NULL
+
+-- Testing addslashes() function with more than expected no. of arguments --
+
+Warning: Wrong parameter count for addslashes() in %s on line %d
+NULL
+unicode(15) hello\world
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/addslashes_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/addslashes_variation1.phpt
diff -u /dev/null 
php-src/ext/standard/tests/strings/addslashes_variation1.phpt:1.2
--- /dev/null   Thu Sep  6 04:02:56 2007
+++ php-src/ext/standard/tests/strings/addslashes_variation1.phpt   Thu Sep 
 6 04:02:56 2007
@@ -0,0 +1,242 @@
+--TEST--
+Test addslashes() function : usage variations  - non-string type argument 
+--INI--
+--FILE--
+?php
+/* Prototype  : string addslashes ( string $str )
+ * Description: Returns a string with backslashes before characters that need 
to be quoted in database queries etc.
+ * Source code: ext/standard/string.c
+*/
+
+/*
+ * Test addslashes() with non-string type argument such as int, float, etc 
+*/
+
+echo *** Testing addslashes() : with non-string type argument ***\n;
+// initialize all required variables
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// declaring a class
+class sample  {
+  public function __toString() {
+  return obj'ct;
+  } 
+}
+
+// Defining resource
+$file_handle = fopen(__FILE__, 'r');
+
+// array with different values
+$values =  array (
+
+  // integer values
+  0,
+  1,
+  12345,
+  -2345,
+
+  // float values
+  10.5,
+  -10.5,
+  10.5e10,
+  10.6E-10,
+  .5,
+
+  // array values
+  array(),
+  array(0),
+  array(1),
+  array(1, 2),
+  array('color' = 'red', 'item' = 'pen'),
+
+  // boolean values
+  true,
+  false,
+  TRUE,
+  FALSE,
+
+  // empty string
+  ,
+  '',
+
+  // undefined variable
+  $undefined_var,
+
+  // unset variable
+  $unset_var,
+  
+  // objects
+  new sample(),
+
+  // resource
+  $file_handle,
+ 
+  NULL,
+  null
+);
+
+
+// loop through each element of the array and check the working of addslashes()
+// when $str arugment is supplied with different values
+echo \n--- Testing addslashes() by supplying different values for 'str' 
argument ---\n;
+$counter = 1;
+for($index = 0; $index  count($values); $index ++) {
+  echo -- Iteration $counter --\n;
+  $str = $values [$index];
+
+  var_dump( addslashes($str) );
+
+  $counter ++;
+}
+
+// closing the file
+fclose($file_handle);
+
+echo Done\n;
+?
+--EXPECTF--
+*** Testing addslashes() : with non-string type argument ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+--- Testing addslashes() by supplying different values for 'str' argument ---
+-- Iteration 1 --
+string(1) 0
+-- Iteration 2 --
+string(1) 1
+-- Iteration 3 --
+string(5) 12345
+-- Iteration 4 --
+string(5) 

[PHP-CVS] cvs: php-src /ext/standard/tests/strings strncmp_basic.phpt strncmp_error.phpt strncmp_variation1.phpt strncmp_variation2.phpt strncmp_variation3.phpt strncmp_variation4.phpt strncmp_variati

2007-09-07 Thread Raghubansh Kumar
kraghubaFri Sep  7 14:22:56 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings strncmp_basic.phpt 
strncmp_variation1.phpt 
strncmp_variation2.phpt 
strncmp_variation3.phpt 
strncmp_variation4.phpt 
strncmp_variation5.phpt 
strncmp_error.phpt 
strncmp_variation6.phpt 
strncmp_variation7.phpt 
strncmp_variation8.phpt 
strncmp_variation9.phpt 
  Log:
  New testcases for strncmp() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_basic.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/strncmp_basic.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/strncmp_basic.phpt:1.2
--- /dev/null   Fri Sep  7 14:22:56 2007
+++ php-src/ext/standard/tests/strings/strncmp_basic.phpt   Fri Sep  7 
14:22:56 2007
@@ -0,0 +1,29 @@
+--TEST--
+Test strncmp() function : basic functionality 
+--FILE--
+?php
+/* Prototype  : int strncmp ( string $str1, string $str2, int $len );
+ * Description: Binary safe case-sensitive string comparison of the first n 
characters
+ * Source code: Zend/zend_builtin_functions.c
+*/
+
+/* Test strncmp() function with all three arguments */
+
+echo *** Test strncmp() function: basic functionality ***\n;
+var_dump( strncmp(Hello, Hello, 5) );  //expected: int(0)
+var_dump( strncmp(Hello, Hi, 5) );  //expected: int(-1)
+var_dump( strncmp(Hi, Hello, 5) );  //expected: int(1)
+echo *** Done ***;
+?
+--EXPECTF--
+*** Test strncmp() function: basic functionality ***
+int(0)
+int(-1)
+int(1)
+*** Done ***
+--UEXPECTF--
+*** Test strncmp() function: basic functionality ***
+int(0)
+int(-1)
+int(1)
+*** Done ***
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/strncmp_variation1.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/strncmp_variation1.phpt:1.2
--- /dev/null   Fri Sep  7 14:22:56 2007
+++ php-src/ext/standard/tests/strings/strncmp_variation1.phpt  Fri Sep  7 
14:22:56 2007
@@ -0,0 +1,245 @@
+--TEST--
+Test strncmp() function: usage variations - different inputs(alphabet 
characters)
+--FILE--
+?php
+/* Prototype  : int strncmp ( string $str1, string $str2, int $len );
+ * Description: Binary safe case-sensitive string comparison of the first n 
characters
+ * Source code: Zend/zend_builtin_functions.c
+*/
+
+/* Test strncmp() function with upper-case and lower-case alphabets as inputs 
for 'str1' and 'str2' */
+
+echo *** Test strncmp() function: with chars ***\n;
+echo -- Passing upper-case letters for 'str1' --\n;
+for($ASCII = 65; $ASCII = 90; $ASCII++) {
+  var_dump( strncmp( chr($ASCII), chr($ASCII), 1 ) );  //comparing uppercase 
letters with uppercase letters; exp: int(0)
+  var_dump( strncmp( chr($ASCII), chr($ASCII + 32), 1 ) );  //comparing 
uppercase letters with lowercase letters; exp: int(-1)
+}
+
+echo \n-- Passing lower-case letters for 'str1' --\n;
+for($ASCII = 97; $ASCII = 122; $ASCII++) {
+  var_dump( strncmp( chr($ASCII), chr($ASCII), 1 ) );  //comparing lowercase 
letters with lowercase letters; exp: int(0)
+  var_dump( strncmp( chr($ASCII), chr($ASCII - 32), 1 ) );  //comparing 
lowercase letters with uppercase letters; exp: int(1)
+}
+echo *** Done ***\n;
+?
+--EXPECTF--
+*** Test strncmp() function: with chars ***
+-- Passing upper-case letters for 'str1' --
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+
+-- Passing lower-case letters for 'str1' --
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+int(0)
+int(1)
+*** Done ***
+--UEXPECTF--   
+*** Test strncmp() function: with chars ***
+-- Passing upper-case letters for 'str1' --
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)
+int(0)
+int(-1)

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings strncmp_basic.phpt strncmp_error.phpt strncmp_variation1.phpt strncmp_variation2.phpt strncmp_variation3.phpt strncmp_variation4.phpt strncm

2007-09-07 Thread Raghubansh Kumar
kraghubaFri Sep  7 14:20:12 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings strncmp_basic.phpt 
strncmp_variation1.phpt 
strncmp_variation2.phpt 
strncmp_variation3.phpt 
strncmp_variation4.phpt 
strncmp_variation5.phpt 
strncmp_variation6.phpt 
strncmp_variation7.phpt 
strncmp_error.phpt 
strncmp_variation8.phpt 
strncmp_variation9.phpt 
  Log:
  New testcases for strncmp() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_basic.phpt
+++ php-src/ext/standard/tests/strings/strncmp_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation1.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation2.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation3.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation4.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation5.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation6.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation7.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation7.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation7.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_error.phpt
+++ php-src/ext/standard/tests/strings/strncmp_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation8.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation8.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation8.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncmp_variation9.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncmp_variation9.phpt
+++ php-src/ext/standard/tests/strings/strncmp_variation9.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings stripslashes_basic.phpt stripslashes_error.phpt stripslashes_variation1.phpt stripslashes_variation2.phpt stripslashes_variation3.phpt stripslashes_v

2007-09-07 Thread Raghubansh Kumar
kraghubaFri Sep  7 14:03:33 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings stripslashes_variation1.phpt 
stripslashes_variation2.phpt 
stripslashes_variation3.phpt 
stripslashes_basic.phpt 
stripslashes_variation4.phpt 
stripslashes_error.phpt 
  Log:
  New testcases for stripslashes() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/stripslashes_variation1.phpt
diff -u /dev/null 
php-src/ext/standard/tests/strings/stripslashes_variation1.phpt:1.2
--- /dev/null   Fri Sep  7 14:03:33 2007
+++ php-src/ext/standard/tests/strings/stripslashes_variation1.phpt Fri Sep 
 7 14:03:33 2007
@@ -0,0 +1,242 @@
+--TEST--
+Test stripslashes() function : usage variations  - non-string type argument 
+--FILE--
+?php
+/* Prototype  : string stripslashes ( string $str )
+ * Description: Returns an un-quoted string
+ * Source code: ext/standard/string.c
+*/
+
+/*
+ * Test stripslashes() with non-string type argument such as int, float, etc 
+*/
+
+echo *** Testing stripslashes() : with non-string type argument ***\n;
+// initialize all required variables
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// declaring a class
+class sample  {
+  public function __toString() {
+  return obj\'ct;
+  } 
+}
+
+// Defining resource
+$file_handle = fopen(__FILE__, 'r');
+
+// array with different values
+$values =  array (
+
+  // integer values
+  0,
+  1,
+  12345,
+  -2345,
+
+  // float values
+  10.5,
+  -10.5,
+  10.5e10,
+  10.6E-10,
+  .5,
+
+  // array values
+  array(),
+  array(0),
+  array(1),
+  array(1, 2),
+  array('color' = 'red', 'item' = 'pen'),
+
+  // boolean values
+  true,
+  false,
+  TRUE,
+  FALSE,
+
+  // empty string
+  ,
+  '',
+
+  // undefined variable
+  $undefined_var,
+
+  // unset variable
+  $unset_var,
+  
+  // objects
+  new sample(),
+
+  // resource
+  $file_handle,
+
+  // NULL values 
+  NULL,
+  null
+);
+
+
+// loop through each element of the array and check the working of 
stripslashes()
+// when $str arugment is supplied with different values
+echo \n--- Testing stripslashes() by supplying different values for 'str' 
argument ---\n;
+$counter = 1;
+for($index = 0; $index  count($values); $index ++) {
+  echo -- Iteration $counter --\n;
+  $str = $values [$index];
+
+  var_dump( stripslashes($str) );
+
+  $counter ++;
+}
+
+// closing the file
+fclose($file_handle);
+
+echo Done\n;
+?
+--EXPECTF--
+*** Testing stripslashes() : with non-string type argument ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+--- Testing stripslashes() by supplying different values for 'str' argument ---
+-- Iteration 1 --
+string(1) 0
+-- Iteration 2 --
+string(1) 1
+-- Iteration 3 --
+string(5) 12345
+-- Iteration 4 --
+string(5) -2345
+-- Iteration 5 --
+string(4) 10.5
+-- Iteration 6 --
+string(5) -10.5
+-- Iteration 7 --
+string(12) 1050
+-- Iteration 8 --
+string(7) 1.06E-9
+-- Iteration 9 --
+string(3) 0.5
+-- Iteration 10 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) Array
+-- Iteration 11 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) Array
+-- Iteration 12 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) Array
+-- Iteration 13 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) Array
+-- Iteration 14 --
+
+Notice: Array to string conversion in %s on line %d
+string(5) Array
+-- Iteration 15 --
+string(1) 1
+-- Iteration 16 --
+string(0) 
+-- Iteration 17 --
+string(1) 1
+-- Iteration 18 --
+string(0) 
+-- Iteration 19 --
+string(0) 
+-- Iteration 20 --
+string(0) 
+-- Iteration 21 --
+string(0) 
+-- Iteration 22 --
+string(0) 
+-- Iteration 23 --
+string(6) obj'ct
+-- Iteration 24 --
+string(14) Resource id #%d
+-- Iteration 25 --
+string(0) 
+-- Iteration 26 --
+string(0) 
+Done
+
+--UEXPECTF--
+*** Testing stripslashes() : with non-string type argument ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+--- Testing stripslashes() by supplying different values for 'str' argument ---
+-- Iteration 1 --
+unicode(1) 0
+-- Iteration 2 --
+unicode(1) 1
+-- Iteration 3 --
+unicode(5) 12345
+-- Iteration 4 --
+unicode(5) -2345
+-- Iteration 5 --
+unicode(4) 10.5
+-- Iteration 6 --
+unicode(5) -10.5
+-- Iteration 7 --
+unicode(12) 1050
+-- Iteration 8 --
+unicode(7) 1.06E-9
+-- Iteration 9 --
+unicode(3) 0.5
+-- Iteration 10 --
+
+Notice: Array to string conversion in %s on line %d
+unicode(5) Array
+-- Iteration 11 --
+
+Notice: Array to string conversion in 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings ucwords_basic.phpt ucwords_error.phpt ucwords_variation1.phpt ucwords_variation2.phpt ucwords_variation3.phpt ucwords_variation4.phpt

2007-09-07 Thread Raghubansh Kumar
kraghubaFri Sep  7 14:44:52 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings ucwords_variation1.phpt 
ucwords_basic.phpt 
ucwords_variation2.phpt 
ucwords_variation3.phpt 
ucwords_variation4.phpt 
ucwords_error.phpt 
  Log:
  New testcases for ucwords() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/ucwords_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/ucwords_variation1.phpt
+++ php-src/ext/standard/tests/strings/ucwords_variation1.phpt
--TEST--
Test ucwords() function : usage variations - unexpected input values
--FILE--
?php
/* Prototype  : string ucwords ( string $str )
 * Description: Uppercase the first character of each word in a string
 * Source code: ext/standard/string.c
*/

/*
 * Test ucwords() by passing different values including scalar and non scalar 
values 
*/

echo *** Testing ucwords() : usage variations ***\n;
// initialize all required variables

// get an unset variable
$unset_var = 'string_val';
unset($unset_var);

$fp = fopen(__FILE__, r);

class my
{
  function __toString() {
return myString;
  }
}

// array with different values
$values =  array (

  // integer values
  0,
  1,
  12345,
  -2345,

  // hex values 
  0x10,
  0X20,
  0xAA,
  -0XF5,

  // octal values
  0123,
  -0342,

  // float values
  10.5,
  -10.5,
  10.5e10,
  10.6E-10,
  .5,

  // array values
  array(),
  array(0),
  array(1),
  array(1, 2),
  array('color' = 'red', 'item' = 'pen'),

  // boolean values
  true,
  false,
  TRUE,
  FALSE,

  // objects
  new my(),

  // empty string
  ,
  '',

  //NULL
  NULL,
  null,

  // hex in string 
  0x123,
  '0x123',
  0xFF12,
  -0xFF12,
  
  // undefined variable
  @$undefined_var,

  // unset variable
  @$unset_var,

  // resource variable
  $fp
);

// loop through each element of the array and check the working of ucwords()
// when $str arugment is supplied with different values
echo \n--- Testing ucwords() by supplying different values for 'str' argument 
---\n;
$counter = 1;
for($index = 0; $index  count($values); $index ++) {
  echo -- Iteration $counter --\n;
  $str = $values [$index];

  var_dump( ucwords($str) );

  $counter ++;
}

// close the file handle
fclose($fp);
echo Done\n;
?
--EXPECTF--
*** Testing ucwords() : usage variations ***

--- Testing ucwords() by supplying different values for 'str' argument ---
-- Iteration 1 --
string(1) 0
-- Iteration 2 --
string(1) 1
-- Iteration 3 --
string(5) 12345
-- Iteration 4 --
string(5) -2345
-- Iteration 5 --
string(2) 16
-- Iteration 6 --
string(2) 32
-- Iteration 7 --
string(3) 170
-- Iteration 8 --
string(4) -245
-- Iteration 9 --
string(2) 83
-- Iteration 10 --
string(4) -226
-- Iteration 11 --
string(4) 10.5
-- Iteration 12 --
string(5) -10.5
-- Iteration 13 --
string(12) 1050
-- Iteration 14 --
string(7) 1.06E-9
-- Iteration 15 --
string(3) 0.5
-- Iteration 16 --

Warning: ucwords() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
NULL
-- Iteration 17 --

Warning: ucwords() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
NULL
-- Iteration 18 --

Warning: ucwords() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
NULL
-- Iteration 19 --

Warning: ucwords() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
NULL
-- Iteration 20 --

Warning: ucwords() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
NULL
-- Iteration 21 --
string(1) 1
-- Iteration 22 --
string(0) 
-- Iteration 23 --
string(1) 1
-- Iteration 24 --
string(0) 
-- Iteration 25 --
string(8) MyString
-- Iteration 26 --
string(0) 
-- Iteration 27 --
string(0) 
-- Iteration 28 --
string(0) 
-- Iteration 29 --
string(0) 
-- Iteration 30 --
string(5) 0x123
-- Iteration 31 --
string(5) 0x123
-- Iteration 32 --
string(6) 0xFF12
-- Iteration 33 --
string(7) -0xFF12
-- Iteration 34 --
string(0) 
-- Iteration 35 --
string(0) 
-- Iteration 36 --

Warning: ucwords() expects parameter 1 to be string (Unicode or binary), 
resource given in %s on line %d
NULL
Done
--UEXPECTF--
*** Testing ucwords() : usage variations ***

--- Testing ucwords() by supplying different values for 'str' argument ---
-- Iteration 1 --
unicode(1) 0
-- Iteration 2 --
unicode(1) 1
-- Iteration 3 --
unicode(5) 12345
-- Iteration 4 --
unicode(5) -2345
-- Iteration 5 --
unicode(2) 16
-- Iteration 6 --
unicode(2) 32
-- Iteration 7 --
unicode(3) 170
-- Iteration 8 --
unicode(4) -245
-- Iteration 9 --
unicode(2) 83
-- Iteration 10 --
unicode(4) -226
-- Iteration 11 --
unicode(4) 10.5
-- Iteration 12 --
unicode(5) -10.5
-- Iteration 13 --
unicode(12) 1050
-- Iteration 14 --
unicode(7) 

[PHP-CVS] cvs: php-src /ext/standard/tests/strings ucwords_basic.phpt ucwords_error.phpt ucwords_variation1.phpt ucwords_variation2.phpt ucwords_variation3.phpt ucwords_variation4.phpt

2007-09-07 Thread Raghubansh Kumar
kraghubaFri Sep  7 14:43:24 2007 UTC

  Added files: 
/php-src/ext/standard/tests/strings ucwords_basic.phpt 
ucwords_variation1.phpt 
ucwords_variation2.phpt 
ucwords_variation3.phpt 
ucwords_variation4.phpt 
ucwords_error.phpt 
  Log:
  New testcases for ucwords() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/ucwords_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/ucwords_basic.phpt
+++ php-src/ext/standard/tests/strings/ucwords_basic.phpt
--TEST--
Test ucwords() function : basic functionality 
--FILE--
?php
/* Prototype  : string ucwords ( string $str )
 * Description: Uppercase the first character of each word in a string
 * Source code: ext/standard/string.c
*/

echo *** Testing ucwords() : basic functionality ***\n;

// lines with different whitespace charecter
$str_array = array(
 testing ucwords,
 'testing ucwords',
 'testing\tucwords',
 testing\tucwords,
 testing\nucwords,
 'testing\nucwords',
 testing\vucwords,
 'testing\vucwords',
 testing,
 'testing',
 ' testing',
  testing,
 testing  ucwords,
 'testing  ucwords',
 'testing\rucwords',
 testing\rucwords,
 'testing\fucwords',
 testing\fucwords
);

// loop through the $strings array to test ucwords on each element 
$iteration = 1;
for($index = 0; $index  count($str_array); $index++) {
  echo -- Iteration $iteration --\n;
  var_dump( ucwords($str_array[$index]) );
  $iteration++;
}

echo Done\n;
?
--EXPECTF--
*** Testing ucwords() : basic functionality ***
-- Iteration 1 --
string(15) Testing Ucwords
-- Iteration 2 --
string(15) Testing Ucwords
-- Iteration 3 --
string(16) Testing\tucwords
-- Iteration 4 --
string(15) Testing Ucwords
-- Iteration 5 --
string(15) Testing
Ucwords
-- Iteration 6 --
string(16) Testing\nucwords
-- Iteration 7 --
string(16) Testing\vucwords
-- Iteration 8 --
string(16) Testing\vucwords
-- Iteration 9 --
string(7) Testing
-- Iteration 10 --
string(7) Testing
-- Iteration 11 --
string(8)  Testing
-- Iteration 12 --
string(8)  Testing
-- Iteration 13 --
string(16) Testing  Ucwords
-- Iteration 14 --
string(16) Testing  Ucwords
-- Iteration 15 --
string(16) Testing\rucwords
-- Iteration 16 --
string(15) TestingUcwords
-- Iteration 17 --
string(16) Testing\fucwords
-- Iteration 18 --
string(16) Testing\fucwords
Done
--UEXPECTF--
*** Testing ucwords() : basic functionality ***
-- Iteration 1 --
unicode(15) Testing Ucwords
-- Iteration 2 --
unicode(15) Testing Ucwords
-- Iteration 3 --
unicode(16) Testing\tucwords
-- Iteration 4 --
unicode(15) TestingUcwords
-- Iteration 5 --
unicode(15) Testing
Ucwords
-- Iteration 6 --
unicode(16) Testing\nucwords
-- Iteration 7 --
unicode(16) Testing\vucwords
-- Iteration 8 --
unicode(16) Testing\vucwords
-- Iteration 9 --
unicode(7) Testing
-- Iteration 10 --
unicode(7) Testing
-- Iteration 11 --
unicode(8)  Testing
-- Iteration 12 --
unicode(8)  Testing
-- Iteration 13 --
unicode(16) Testing  Ucwords
-- Iteration 14 --
unicode(16) Testing  Ucwords
-- Iteration 15 --
unicode(16) Testing\rucwords
-- Iteration 16 --
unicode(15) TestingUcwords
-- Iteration 17 --
unicode(16) Testing\fucwords
-- Iteration 18 --
unicode(16) Testing\fucwords
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/ucwords_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/ucwords_variation1.phpt
+++ php-src/ext/standard/tests/strings/ucwords_variation1.phpt
--TEST--
Test ucwords() function : usage variations - unexpected input values
--FILE--
?php
/* Prototype  : string ucwords ( string $str )
 * Description: Uppercase the first character of each word in a string
 * Source code: ext/standard/string.c
*/

/*
 * Test ucwords() by passing different values including scalar and non scalar 
values 
*/

echo *** Testing ucwords() : usage variations ***\n;
// initialize all required variables

// get an unset variable
$unset_var = 'string_val';
unset($unset_var);

$fp = fopen(__FILE__, r);

class my
{
  function __toString() {
return myString;
  }
}

// array with different values
$values =  array (

  // integer values
  0,
  1,
  12345,
  -2345,

  // hex values 
  0x10,
  0X20,
  0xAA,
  -0XF5,

  // octal values
  0123,
  -0342,

  // float values
  10.5,
  -10.5,
  10.5e10,
  10.6E-10,
  .5,

  // array values
  array(),
  array(0),
  array(1),
  array(1, 2),
  array('color' = 'red', 'item' = 'pen'),

  // boolean values
  true,
  false,
  TRUE,
  FALSE,

  // objects
  new my(),

  // empty string
  ,
  '',

  //NULL
  NULL,
  null,

  // hex in string 
  0x123,
  '0x123',
  0xFF12,
  -0xFF12,
  
  // undefined variable
  @$undefined_var,

  // unset variable
  @$unset_var,

  // resource variable
  $fp
);

// loop through each element of the array and check the working of 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings stripslashes_basic.phpt stripslashes_error.phpt stripslashes_variation1.phpt stripslashes_variation2.phpt stripslashes_variation3.phpt strip

2007-09-07 Thread Raghubansh Kumar
kraghubaFri Sep  7 13:51:27 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings stripslashes_variation1.phpt 
stripslashes_basic.phpt 
stripslashes_variation2.phpt 
stripslashes_variation3.phpt 
stripslashes_variation4.phpt 
stripslashes_variation5.phpt 
stripslashes_error.phpt 
  Log:
  New testcases for stripslashes() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripslashes_variation1.phpt
+++ php-src/ext/standard/tests/strings/stripslashes_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripslashes_basic.phpt
+++ php-src/ext/standard/tests/strings/stripslashes_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripslashes_variation2.phpt
+++ php-src/ext/standard/tests/strings/stripslashes_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripslashes_variation3.phpt
+++ php-src/ext/standard/tests/strings/stripslashes_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripslashes_variation4.phpt
+++ php-src/ext/standard/tests/strings/stripslashes_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripslashes_variation5.phpt
+++ php-src/ext/standard/tests/strings/stripslashes_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripslashes_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripslashes_error.phpt
+++ php-src/ext/standard/tests/strings/stripslashes_error.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/general_functions is_callable.phpt

2007-09-10 Thread Raghubansh Kumar
kraghubaTue Sep 11 05:21:40 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/general_functions   is_callable.phpt 
  Log:
  fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/general_functions/is_callable.phpt
diff -u php-src/ext/standard/tests/general_functions/is_callable.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/is_callable.phpt:1.1.2.3
--- php-src/ext/standard/tests/general_functions/is_callable.phpt:1.1.2.2   
Thu Jul 12 09:26:42 2007
+++ php-src/ext/standard/tests/general_functions/is_callable.phpt   Tue Sep 
11 05:21:40 2007
@@ -2,6 +2,7 @@
 Test is_callable() function
 --INI--
 precision=14
+error_reporting = E_ALL  ~E_NOTICE | E_STRICT
 --FILE--
 ?php
 /* Prototype: bool is_callable ( mixed $var [, bool $syntax_only [, string 
$callable_name]] );

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



[PHP-CVS] cvs: php-src /ext/standard/tests/general_functions is_callable.phpt

2007-09-10 Thread Raghubansh Kumar
kraghubaTue Sep 11 05:23:45 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/general_functions   is_callable.phpt 
  Log:
  fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/is_callable.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/general_functions/is_callable.phpt
diff -u php-src/ext/standard/tests/general_functions/is_callable.phpt:1.3 
php-src/ext/standard/tests/general_functions/is_callable.phpt:1.4
--- php-src/ext/standard/tests/general_functions/is_callable.phpt:1.3   Thu Jul 
12 09:26:28 2007
+++ php-src/ext/standard/tests/general_functions/is_callable.phpt   Tue Sep 
11 05:23:45 2007
@@ -2,6 +2,7 @@
 Test is_callable() function
 --INI--
 precision=14
+error_reporting = E_ALL  ~E_NOTICE | E_STRICT
 --FILE--
 ?php
 /* Prototype: bool is_callable ( mixed $var [, bool $syntax_only [, string 
$callable_name]] );


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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file is_file_variation4.phpt rename_variation.phpt

2007-09-12 Thread Raghubansh Kumar
kraghubaWed Sep 12 08:27:35 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/fileis_file_variation4.phpt 
rename_variation.phpt 
  Log:
  marked with Bug# 42638
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_file_variation4.phpt?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/standard/tests/file/is_file_variation4.phpt
diff -u php-src/ext/standard/tests/file/is_file_variation4.phpt:1.1.2.4 
php-src/ext/standard/tests/file/is_file_variation4.phpt:1.1.2.5
--- php-src/ext/standard/tests/file/is_file_variation4.phpt:1.1.2.4 Mon Jul 
23 10:47:13 2007
+++ php-src/ext/standard/tests/file/is_file_variation4.phpt Wed Sep 12 
08:27:35 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test is_file() function: usage variations - diff. path notations (Bug #42027)
+Test is_file() function: usage variations - diff. path notations (Bug #42027, 
#42638)
 --FILE--
 ?php
 /* Prototype: bool is_file ( string $filename );
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/standard/tests/file/rename_variation.phpt
diff -u php-src/ext/standard/tests/file/rename_variation.phpt:1.1.2.2 
php-src/ext/standard/tests/file/rename_variation.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/rename_variation.phpt:1.1.2.2   Fri Jun 
29 12:56:49 2007
+++ php-src/ext/standard/tests/file/rename_variation.phpt   Wed Sep 12 
08:27:35 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test rename() function: usage variations-1
+Test rename() function: usage variations-1 (Bug#42638)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file is_file_variation4.phpt rename_variation.phpt

2007-09-12 Thread Raghubansh Kumar
kraghubaWed Sep 12 08:29:34 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/fileis_file_variation4.phpt 
rename_variation.phpt 
  Log:
  marked with bug#42638
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_file_variation4.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/is_file_variation4.phpt
diff -u php-src/ext/standard/tests/file/is_file_variation4.phpt:1.3 
php-src/ext/standard/tests/file/is_file_variation4.phpt:1.4
--- php-src/ext/standard/tests/file/is_file_variation4.phpt:1.3 Mon Jul 23 
10:45:53 2007
+++ php-src/ext/standard/tests/file/is_file_variation4.phpt Wed Sep 12 
08:29:34 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test is_file() function: usage variations - diff. path notations (Bug #42027)
+Test is_file() function: usage variations - diff. path notations (Bug #42027, 
#42638)
 --FILE--
 ?php
 /* Prototype: bool is_file ( string $filename );
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/rename_variation.phpt
diff -u php-src/ext/standard/tests/file/rename_variation.phpt:1.3 
php-src/ext/standard/tests/file/rename_variation.phpt:1.4
--- php-src/ext/standard/tests/file/rename_variation.phpt:1.3   Fri Jun 29 
12:54:06 2007
+++ php-src/ext/standard/tests/file/rename_variation.phpt   Wed Sep 12 
08:29:34 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test rename() function: usage variations-1
+Test rename() function: usage variations-1 (Bug#42638)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file readlink_realpath_basic1.phpt readlink_realpath_variation1.phpt readlink_realpath_variation2.phpt

2007-09-12 Thread Raghubansh Kumar
kraghubaWed Sep 12 09:47:35 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filereadlink_realpath_variation1.phpt 
readlink_realpath_variation2.phpt 
readlink_realpath_basic1.phpt 
  Log:
  marked with Bug #42038
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt
diff -u 
php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt:1.1.2.1 
php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt:1.1.2.1   
Mon Jul  9 17:38:33 2007
+++ php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt   Wed Sep 
12 09:47:35 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in object
+Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in object(Bug #42038)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt
diff -u 
php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt:1.1.2.1 
php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt:1.1.2.1   
Mon Jul  9 17:38:33 2007
+++ php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt   Wed Sep 
12 09:47:35 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in array
+Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in array(Bug #42038)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt
diff -u php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt:1.1.2.1 
php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt:1.1.2.1   
Mon Jul  9 17:38:33 2007
+++ php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt   Wed Sep 
12 09:47:35 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test readlink() and realpath functions: basic functionality - diff. path 
notation for links
+Test readlink() and realpath functions: basic functionality - diff. path 
notation for links(Bug #42038)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file readlink_realpath_basic1.phpt readlink_realpath_variation1.phpt readlink_realpath_variation2.phpt

2007-09-12 Thread Raghubansh Kumar
kraghubaWed Sep 12 09:49:25 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filereadlink_realpath_variation1.phpt 
readlink_realpath_variation2.phpt 
readlink_realpath_basic1.phpt 
  Log:
  marked with Bug #42038
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt
diff -u php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt:1.2 
php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt:1.3
--- php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt:1.2   
Mon Jul  9 17:40:16 2007
+++ php-src/ext/standard/tests/file/readlink_realpath_variation1.phpt   Wed Sep 
12 09:49:25 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in object
+Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in object(Bug #42038)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt
diff -u php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt:1.2 
php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt:1.3
--- php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt:1.2   
Mon Jul  9 17:40:16 2007
+++ php-src/ext/standard/tests/file/readlink_realpath_variation2.phpt   Wed Sep 
12 09:49:25 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in array
+Test readlink() and realpath() functions: usage variation - linkname/filename 
stored in array(Bug #42038)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt
diff -u php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt:1.2 
php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt:1.3
--- php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt:1.2   Mon Jul 
 9 17:40:16 2007
+++ php-src/ext/standard/tests/file/readlink_realpath_basic1.phpt   Wed Sep 
12 09:49:25 2007
@@ -1,5 +1,5 @@
 --TEST--
-Test readlink() and realpath functions: basic functionality - diff. path 
notation for links
+Test readlink() and realpath functions: basic functionality - diff. path 
notation for links(Bug #42038)
 --SKIPIF--
 ?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file lstat_stat_variation6.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 09:38:14 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filelstat_stat_variation6.phpt 
  Log:
  fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation6.phpt?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/standard/tests/file/lstat_stat_variation6.phpt
diff -u php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.1.2.4 
php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.1.2.5
--- php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.1.2.4  Thu Aug 
30 04:04:58 2007
+++ php-src/ext/standard/tests/file/lstat_stat_variation6.phpt  Fri Sep 14 
09:38:13 2007
@@ -2,8 +2,8 @@
 Test lstat() and stat() functions: usage variations - effects of touch() on 
link 
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip.. lstat() not available on Windows');
+if (!(stristr(PHP_OS, 'linux')))  {
+die('skip.. test valid for linux only');
 }
 
 // checking for atime update whether it is enabled or disabled
@@ -40,10 +40,13 @@
 // touch a link, check stat, there should be difference in atime
 echo *** Testing lstat() for link after using touch() on the link ***\n;
 $old_stat = lstat($link_name);
+sleep(2);
+
 // clear the cache
 clearstatcache();
-sleep(2);
+
 var_dump( touch($link_name) );
+
 $new_stat = lstat($link_name);
 
 // compare self stats

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file lstat_stat_variation6.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 09:44:02 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filelstat_stat_variation6.phpt 
  Log:
  fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/lstat_stat_variation6.phpt?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/standard/tests/file/lstat_stat_variation6.phpt
diff -u php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.3 
php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.4
--- php-src/ext/standard/tests/file/lstat_stat_variation6.phpt:1.3  Thu Aug 
30 04:02:57 2007
+++ php-src/ext/standard/tests/file/lstat_stat_variation6.phpt  Fri Sep 14 
09:44:02 2007
@@ -2,8 +2,8 @@
 Test lstat() and stat() functions: usage variations - effects of touch() on 
link 
 --SKIPIF--
 ?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
-die('skip.. lstat() not available on Windows');
+if (!(stristr(PHP_OS, 'linux')))  {
+die('skip.. test valid for linux only');
 }
 
 // checking for atime update whether it is enabled or disabled
@@ -40,10 +40,13 @@
 // touch a link, check stat, there should be difference in atime
 echo *** Testing lstat() for link after using touch() on the link ***\n;
 $old_stat = lstat($link_name);
+sleep(2);
+
 // clear the cache
 clearstatcache();
-sleep(2);
+
 var_dump( touch($link_name) );
+
 $new_stat = lstat($link_name);
 
 // compare self stats

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file wordwrap_basic.phpt wordwrap_error.phpt wordwrap_variation1.phpt wordwrap_variation2.phpt wordwrap_variation3.phpt wordwrap_variation4.phpt wor

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 14:14:48 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filewordwrap_error.phpt 
wordwrap_variation1.phpt 
wordwrap_variation2.phpt 
wordwrap_variation3.phpt 
wordwrap_basic.phpt 
wordwrap_variation4.phpt 
wordwrap_variation5.phpt 
  Log:
  New testcases for wordwrap() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/wordwrap_error.phpt
+++ php-src/ext/standard/tests/file/wordwrap_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/wordwrap_variation1.phpt
+++ php-src/ext/standard/tests/file/wordwrap_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/wordwrap_variation2.phpt
+++ php-src/ext/standard/tests/file/wordwrap_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/wordwrap_variation3.phpt
+++ php-src/ext/standard/tests/file/wordwrap_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/wordwrap_basic.phpt
+++ php-src/ext/standard/tests/file/wordwrap_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/wordwrap_variation4.phpt
+++ php-src/ext/standard/tests/file/wordwrap_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/wordwrap_variation5.phpt
+++ php-src/ext/standard/tests/file/wordwrap_variation5.phpt

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



[PHP-CVS] cvs: php-src /ext/standard/tests/file wordwrap_error.phpt wordwrap_variation3.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 14:28:42 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/filewordwrap_error.phpt 
wordwrap_variation3.phpt 
  Log:
  better comments
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_error.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/wordwrap_error.phpt
diff -u php-src/ext/standard/tests/file/wordwrap_error.phpt:1.2 
php-src/ext/standard/tests/file/wordwrap_error.phpt:1.3
--- php-src/ext/standard/tests/file/wordwrap_error.phpt:1.2 Fri Sep 14 
14:17:22 2007
+++ php-src/ext/standard/tests/file/wordwrap_error.phpt Fri Sep 14 14:28:42 2007
@@ -7,10 +7,6 @@
  * Source code: ext/standard/string.c
 */
 
-//
-// add comment here to indicate details of what this testcase is testing in 
particular
-//
-
 echo *** Testing wordwrap() : error conditions ***\n;
 
 // Zero argument
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_variation3.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/standard/tests/file/wordwrap_variation3.phpt
diff -u php-src/ext/standard/tests/file/wordwrap_variation3.phpt:1.2 
php-src/ext/standard/tests/file/wordwrap_variation3.phpt:1.3
--- php-src/ext/standard/tests/file/wordwrap_variation3.phpt:1.2Fri Sep 
14 14:17:22 2007
+++ php-src/ext/standard/tests/file/wordwrap_variation3.phptFri Sep 14 
14:28:42 2007
@@ -8,10 +8,9 @@
  * Source code: ext/standard/string.c
 */
 
-//
-// add comment here to indicate details of what this testcase is testing in 
particular
-//
-
+/*
+ * test wordwrap by passing different values for break argument 
+*/
 echo *** Testing wordwrap() : usage variations ***\n;
 // initialize all required variables
 $str = 'testing wordwrap function';

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file wordwrap_variation3.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 14:31:55 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/filewordwrap_variation3.phpt 
  Log:
  better comments
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/wordwrap_variation3.phpt?r1=1.1.2.1r2=1.1.2.2diff_format=u
Index: php-src/ext/standard/tests/file/wordwrap_variation3.phpt
diff -u php-src/ext/standard/tests/file/wordwrap_variation3.phpt:1.1.2.1 
php-src/ext/standard/tests/file/wordwrap_variation3.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/wordwrap_variation3.phpt:1.1.2.1Fri Sep 
14 14:14:48 2007
+++ php-src/ext/standard/tests/file/wordwrap_variation3.phptFri Sep 14 
14:31:55 2007
@@ -8,10 +8,9 @@
  * Source code: ext/standard/string.c
 */
 
-//
-// add comment here to indicate details of what this testcase is testing in 
particular
-//
-
+/*
+ * test wordwrap by passing different values for break argument 
+*/
 echo *** Testing wordwrap() : usage variations ***\n;
 // initialize all required variables
 $str = 'testing wordwrap function';

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file chop_basic.phpt chop_error.phpt chop_variation1.phpt chop_variation2.phpt chop_variation3.phpt chop_variation4.phpt chop_variation5.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 18:24:48 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filechop_variation1.phpt 
chop_error.phpt 
chop_variation2.phpt 
chop_variation3.phpt 
chop_variation4.phpt 
chop_variation5.phpt 
chop_basic.phpt 
  Log:
  New testscases for chop() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/chop_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/chop_variation1.phpt
+++ php-src/ext/standard/tests/file/chop_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/chop_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/chop_error.phpt
+++ php-src/ext/standard/tests/file/chop_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/chop_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/chop_variation2.phpt
+++ php-src/ext/standard/tests/file/chop_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/chop_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/chop_variation3.phpt
+++ php-src/ext/standard/tests/file/chop_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/chop_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/chop_variation4.phpt
+++ php-src/ext/standard/tests/file/chop_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/chop_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/chop_variation5.phpt
+++ php-src/ext/standard/tests/file/chop_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/chop_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/chop_basic.phpt
+++ php-src/ext/standard/tests/file/chop_basic.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file strncasecmp_basic.phpt strncasecmp_error.phpt strncasecmp_variation1.phpt strncasecmp_variation10.phpt strncasecmp_variation11.phpt strncasecmp

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 18:26:44 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filestrncasecmp_variation4.phpt 
strncasecmp_variation5.phpt 
strncasecmp_variation6.phpt 
strncasecmp_variation7.phpt 
strncasecmp_variation8.phpt 
strncasecmp_variation9.phpt 
strncasecmp_error.phpt 
strncasecmp_basic.phpt 
strncasecmp_variation1.phpt 
strncasecmp_variation10.phpt 
strncasecmp_variation11.phpt 
strncasecmp_variation2.phpt 
strncasecmp_variation3.phpt 
  Log:
  New testcases for strncasecmp() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation4.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation5.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation6.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation7.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation7.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation7.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation8.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation8.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation8.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation9.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation9.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation9.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_error.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_basic.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation1.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation10.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation10.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation10.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation11.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation11.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation11.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation2.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/strncasecmp_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/file/strncasecmp_variation3.phpt
+++ php-src/ext/standard/tests/file/strncasecmp_variation3.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings wordwrap_basic.phpt wordwrap_error.phpt wordwrap_variation1.phpt wordwrap_variation2.phpt wordwrap_variation3.phpt wordwrap_variation4.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 18:53:38 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings wordwrap_variation1.phpt 
wordwrap_variation2.phpt 
wordwrap_variation3.phpt 
wordwrap_basic.phpt 
wordwrap_variation4.phpt 
wordwrap_variation5.phpt 
wordwrap_error.phpt 
  Log:
  New testcases for wordwrap()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/wordwrap_variation1.phpt
+++ php-src/ext/standard/tests/strings/wordwrap_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/wordwrap_variation2.phpt
+++ php-src/ext/standard/tests/strings/wordwrap_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/wordwrap_variation3.phpt
+++ php-src/ext/standard/tests/strings/wordwrap_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/wordwrap_basic.phpt
+++ php-src/ext/standard/tests/strings/wordwrap_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/wordwrap_variation4.phpt
+++ php-src/ext/standard/tests/strings/wordwrap_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/wordwrap_variation5.phpt
+++ php-src/ext/standard/tests/strings/wordwrap_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/wordwrap_error.phpt
+++ php-src/ext/standard/tests/strings/wordwrap_error.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file wordwrap_basic.phpt wordwrap_error.phpt wordwrap_variation1.phpt wordwrap_variation2.phpt wordwrap_variation3.phpt wordwrap_variation4.phpt wor

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 18:55:56 2007 UTC

  Removed files:   (Branch: PHP_5_2)
/php-src/ext/standard/tests/filewordwrap_error.phpt 
wordwrap_variation1.phpt 
wordwrap_variation2.phpt 
wordwrap_variation3.phpt 
wordwrap_basic.phpt 
wordwrap_variation4.phpt 
wordwrap_variation5.phpt 
  Log:
  Removing from file dir as it was wrongly committed to this dir
  

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings chop_basic.phpt chop_error.phpt chop_variation1.phpt chop_variation2.phpt chop_variation3.phpt chop_variation4.phpt chop_variation5.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 18:58:02 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings chop_variation1.phpt 
chop_error.phpt 
chop_variation2.phpt 
chop_variation3.phpt 
chop_variation4.phpt 
chop_variation5.phpt 
chop_basic.phpt 
  Log:
  New testcases for chop()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/chop_variation1.phpt
+++ php-src/ext/standard/tests/strings/chop_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/chop_error.phpt
+++ php-src/ext/standard/tests/strings/chop_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/chop_variation2.phpt
+++ php-src/ext/standard/tests/strings/chop_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/chop_variation3.phpt
+++ php-src/ext/standard/tests/strings/chop_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/chop_variation4.phpt
+++ php-src/ext/standard/tests/strings/chop_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/chop_variation5.phpt
+++ php-src/ext/standard/tests/strings/chop_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/chop_basic.phpt
+++ php-src/ext/standard/tests/strings/chop_basic.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file chop_basic.phpt chop_error.phpt chop_variation1.phpt chop_variation2.phpt chop_variation3.phpt chop_variation4.phpt chop_variation5.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 18:59:22 2007 UTC

  Removed files:   (Branch: PHP_5_2)
/php-src/ext/standard/tests/filechop_variation1.phpt 
chop_error.phpt 
chop_variation2.phpt 
chop_variation3.phpt 
chop_variation4.phpt 
chop_variation5.phpt 
chop_basic.phpt 
  Log:
  Removing from file dir as it was wrongly committed to this dir
  

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/strings stripos_basic.phpt strncasecmp_basic.phpt strncasecmp_error.phpt strncasecmp_variation1.phpt strncasecmp_variation10.phpt strncasecmp_variat

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 19:02:08 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings strncasecmp_basic.phpt 
stripos_basic.phpt 
strncasecmp_variation10.phpt 
strncasecmp_variation11.phpt 
strncasecmp_variation1.phpt 
strncasecmp_variation2.phpt 
strncasecmp_variation3.phpt 
strncasecmp_variation4.phpt 
strncasecmp_variation5.phpt 
strncasecmp_variation6.phpt 
strncasecmp_error.phpt 
strncasecmp_variation7.phpt 
strncasecmp_variation8.phpt 
strncasecmp_variation9.phpt 
  Log:
  New testcases for strncasecmp()
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_basic.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/stripos_basic.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/stripos_basic.phpt
+++ php-src/ext/standard/tests/strings/stripos_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation10.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation10.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation10.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation11.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation11.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation11.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation1.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation1.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation2.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation2.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation3.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation3.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation4.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation4.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation5.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation5.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation6.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation6.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_error.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_error.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation7.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation7.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation7.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation8.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation8.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation8.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strncasecmp_variation9.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strncasecmp_variation9.phpt
+++ php-src/ext/standard/tests/strings/strncasecmp_variation9.phpt

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard/tests/file strncasecmp_basic.phpt strncasecmp_error.phpt strncasecmp_variation1.phpt strncasecmp_variation10.phpt strncasecmp_variation11.phpt strncasecmp

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 19:03:14 2007 UTC

  Removed files:   (Branch: PHP_5_2)
/php-src/ext/standard/tests/filestrncasecmp_variation4.phpt 
strncasecmp_variation5.phpt 
strncasecmp_variation6.phpt 
strncasecmp_variation7.phpt 
strncasecmp_variation8.phpt 
strncasecmp_variation9.phpt 
strncasecmp_error.phpt 
strncasecmp_basic.phpt 
strncasecmp_variation1.phpt 
strncasecmp_variation10.phpt 
strncasecmp_variation11.phpt 
strncasecmp_variation2.phpt 
strncasecmp_variation3.phpt 
  Log:
  Removing from file dir as it was wrongly committed to this dir
  

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings wordwrap_basic.phpt wordwrap_error.phpt wordwrap_variation1.phpt wordwrap_variation2.phpt wordwrap_variation3.phpt wordwrap_variation4.phpt wordwrap_

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 19:09:11 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings wordwrap_variation1.phpt 
wordwrap_variation2.phpt 
wordwrap_variation3.phpt 
wordwrap_variation4.phpt 
wordwrap_variation5.phpt 
wordwrap_basic.phpt 
wordwrap_error.phpt 
  Log:
  New testcases for wordwrap()
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/wordwrap_variation1.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/wordwrap_variation1.phpt
diff -u /dev/null 
php-src/ext/standard/tests/strings/wordwrap_variation1.phpt:1.2
--- /dev/null   Fri Sep 14 19:09:11 2007
+++ php-src/ext/standard/tests/strings/wordwrap_variation1.phpt Fri Sep 14 
19:09:11 2007
@@ -0,0 +1,335 @@
+--TEST--
+Test wordwrap() function : usage variations  - unexpected values for str 
argument
+--FILE--
+?php
+/* Prototype  : string wordwrap ( string $str [, int $width [, string $break 
[, bool $cut]]] )
+ * Description: Wraps buffer to selected number of characters using string 
break char
+ * Source code: ext/standard/string.c
+*/
+
+/*
+ * testing wordwrap() by providing different values for str argument
+*/
+
+echo *** Testing wordwrap() : usage variations ***\n;
+// initialize all required variables
+$width = 3;
+$break = 'br /\n';
+$cut = true;
+
+// resource variable
+$fp = fopen(__FILE__, r);
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// array with different values
+$values =  array (
+
+  // integer values
+  0,
+  1,
+  12345,
+  -2345,
+
+  // float values
+  10.5,
+  -10.5,
+  10.5e10,
+  10.6E-10,
+  .5,
+
+  // array values
+  array(),
+  array(0),
+  array(1),
+  array(1, 2),
+  array('color' = 'red', 'item' = 'pen'),
+
+  // boolean values
+  true,
+  false,
+  TRUE,
+  FALSE,
+
+  // objects
+  new stdclass(),
+
+  // Null
+  NULL,
+  null,
+
+  // empty string
+  ,
+  '',
+
+  // resource variable
+  $fp,
+
+  // undefined variable
+  @$undefined_var,
+
+  // unset variable
+  @$unset_var
+);
+
+// loop though each element of the array and check the working of wordwrap()
+// when $str arugment is supplied with different values
+echo \n--- Testing wordwrap() by supplying different values for 'str' 
argument ---\n;
+$counter = 1;
+for($index = 0; $index  count($values); $index ++) {
+  echo -- Iteration $counter --\n;
+  $str = $values [$index];
+
+  var_dump( wordwrap($str) );
+  var_dump( wordwrap($str, $width) );
+  var_dump( wordwrap($str, $width, $break) );
+
+  // $cut as false
+  $cut = false;
+  var_dump( wordwrap($str, $width, $break, $cut) );
+
+  // $cut as true
+  $cut = true;
+  var_dump( wordwrap($str, $width, $break, $cut) );
+
+  $counter ++;
+}
+
+// close the resource 
+fclose($fp);
+
+echo Done\n;
+?
+--EXPECTF--
+*** Testing wordwrap() : usage variations ***
+
+--- Testing wordwrap() by supplying different values for 'str' argument ---
+-- Iteration 1 --
+string(1) 0
+string(1) 0
+string(1) 0
+string(1) 0
+string(1) 0
+-- Iteration 2 --
+string(1) 1
+string(1) 1
+string(1) 1
+string(1) 1
+string(1) 1
+-- Iteration 3 --
+string(5) 12345
+string(5) 12345
+string(5) 12345
+string(5) 12345
+string(13) 123br /\n45
+-- Iteration 4 --
+string(5) -2345
+string(5) -2345
+string(5) -2345
+string(5) -2345
+string(13) -23br /\n45
+-- Iteration 5 --
+string(4) 10.5
+string(4) 10.5
+string(4) 10.5
+string(4) 10.5
+string(12) 10.br /\n5
+-- Iteration 6 --
+string(5) -10.5
+string(5) -10.5
+string(5) -10.5
+string(5) -10.5
+string(13) -10br /\n.5
+-- Iteration 7 --
+string(12) 1050
+string(12) 1050
+string(12) 1050
+string(12) 1050
+string(36) 105br /\n000br /\n000br /\n000
+-- Iteration 8 --
+string(7) 1.06E-9
+string(7) 1.06E-9
+string(7) 1.06E-9
+string(7) 1.06E-9
+string(23) 1.0br /\n6E-br /\n9
+-- Iteration 9 --
+string(3) 0.5
+string(3) 0.5
+string(3) 0.5
+string(3) 0.5
+string(3) 0.5
+-- Iteration 10 --
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+-- Iteration 11 --
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line %d
+NULL
+
+Warning: wordwrap() expects parameter 1 to be string, array given in %s on 
line 

[PHP-CVS] cvs: php-src /ext/standard/tests/file wordwrap_basic.phpt wordwrap_error.phpt wordwrap_variation1.phpt wordwrap_variation2.phpt wordwrap_variation3.phpt wordwrap_variation4.phpt wordwrap_var

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 19:10:04 2007 UTC

  Removed files:   
/php-src/ext/standard/tests/filewordwrap_error.phpt 
wordwrap_variation1.phpt 
wordwrap_basic.phpt 
wordwrap_variation2.phpt 
wordwrap_variation3.phpt 
wordwrap_variation4.phpt 
wordwrap_variation5.phpt 
  Log:
  Removing from file dir as it was wrongly committed to this dir
  

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings chop_basic.phpt chop_error.phpt chop_variation1.phpt chop_variation2.phpt chop_variation3.phpt chop_variation4.phpt chop_variation5.phpt

2007-09-14 Thread Raghubansh Kumar
kraghubaFri Sep 14 19:14:52 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/strings chop_variation2.phpt 
chop_variation3.phpt 
chop_error.phpt 
chop_variation4.phpt 
chop_variation5.phpt 
chop_basic.phpt 
chop_variation1.phpt 
  Log:
  New testcases for chop()
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/chop_variation2.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/strings/chop_variation2.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/chop_variation2.phpt:1.2
--- /dev/null   Fri Sep 14 19:14:52 2007
+++ php-src/ext/standard/tests/strings/chop_variation2.phpt Fri Sep 14 
19:14:52 2007
@@ -0,0 +1,248 @@
+--TEST--
+Test chop() function : usage variations  - unexpected values for charlist 
argument
+--FILE--
+?php
+/* Prototype  : string chop ( string $str [, string $charlist] )
+ * Description: Strip whitespace (or other characters) from the end of a string
+ * Source code: ext/standard/string.c
+*/
+
+/*
+ * Testing chop() : with different unexpected values of charlist argument 
passed tot he function
+*/
+
+echo *** Testing chop() : with unexpected values of charlist argument passed 
to the function ***\n;
+// initialize all required variables
+$str = 'hello world12345 ';
+
+// get an unset variable
+$unset_var = 'string_val';
+unset($unset_var);
+
+// declaring class
+class sample  {
+  public function __toString()  {
+  return @# $%12345;
+  }
+}
+
+// defining a resource
+$file_handle = fopen(__FILE__, 'r');
+
+// array with different values
+$values =  array (
+
+  // integer values
+  0,
+  1,
+  12345,
+  -2345,
+
+  // float values
+  10.5,
+  -10.5,
+  10.5e10,
+  10.6E-10,
+  .5,
+
+  // array values
+  array(),
+  array(0),
+  array(1),
+  array(1, 2),
+  array('color' = 'red', 'item' = 'pen'),
+
+  // boolean values
+  true,
+  false,
+  TRUE,
+  FALSE,
+
+  // objects
+  new sample(),
+
+  // empty string
+  ,
+  '',
+
+  // null vlaues
+  NULL,
+  null,
+
+  // resource
+  $file_handle,
+  
+  // undefined variable
+  $undefined_var,
+
+  // unset variable
+  $unset_var
+  
+);
+
+
+// loop through each element of the array and check the working of chop()
+// when $charlist arugment is supplied with different values
+echo \n--- Testing chop() by supplying different values for 'charlist' 
argument ---\n;
+$counter = 1;
+for($index = 0; $index  count($values); $index ++) {
+  echo -- Iteration $counter --\n;
+  $charlist = $values [$index];
+
+  var_dump( chop($str, $charlist) );
+
+  $counter ++;
+}
+
+// closing the resource
+fclose($file_handle);
+
+echo Done\n;
+?
+--EXPECTF--
+*** Testing chop() : with unexpected values of charlist argument passed to the 
function ***
+
+Notice: Undefined variable: undefined_var in %s on line %d
+
+Notice: Undefined variable: unset_var in %s on line %d
+
+--- Testing chop() by supplying different values for 'charlist' argument ---
+-- Iteration 1 --
+string(17) hello world12345 
+-- Iteration 2 --
+string(17) hello world12345 
+-- Iteration 3 --
+string(17) hello world12345 
+-- Iteration 4 --
+string(17) hello world12345 
+-- Iteration 5 --
+string(17) hello world12345 
+-- Iteration 6 --
+string(17) hello world12345 
+-- Iteration 7 --
+string(17) hello world12345 
+-- Iteration 8 --
+string(17) hello world12345 
+-- Iteration 9 --
+string(17) hello world12345 
+-- Iteration 10 --
+
+Warning: chop() expects parameter 2 to be string (Unicode or binary), array 
given in %s on line %d
+NULL
+-- Iteration 11 --
+
+Warning: chop() expects parameter 2 to be string (Unicode or binary), array 
given in %s on line %d
+NULL
+-- Iteration 12 --
+
+Warning: chop() expects parameter 2 to be string (Unicode or binary), array 
given in %s on line %d
+NULL
+-- Iteration 13 --
+
+Warning: chop() expects parameter 2 to be string (Unicode or binary), array 
given in %s on line %d
+NULL
+-- Iteration 14 --
+
+Warning: chop() expects parameter 2 to be string (Unicode or binary), array 
given in %s on line %d
+NULL
+-- Iteration 15 --
+string(17) hello world12345 
+-- Iteration 16 --
+string(17) hello world12345 
+-- Iteration 17 --
+string(17) hello world12345 
+-- Iteration 18 --
+string(17) hello world12345 
+-- Iteration 19 --
+string(11) hello world
+-- Iteration 20 --
+string(17) hello world12345 
+-- Iteration 21 --
+string(17) hello world12345 
+-- Iteration 22 --
+string(17) hello world12345 
+-- Iteration 23 --
+string(17) hello world12345 
+-- Iteration 24 --
+
+Warning: chop() expects parameter 2 to be string (Unicode or binary), resource 
given in %s on line %d
+NULL
+-- Iteration 25 --
+string(17) hello world12345 
+-- Iteration 26 --
+string(17) hello world12345 
+Done
+
+--UEXPECTF--
+*** Testing chop() : with unexpected values 

  1   2   3   4   >