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

Side by Side Diff: test/global/binstubs/outdated_snapshot_test.dart

Issue 1215833002: Use the new test runner. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 6 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
OLDNEW
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:pub/src/io.dart';
9 import 'package:scheduled_test/scheduled_process.dart'; 9 import 'package:scheduled_test/scheduled_process.dart';
10 import 'package:scheduled_test/scheduled_stream.dart'; 10 import 'package:scheduled_test/scheduled_stream.dart';
11 import 'package:scheduled_test/scheduled_test.dart'; 11 import 'package:scheduled_test/scheduled_test.dart';
12 12
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();
19 integration("a binstub runs 'pub global run' for an outdated snapshot", () { 18 integration("a binstub runs 'pub global run' for an outdated snapshot", () {
20 servePackages((builder) { 19 servePackages((builder) {
21 builder.serve("foo", "1.0.0", pubspec: { 20 builder.serve("foo", "1.0.0", pubspec: {
22 "executables": { 21 "executables": {
23 "foo-script": "script" 22 "foo-script": "script"
24 } 23 }
25 }, contents: [ 24 }, contents: [
26 d.dir("bin", [ 25 d.dir("bin", [
27 d.file("script.dart", "main(args) => print('ok \$args');") 26 d.file("script.dart", "main(args) => print('ok \$args');")
28 ]) 27 ])
(...skipping 20 matching lines...) Expand all
49 process.shouldExit(); 48 process.shouldExit();
50 49
51 d.dir(cachePath, [ 50 d.dir(cachePath, [
52 d.dir('global_packages/foo/bin', [ 51 d.dir('global_packages/foo/bin', [
53 d.binaryMatcherFile('script.dart.snapshot', isNot(equals( 52 d.binaryMatcherFile('script.dart.snapshot', isNot(equals(
54 readBinaryFile(testAssetPath('out-of-date.snapshot'))))) 53 readBinaryFile(testAssetPath('out-of-date.snapshot')))))
55 ]) 54 ])
56 ]).validate(); 55 ]).validate();
57 }); 56 });
58 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698