From bcd4142b1489a0e9517b953a1c31311ce9bd4ddb Mon Sep 17 00:00:00 2001 From: Jonathan Koren Date: Mon, 13 Jan 2020 07:43:25 -0800 Subject: [PATCH] Verify files at different levels in test --- test/dartdoc_test.dart | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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)); }