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

Side by Side Diff: sdk/lib/_internal/dartdoc/test/dartdoc_test.dart

Issue 46063010: Change dart:io Platform.script to return a Uri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/dartdoc.dart ('k') | sdk/lib/_internal/pub/lib/src/io.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Unit tests for doc. 5 /// Unit tests for doc.
6 library dartdocTests; 6 library dartdocTests;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 }); 189 });
190 }); 190 });
191 } 191 }
192 192
193 void _testRunDartDoc(List<String> libraryPaths, void eval(ProcessResult)) { 193 void _testRunDartDoc(List<String> libraryPaths, void eval(ProcessResult)) {
194 expect(_runDartdoc(libraryPaths).then(eval), completes); 194 expect(_runDartdoc(libraryPaths).then(eval), completes);
195 } 195 }
196 196
197 /// The path to the root directory of the dartdoc entrypoint. 197 /// The path to the root directory of the dartdoc entrypoint.
198 String get _dartdocDir { 198 String get _dartdocDir {
199 var dir = path.absolute(Platform.script); 199 var dir = path.absolute(Platform.script.toFilePath());
200 while (path.basename(dir) != 'dartdoc') { 200 while (path.basename(dir) != 'dartdoc') {
201 if (!path.absolute(dir).contains('dartdoc') || dir == path.dirname(dir)) { 201 if (!path.absolute(dir).contains('dartdoc') || dir == path.dirname(dir)) {
202 fail('Unable to find root dartdoc directory.'); 202 fail('Unable to find root dartdoc directory.');
203 } 203 }
204 dir = path.dirname(dir); 204 dir = path.dirname(dir);
205 } 205 }
206 return path.absolute(dir); 206 return path.absolute(dir);
207 } 207 }
208 208
209 /// The path to use for the package root for subprocesses. 209 /// The path to use for the package root for subprocesses.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 } 275 }
276 } 276 }
277 277
278 278
279 validateDartdocMarkdown(String description, String markdown, 279 validateDartdocMarkdown(String description, String markdown,
280 String html) { 280 String html) {
281 var dartdoc = new dd.Dartdoc(); 281 var dartdoc = new dd.Dartdoc();
282 validate(description, markdown, html, linkResolver: dartdoc.dartdocResolver, 282 validate(description, markdown, html, linkResolver: dartdoc.dartdocResolver,
283 inlineSyntaxes: dartdoc.dartdocSyntaxes); 283 inlineSyntaxes: dartdoc.dartdocSyntaxes);
284 } 284 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/dartdoc.dart ('k') | sdk/lib/_internal/pub/lib/src/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698