summaryrefslogtreecommitdiffstatshomepage
path: root/tools
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-11-06 12:44:50 +1100
committerDamien George <damien@micropython.org>2024-11-18 23:27:13 +1100
commit159b54b7da404bc9a8d60d8c989e33e11412e548 (patch)
treeea6d9c03ba040700f6447a53c3c469e312a308bf /tools
parentc1a85bb6debb6f20a19d8699f2a009fadd4ed9d2 (diff)
downloadmicropython-159b54b7da404bc9a8d60d8c989e33e11412e548.tar.gz
micropython-159b54b7da404bc9a8d60d8c989e33e11412e548.zip
tools/mpremote: Add test for forced copy.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mpremote/tests/test_filesystem.sh5
-rw-r--r--tools/mpremote/tests/test_filesystem.sh.exp4
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/mpremote/tests/test_filesystem.sh b/tools/mpremote/tests/test_filesystem.sh
index b6d5a7febc..727efea90e 100755
--- a/tools/mpremote/tests/test_filesystem.sh
+++ b/tools/mpremote/tests/test_filesystem.sh
@@ -66,6 +66,11 @@ $MPREMOTE resume cp "${TMP}/a.py" :aaa
$MPREMOTE resume cp "${TMP}/a.py" :bbb/b.py
$MPREMOTE resume cat :aaa/a.py bbb/b.py
+# Test cp -f (force copy).
+echo -----
+$MPREMOTE resume cp -f "${TMP}/a.py" :aaa
+$MPREMOTE resume cat :aaa/a.py
+
echo -----
$MPREMOTE resume rm :b.py c.py
$MPREMOTE resume ls
diff --git a/tools/mpremote/tests/test_filesystem.sh.exp b/tools/mpremote/tests/test_filesystem.sh.exp
index 7220dc41e4..b252bc7eb0 100644
--- a/tools/mpremote/tests/test_filesystem.sh.exp
+++ b/tools/mpremote/tests/test_filesystem.sh.exp
@@ -38,6 +38,10 @@ print("World")
print("Hello")
print("World")
-----
+cp ${TMP}/a.py :aaa
+print("Hello")
+print("World")
+-----
rm :b.py
rm :c.py
ls :