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

Side by Side Diff: test/global/binstubs/outdated_binstub_runs_pub_global_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, 5 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:scheduled_test/scheduled_process.dart'; 8 import 'package:scheduled_test/scheduled_process.dart';
9 import 'package:scheduled_test/scheduled_stream.dart'; 9 import 'package:scheduled_test/scheduled_stream.dart';
10 import 'package:scheduled_test/scheduled_test.dart'; 10 import 'package:scheduled_test/scheduled_test.dart';
11 11
12 import '../../descriptor.dart' as d; 12 import '../../descriptor.dart' as d;
13 import '../../test_pub.dart'; 13 import '../../test_pub.dart';
14 import 'utils.dart'; 14 import 'utils.dart';
15 15
16 main() { 16 main() {
17 initConfig();
18 integration("an outdated binstub runs 'pub global run'", () { 17 integration("an outdated binstub runs 'pub global run'", () {
19 servePackages((builder) { 18 servePackages((builder) {
20 builder.serve("foo", "1.0.0", pubspec: { 19 builder.serve("foo", "1.0.0", pubspec: {
21 "executables": { 20 "executables": {
22 "foo-script": "script" 21 "foo-script": "script"
23 } 22 }
24 }, contents: [ 23 }, contents: [
25 d.dir("bin", [ 24 d.dir("bin", [
26 d.file("script.dart", "main(args) => print('ok');") 25 d.file("script.dart", "main(args) => print('ok');")
27 ]) 26 ])
(...skipping 12 matching lines...) Expand all
40 39
41 var process = new ScheduledProcess.start( 40 var process = new ScheduledProcess.start(
42 p.join(sandboxDir, cachePath, "bin", binStubName("foo-script")), 41 p.join(sandboxDir, cachePath, "bin", binStubName("foo-script")),
43 ["arg1", "arg2"], 42 ["arg1", "arg2"],
44 environment: getEnvironment()); 43 environment: getEnvironment());
45 44
46 process.stdout.expect(consumeThrough("ok")); 45 process.stdout.expect(consumeThrough("ok"));
47 process.shouldExit(); 46 process.shouldExit();
48 }); 47 });
49 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698