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

Side by Side Diff: tests/standalone/io/link_test.dart

Issue 17638007: Create LinkExceptions using the right arguments, in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test 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
« no previous file with comments | « sdk/lib/io/link.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "dart:async"; 6 import "dart:async";
7 import "dart:io"; 7 import "dart:io";
8 import "dart:isolate"; 8 import "dart:isolate";
9 9
10 // Test the dart:io Link class. 10 // Test the dart:io Link class.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 .last) 166 .last)
167 .then((_) => 167 .then((_) =>
168 // This directory listing must terminate, even though it contains loops. 168 // This directory listing must terminate, even though it contains loops.
169 new Directory.fromPath(base.append('a/b/c')) 169 new Directory.fromPath(base.append('a/b/c'))
170 .list(recursive: true, followLinks: true) 170 .list(recursive: true, followLinks: true)
171 .last) 171 .last)
172 .then((_) => 172 .then((_) =>
173 new Directory.fromPath(base).delete(recursive: true)); 173 new Directory.fromPath(base).delete(recursive: true));
174 } 174 }
175 175
176 void testLinkErrorSync() {
177 Expect.throws(() =>
178 new Link('some-dir-that-doent exist/some link file/bla/fisk').createSync(
179 'bla bla bla/b lalal/blfir/sdfred/es'),
180 (e) => e is LinkException);
181 }
182
176 main() { 183 main() {
177 testCreateSync(); 184 testCreateSync();
178 testCreateLoopingLink(); 185 testCreateLoopingLink();
186 testLinkErrorSync();
179 } 187 }
OLDNEW
« no previous file with comments | « sdk/lib/io/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698