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

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

Issue 12328021: Make sure package names are URL encoded. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: URL encode version too. Created 7 years, 10 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/install/hosted/install_test.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) 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 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 import 'dart:math' as math; 10 import 'dart:math' as math;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 expectValidationError(license); 277 expectValidationError(license);
278 }); 278 });
279 279
280 integration('has an empty package name', () { 280 integration('has an empty package name', () {
281 dir(appPath, [libPubspec("", "1.0.0")]).scheduleCreate(); 281 dir(appPath, [libPubspec("", "1.0.0")]).scheduleCreate();
282 expectValidationError(name); 282 expectValidationError(name);
283 }); 283 });
284 284
285 integration('has a package name with an invalid character', () { 285 integration('has a package name with an invalid character', () {
286 dir(appPath, [libPubspec("test-pkg", "1.0.0")]).scheduleCreate(); 286 dir(appPath, [libPubspec("test-pkg", "1.0.0")]).scheduleCreate();
287 expectValidationWarning(name); 287 expectValidationError(name);
288 }); 288 });
289 289
290 integration('has a package name that begins with a number', () { 290 integration('has a package name that begins with a number', () {
291 dir(appPath, [libPubspec("8ball", "1.0.0")]).scheduleCreate(); 291 dir(appPath, [libPubspec("8ball", "1.0.0")]).scheduleCreate();
292 expectValidationWarning(name); 292 expectValidationError(name);
293 }); 293 });
294 294
295 integration('has a package name that contains upper-case letters', () { 295 integration('has a package name that contains upper-case letters', () {
296 dir(appPath, [libPubspec("TestPkg", "1.0.0")]).scheduleCreate(); 296 dir(appPath, [libPubspec("TestPkg", "1.0.0")]).scheduleCreate();
297 expectValidationWarning(name); 297 expectValidationWarning(name);
298 }); 298 });
299 299
300 integration('has a package name that is a Dart reserved word', () { 300 integration('has a package name that is a Dart reserved word', () {
301 dir(appPath, [libPubspec("final", "1.0.0")]).scheduleCreate(); 301 dir(appPath, [libPubspec("final", "1.0.0")]).scheduleCreate();
302 expectValidationError(name); 302 expectValidationError(name);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 }); 576 });
577 577
578 test('has a README with invalid utf-8', () { 578 test('has a README with invalid utf-8', () {
579 dir(appPath, [ 579 dir(appPath, [
580 binaryFile("README", [192]) 580 binaryFile("README", [192])
581 ]).scheduleCreate(); 581 ]).scheduleCreate();
582 expectValidationWarning(utf8Readme); 582 expectValidationWarning(utf8Readme);
583 }); 583 });
584 }); 584 });
585 } 585 }
OLDNEW
« no previous file with comments | « utils/tests/pub/install/hosted/install_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698