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

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

Issue 19500013: Use path package in dartdoc (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 /// ProcessResult. 231 /// ProcessResult.
232 Future<ProcessResult> _runDartdoc(List<String> libraryPaths) { 232 Future<ProcessResult> _runDartdoc(List<String> libraryPaths) {
233 var dartBin = Platform.executable; 233 var dartBin = Platform.executable;
234 234
235 var dartdoc = path.join(_dartdocDir, 'bin/dartdoc.dart'); 235 var dartdoc = path.join(_dartdocDir, 'bin/dartdoc.dart');
236 236
237 final runArgs = ['--package-root=$_packageRoot/', dartdoc]; 237 final runArgs = ['--package-root=$_packageRoot/', dartdoc];
238 238
239 // Turn relative libraryPaths to absolute ones. 239 // Turn relative libraryPaths to absolute ones.
240 runArgs.addAll(libraryPaths 240 runArgs.addAll(libraryPaths
241 .map((e) => path.join(dd.scriptDir.toNativePath(), e))); 241 .map((e) => path.join(path.absolute(dd.scriptDir), e)));
242 242
243 return Process.run(dartBin, runArgs); 243 return Process.run(dartBin, runArgs);
244 } 244 }
245 245
246 final _dartdocCompletionRegExp = 246 final _dartdocCompletionRegExp =
247 new RegExp(r'Documentation complete -- documented (\d+) libraries, (\d+) types , and (\d+) members\.'); 247 new RegExp(r'Documentation complete -- documented (\d+) libraries, (\d+) types , and (\d+) members\.');
248 248
249 void _expectDocumented(String output, { int libCount, int typeCount, 249 void _expectDocumented(String output, { int libCount, int typeCount,
250 int memberCount}) { 250 int memberCount}) {
251 251
(...skipping 21 matching lines...) Expand all
273 } 273 }
274 } 274 }
275 275
276 276
277 validateDartdocMarkdown(String description, String markdown, 277 validateDartdocMarkdown(String description, String markdown,
278 String html) { 278 String html) {
279 var dartdoc = new dd.Dartdoc(); 279 var dartdoc = new dd.Dartdoc();
280 validate(description, markdown, html, linkResolver: dartdoc.dartdocResolver, 280 validate(description, markdown, html, linkResolver: dartdoc.dartdocResolver,
281 inlineSyntaxes: dartdoc.dartdocSyntaxes); 281 inlineSyntaxes: dartdoc.dartdocSyntaxes);
282 } 282 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698