summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/vfs_lfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod/vfs_lfs.py')
-rw-r--r--tests/extmod/vfs_lfs.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/extmod/vfs_lfs.py b/tests/extmod/vfs_lfs.py
index 1d47605c55..82c8fead5a 100644
--- a/tests/extmod/vfs_lfs.py
+++ b/tests/extmod/vfs_lfs.py
@@ -98,6 +98,8 @@ def test(bdev, vfs_class):
print(list(vfs.ilistdir()))
# getcwd, chdir
+ vfs.mkdir("/testdir2")
+ vfs.mkdir("/testdir/subdir")
print(vfs.getcwd())
vfs.chdir("/testdir")
print(vfs.getcwd())
@@ -111,7 +113,29 @@ def test(bdev, vfs_class):
# chdir back to root and remove testdir
vfs.chdir("/")
print(vfs.getcwd())
+ vfs.chdir("testdir")
+ print(vfs.getcwd())
+ vfs.chdir("..")
+ print(vfs.getcwd())
+ vfs.chdir("testdir/subdir")
+ print(vfs.getcwd())
+ vfs.chdir("../..")
+ print(vfs.getcwd())
+ vfs.chdir("/./testdir2")
+ print(vfs.getcwd())
+ vfs.chdir("../testdir")
+ print(vfs.getcwd())
+ vfs.chdir("../..")
+ print(vfs.getcwd())
+ vfs.chdir(".//testdir")
+ print(vfs.getcwd())
+ vfs.chdir("subdir/./")
+ print(vfs.getcwd())
+ vfs.chdir("/")
+ print(vfs.getcwd())
+ vfs.rmdir("testdir/subdir")
vfs.rmdir("testdir")
+ vfs.rmdir("testdir2")
bdev = RAMBlockDevice(30)