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

Side by Side Diff: test/snapshot/upgrades_snapshot_for_dependency_test.dart

Issue 1664563002: Refactor test servers to make them less global. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 10 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
« no previous file with comments | « test/serve_packages.dart ('k') | test/snapshot/upgrades_snapshot_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 'package:path/path.dart' as p; 5 import 'package:path/path.dart' as p;
6 import 'package:scheduled_test/scheduled_test.dart'; 6 import 'package:scheduled_test/scheduled_test.dart';
7 7
8 import '../descriptor.dart' as d; 8 import '../descriptor.dart' as d;
9 import '../test_pub.dart'; 9 import '../test_pub.dart';
10 10
(...skipping 17 matching lines...) Expand all
28 }); 28 });
29 29
30 d.appDir({"foo": "any"}).create(); 30 d.appDir({"foo": "any"}).create();
31 31
32 pubGet(output: contains("Precompiled foo:hello.")); 32 pubGet(output: contains("Precompiled foo:hello."));
33 33
34 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ 34 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [
35 d.matcherFile('hello.dart.snapshot', contains('hello!')) 35 d.matcherFile('hello.dart.snapshot', contains('hello!'))
36 ]).validate(); 36 ]).validate();
37 37
38 servePackages((builder) { 38 globalPackageServer.add((builder) {
39 builder.serve("bar", "1.2.4", contents: [ 39 builder.serve("bar", "1.2.4", contents: [
40 d.dir("lib", [d.file("bar.dart", "final message = 'hello 2!';")]), 40 d.dir("lib", [d.file("bar.dart", "final message = 'hello 2!';")]),
41 ]); 41 ]);
42 }); 42 });
43 43
44 pubUpgrade(output: contains("Precompiled foo:hello.")); 44 pubUpgrade(output: contains("Precompiled foo:hello."));
45 45
46 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [ 46 d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [
47 d.matcherFile('hello.dart.snapshot', contains('hello 2!')) 47 d.matcherFile('hello.dart.snapshot', contains('hello 2!'))
48 ]).validate(); 48 ]).validate();
49 49
50 var process = pubRun(args: ['foo:hello']); 50 var process = pubRun(args: ['foo:hello']);
51 process.stdout.expect("hello 2!"); 51 process.stdout.expect("hello 2!");
52 process.shouldExit(); 52 process.shouldExit();
53 }); 53 });
54 } 54 }
OLDNEW
« no previous file with comments | « test/serve_packages.dart ('k') | test/snapshot/upgrades_snapshot_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698