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

Unified Diff: sdk/lib/_internal/pub/test/pub_get_and_upgrade_test.dart

Issue 351703004: Improve pub's pubspec error messages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/pub_get_and_upgrade_test.dart
diff --git a/sdk/lib/_internal/pub/test/pub_get_and_upgrade_test.dart b/sdk/lib/_internal/pub/test/pub_get_and_upgrade_test.dart
index 337c9574b73e4240f8e6b4b4b19dbd9c4b8aa52d..c5d78a353b1d01290f4ac062b5806605eac0fa09 100644
--- a/sdk/lib/_internal/pub/test/pub_get_and_upgrade_test.dart
+++ b/sdk/lib/_internal/pub/test/pub_get_and_upgrade_test.dart
@@ -6,6 +6,7 @@ library pub_tests;
import 'package:scheduled_test/scheduled_test.dart';
+import '../lib/src/exit_codes.dart' as exit_codes;
import 'descriptor.dart' as d;
import 'test_pub.dart';
@@ -27,8 +28,9 @@ main() {
d.pubspec({"dependencies": {"foo": null}})
]).create();
- pubCommand(command, error: new RegExp(r'Missing the required "name" '
- r'field\.'));
+ pubCommand(command,
+ error: contains('Missing the required "name" field.'),
+ exitCode: exit_codes.DATA);
});
});
@@ -120,8 +122,9 @@ main() {
})
]).create();
- pubCommand(command, error: new RegExp(r'"dependencies.myapp": Package '
- r'may not list itself as a dependency\.'));
+ pubCommand(command,
+ error: contains('A package may not list itself as a dependency.'),
+ exitCode: exit_codes.DATA);
});
integration('does not allow a dev dependency on itself', () {
@@ -134,8 +137,9 @@ main() {
})
]).create();
- pubCommand(command, error: new RegExp(r'"dev_dependencies.myapp": '
- r'Package may not list itself as a dependency\.'));
+ pubCommand(command,
+ error: contains('A package may not list itself as a dependency.'),
+ exitCode: exit_codes.DATA);
});
});
}
« no previous file with comments | « sdk/lib/_internal/pub/test/get/git/require_pubspec_name_test.dart ('k') | sdk/lib/_internal/pub/test/pubspec_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698