@@ -627,8 +627,8 @@ updateTestPackageDocs() async {
627
627
@Task ('Validate the SDK doc build.' )
628
628
@Depends (buildSdkDocs)
629
629
validateSdkDocs () {
630
- const expectedLibCount = 19 ;
631
-
630
+ const expectedLibCount = 7 ;
631
+ const expectedSubLibCount = 12 ;
632
632
File indexHtml = joinFile (sdkDocsDir, ['index.html' ]);
633
633
if (! indexHtml.existsSync ()) {
634
634
fail ('no index.html found for SDK docs' );
@@ -642,12 +642,20 @@ validateSdkDocs() {
642
642
}
643
643
log ('$foundLibs index.html dart: entries found' );
644
644
645
+ int foundSubLibs =
646
+ _findCount (indexContents, '<li class="section-subitem"><a href="dart-' );
647
+ if (foundSubLibs != expectedSubLibCount) {
648
+ fail (
649
+ 'expected $expectedSubLibCount dart: index.html entries in categories, found $foundSubLibs ' );
650
+ }
651
+ log ('$foundSubLibs index.html dart: entries in categories found' );
652
+
645
653
// check for the existence of certain files/dirs
646
654
var libsLength =
647
655
sdkDocsDir.listSync ().where ((fs) => fs.path.contains ('dart-' )).length;
648
- if (libsLength != expectedLibCount) {
656
+ if (libsLength != expectedLibCount + expectedSubLibCount ) {
649
657
fail ('docs not generated for all the SDK libraries, '
650
- 'expected $expectedLibCount directories, generated $libsLength directories' );
658
+ 'expected ${ expectedLibCount + expectedSubLibCount } directories, generated $libsLength directories' );
651
659
}
652
660
log ('$libsLength dart: libraries found' );
653
661
0 commit comments