Commit 1b3e3724 authored by Damien George's avatar Damien George
Browse files

tests/extmod: Add some more VFS tests.

parent 6c8b57a9
......@@ -109,3 +109,23 @@ try:
uos.umount('/test_mnt')
except OSError:
print('OSError')
# root dir
uos.mount(Filesystem(3), '/')
print(uos.listdir())
open('test')
uos.mount(Filesystem(4), '/mnt')
print(uos.listdir())
print(uos.listdir('/mnt'))
uos.chdir('/mnt')
print(uos.listdir())
# chdir to a subdir within root-mounted vfs, and then listdir
uos.chdir('/subdir')
print(uos.listdir())
uos.chdir('/')
uos.umount('/')
print(uos.listdir('/'))
uos.umount('/mnt')
......@@ -32,3 +32,22 @@ OSError
1 umount
2 umount
OSError
3 mount False False
3 listdir /
['a3']
3 open test r
4 mount False False
3 listdir /
['mnt', 'a3']
4 listdir /
['a4']
4 chdir /
4 listdir
['a4']
3 chdir /subdir
3 listdir
['a3']
3 chdir /
3 umount
['mnt']
4 umount
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment