Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(970)

Unified Diff: pkg/docgen/test/only_lib_content_in_pkg_test.dart

Issue 203753005: pkg/docgen: test fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/docgen/test/multi_library_test.dart ('k') | pkg/docgen/test/single_library_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/test/only_lib_content_in_pkg_test.dart
diff --git a/pkg/docgen/test/only_lib_content_in_pkg_test.dart b/pkg/docgen/test/only_lib_content_in_pkg_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..6df4a746ef3b8248d65ed85ccca8d34f407aef3c
--- /dev/null
+++ b/pkg/docgen/test/only_lib_content_in_pkg_test.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library docgen.test.only_lib_content_in_pkg;
+
+import 'dart:io';
+
+import 'package:path/path.dart' as p;
+import 'package:scheduled_test/descriptor.dart' as d;
+import 'package:scheduled_test/scheduled_test.dart';
+import 'package:unittest/matcher.dart';
+
+import '../lib/docgen.dart' as dg;
+import 'util.dart';
+
+void main() {
+
+ setUp(() {
+ scheduleTempDir();
+ });
+
+ test('exclude non-lib code from package docs', () {
+ schedule(() {
+ var thisScript = Platform.script;
+ var thisPath = p.fromUri(thisScript);
+ expect(p.basename(thisPath), 'only_lib_content_in_pkg_test.dart');
+ expect(p.dirname(thisPath), endsWith('test'));
+
+
+ var codeDir = p.normalize(p.join(thisPath, '..', '..'));
+ print(codeDir);
+ expect(FileSystemEntity.isDirectorySync(codeDir), isTrue);
+ return dg.docgen(['$codeDir/'], out: p.join(d.defaultRoot, 'docs'));
+ });
+
+ d.dir('docs', [
+ d.dir('docgen', [
+ d.matcherFile('docgen.json', isJsonMap)
+ ]),
+ d.matcherFile('index.json', isJsonMap),
+ d.matcherFile('index.txt', hasSortedLines),
+ d.matcherFile('library_list.json', isJsonMap),
+ d.nothing('test_lib.json'),
+ d.nothing('test_lib-bar.json'),
+ d.nothing('test_lib-foo.json')
+ ]).validate();
+
+ });
+}
« no previous file with comments | « pkg/docgen/test/multi_library_test.dart ('k') | pkg/docgen/test/single_library_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698