Files
sdk/pkg/status_file/test/parse_and_normalize_test.dart
T
Devon Carew e2fe203adc [deps] roll package:lints to the latest
Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d
Tested: analysis clean (this is a lint only related change)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-05 03:36:59 +00:00

31 lines
977 B
Dart

// 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.
library;
import 'dart:io';
import 'package:status_file/canonical_status_file.dart';
final Uri repoRoot = Platform.script.resolve("../../../");
void main() {
// Parse every status file in the repository.
for (var directory in ["tests", "runtime/tests"]) {
for (var entry in Directory.fromUri(repoRoot.resolve(directory))
.listSync(recursive: true)) {
if (!entry.path.endsWith(".status")) continue;
try {
var statusFile = StatusFile.read(entry.path);
statusFile.toString();
} catch (err, st) {
print(err);
print(st);
throw Exception("Could not parse '${entry.path}'.\n$err");
}
}
}
}