Code Monkey home page Code Monkey logo

Comments (5)

erikn69 avatar erikn69 commented on July 22, 2024 1

I run '[test]test/test.txt' on testing

public function testWritingReadingFilesWithSpecialPath()
    {
        $adapter = $this->adapter();
        foreach ([
            'a path with square brackets in dirname 2' => '[test]test/test.txt',
        ] as $msg => $path) {
            $adapter->write($path, 'contents', new Config());
            $contents = $adapter->read($path);

            $this->assertEquals('contents', isset($contents['contents']) ? $contents['contents'] : '', $msg);
        }
 }

I get

PHPUnit 9.5.6 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.5
Configuration: google_flysystem\phpunit.xml.dist

.                                                                   1 / 1 (100%)

Time: 00:05.495, Memory: 8.00 MB

OK (1 test, 1 assertion)

image

from flysystem-google-drive-ext.

martinwang2002 avatar martinwang2002 commented on July 22, 2024 1

Great! I have tested and it works. I got this package via packagist, so a new version is preferred.

from flysystem-google-drive-ext.

erikn69 avatar erikn69 commented on July 22, 2024 1

@masbug I have fixed some common bugs, and i made it works as expected behavior according v1 and v2 flysystem docs, so, when would the new release date be?

from flysystem-google-drive-ext.

masbug avatar masbug commented on July 22, 2024 1

@erikn69 Sorry for my tardiness. Thank you for the great work you've done so far! I tagged the releases for both branches.

from flysystem-google-drive-ext.

erikn69 avatar erikn69 commented on July 22, 2024

@martinwang2002 Did you try the last unreleased changes on flysystem-google-drive-ext 1.x,
i believe that bug is already fixed by me

public function testWritingReadingFilesWithSpecialPath()
{
$adapter = $this->adapter();
foreach ([
'a path with square brackets in filename 1' => 'some/file[name].txt',
'a path with square brackets in filename 2' => 'some/file[0].txt',
'a path with square brackets in filename 3' => 'some/file[10].txt',
'a path with square brackets in dirname 1' => 'some[name]/file.txt',
'a path with square brackets in dirname 2' => 'some[0]/file.txt',
'a path with square brackets in dirname 3' => 'some[10]/file.txt',
'a path with curly brackets in filename 1' => 'some/file{name}.txt',
'a path with curly brackets in filename 2' => 'some/file{0}.txt',
'a path with curly brackets in filename 3' => 'some/file{10}.txt',
'a path with curly brackets in dirname 1' => 'some{name}/filename.txt',
'a path with curly brackets in dirname 2' => 'some{0}/filename.txt',
'a path with curly brackets in dirname 3' => 'some{10}/filename.txt',
'a path with space in dirname' => 'some dir/filename.txt',
'a path with space in filename' => 'somedir/file name.txt'
] as $msg => $path) {
$adapter->write($path, 'contents', new Config());
$contents = $adapter->read($path);
$this->assertEquals('contents', isset($contents['contents']) ? $contents['contents'] : '', $msg);
}
}

Give a try please, @masbug if works on this test, maybe he needs a new release, also there is'nt v2's release

from flysystem-google-drive-ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.