| Index: tests/standalone/src/FileTest.dart
|
| diff --git a/tests/standalone/src/FileTest.dart b/tests/standalone/src/FileTest.dart
|
| index 5b172bb088e4ab0486d23dbaeb186e37c88ff67d..b740ca3dd5d9ac06a16ab985aaa47e1805e87354 100644
|
| --- a/tests/standalone/src/FileTest.dart
|
| +++ b/tests/standalone/src/FileTest.dart
|
| @@ -735,6 +735,22 @@ class FileTest {
|
| f.exists();
|
| }
|
|
|
| + static void testOpenDirectoryAsFile() {
|
| + var f = new File('.');
|
| + f.open();
|
| + f.openHandler = (r) => Expect.fail('Directory opened as file');
|
| + }
|
| +
|
| + static void testOpenDirectoryAsFileSync() {
|
| + var f = new File('.');
|
| + try {
|
| + f.openSync();
|
| + Expect.fail("Expected exception opening directory as file");
|
| + } catch (var e) {
|
| + Expect.isTrue(e is FileIOException);
|
| + }
|
| + }
|
| +
|
| // 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() {
|
| @@ -809,6 +825,8 @@ class FileTest {
|
| testPosition();
|
| testPositionSync();
|
| testMixedSyncAndAsync();
|
| + testOpenDirectoryAsFile();
|
| + testOpenDirectoryAsFileSync();
|
|
|
| createTempDirectory(() {
|
| testReadWrite();
|
|
|