| Basic test coverage for fileSystemDirectoryEntry.getFile() |
| |
| 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: getFile('file1.txt') |
| PASS file1Entry.name is "file1.txt" |
| PASS file1Entry.fullPath is "/testFiles/file1.txt" |
| PASS file1Entry.isFile is true |
| * Error case: calling getFile() with path to folder |
| PASS ex.name is "TypeMismatchError" |
| * Error case: calling getFile() with path containing backslash |
| PASS ex.name is "TypeMismatchError" |
| * Error case: calling getFile() with path which does not exist |
| PASS ex.name is "NotFoundError" |
| * Error case: calling getFile() with path containing a NUL character |
| PASS ex.name is "TypeMismatchError" |
| * Error case: calling getFile() with path to root |
| PASS ex.name is "TypeMismatchError" |
| * Regular case: calling getFile() with absolute path |
| PASS file3Entry.name is "file3.txt" |
| PASS file3Entry.fullPath is "/testFiles/subfolder1/file3.txt" |
| PASS file3Entry.isFile is true |
| * Edge case: calling getFile() with relative path containing '.' and '..' |
| PASS file3Entry.name is "file3.txt" |
| PASS file3Entry.fullPath is "/testFiles/subfolder1/file3.txt" |
| PASS file3Entry.isFile is true |
| * Edge case: calling getFile() with relative path containing too many '..' |
| PASS file1Entry.name is "file1.txt" |
| PASS file1Entry.fullPath is "/testFiles/file1.txt" |
| PASS file1Entry.isFile is true |
| * Edge case: calling getFile() with absolute path containing '..' |
| PASS file1Entry.name is "file1.txt" |
| PASS file1Entry.fullPath is "/testFiles/file1.txt" |
| PASS file1Entry.isFile is true |
| * Edge case: calling getFile() with absolute path containing too many '..' |
| PASS file1Entry.name is "file1.txt" |
| PASS file1Entry.fullPath is "/testFiles/file1.txt" |
| PASS file1Entry.isFile is true |
| * Error case: calling getFile() with empty path |
| PASS ex.name is "TypeMismatchError" |
| * Edge case: calling getFile() with absolute path starting with 2 slashes |
| PASS file1Entry.name is "file1.txt" |
| PASS file1Entry.fullPath is "/testFiles/file1.txt" |
| PASS file1Entry.isFile is true |
| * Edge case: calling getFile() with absolute path starting with 2 slashes and containing 2 following slashes |
| PASS file1Entry.name is "file1.txt" |
| PASS file1Entry.fullPath is "/testFiles/file1.txt" |
| PASS file1Entry.isFile is true |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |