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

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

Issue 11878015: Default constructor for dart:io Path now handles native Windows paths. Path() now does the same as… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't change tools/version.dart until the binaries are updated. Created 7 years, 11 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
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/dartdoc.dart ('k') | sdk/lib/io/directory_impl.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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 expect(doc.relativePath('other/sub/file.html'), equals( 112 expect(doc.relativePath('other/sub/file.html'), equals(
113 '../../other/sub/file.html')); 113 '../../other/sub/file.html'));
114 }); 114 });
115 115
116 test('from nested to directory with different path', () { 116 test('from nested to directory with different path', () {
117 doc.startFile('dir/sub/file.html'); 117 doc.startFile('dir/sub/file.html');
118 expect(doc.relativePath('other/file.html'), equals( 118 expect(doc.relativePath('other/file.html'), equals(
119 '../../other/file.html')); 119 '../../other/file.html'));
120 }); 120 });
121 }); 121 });
122 122
123 group('integration tests', () { 123 group('integration tests', () {
124 test('no entrypoints', () { 124 test('no entrypoints', () {
125 expect(_runDartdoc([], exitCode: 1), completes); 125 expect(_runDartdoc([], exitCode: 1), completes);
126 }); 126 });
127 127
128 test('library with no packages', () { 128 test('library with no packages', () {
129 expect(_runDartdoc( 129 expect(_runDartdoc(
130 [new Path.fromNative('test/test_files/other_place/' 130 [new Path('test/test_files/other_place/'
131 'no_package_test_file.dart').toNativePath()]), 131 'no_package_test_file.dart').toNativePath()]),
132 completes); 132 completes);
133 }); 133 });
134 134
135 test('library with packages', () { 135 test('library with packages', () {
136 expect(_runDartdoc( 136 expect(_runDartdoc(
137 [new Path.fromNative('test/test_files/' 137 [new Path('test/test_files/'
138 'package_test_file.dart').toNativePath()]), 138 'package_test_file.dart').toNativePath()]),
139 completes); 139 completes);
140 }); 140 });
141 141
142 }); 142 });
143 } 143 }
144 144
145 Future _runDartdoc(List<String> arguments, {int exitCode: 0}) { 145 Future _runDartdoc(List<String> arguments, {int exitCode: 0}) {
146 var dartBin = new Options().executable; 146 var dartBin = new Options().executable;
147 var dartdoc = 'bin/dartdoc.dart'; 147 var dartdoc = 'bin/dartdoc.dart';
148 arguments.insertRange(0, 1, dartdoc); 148 arguments.insertRange(0, 1, dartdoc);
149 return Process.run(dartBin, arguments) 149 return Process.run(dartBin, arguments)
150 .then((result) { 150 .then((result) {
151 expect(result.exitCode, exitCode); 151 expect(result.exitCode, exitCode);
152 }); 152 });
153 } 153 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/dartdoc/lib/dartdoc.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698