Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: pkg/analyzer/test/generated/bazel_test.dart

Issue 2502103003: Change BazelWorkspace so that it checks the main source directory before READONLY. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/bazel.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/bazel_test.dart
diff --git a/pkg/analyzer/test/generated/bazel_test.dart b/pkg/analyzer/test/generated/bazel_test.dart
index cc1a75a405222ccb116d97a5816840477a6bfc87..a37a118d3c358caaeefea2debb8b9b34774a66ab 100644
--- a/pkg/analyzer/test/generated/bazel_test.dart
+++ b/pkg/analyzer/test/generated/bazel_test.dart
@@ -612,6 +612,22 @@ class BazelWorkspaceTest extends _BaseTest {
_p('/Users/user/test/READONLY/prime/other/module/test4.dart'));
}
+ void test_findFile_main_overrides_readonly() {
+ provider.newFolder(_p('/Users/user/test/READONLY/prime'));
+ provider.newFolder(_p('/Users/user/test/prime'));
+ provider.newFolder(_p('/Users/user/test/prime/bazel-genfiles'));
+ provider.newFile(_p('/Users/user/test/prime/my/module/test.dart'), '');
+ provider.newFile(
+ _p('/Users/user/test/READONLY/prime/my/module/test.dart'), '');
+ BazelWorkspace workspace =
+ BazelWorkspace.find(provider, _p('/Users/user/test/prime/my/module'));
+ expect(
+ workspace
+ .findFile(_p('/Users/user/test/prime/my/module/test.dart'))
+ .path,
+ _p('/Users/user/test/prime/my/module/test.dart'));
+ }
+
void test_findFile_noReadOnly() {
provider.newFile(_p('/workspace/WORKSPACE'), '');
provider.newFile(_p('/workspace/my/module/test1.dart'), '');
« no previous file with comments | « pkg/analyzer/lib/src/generated/bazel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698