| Basic test coverage for fileSystemDirectoryEntry.getDirectory() |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS dataTransfer.items.length is 1 |
| * Error case: create flag is set to true |
| PASS ex.name is "SecurityError" |
| * Regular case: getDirectory('subfolder1') |
| PASS subfolder1Entry.name is "subfolder1" |
| PASS subfolder1Entry.fullPath is "/testFiles/subfolder1" |
| PASS subfolder1Entry.isDirectory is true |
| * Error case: calling getDirectory() with path to file |
| PASS ex.name is "TypeMismatchError" |
| * Error case: calling getDirectory() with path containing backslash |
| PASS ex.name is "TypeMismatchError" |
| * Error case: calling getDirectory() with path which does not exist |
| PASS ex.name is "NotFoundError" |
| * Error case: calling getDirectory() with path containing a NUL character |
| PASS ex.name is "TypeMismatchError" |
| * Regular case: calling getDirectory() with path to root |
| PASS rootEntry.name is "" |
| PASS rootEntry.fullPath is "/" |
| PASS rootEntry.isDirectory is true |
| * Regular case: calling getDirectory() with absolute path |
| PASS subfolder2aEntry.name is "subfolder2a" |
| PASS subfolder2aEntry.fullPath is "/testFiles/subfolder2/subfolder2a" |
| PASS subfolder2aEntry.isDirectory is true |
| * Edge case: calling getDirectory() with relative path containing '.' and '..' |
| PASS subfolder2aEntry.name is "subfolder2a" |
| PASS subfolder2aEntry.fullPath is "/testFiles/subfolder2/subfolder2a" |
| PASS subfolder2aEntry.isDirectory is true |
| * Edge case: calling getDirectory() with relative path containing too many '..' |
| PASS subfolder1Entry.name is "subfolder1" |
| PASS subfolder1Entry.fullPath is "/testFiles/subfolder1" |
| PASS subfolder1Entry.isDirectory is true |
| * Edge case: calling getDirectory() with absolute path containing '..' |
| PASS subfolder1Entry.name is "subfolder1" |
| PASS subfolder1Entry.fullPath is "/testFiles/subfolder1" |
| PASS subfolder1Entry.isDirectory is true |
| * Edge case: calling getDirectory() with absolute path containing too many '..' |
| PASS subfolder1Entry.name is "subfolder1" |
| PASS subfolder1Entry.fullPath is "/testFiles/subfolder1" |
| PASS subfolder1Entry.isDirectory is true |
| * Edge case: calling getDirectory() with empty path |
| PASS testFilesEntry.isFile is false |
| PASS testFilesEntry.isDirectory is true |
| PASS testFilesEntry.name is "testFiles" |
| PASS testFilesEntry.fullPath is "/testFiles" |
| * Edge case: calling getDirectory() with null path |
| PASS testFilesEntry.isFile is false |
| PASS testFilesEntry.isDirectory is true |
| PASS testFilesEntry.name is "testFiles" |
| PASS testFilesEntry.fullPath is "/testFiles" |
| * Edge case: calling getDirectory() with undefined path |
| PASS testFilesEntry.isFile is false |
| PASS testFilesEntry.isDirectory is true |
| PASS testFilesEntry.name is "testFiles" |
| PASS testFilesEntry.fullPath is "/testFiles" |
| * Edge case: calling getDirectory() with path '.' |
| PASS testFilesEntry.isFile is false |
| PASS testFilesEntry.isDirectory is true |
| PASS testFilesEntry.name is "testFiles" |
| PASS testFilesEntry.fullPath is "/testFiles" |
| * Edge case: calling getDirectory() with path starting with 2 slashes |
| PASS testFilesEntry.isFile is false |
| PASS testFilesEntry.isDirectory is true |
| PASS testFilesEntry.name is "subfolder1" |
| PASS testFilesEntry.fullPath is "/testFiles/subfolder1" |
| * Edge case: calling getDirectory() with path starting with 2 slashes and containing 2 following slashes |
| PASS testFilesEntry.isFile is false |
| PASS testFilesEntry.isDirectory is true |
| PASS testFilesEntry.name is "subfolder1" |
| PASS testFilesEntry.fullPath is "/testFiles/subfolder1" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |