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

Side by Side Diff: utils/tests/pub/validator_test.dart

Issue 11931040: adds file path source to pub (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase to newest as of 5 min ago Created 7 years, 11 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
« no previous file with comments | « utils/tests/pub/test_pub.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 validator_test; 5 library validator_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:json' as json; 9 import 'dart:json' as json;
10 10
11 import 'test_pub.dart'; 11 import 'test_pub.dart';
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 integration('has a lib directory containing only src', () { 279 integration('has a lib directory containing only src', () {
280 file(join(appPath, "lib", "test_pkg.dart"), '').scheduleDelete(); 280 file(join(appPath, "lib", "test_pkg.dart"), '').scheduleDelete();
281 dir(appPath, [ 281 dir(appPath, [
282 dir("lib", [ 282 dir("lib", [
283 dir("src", [file("test_pkg.dart", "int i = 0;")]) 283 dir("src", [file("test_pkg.dart", "int i = 0;")])
284 ]) 284 ])
285 ]).scheduleCreate(); 285 ]).scheduleCreate();
286 expectValidationError(lib); 286 expectValidationError(lib);
287 }); 287 });
288 288
289 integration('has a dependency with a path source', () {
290 dir(appPath, [
291 libPubspec("test_pkg", "1.0.0", [
292 {'path': '/foo/bar'}
293 ])
294 ]).scheduleCreate();
295 expectValidationError(dependency);
296 });
297
289 group('has a dependency with a non-hosted source', () { 298 group('has a dependency with a non-hosted source', () {
290 group('where a hosted version of that dependency exists', () { 299 group('where a hosted version of that dependency exists', () {
291 integration("and should suggest the hosted package's primary " 300 integration("and should suggest the hosted package's primary "
292 "version", () { 301 "version", () {
293 useMockClient(new MockClient((request) { 302 useMockClient(new MockClient((request) {
294 expect(request.method, equals("GET")); 303 expect(request.method, equals("GET"));
295 expect(request.url.path, equals("/packages/foo.json")); 304 expect(request.url.path, equals("/packages/foo.json"));
296 305
297 return new Future.immediate(new http.Response(json.stringify({ 306 return new Future.immediate(new http.Response(json.stringify({
298 "name": "foo", 307 "name": "foo",
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 var names = ["tools", "tests", "docs", "examples", "sample", "samples"]; 524 var names = ["tools", "tests", "docs", "examples", "sample", "samples"];
516 for (var name in names) { 525 for (var name in names) {
517 integration('"$name"', () { 526 integration('"$name"', () {
518 dir(appPath, [dir(name)]).scheduleCreate(); 527 dir(appPath, [dir(name)]).scheduleCreate();
519 expectValidationWarning(directory); 528 expectValidationWarning(directory);
520 }); 529 });
521 } 530 }
522 }); 531 });
523 }); 532 });
524 } 533 }
OLDNEW
« no previous file with comments | « utils/tests/pub/test_pub.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698