diff options
| author | Damien George <damien@micropython.org> | 2025-02-26 17:12:45 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-02-28 14:14:58 +1100 |
| commit | 71c7c03e411121b0193590bb683961e83c787ab1 (patch) | |
| tree | 06910befd7d958f58062514637faabf5e295cf2d | |
| parent | 86526e9c2b5fcde2ecdee3817cc002920078b07b (diff) | |
tools/mpremote/tests: Add test for RemoteFile.readline.
Signed-off-by: Damien George <damien@micropython.org>
| -rwxr-xr-x | tools/mpremote/tests/test_mount.sh | 4 | ||||
| -rw-r--r-- | tools/mpremote/tests/test_mount.sh.exp | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/mpremote/tests/test_mount.sh b/tools/mpremote/tests/test_mount.sh index 9eab0b0d6..724ae1417 100755 --- a/tools/mpremote/tests/test_mount.sh +++ b/tools/mpremote/tests/test_mount.sh @@ -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())" diff --git a/tools/mpremote/tests/test_mount.sh.exp b/tools/mpremote/tests/test_mount.sh.exp index 560f5e4f1..616cb75bc 100644 --- a/tools/mpremote/tests/test_mount.sh.exp +++ b/tools/mpremote/tests/test_mount.sh.exp @@ -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 |
