OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'package:path/path.dart' as p; | 7 import 'package:path/path.dart' as p; |
| 8 import 'package:pub/src/io.dart'; |
8 import 'package:scheduled_test/scheduled_process.dart'; | 9 import 'package:scheduled_test/scheduled_process.dart'; |
9 import 'package:scheduled_test/scheduled_stream.dart'; | 10 import 'package:scheduled_test/scheduled_stream.dart'; |
10 import 'package:scheduled_test/scheduled_test.dart'; | 11 import 'package:scheduled_test/scheduled_test.dart'; |
11 | 12 |
12 import '../../../lib/src/io.dart'; | |
13 import '../../descriptor.dart' as d; | 13 import '../../descriptor.dart' as d; |
14 import '../../test_pub.dart'; | 14 import '../../test_pub.dart'; |
15 import 'utils.dart'; | 15 import 'utils.dart'; |
16 | 16 |
17 main() { | 17 main() { |
18 initConfig(); | 18 initConfig(); |
19 integration("a binstub runs 'pub global run' for an outdated snapshot", () { | 19 integration("a binstub runs 'pub global run' for an outdated snapshot", () { |
20 servePackages((builder) { | 20 servePackages((builder) { |
21 builder.serve("foo", "1.0.0", pubspec: { | 21 builder.serve("foo", "1.0.0", pubspec: { |
22 "executables": { | 22 "executables": { |
(...skipping 26 matching lines...) Expand all Loading... |
49 process.shouldExit(); | 49 process.shouldExit(); |
50 | 50 |
51 d.dir(cachePath, [ | 51 d.dir(cachePath, [ |
52 d.dir('global_packages/foo/bin', [ | 52 d.dir('global_packages/foo/bin', [ |
53 d.binaryMatcherFile('script.dart.snapshot', isNot(equals( | 53 d.binaryMatcherFile('script.dart.snapshot', isNot(equals( |
54 readBinaryFile(testAssetPath('out-of-date.snapshot'))))) | 54 readBinaryFile(testAssetPath('out-of-date.snapshot'))))) |
55 ]) | 55 ]) |
56 ]).validate(); | 56 ]).validate(); |
57 }); | 57 }); |
58 } | 58 } |
OLD | NEW |