@@ -438,88 +438,6 @@ class C1 {}
438438 package.documentedCategoriesSorted.map ((c) => c.name), equals (['One' ]));
439439 }
440440
441- void
442- test_templatesDirOption_referencingANonExistentDirectory_resultsInDartdocFailure () async {
443- await createPackage (
444- libFiles: [
445- d.file ('library_1.dart' , '''
446- library library_1;
447- class Foo {}
448- ''' ),
449- ],
450- );
451- expect (
452- () => buildDartdoc (additionalArguments: ['--templates-dir' , 'bad' ]),
453- throwsA (const TypeMatcher <DartdocFailure >().having (
454- (f) => f.message,
455- 'message' ,
456- startsWith (
457- 'Argument --templates-dir, set to bad, resolves to missing path' ),
458- )));
459- }
460-
461- void test_templatesDirOption_specifiesTheTemplatesToUse () async {
462- await createPackage (
463- libFiles: [
464- d.file ('library_1.dart' , '''
465- library library_1;
466- class Foo {}
467- ''' ),
468- ],
469- files: [
470- d.dir ('templates' , [
471- d.file ('_sidebar_for_container.html' , 'EMPTY' ),
472- d.file ('_sidebar_for_library.html' , 'EMPTY' ),
473- d.file ('404error.html' , 'EMPTY' ),
474- d.file ('category.html' , 'EMPTY' ),
475- d.file ('class.html' , 'CLASS FILE' ),
476- d.file ('constructor.html' , 'EMPTY' ),
477- d.file ('enum.html' , 'EMPTY' ),
478- d.file ('extension.html' , 'EMPTY' ),
479- d.file ('function.html' , 'EMPTY' ),
480- d.file ('index.html' , 'EMPTY' ),
481- d.file ('library.html' , 'EMPTY' ),
482- d.file ('method.html' , 'EMPTY' ),
483- d.file ('mixin.html' , 'EMPTY' ),
484- d.file ('property.html' , 'EMPTY' ),
485- d.file ('top_level_property.html' , 'EMPTY' ),
486- d.file ('typedef.html' , 'EMPTY' ),
487- d.file ('search.html' , 'EMPTY' ),
488- ]),
489- ],
490- );
491- var customTemplatesDir = path.join (packagePath, 'templates' );
492- var dartdoc = await buildDartdoc (
493- additionalArguments: ['--templates-dir' , customTemplatesDir]);
494- await dartdoc.generateDocsBase ();
495- final indexContent = resourceProvider
496- .getFile (
497- path.joinAll ([packagePath, 'doc' , 'library_1' , 'Foo-class.html' ]))
498- .readAsStringSync ();
499- expect (indexContent, contains ('CLASS FILE' ));
500- }
501-
502- void
503- test_templatesDirOptionReferencingAnEmptyDirectory_resultsInDartdocFailure () async {
504- await createPackage (
505- libFiles: [
506- d.file ('library_1.dart' , '''
507- library library_1;
508- class Foo {}
509- ''' ),
510- ],
511- );
512- var customTemplatesDir = resourceProvider
513- .newFolder (resourceProvider.pathContext
514- .canonicalize (resourceProvider.convertPath ('/custom_templates' )))
515- .path;
516- expect (
517- () => buildDartdoc (
518- additionalArguments: ['--templates-dir' , customTemplatesDir]),
519- throwsA (const TypeMatcher <DartdocFailure >().having ((f) => f.message,
520- 'message' , startsWith ('Missing required template file' ))));
521- }
522-
523441 void test_emptyPackage () async {
524442 await createPackage ();
525443 await (await buildDartdoc ()).generateDocs ();
0 commit comments