mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 18:25:13 +00:00
Merge pull request #490 from bantu/sftp-large-files
SFTP: Add truncate() to size() test for files larger than 4 GiB. * bantu/sftp-large-files: SFTP: Add truncate() to size() test for files larger than 4 GiB.
This commit is contained in:
commit
de9bd70df6
@ -431,6 +431,20 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase
|
|||||||
/**
|
/**
|
||||||
* @depends testFileExistsIsFileIsDirDir
|
* @depends testFileExistsIsFileIsDirDir
|
||||||
*/
|
*/
|
||||||
|
public function testTruncateLargeFile($sftp)
|
||||||
|
{
|
||||||
|
$filesize = (4 * 1024 + 16) * 1024 * 1024;
|
||||||
|
$filename = 'file-large-from-truncate-4112MiB.txt';
|
||||||
|
$this->assertTrue($sftp->touch($filename));
|
||||||
|
$this->assertTrue($sftp->truncate($filename, $filesize));
|
||||||
|
$this->assertSame($filesize, $sftp->size($filename));
|
||||||
|
|
||||||
|
return $sftp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testTruncateLargeFile
|
||||||
|
*/
|
||||||
public function testRmDirScratch($sftp)
|
public function testRmDirScratch($sftp)
|
||||||
{
|
{
|
||||||
$this->assertFalse(
|
$this->assertFalse(
|
||||||
|
Loading…
Reference in New Issue
Block a user