Chromium Code Reviews

Unified Diff: test/get/dot_packages_test.dart

Issue 1096723002: Make pub generate .packages file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: test/get/dot_packages_test.dart
diff --git a/test/get/dot_packages_test.dart b/test/get/dot_packages_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..17db9dafb8f2e75a3e7e67ae4fea121192dac9bd
--- /dev/null
+++ b/test/get/dot_packages_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS d.file
nweiz 2015/06/10 22:33:59 2015 I'd call this file "packages_file_test". Als
Lasse Reichstein Nielsen 2015/06/11 11:21:02 Done.
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE d.file.
+
+library pub_tests;
nweiz 2015/06/10 22:33:59 Remove this. Some old tests have it, but new tests
Lasse Reichstein Nielsen 2015/06/11 11:21:03 Done.
+
+import '../descriptor.dart' as d;
+import '../test_pub.dart';
+
+main() {
+ initConfig();
+ integration('re-gets a package if its source has changed', () {
nweiz 2015/06/10 22:33:59 Update the test name.
Lasse Reichstein Nielsen 2015/06/11 11:21:02 Done.
+ servePackages((builder) {
+ builder.serve("foo", "1.2.3",
+ deps: {'baz': '2.2.2'},
nweiz 2015/06/10 22:33:59 We don't do argument alignment like this. It'll al
Lasse Reichstein Nielsen 2015/06/11 11:21:02 Arguments fixed to match formatter. The d.dir bel
nweiz 2015/06/12 23:48:08 Yeah, I think Bob is working on better support for
Bob Nystrom 2015/06/12 23:49:15 Yup. It's landed on master in the dart_style repo
+ contents: [d.dir("lib", [])]);
+ builder.serve("bar", "3.2.1",
+ contents: [d.dir("lib", [])]);
+ builder.serve("baz", "2.2.2",
+ deps: {"bar": "3.2.1"},
+ contents: [d.dir("lib", [])]);
+ });
+
+ d.appDir({"foo": "1.2.3"}).create();
+
+ pubGet();
+
+ d.dir(appPath, [d.dotPackagesFile({"foo": "1.2.3",
nweiz 2015/06/10 22:33:59 This should contain a link back to the application
Lasse Reichstein Nielsen 2015/06/11 11:21:03 True. Updating test to check fail if there are mor
+ "bar": "3.2.1",
+ "baz": "3.2.1"})]).validate();
+ });
+}
+

Powered by Google App Engine