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

Side by Side Diff: utils/tests/pub/test_pub.dart

Issue 13116020: Clean up the semantics of io.dart operations w.r.t. symlinks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « utils/tests/pub/io_test.dart ('k') | utils/tests/pub/validator_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub 5 /// Test infrastructure for testing pub. Unlike typical unit tests, most pub
6 /// tests are integration tests that stage some stuff on the file system, run 6 /// tests are integration tests that stage some stuff on the file system, run
7 /// pub, and then validate the results. This library provides an API to build 7 /// pub, and then validate the results. This library provides an API to build
8 /// tests like that. 8 /// tests like that.
9 library test_pub; 9 library test_pub;
10 10
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 void _integration(String description, void body(), [Function testFn]) { 229 void _integration(String description, void body(), [Function testFn]) {
230 testFn(description, () { 230 testFn(description, () {
231 // Ensure the SDK version is always available. 231 // Ensure the SDK version is always available.
232 d.dir(sdkPath, [ 232 d.dir(sdkPath, [
233 d.file('version', '0.1.2.3') 233 d.file('version', '0.1.2.3')
234 ]).create(); 234 ]).create();
235 235
236 _sandboxDir = createTempDir(); 236 _sandboxDir = createTempDir();
237 d.defaultRoot = sandboxDir; 237 d.defaultRoot = sandboxDir;
238 currentSchedule.onComplete.schedule(() => deleteDir(_sandboxDir), 238 currentSchedule.onComplete.schedule(() => deleteEntry(_sandboxDir),
239 'deleting the sandbox directory'); 239 'deleting the sandbox directory');
240 240
241 // Schedule the test. 241 // Schedule the test.
242 body(); 242 body();
243 }); 243 });
244 } 244 }
245 245
246 /// Get the path to the root "util/test/pub" directory containing the pub 246 /// Get the path to the root "util/test/pub" directory containing the pub
247 /// tests. 247 /// tests.
248 String get testDirectory { 248 String get testDirectory {
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 bool matches(item, MatchState matchState) { 584 bool matches(item, MatchState matchState) {
585 if (item is! Pair) return false; 585 if (item is! Pair) return false;
586 return _firstMatcher.matches(item.first, matchState) && 586 return _firstMatcher.matches(item.first, matchState) &&
587 _lastMatcher.matches(item.last, matchState); 587 _lastMatcher.matches(item.last, matchState);
588 } 588 }
589 589
590 Description describe(Description description) { 590 Description describe(Description description) {
591 description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]); 591 description.addAll("(", ", ", ")", [_firstMatcher, _lastMatcher]);
592 } 592 }
593 } 593 }
OLDNEW
« no previous file with comments | « utils/tests/pub/io_test.dart ('k') | utils/tests/pub/validator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698