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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/status_file/test/repo_status_files_test.dart
diff --git a/pkg/status_file/test/repo_status_files_test.dart b/pkg/status_file/test/repo_status_files_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ef4ae6d11ff76f03da1d29ef6cbc019a0ace0a71
--- /dev/null
+++ b/pkg/status_file/test/repo_status_files_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Tests that every .status file in the Dart repository can be successfully
+/// parsed.
+import 'dart:io';
+
+import 'package:expect/expect.dart';
+import 'package:path/path.dart' as p;
+import 'package:status_file/status_file.dart';
+
+final repoRoot =
+ p.normalize(p.join(p.dirname(p.fromUri(Platform.script)), "../../../"));
+
+void main() {
+ // Parse every status file in the repository.
+ for (var directory in ["tests", p.join("runtime", "tests")]) {
+ for (var entry in new Directory(p.join(repoRoot, directory))
+ .listSync(recursive: true)) {
+ if (!entry.path.endsWith(".status")) continue;
+
+ // Inside the co19 repository, there is a status file that doesn't appear
+ // to be valid and looks more like some kind of template or help document.
+ // Ignore it.
+ if (entry.path.endsWith(p.join("co19", "src", "co19.status"))) continue;
+
+ try {
+ new StatusFile.read(entry.path);
+ } catch (err) {
+ var path = p.relative(entry.path, from: repoRoot);
+ Expect.fail("Could not parse '$path'.\n$err");
+ }
+ }
+ }
+}
« 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