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

Side by Side Diff: test/hosted/version_negotiation_test.dart

Issue 1215833002: Use the new test runner. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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
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 'package:scheduled_test/scheduled_server.dart'; 7 import 'package:scheduled_test/scheduled_server.dart';
8 import 'package:scheduled_test/scheduled_test.dart'; 8 import 'package:scheduled_test/scheduled_test.dart';
9 import 'package:shelf/shelf.dart' as shelf; 9 import 'package:shelf/shelf.dart' as shelf;
10 10
11 import '../descriptor.dart' as d; 11 import '../descriptor.dart' as d;
12 import '../test_pub.dart'; 12 import '../test_pub.dart';
13 13
14 main() { 14 main() {
15 initConfig();
16
17 forBothPubGetAndUpgrade((command) { 15 forBothPubGetAndUpgrade((command) {
18 integration('sends the correct Accept header', () { 16 integration('sends the correct Accept header', () {
19 var server = new ScheduledServer(); 17 var server = new ScheduledServer();
20 18
21 d.appDir({ 19 d.appDir({
22 "foo": { 20 "foo": {
23 "hosted": { 21 "hosted": {
24 "name": "foo", 22 "name": "foo",
25 "url": server.url.then((url) => url.toString()) 23 "url": server.url.then((url) => url.toString())
26 } 24 }
(...skipping 29 matching lines...) Expand all
56 (request) => new shelf.Response(406)); 54 (request) => new shelf.Response(406));
57 55
58 pub.shouldExit(1); 56 pub.shouldExit(1);
59 57
60 pub.stderr.expect(emitsLines( 58 pub.stderr.expect(emitsLines(
61 "Pub 0.1.2+3 is incompatible with the current version of localhost.\n" 59 "Pub 0.1.2+3 is incompatible with the current version of localhost.\n"
62 "Upgrade pub to the latest version and try again.")); 60 "Upgrade pub to the latest version and try again."));
63 }); 61 });
64 }); 62 });
65 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698