Skip to content

Commit

Permalink
Fix grinder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-g committed Apr 21, 2020
1 parent 2802bb6 commit 55a6d35
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -949,19 +949,19 @@ Future<void> testDart2(Iterable<File> tests) async {
return CoverageSubprocessLauncher.generateCoverageToFile(File('lcov.info'));
}

@Task('Generate docs for dartdoc')
@Task('Generate docs for dartdoc without link-to-remote')
Future<void> testDartdoc() async {
var launcher = SubprocessLauncher('test-dartdoc');
await launcher.runStreamed(Platform.resolvedExecutable, [
'--enable-asserts',
'bin/dartdoc.dart',
'--output',
dartdocDocsDir.path
dartdocDocsDir.path,
'--no-link-to-remote',
]);
expectFileContains(path.join(dartdocDocsDir.path, 'index.html'),
['<title>dartdoc - Dart API docs</title>']);
final RegExp object =
RegExp('Object-class.html">Object</a></li>', multiLine: true);
final RegExp object = RegExp('<li>Object</li>', multiLine: true);
expectFileContains(
path.join(dartdocDocsDir.path, 'dartdoc', 'ModelElement-class.html'),
[object]);
Expand All @@ -971,12 +971,11 @@ Future<void> testDartdoc() async {
Future<void> testDartdocRemote() async {
var launcher = SubprocessLauncher('test-dartdoc-remote');
final RegExp object = RegExp(
'<a href="https://api.dartlang.org/(dev|stable)/[^/]*/dart-core/Object-class.html">Object</a>',
'<a href="https://api.dart.dev/(dev|stable|beta|edge)/[^/]*/dart-core/Object-class.html">Object</a>',
multiLine: true);
await launcher.runStreamed(Platform.resolvedExecutable, [
'--enable-asserts',
'bin/dartdoc.dart',
'--link-to-remote',
'--output',
dartdocDocsDir.path
]);
Expand Down Expand Up @@ -1033,8 +1032,8 @@ Future<void> testDartdocFlutterPlugin() async {
path.join(
pluginPackageDocsDir.path, 'testlib', 'MyAwesomeWidget-class.html'),
[
'<a href="https://docs.flutter.io/flutter/widgets/Widget-class.html">Widget</a>',
'<a href="https://docs.flutter.io/flutter/dart-core/Object-class.html">Object</a>'
'<a href="https://api.flutter.dev/flutter/widgets/Widget-class.html">Widget</a>',
'<a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a>'
]);
}

Expand Down

0 comments on commit 55a6d35

Please sign in to comment.