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

Unified Diff: sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart

Issue 844263004: Properly update git binary snapshots during pub upgrade. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
diff --git a/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_test.dart b/sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
similarity index 53%
copy from sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_test.dart
copy to sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
index 10aefb6bbb2024f0bb5d5ff1fb0ae97c20eee4c1..c1c1f68d1267989c8755a959ea46a0ff66f3d589 100644
--- a/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_test.dart
+++ b/sdk/lib/_internal/pub/test/snapshot/updates_snapshot_for_git_dependency_test.dart
@@ -12,39 +12,41 @@ import '../test_pub.dart';
main() {
initConfig();
- integration("upgrades a snapshot when its package is upgraded", () {
- servePackages((builder) {
- builder.serve("foo", "1.2.3", contents: [
- d.dir("bin", [
- d.file("hello.dart", "void main() => print('hello!');")
- ])
- ]);
- });
+ integration("upgrades a snapshot when a git dependency is upgraded", () {
+ ensureGit();
- d.appDir({"foo": "any"}).create();
+ d.git('foo.git', [
+ d.pubspec({
+ "name": "foo",
+ "version": "0.0.1"
+ }),
+ d.dir("bin", [
+ d.file("hello.dart", "void main() => print('Hello!');")
+ ])
+ ]).create();
+
+ d.appDir({"foo": {"git": "../foo.git"}}).create();
pubGet(output: contains("Precompiled foo:hello."));
d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [
- d.matcherFile('hello.dart.snapshot', contains('hello!'))
+ d.matcherFile('hello.dart.snapshot', contains('Hello!'))
]).validate();
- servePackages((builder) {
- builder.serve("foo", "1.2.4", contents: [
- d.dir("bin", [
- d.file("hello.dart", "void main() => print('hello 2!');")
- ])
- ]);
- });
+ d.git('foo.git', [
+ d.dir("bin", [
+ d.file("hello.dart", "void main() => print('Goodbye!');")
+ ])
+ ]).commit();
pubUpgrade(output: contains("Precompiled foo:hello."));
d.dir(p.join(appPath, '.pub', 'bin', 'foo'), [
- d.matcherFile('hello.dart.snapshot', contains('hello 2!'))
+ d.matcherFile('hello.dart.snapshot', contains('Goodbye!'))
]).validate();
var process = pubRun(args: ['foo:hello']);
- process.stdout.expect("hello 2!");
+ process.stdout.expect("Goodbye!");
process.shouldExit();
});
}

Powered by Google App Engine
This is Rietveld 408576698