Chromium Code Reviews| Index: tests/standalone/io/file_system_links_test.dart |
| diff --git a/tests/standalone/io/file_system_links_test.dart b/tests/standalone/io/file_system_links_test.dart |
| index 856416e147c528aa36da6941d454b92002d2f12f..a18665f8addf8d6ea0b1d5e215774941aa3295bb 100644 |
| --- a/tests/standalone/io/file_system_links_test.dart |
| +++ b/tests/standalone/io/file_system_links_test.dart |
| @@ -127,6 +127,21 @@ testDirectoryListing() { |
| createLink(temp2.path, y, true, () { |
| var files = []; |
| var dirs = []; |
| + for (var entry in temp.listSync(recursive:true)) { |
| + if (entry is File) { |
| + files.add(entry.name); |
| + } else { |
| + Expect.isTrue(entry is Directory); |
| + dirs.add(entry.path); |
| + } |
| + } |
| + Expect.equals(1, files.length); |
| + Expect.isTrue(files[0].endsWith(x)); |
| + Expect.equals(1, dirs.length); |
| + Expect.isTrue(dirs[0].endsWith(y)); |
| + files = []; |
|
Mads Ager (google)
2013/01/04 10:00:25
Add an empty line before resetting files and dirs
Bill Hesse
2013/01/04 13:49:27
Done.
|
| + dirs = []; |
| + |
| var lister = temp.list(recursive: true); |
| lister.onFile = (f) => files.add(f); |
| lister.onDir = (d) => dirs.add(d); |
| @@ -150,6 +165,8 @@ testDirectoryListingBrokenLink() { |
| var doesNotExist = 'this_thing_does_not_exist'; |
| new File(x).createSync(); |
| createLink(doesNotExist, link, true, () { |
| + Expect.throws(() => temp.listSync(recursive: true), |
| + (e) => e is DirectoryIOException); |
| var files = []; |
| var dirs = []; |
| var errors = []; |