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

Side by Side Diff: test/io_test.dart

Issue 1153643002: Use "package:" imports for pub. (Closed) Base URL: git@github.com:dart-lang/pub_test@master
Patch Set: Code review changes Created 5 years, 7 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
« no previous file with comments | « test/implicit_dependency_test.dart ('k') | test/lish/archives_and_uploads_a_package_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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 io_test; 5 library io_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
11 import 'package:pub/src/io.dart';
11 import 'package:unittest/unittest.dart'; 12 import 'package:unittest/unittest.dart';
12 13
13 import '../lib/src/io.dart';
14 import 'test_pub.dart'; 14 import 'test_pub.dart';
15 15
16 main() { 16 main() {
17 initConfig(); 17 initConfig();
18 18
19 group('listDir', () { 19 group('listDir', () {
20 test('ignores hidden files by default', () { 20 test('ignores hidden files by default', () {
21 expect(withTempDir((temp) { 21 expect(withTempDir((temp) {
22 writeTextFile(path.join(temp, 'file1.txt'), ''); 22 writeTextFile(path.join(temp, 'file1.txt'), '');
23 writeTextFile(path.join(temp, 'file2.txt'), ''); 23 writeTextFile(path.join(temp, 'file2.txt'), '');
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 expect(predicate(symlink2Path), equals(forMultiLevelFileSymlink)); 356 expect(predicate(symlink2Path), equals(forMultiLevelFileSymlink));
357 }), completes); 357 }), completes);
358 }); 358 });
359 } 359 }
360 }); 360 });
361 } 361 }
362 362
363 /// Like [withTempDir], but canonicalizes the path before passing it to [fn]. 363 /// Like [withTempDir], but canonicalizes the path before passing it to [fn].
364 Future withCanonicalTempDir(Future fn(String path)) => 364 Future withCanonicalTempDir(Future fn(String path)) =>
365 withTempDir((temp) => fn(canonicalize(temp))); 365 withTempDir((temp) => fn(canonicalize(temp)));
OLDNEW
« no previous file with comments | « test/implicit_dependency_test.dart ('k') | test/lish/archives_and_uploads_a_package_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698