Index: utils/tests/pub/validator_test.dart |
diff --git a/utils/tests/pub/validator_test.dart b/utils/tests/pub/validator_test.dart |
index d9877eb45de9c678b220df0939f5f386b3590d78..40576ac34ca7ee23a42cca53364a9103441d1008 100644 |
--- a/utils/tests/pub/validator_test.dart |
+++ b/utils/tests/pub/validator_test.dart |
@@ -210,7 +210,7 @@ main() { |
run(); |
}); |
- test('has a package name that is a Dart identifier', () { |
+ test('has a package name that is a Dart reserved word', () { |
dir(appPath, [libPubspec("operator", "1.0.0")]).scheduleCreate(); |
expectValidationError(name); |
run(); |
@@ -243,7 +243,7 @@ main() { |
run(); |
}); |
- test('has a library name that is a Dart identifier', () { |
+ test('has a library name that is a Dart reserved word', () { |
dir(appPath, [ |
libPubspec("test_pkg", "1.0.0"), |
dir("lib", [file("operator.dart", "int i = 0;")]) |
@@ -252,6 +252,15 @@ main() { |
run(); |
}); |
+ test('has a single library named differently than the package', () { |
+ file(join(appPath, "lib", "test_pkg.dart"), '').scheduleDelete(); |
+ dir(appPath, [ |
+ dir("lib", [file("best_pkg.dart", "int i = 0;")]) |
+ ]).scheduleCreate(); |
+ expectValidationWarning(name); |
+ run(); |
+ }); |
+ |
test('has no lib directory', () { |
dir(join(appPath, "lib")).scheduleDelete(); |
expectValidationError(lib); |