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

Unified Diff: sdk/lib/_internal/pub/test/pub_cache_test.dart

Issue 23272002: Command to print paths to dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused variable. Created 7 years, 4 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/pub_cache_test.dart
diff --git a/sdk/lib/_internal/pub/test/pub_cache_test.dart b/sdk/lib/_internal/pub/test/pub_cache_test.dart
index 39bb79b3a44c3822d1cffa459c2426c33dd69f0a..91bc4a0ca7adf369d5b74138aa787240e72817c5 100644
--- a/sdk/lib/_internal/pub/test/pub_cache_test.dart
+++ b/sdk/lib/_internal/pub/test/pub_cache_test.dart
@@ -4,12 +4,19 @@
library pub_cache_test;
+import 'package:path/path.dart' as path;
+
import 'descriptor.dart' as d;
import 'test_pub.dart';
main() {
initConfig();
+ hostedDir(package) {
+ return path.join(sandboxDir, cachePath, "hosted",
+ "pub.dartlang.org", package);
+ }
+
integration('running pub cache displays error message', () {
schedulePub(args: ['cache'],
output: '''
@@ -47,7 +54,7 @@ main() {
])
]).create();
- schedulePub(args: ['cache', 'list'], output: '{"packages":{}}');
+ schedulePub(args: ['cache', 'list'], outputJson: {"packages":{}});
});
integration('running pub cache list', () {
@@ -66,10 +73,12 @@ main() {
])
]).create();
- schedulePub(args: ['cache', 'list'], output:
- new RegExp(r'\{"packages":\{"bar":\{"2\.0\.0":\{"location":'
- r'"[^"]+bar-2\.0\.0"\}},"foo":\{"1\.2\.3":\{"location":'
- r'"[^"]+foo-1\.2\.3"\}\}\}\}$'));
+ schedulePub(args: ['cache', 'list'], outputJson: {
+ "packages": {
+ "bar": {"2.0.0": {"location": hostedDir('bar-2.0.0')}},
+ "foo": {"1.2.3": {"location": hostedDir('foo-1.2.3')}}
+ }
+ });
});
integration('includes packages containing deps with bad sources', () {
@@ -85,8 +94,10 @@ main() {
])
]).create();
- schedulePub(args: ['cache', 'list'], output:
- new RegExp(r'\{"packages":\{"foo":\{"1\.2\.3":\{"location":'
- r'"[^"]+foo-1\.2\.3"\}\}\}\}$'));
+ schedulePub(args: ['cache', 'list'], outputJson: {
+ "packages": {
+ "foo": {"1.2.3": {"location": hostedDir('foo-1.2.3')}}
+ }
+ });
});
}
« no previous file with comments | « sdk/lib/_internal/pub/test/list_package_dirs/no_lockfile_test.dart ('k') | sdk/lib/_internal/pub/test/pub_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698