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

Side by Side Diff: pkg/intl/test/message_extraction/message_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/intl/test/message_extraction/failed_extraction_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 message_extraction_test; 5 library message_extraction_test;
6 6
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 }).then(makeSureWeVerify).then(checkResult); 78 }).then(makeSureWeVerify).then(checkResult);
79 }); 79 });
80 } 80 }
81 81
82 void copyFilesToTempDirectory() { 82 void copyFilesToTempDirectory() {
83 if (useLocalDirectory) return; 83 if (useLocalDirectory) return;
84 var files = [asTestDirPath('sample_with_messages.dart'), 84 var files = [asTestDirPath('sample_with_messages.dart'),
85 asTestDirPath('part_of_sample_with_messages.dart'), 85 asTestDirPath('part_of_sample_with_messages.dart'),
86 asTestDirPath('verify_messages.dart'), 86 asTestDirPath('verify_messages.dart'),
87 asTestDirPath('run_and_verify.dart'), 87 asTestDirPath('run_and_verify.dart'),
88 asTestDirPath('embedded_plural_text_before.dart'),
89 asTestDirPath('embedded_plural_text_after.dart'),
88 asTestDirPath('print_to_list.dart')]; 90 asTestDirPath('print_to_list.dart')];
89 for (var filename in files) { 91 for (var filename in files) {
90 var file = new File(filename); 92 var file = new File(filename);
91 file.copySync(path.join(tempDir, path.basename(filename))); 93 file.copySync(path.join(tempDir, path.basename(filename)));
92 } 94 }
93 } 95 }
94 96
95 void deleteGeneratedFiles() { 97 void deleteGeneratedFiles() {
96 if (useLocalDirectory) return; 98 if (useLocalDirectory) return;
97 try { 99 try {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 '--suppress-warnings', 'sample_with_messages.dart', 145 '--suppress-warnings', 'sample_with_messages.dart',
144 'part_of_sample_with_messages.dart']); 146 'part_of_sample_with_messages.dart']);
145 147
146 Future<ProcessResult> generateTranslationFiles(ProcessResult previousResult) => 148 Future<ProcessResult> generateTranslationFiles(ProcessResult previousResult) =>
147 run(previousResult, 149 run(previousResult,
148 [asTestDirPath('make_hardcoded_translation.dart'), 150 [asTestDirPath('make_hardcoded_translation.dart'),
149 'intl_messages.arb']); 151 'intl_messages.arb']);
150 152
151 Future<ProcessResult> generateCodeFromTranslation(ProcessResult previousResult) 153 Future<ProcessResult> generateCodeFromTranslation(ProcessResult previousResult)
152 => run(previousResult, [asTestDirPath('../../bin/generate_from_arb.dart'), 154 => run(previousResult, [asTestDirPath('../../bin/generate_from_arb.dart'),
153 deferredLoadArg, '--generated-file-prefix=foo_', 155 deferredLoadArg, '--generated-file-prefix=foo_',
154 'sample_with_messages.dart', 'part_of_sample_with_messages.dart', 156 'sample_with_messages.dart', 'part_of_sample_with_messages.dart',
155 'translation_fr.arb', 'translation_de_DE.arb']); 157 'translation_fr.arb', 'translation_de_DE.arb']);
156 158
157 Future<ProcessResult> runAndVerify(ProcessResult previousResult) => run( 159 Future<ProcessResult> runAndVerify(ProcessResult previousResult) => run(
158 previousResult, [asTempDirPath('run_and_verify.dart')]); 160 previousResult, [asTempDirPath('run_and_verify.dart')]);
OLDNEW
« no previous file with comments | « pkg/intl/test/message_extraction/failed_extraction_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698