OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |