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

Side by Side Diff: sdk/lib/_internal/pub/test/hosted/offline_test.dart

Issue 16034002: Use helper methods for running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of unnecessary RegExps in tests. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library pub_tests; 5 library pub_tests;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import '../descriptor.dart' as d; 9 import '../descriptor.dart' as d;
10 import '../test_pub.dart'; 10 import '../test_pub.dart';
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 integration('fails gracefully if a dependency is not cached', () { 44 integration('fails gracefully if a dependency is not cached', () {
45 // Run the server so that we know what URL to use in the system cache. 45 // Run the server so that we know what URL to use in the system cache.
46 servePackages([]); 46 servePackages([]);
47 47
48 d.appDir([ 48 d.appDir([
49 dependencyMap("foo", "any") 49 dependencyMap("foo", "any")
50 ]).create(); 50 ]).create();
51 51
52 pubCommand(command, args: ['--offline'], 52 pubCommand(command, args: ['--offline'],
53 error: new RegExp('Could not find package "foo" in cache')); 53 error: 'Could not find package "foo" in cache.');
54 }); 54 });
55 55
56 integration('fails gracefully no cached versions match', () { 56 integration('fails gracefully no cached versions match', () {
57 // Run the server so that we know what URL to use in the system cache. 57 // Run the server so that we know what URL to use in the system cache.
58 servePackages([]); 58 servePackages([]);
59 59
60 d.cacheDir({ 60 d.cacheDir({
61 "foo": ["1.2.2", "1.2.3"] 61 "foo": ["1.2.2", "1.2.3"]
62 }, includePubspecs: true).create(); 62 }, includePubspecs: true).create();
63 63
64 d.appDir([ 64 d.appDir([
65 dependencyMap("foo", ">2.0.0") 65 dependencyMap("foo", ">2.0.0")
66 ]).create(); 66 ]).create();
67 67
68 pubCommand(command, args: ['--offline'], 68 pubCommand(command, args: ['--offline'], error:
69 error: new RegExp("Package 'foo' has no versions that match >2.0.0")); 69 "Package 'foo' has no versions that match >2.0.0 derived from:\n"
70 "- 'myapp' depends on version >2.0.0");
70 }); 71 });
71 }); 72 });
72 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698