| OLD | NEW |
| 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 import 'package:path/path.dart' as p; | 5 import 'package:path/path.dart' as p; |
| 6 import 'package:pub/src/entrypoint.dart'; | 6 import 'package:pub/src/entrypoint.dart'; |
| 7 import 'package:pub/src/io.dart'; | 7 import 'package:pub/src/io.dart'; |
| 8 import 'package:pub/src/system_cache.dart'; | 8 import 'package:pub/src/system_cache.dart'; |
| 9 import 'package:scheduled_test/scheduled_test.dart'; | 9 import 'package:scheduled_test/scheduled_test.dart'; |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 }); | 142 }); |
| 143 | 143 |
| 144 commonTests(); | 144 commonTests(); |
| 145 }); | 145 }); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void scheduleEntrypoint([String path]) { | 148 void scheduleEntrypoint([String path]) { |
| 149 if (path == null) path = appPath; | 149 if (path == null) path = appPath; |
| 150 schedule(() { | 150 schedule(() { |
| 151 root = p.join(sandboxDir, path); | 151 root = p.join(sandboxDir, path); |
| 152 entrypoint = new Entrypoint(root, | 152 entrypoint = new Entrypoint(root, new SystemCache(rootDir: root)); |
| 153 new SystemCache.withSources(rootDir: root)); | |
| 154 }, 'initializing entrypoint at $path'); | 153 }, 'initializing entrypoint at $path'); |
| 155 | 154 |
| 156 currentSchedule.onComplete.schedule(() { | 155 currentSchedule.onComplete.schedule(() { |
| 157 entrypoint = null; | 156 entrypoint = null; |
| 158 }, 'nulling entrypoint'); | 157 }, 'nulling entrypoint'); |
| 159 } | 158 } |
| 160 | 159 |
| 161 void commonTests() { | 160 void commonTests() { |
| 162 integration('ignores broken symlinks', () { | 161 integration('ignores broken symlinks', () { |
| 163 // Windows requires us to symlink to a directory that actually exists. | 162 // Windows requires us to symlink to a directory that actually exists. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 unorderedEquals([ | 256 unorderedEquals([ |
| 258 p.join(root, 'packages', 'subfile1.txt'), | 257 p.join(root, 'packages', 'subfile1.txt'), |
| 259 p.join(root, 'packages', 'subfile2.txt'), | 258 p.join(root, 'packages', 'subfile2.txt'), |
| 260 p.join(root, 'packages', 'subsubdir', 'subsubfile1.txt'), | 259 p.join(root, 'packages', 'subsubdir', 'subsubfile1.txt'), |
| 261 p.join(root, 'packages', 'subsubdir', 'subsubfile2.txt') | 260 p.join(root, 'packages', 'subsubdir', 'subsubfile2.txt') |
| 262 ])); | 261 ])); |
| 263 }); | 262 }); |
| 264 }); | 263 }); |
| 265 }); | 264 }); |
| 266 } | 265 } |
| OLD | NEW |