| Index: tests/standalone/io/file_test.dart
|
| diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
|
| index 0e632025ffd0005e13b1027a77c64d39d76ea890..73db86b6e50dc64adaab231c66bf68b700d255ee 100644
|
| --- a/tests/standalone/io/file_test.dart
|
| +++ b/tests/standalone/io/file_test.dart
|
| @@ -1268,6 +1268,23 @@ class FileTest {
|
| Expect.isTrue(modified.isBefore(new DateTime.now()));
|
| }
|
|
|
| + static void testLastModifiedSyncDirectory() {
|
| + Directory tmp = tempDirectory.createTempSync('file_last_modified_test_');
|
| + String dirPath = '${tmp.path}/dir';
|
| + new Directory(dirPath).createSync();
|
| + try {
|
| + new File(dirPath).lastModifiedSync();
|
| + 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 that opens the same file for writing then for appending to test
|
| // that the file is not truncated when opened for appending.
|
| static void testAppend() {
|
| @@ -1484,6 +1501,7 @@ class FileTest {
|
| testRename(targetExists: true);
|
| testRenameSync(targetExists: true);
|
| testLastModified();
|
| + testLastModifiedSyncDirectory();
|
| testDoubleAsyncOperation();
|
| asyncEnd();
|
| });
|
|
|