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

Unified Diff: pkg/intl/test/message_extraction/failed_extraction_test.dart

Issue 771253002: Add a flag to prohibit plurals/genders that don't take up the whole string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review fixes Created 6 years 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: pkg/intl/test/message_extraction/failed_extraction_test.dart
diff --git a/pkg/intl/test/message_extraction/failed_extraction_test.dart b/pkg/intl/test/message_extraction/failed_extraction_test.dart
index 430a43fd4d72de842f6763bc50ce039f76e0e802..3a7d75e1dd0daa53ad45f5fdc2802605ed0ac68d 100644
--- a/pkg/intl/test/message_extraction/failed_extraction_test.dart
+++ b/pkg/intl/test/message_extraction/failed_extraction_test.dart
@@ -13,7 +13,11 @@ main() {
});
}
-void runTestWithWarnings({bool warningsAreErrors, int expectedExitCode}) {
+const defaultFiles =
+ const ["sample_with_messages.dart", "part_of_sample_with_messages.dart"];
+
+void runTestWithWarnings({bool warningsAreErrors, int expectedExitCode,
+ bool embeddedPlurals: true, List<String> sourceFiles: defaultFiles}) {
void verify(ProcessResult result) {
try {
@@ -29,8 +33,10 @@ void runTestWithWarnings({bool warningsAreErrors, int expectedExitCode}) {
if (warningsAreErrors) {
args.add('--warnings-are-errors');
}
- var files = [asTempDirPath("sample_with_messages.dart"), asTempDirPath(
- "part_of_sample_with_messages.dart"),];
+ if (!embeddedPlurals) {
+ args.add('--no-embedded-plurals');
+ }
+ var files = sourceFiles.map(asTempDirPath).toList();
var allArgs = [program]
..addAll(args)
..addAll(files);

Powered by Google App Engine
This is Rietveld 408576698