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

Side by Side Diff: pkg/status_file/test/repo_status_files_test.dart

Issue 2984203002: Move the status file parser into its own package. (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « pkg/status_file/pubspec.yaml ('k') | pkg/status_file/test/status_expression_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017, 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
5 /// Tests that every .status file in the Dart repository can be successfully
6 /// parsed.
7 import 'dart:io';
8
9 import 'package:expect/expect.dart';
10 import 'package:path/path.dart' as p;
11 import 'package:status_file/status_file.dart';
12
13 final repoRoot =
14 p.normalize(p.join(p.dirname(p.fromUri(Platform.script)), "../../../"));
15
16 void main() {
17 // Parse every status file in the repository.
18 for (var directory in ["tests", p.join("runtime", "tests")]) {
19 for (var entry in new Directory(p.join(repoRoot, directory))
20 .listSync(recursive: true)) {
21 if (!entry.path.endsWith(".status")) continue;
22
23 // Inside the co19 repository, there is a status file that doesn't appear
24 // to be valid and looks more like some kind of template or help document.
25 // Ignore it.
26 if (entry.path.endsWith(p.join("co19", "src", "co19.status"))) continue;
27
28 try {
29 new StatusFile.read(entry.path);
30 } catch (err) {
31 var path = p.relative(entry.path, from: repoRoot);
32 Expect.fail("Could not parse '$path'.\n$err");
33 }
34 }
35 }
36 }
OLDNEW
« no previous file with comments | « pkg/status_file/pubspec.yaml ('k') | pkg/status_file/test/status_expression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698