file: update glob function to clean correctely in relative mode
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3736 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -438,4 +438,34 @@ class test_file extends PHPUnit_Framework_TestCase
|
||||
$res = $file->mkdir ("/testDFFileDir/tptp/titi/poo", 0777, true);
|
||||
$this->assertSame ($res, true);
|
||||
}
|
||||
|
||||
public function test_glob_1 ()
|
||||
{
|
||||
$file = new file ();
|
||||
$file->chroot ("/tmp");
|
||||
$res = $file->glob ("/testDFFileDir/*");
|
||||
$this->assertSame ($res, array ("/testDFFileDir/toto",
|
||||
"/testDFFileDir/tptp"));
|
||||
}
|
||||
|
||||
public function test_glob_2 ()
|
||||
{
|
||||
$file = new file ();
|
||||
$file->chroot ("/tmp");
|
||||
$file->chdir ("/testDFFileDir");
|
||||
$res = $file->glob ("*");
|
||||
$this->assertSame ($res, array ("toto",
|
||||
"tptp"));
|
||||
}
|
||||
|
||||
public function test_glob_3 ()
|
||||
{
|
||||
$file = new file ();
|
||||
$file->chroot ("/tmp");
|
||||
$file->chdir ("/testDFFileDir");
|
||||
$res = $file->glob ("/testDFFileDir/*");
|
||||
$this->assertSame ($res, array ("/testDFFileDir/toto",
|
||||
"/testDFFileDir/tptp"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user