| Index: tests/standalone/io/file_test.dart
|
| diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
|
| index 8a8d6811ec21c4dd8c9dd6b1d74ec5d004885473..0e632025ffd0005e13b1027a77c64d39d76ea890 100644
|
| --- a/tests/standalone/io/file_test.dart
|
| +++ b/tests/standalone/io/file_test.dart
|
| @@ -642,6 +642,23 @@ class FileTest {
|
| openedFile.closeSync();
|
| }
|
|
|
| + static void testLengthSyncDirectory() {
|
| + Directory tmp = tempDirectory.createTempSync('file_length_test_');
|
| + String dirPath = '${tmp.path}/dir';
|
| + new Directory(dirPath).createSync();
|
| + try {
|
| + new File(dirPath).lengthSync();
|
| + Expect.fail('Expected operation to throw');
|
| + } catch (e) {
|
| + if (e is! FileSystemException) {
|
| + print(e);
|
| + }
|
| + Expect.isTrue(e is FileSystemException);
|
| + } finally {
|
| + tmp.deleteSync(recursive: true);
|
| + }
|
| + }
|
| +
|
| // Test for file position functionality.
|
| static void testPosition() {
|
| asyncTestStarted();
|
| @@ -1428,6 +1445,7 @@ class FileTest {
|
|
|
| createTempDirectory(() {
|
| testLength();
|
| + testLengthSyncDirectory();
|
| testReadWrite();
|
| testReadWriteSync();
|
| testReadWriteNoArgsSync();
|
|
|