| 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 /** | 5 /** |
| 6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub | 6 * Test infrastructure for testing pub. Unlike typical unit tests, most pub |
| 7 * tests are integration tests that stage some stuff on the file system, run | 7 * tests are integration tests that stage some stuff on the file system, run |
| 8 * pub, and then validate the results. This library provides an API to build | 8 * pub, and then validate the results. This library provides an API to build |
| 9 * tests like that. | 9 * tests like that. |
| 10 */ | 10 */ |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 ]); | 295 ]); |
| 296 } | 296 } |
| 297 | 297 |
| 298 /** | 298 /** |
| 299 * Describes a directory for a Git package. This directory is of the form found | 299 * Describes a directory for a Git package. This directory is of the form found |
| 300 * in the revision cache of the global package cache. | 300 * in the revision cache of the global package cache. |
| 301 */ | 301 */ |
| 302 DirectoryDescriptor gitPackageRevisionCacheDir(String name, [int modifier]) { | 302 DirectoryDescriptor gitPackageRevisionCacheDir(String name, [int modifier]) { |
| 303 var value = name; | 303 var value = name; |
| 304 if (modifier != null) value = "$name $modifier"; | 304 if (modifier != null) value = "$name $modifier"; |
| 305 return dir(new RegExp("$name${@'-[a-f0-9]+'}"), [ | 305 return dir(new RegExp("$name${r'-[a-f0-9]+'}"), [ |
| 306 libDir(name, value) | 306 libDir(name, value) |
| 307 ]); | 307 ]); |
| 308 } | 308 } |
| 309 | 309 |
| 310 /** | 310 /** |
| 311 * Describes a directory for a Git package. This directory is of the form found | 311 * Describes a directory for a Git package. This directory is of the form found |
| 312 * in the repo cache of the global package cache. | 312 * in the repo cache of the global package cache. |
| 313 */ | 313 */ |
| 314 DirectoryDescriptor gitPackageRepoCacheDir(String name) { | 314 DirectoryDescriptor gitPackageRepoCacheDir(String name) { |
| 315 return dir(new RegExp("$name${@'-[a-f0-9]+'}"), [ | 315 return dir(new RegExp("$name${r'-[a-f0-9]+'}"), [ |
| 316 dir('branches'), | 316 dir('branches'), |
| 317 dir('hooks'), | 317 dir('hooks'), |
| 318 dir('info'), | 318 dir('info'), |
| 319 dir('objects'), | 319 dir('objects'), |
| 320 dir('refs') | 320 dir('refs') |
| 321 ]); | 321 ]); |
| 322 } | 322 } |
| 323 | 323 |
| 324 /** | 324 /** |
| 325 * Describes the `packages/` directory containing all the given [packages], | 325 * Describes the `packages/` directory containing all the given [packages], |
| (...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 /** | 1160 /** |
| 1161 * Schedules a callback to be called after Pub is run with [runPub], even if it | 1161 * Schedules a callback to be called after Pub is run with [runPub], even if it |
| 1162 * fails. | 1162 * fails. |
| 1163 */ | 1163 */ |
| 1164 void _scheduleCleanup(_ScheduledEvent event) { | 1164 void _scheduleCleanup(_ScheduledEvent event) { |
| 1165 if (_scheduledCleanup == null) _scheduledCleanup = []; | 1165 if (_scheduledCleanup == null) _scheduledCleanup = []; |
| 1166 _scheduledCleanup.add(event); | 1166 _scheduledCleanup.add(event); |
| 1167 } | 1167 } |
| OLD | NEW |