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

Side by Side Diff: pkg/analyzer/test/file_system/memory_file_system_test.dart

Issue 2270593003: Add support for resolving symbolic links (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: comment clean-up Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.test.file_system.memory_file_system_test; 5 library analyzer.test.file_system.memory_file_system_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core' hide Resource; 8 import 'dart:core' hide Resource;
9 9
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 String newPath = '/foo/bar/baz'; 187 String newPath = '/foo/bar/baz';
188 File file = provider.newFile(oldPath, 'text'); 188 File file = provider.newFile(oldPath, 'text');
189 provider.newFolder(newPath); 189 provider.newFolder(newPath);
190 expect(() { 190 expect(() {
191 file.renameSync(newPath); 191 file.renameSync(newPath);
192 }, throwsA(_isFileSystemException)); 192 }, throwsA(_isFileSystemException));
193 expect(file.path, oldPath); 193 expect(file.path, oldPath);
194 expect(file.exists, isTrue); 194 expect(file.exists, isTrue);
195 } 195 }
196 196
197 void test_resolveSymbolicLinksSync() {
198 File file = provider.newFile('/test.txt', 'text');
199 expect(file.resolveSymbolicLinksSync(), file);
200 }
201
197 void test_shortName() { 202 void test_shortName() {
198 File file = provider.getResource('/foo/bar/file.txt'); 203 File file = provider.getResource('/foo/bar/file.txt');
199 expect(file.shortName, 'file.txt'); 204 expect(file.shortName, 'file.txt');
200 } 205 }
201 206
202 void test_toString() { 207 void test_toString() {
203 File file = provider.getResource('/foo/bar/file.txt'); 208 File file = provider.getResource('/foo/bar/file.txt');
204 expect(file.toString(), '/foo/bar/file.txt'); 209 expect(file.toString(), '/foo/bar/file.txt');
205 } 210 }
206 211
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 return new Future.delayed(Duration.ZERO, computation); 731 return new Future.delayed(Duration.ZERO, computation);
727 } 732 }
728 733
729 _watchingFolder(String path, test(List<WatchEvent> changesReceived)) { 734 _watchingFolder(String path, test(List<WatchEvent> changesReceived)) {
730 Folder folder = provider.getResource(path); 735 Folder folder = provider.getResource(path);
731 var changesReceived = <WatchEvent>[]; 736 var changesReceived = <WatchEvent>[];
732 folder.changes.listen(changesReceived.add); 737 folder.changes.listen(changesReceived.add);
733 return test(changesReceived); 738 return test(changesReceived);
734 } 739 }
735 } 740 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698