Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
1b3e3724
Commit
1b3e3724
authored
Mar 10, 2017
by
Damien George
Browse files
tests/extmod: Add some more VFS tests.
parent
6c8b57a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/extmod/vfs_basic.py
View file @
1b3e3724
...
...
@@ -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'
)
tests/extmod/vfs_basic.py.exp
View file @
1b3e3724
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment