php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45841 wrong test case about . and .. order (directories)
Submitted: 2008-08-17 12:54 UTC Modified: 2008-08-18 04:46 UTC
From: xuefer at gmail dot com Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 5.3CVS-2008-08-17 (CVS) OS: linux
Private report: No CVE-ID: None
 [2008-08-17 12:54 UTC] xuefer at gmail dot com
Description:
------------
at least both tests/dir/readdir_variation2.phpt tests/dir/rewinddir_variation2.phpt assume that directory entry "." is before ".." but it is not in my case

Test readdir() function : usage variations - empty directories [/home/xuefer/src/php5/ext/standard/tests/dir/readdir_variation2.phpt]


---- EXPECTED OUTPUT
*** Testing readdir() : usage variations ***

-- Pass an empty directory to readdir() --
string(1) "."
string(2) ".."
===DONE===
---- ACTUAL OUTPUT
*** Testing readdir() : usage variations ***

-- Pass an empty directory to readdir() --
string(2) ".."
string(1) "."
===DONE===
---- FAILED




Test rewinddir() function : usage variations - operate on a closed directory [/home/xuefer/src/php5/ext/standard/tests/dir/rewinddir_variation2.phpt]
---- EXPECTED OUTPUT
*** Testing rewinddir() : usage variations ***

-- Create the directory handle, read and close the directory --
resource(%d) of type (stream)
string(1) "."

-- Call to rewinddir() --

Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
bool(false)
===DONE===
---- ACTUAL OUTPUT
*** Testing rewinddir() : usage variations ***

-- Create the directory handle, read and close the directory --
resource(5) of type (stream)
string(2) ".."

-- Call to rewinddir() --

Warning: rewinddir(): 5 is not a valid Directory resource in /home/xuefer/src/php5/ext/standard/tests/dir/rewinddir_variation2.php on line 23
bool(false)
===DONE===
---- FAILED



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-18 04:46 UTC] lbarnaud@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 01:01:27 2024 UTC