| 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 library pub_update_test; | 5 library pub_update_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| 11 | 11 |
| 12 import '../../pub/lock_file.dart'; | 12 import '../lib/src/lock_file.dart'; |
| 13 import '../../pub/package.dart'; | 13 import '../lib/src/package.dart'; |
| 14 import '../../pub/pubspec.dart'; | 14 import '../lib/src/pubspec.dart'; |
| 15 import '../../pub/sdk.dart' as sdk; | 15 import '../lib/src/sdk.dart' as sdk; |
| 16 import '../../pub/source.dart'; | 16 import '../lib/src/source.dart'; |
| 17 import '../../pub/source_registry.dart'; | 17 import '../lib/src/source_registry.dart'; |
| 18 import '../../pub/system_cache.dart'; | 18 import '../lib/src/system_cache.dart'; |
| 19 import '../../pub/utils.dart'; | 19 import '../lib/src/utils.dart'; |
| 20 import '../../pub/version.dart'; | 20 import '../lib/src/version.dart'; |
| 21 import '../../pub/solver/version_solver.dart'; | 21 import '../lib/src/solver/version_solver.dart'; |
| 22 import 'test_pub.dart'; | 22 import 'test_pub.dart'; |
| 23 | 23 |
| 24 MockSource source1; | 24 MockSource source1; |
| 25 MockSource source2; | 25 MockSource source2; |
| 26 | 26 |
| 27 main() { | 27 main() { |
| 28 initConfig(); | 28 initConfig(); |
| 29 | 29 |
| 30 // Since this test isn't run from the SDK, it can't find the "version" file | 30 // Since this test isn't run from the SDK, it can't find the "version" file |
| 31 // to load. Instead, just manually inject a version. | 31 // to load. Instead, just manually inject a version. |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 }; | 989 }; |
| 990 | 990 |
| 991 var match = new RegExp(r"(.*) from (.*)").firstMatch(description); | 991 var match = new RegExp(r"(.*) from (.*)").firstMatch(description); |
| 992 if (match != null) { | 992 if (match != null) { |
| 993 name = match[1]; | 993 name = match[1]; |
| 994 source = sourceNames[match[2]]; | 994 source = sourceNames[match[2]]; |
| 995 } | 995 } |
| 996 | 996 |
| 997 callback(isDev, name, source); | 997 callback(isDev, name, source); |
| 998 } | 998 } |
| OLD | NEW |