Chromium Code Reviews| Index: tests/standalone/io/link_test.dart |
| diff --git a/tests/standalone/io/link_test.dart b/tests/standalone/io/link_test.dart |
| index a20d82c722a7a0c12e1716a8a229ae4e2cc8d046..e4ecfbe28ce0dff90215e4896ee7de0a6713ab85 100644 |
| --- a/tests/standalone/io/link_test.dart |
| +++ b/tests/standalone/io/link_test.dart |
| @@ -137,7 +137,34 @@ testCreateSync() { |
| }); |
| } |
| +testCreateLoopingLink() { |
| + Path base = new Path(new Directory('').createTempSync().path); |
| + new Directory.fromPath(base.append('a/b/c')).create(recursive: true) |
| + .then((_) => |
| + new Link.fromPath(base.append('a/b/c/d')) |
| + .create(base.append('a/b').toNativePath())) |
| + .then((_) => |
| + new Link.fromPath(base.append('a/b/c/e')) |
| + .create(base.append('a').toNativePath())) |
| + .then((_) => |
| + new Directory.fromPath(base.append('a')) |
| + .list(recursive: true,followLinks: false) |
|
Søren Gjesse
2013/04/10 11:33:23
space after ,
Bill Hesse
2013/04/10 12:49:47
Done.
|
| + .last) |
| + .then((_) => |
| + // This directory listing must terminate, even though it contains loops. |
| + new Directory.fromPath(base.append('a')) |
| + .list(recursive: true,followLinks: true) |
|
Søren Gjesse
2013/04/10 11:33:23
ditto.
|
| + .last) |
| + .then((_) => |
| + // This directory listing must terminate, even though it contains loops. |
| + new Directory.fromPath(base.append('a/b/c')) |
| + .list(recursive: true, followLinks: true) |
| + .last) |
| + .then((_) => |
| + new Directory.fromPath(base).delete(recursive: true)); |
| +} |
| main() { |
| testCreateSync(); |
| + testCreateLoopingLink(); |
| } |