tools/mpremote/tests: Add test for RemoteFile.readline.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2025-02-26 17:12:45 +11:00
parent 86526e9c2b
commit 71c7c03e41
2 changed files with 7 additions and 0 deletions

View file

@ -26,3 +26,7 @@ $MPREMOTE mount ${TMP} exec "import mount_package; mount_package.x(); mount_pack
echo -----
$MPREMOTE mount ${TMP} exec "open('test.txt', 'w').write('hello world\n')"
cat "${TMP}/test.txt"
# Test RemoteFile.readline and RemoteFile.readlines methods.
echo -----
$MPREMOTE mount ${TMP} exec "print(open('test.txt').readlines())"

View file

@ -5,3 +5,6 @@ Local directory ${TMP} is mounted at /remote
-----
Local directory ${TMP} is mounted at /remote
hello world
-----
['hello world\n']
Local directory ${TMP} is mounted at /remote