summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/extmod/vfs_posix.py23
-rw-r--r--tests/extmod/vfs_posix.py.exp4
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/extmod/vfs_posix.py b/tests/extmod/vfs_posix.py
new file mode 100644
index 000000000..3bea99365
--- /dev/null
+++ b/tests/extmod/vfs_posix.py
@@ -0,0 +1,23 @@
+# Test for VfsPosix
+
+try:
+ import uos
+
+ uos.VfsPosix
+except (ImportError, AttributeError):
+ print("SKIP")
+ raise SystemExit
+
+
+# getcwd and chdir
+curdir = uos.getcwd()
+uos.chdir("/")
+print(uos.getcwd())
+uos.chdir(curdir)
+print(uos.getcwd() == curdir)
+
+# stat
+print(type(uos.stat("/")))
+
+# listdir and ilistdir
+print(type(uos.listdir("/")))
diff --git a/tests/extmod/vfs_posix.py.exp b/tests/extmod/vfs_posix.py.exp
new file mode 100644
index 000000000..1b1f59b43
--- /dev/null
+++ b/tests/extmod/vfs_posix.py.exp
@@ -0,0 +1,4 @@
+/
+True
+<class 'tuple'>
+<class 'list'>