diff --git a/tests/sys/src/TestFileSystem.hx b/tests/sys/src/TestFileSystem.hx index 385086b992c..757831bf0b2 100644 --- a/tests/sys/src/TestFileSystem.hx +++ b/tests/sys/src/TestFileSystem.hx @@ -60,6 +60,13 @@ class TestFileSystem extends utest.Test { //read directory with complex path Assert.isTrue(FileSystem.readDirectory("../sys/./.." + tailingSlash).indexOf("sys") > -1); } + // should throw if directory doesn't exist + try { + FileSystem.readDirectory("non-existant"); + Assert.isFalse(true); + } catch (_) { + Assert.isTrue(true); + } } function testCreateDirectory():Void {