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

Side by Side Diff: packages/intl/test/message_extraction/failed_extraction_test.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4 library failed_extraction_test;
5
6 import "message_extraction_test.dart";
7 import "dart:io";
8 import "package:unittest/unittest.dart";
9
10 main() {
11 test("Expect warnings but successful extraction", () {
12 runTestWithWarnings(warningsAreErrors: false, expectedExitCode: 0);
13 });
14 }
15
16 const defaultFiles = const [
17 "sample_with_messages.dart",
18 "part_of_sample_with_messages.dart"
19 ];
20
21 void runTestWithWarnings({bool warningsAreErrors, int expectedExitCode,
22 bool embeddedPlurals: true, List<String> sourceFiles: defaultFiles}) {
23 void verify(ProcessResult result) {
24 try {
25 expect(result.exitCode, expectedExitCode);
26 } finally {
27 deleteGeneratedFiles();
28 }
29 }
30
31 copyFilesToTempDirectory();
32 var program = asTestDirPath("../../bin/extract_to_arb.dart");
33 var args = ["--output-dir=$tempDir"];
34 if (warningsAreErrors) {
35 args.add('--warnings-are-errors');
36 }
37 if (!embeddedPlurals) {
38 args.add('--no-embedded-plurals');
39 }
40 var files = sourceFiles.map(asTempDirPath).toList();
41 var allArgs = [program]
42 ..addAll(args)
43 ..addAll(files);
44 var callback = expectAsync(verify);
45 run(null, allArgs).then(callback);
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698