WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
67462
fix MockFileSystem.glob(), refactor filesystem tests
https://bugs.webkit.org/show_bug.cgi?id=67462
Summary
fix MockFileSystem.glob(), refactor filesystem tests
Dirk Pranke
Reported
2011-09-01 19:17:24 PDT
fix MockFileSystem.glob(), refactor filesystem tests
Attachments
Patch
(8.45 KB, patch)
2011-09-01 19:55 PDT
,
Dirk Pranke
eric
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dirk Pranke
Comment 1
2011-09-01 19:55:59 PDT
Created
attachment 106085
[details]
Patch
Eric Seidel (no email)
Comment 2
2011-09-01 20:03:45 PDT
Comment on
attachment 106085
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=106085&action=review
OK.
> Tools/Scripts/webkitpy/common/system/filesystem_mock.py:155 > + glob_string = glob_string.replace('\\*', '[^\\/]*') + '$' > + glob_string = glob_string.replace('\\/', '/') > + path_filter = lambda path: re.match(glob_string, path)
This is going to end up matching . in glob_string against any char. Which is OK, but you shoudl be aware.
Dirk Pranke
Comment 3
2011-09-01 20:21:24 PDT
Comment on
attachment 106085
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=106085&action=review
>> Tools/Scripts/webkitpy/common/system/filesystem_mock.py:155 >> + path_filter = lambda path: re.match(glob_string, path) > > This is going to end up matching . in glob_string against any char. Which is OK, but you shoudl be aware.
If I understand you correctly (you're saying that glob('foo.ar') will match a file called 'foobar', I don't think so; the '.' in glob string is escaped out on line 152. Or am I missing something?
Eric Seidel (no email)
Comment 4
2011-09-01 20:29:56 PDT
Comment on
attachment 106085
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=106085&action=review
>>> Tools/Scripts/webkitpy/common/system/filesystem_mock.py:155 >>> + path_filter = lambda path: re.match(glob_string, path) >> >> This is going to end up matching . in glob_string against any char. Which is OK, but you shoudl be aware. > > If I understand you correctly (you're saying that glob('foo.ar') will match a file called 'foobar', I don't think so; the '.' in glob string is escaped out on line 152. Or am I missing something?
Ah, I missed the regexp escape.
Dirk Pranke
Comment 5
2011-09-01 20:40:58 PDT
(In reply to
comment #4
)
> Ah, I missed the regexp escape.
Okay. Probably would be a good thing to test for, though. I'll add a test. Thanks!
Dirk Pranke
Comment 6
2011-09-06 18:42:53 PDT
Committed
r94618
: <
http://trac.webkit.org/changeset/94618
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug