tests/extmod/vfs_fat: Add test for ilistdir of a non-existent directory.

This commit is contained in:
Damien George 2017-05-13 19:10:15 +10:00
parent f95e4e7782
commit cda09727b4
2 changed files with 7 additions and 0 deletions

View File

@ -93,3 +93,9 @@ uos.umount(vfs)
vfs = uos.VfsFat(bdev)
print(list(vfs.ilistdir(b"")))
# list a non-existent directory
try:
vfs.ilistdir(b"no_exist")
except OSError as e:
print('ENOENT:', e.args[0] == uerrno.ENOENT)

View File

@ -13,3 +13,4 @@ getcwd: /foo_dir
True
getcwd: /
[(b'foo_file.txt', 32768, 0), (b'foo_dir', 16384, 0)]
ENOENT: True