Fix comments
diff --git a/dart_test.yaml b/dart_test.yaml
index 423fa52..588b409 100644
--- a/dart_test.yaml
+++ b/dart_test.yaml
@@ -1,6 +1,6 @@
tags:
- crashtest:
- skip: 'Only run crashtest tests manually with `dart test -P crashtest`'
+ crash_test:
+ skip: 'Only run crash_test tests manually with `dart test -P crash_test`'
presets:
- crashtest:
- skip: false # Don't skip when running in -P crashtest
+ crash_test:
+ skip: false # Don't skip when running in -P crash_test
diff --git a/test/crash_test.dart b/test/crash_test.dart
index b85cc97..13322c0 100644
--- a/test/crash_test.dart
+++ b/test/crash_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2022, 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.
@@ -79,15 +79,18 @@
try {
await TarReader.forEach(Stream.value(archive), (entry) async {
if (entry.name.endsWith('.md')) {
- late String str;
+ late String contents;
try {
final bytes = await http.ByteStream(entry.contents).toBytes();
- str = utf8.decode(bytes);
+ contents = utf8.decode(bytes);
} on FormatException {
return; // ignore invalid utf8
}
try {
- markdownToHtml(str, extensionSet: ExtensionSet.gitHubWeb);
+ markdownToHtml(
+ contents,
+ extensionSet: ExtensionSet.gitHubWeb,
+ );
} catch (err, st) {
errors
.add('package:$package/${entry.name}, throws: $err\n$st');
@@ -117,6 +120,6 @@
}
},
timeout: Timeout(Duration(hours: 1)),
- tags: 'crashtest', // skipped by default, see: dart_test.yaml
+ tags: 'crash_test', // skipped by default, see: dart_test.yaml
);
}