@@ -627,8 +627,8 @@ updateTestPackageDocs() async {
627627@Task ('Validate the SDK doc build.' )
628628@Depends (buildSdkDocs)
629629validateSdkDocs () {
630- const expectedLibCount = 19 ;
631-
630+ const expectedLibCount = 7 ;
631+ const expectedSubLibCount = 12 ;
632632 File indexHtml = joinFile (sdkDocsDir, ['index.html' ]);
633633 if (! indexHtml.existsSync ()) {
634634 fail ('no index.html found for SDK docs' );
@@ -642,12 +642,20 @@ validateSdkDocs() {
642642 }
643643 log ('$foundLibs index.html dart: entries found' );
644644
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+
645653 // check for the existence of certain files/dirs
646654 var libsLength =
647655 sdkDocsDir.listSync ().where ((fs) => fs.path.contains ('dart-' )).length;
648- if (libsLength != expectedLibCount) {
656+ if (libsLength != expectedLibCount + expectedSubLibCount ) {
649657 fail ('docs not generated for all the SDK libraries, '
650- 'expected $expectedLibCount directories, generated $libsLength directories' );
658+ 'expected ${ expectedLibCount + expectedSubLibCount } directories, generated $libsLength directories' );
651659 }
652660 log ('$libsLength dart: libraries found' );
653661
0 commit comments