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

Unified Diff: test/descriptor.dart

Issue 1096723002: Make pub generate .packages file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | test/descriptor/packages.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/descriptor.dart
diff --git a/test/descriptor.dart b/test/descriptor.dart
index 9890ba3685e691572fa65bcd92688f670bd64cce..a9c5dffb29edbb6dad0202443532702ccad0c4da 100644
--- a/test/descriptor.dart
+++ b/test/descriptor.dart
@@ -5,19 +5,26 @@
/// Pub-specific scheduled_test descriptors.
library descriptor;
+import "dart:io" show File;
+
import 'package:oauth2/oauth2.dart' as oauth2;
+import 'package:path/path.dart' as p;
import 'package:pub/src/io.dart';
import 'package:pub/src/utils.dart';
import 'package:scheduled_test/descriptor.dart';
import 'package:scheduled_test/scheduled_server.dart';
+import 'package:package_config/packages_file.dart' as packages_file;
+import 'package:stack_trace/stack_trace.dart';
import 'descriptor/git.dart';
import 'descriptor/tar.dart';
+import 'descriptor/packages.dart';
import 'test_pub.dart';
export 'package:scheduled_test/descriptor.dart';
export 'descriptor/git.dart';
export 'descriptor/tar.dart';
+export 'descriptor/packages.dart';
/// Creates a new [GitRepoDescriptor] with [name] and [contents].
GitRepoDescriptor git(String name, [Iterable<Descriptor> contents]) =>
@@ -182,3 +189,14 @@ Descriptor credentialsFile(
/// the given [dependencies].
DirectoryDescriptor appDir([Map dependencies]) =>
dir(appPath, [appPubspec(dependencies)]);
+
+/// Describes a `.packages` file.
+///
+/// [dependencies] maps package names to version strings.
+///
+/// Validation checks that the `.packages` file exists, has the expected
+/// entries (one per key in [dependencies]), each with a path that contains
+/// either the version string (for a reference to the pub cache) or a
+/// path to a path dependency, relative to the application directory.
+Descriptor packagesFile([Map dependencies]) =>
+ new PackagesFileDescriptor(dependencies);
« no previous file with comments | « pubspec.yaml ('k') | test/descriptor/packages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698