diff --git a/test/dartdoc_test.dart b/test/dartdoc_test.dart
index 080604fce5..7a3339ed58 100644
--- a/test/dartdoc_test.dart
+++ b/test/dartdoc_test.dart
@@ -410,15 +410,20 @@ void main() {
test('rel canonical prefix does not include base href', () async {
final String prefix = 'foo.bar/baz';
Dartdoc dartdoc = await buildDartdoc(
- ['--rel-canonical-prefix', prefix], testPackageMinimumDir, tempDir);
+ ['--rel-canonical-prefix', prefix], testPackageDir, tempDir);
await dartdoc.generateDocsBase();
- File file = File(path.join(tempDir.path, 'small', 'small-library.html'));
- expect(file.existsSync(), isTrue);
+ // Verify files at different levels have correct content.
+ File level1 = File(path.join(tempDir.path, 'ex', 'Apple-class.html'));
+ expect(level1.existsSync(), isTrue);
expect(
- file.readAsStringSync(),
+ level1.readAsStringSync(),
contains(
- ''));
+ ''));
+ File level2 = File(path.join(tempDir.path, 'ex', 'Apple', 'm.html'));
+ expect(level2.existsSync(), isTrue);
+ expect(level2.readAsStringSync(),
+ contains(''));
});
}, timeout: Timeout.factor(8));
}