~ chicken-core (master) 6762f24f90fa62f6cdbe8720b6287eaea45dbf91


commit 6762f24f90fa62f6cdbe8720b6287eaea45dbf91
Author:     Mario Domenech Goulart <mario@parenteses.org>
AuthorDate: Mon Sep 7 07:58:30 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Mon Sep 7 11:35:49 2026 +0200

    Add test case for copy-file
    
    Signed-off-by: felix <felix@call-with-current-continuation.org>

diff --git a/tests/runtests.sh b/tests/runtests.sh
index 2edfaa57..5f879ef8 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -440,6 +440,9 @@ $compile posix-tests.scm
 echo "======================================== file access tests ..."
 $interpret -s file-access-tests.scm
 
+echo "======================================== file copy tests ..."
+$interpret -s test-copy-file.scm
+
 echo "======================================== find-files tests ..."
 $interpret -bnq test-find-files.scm
 
diff --git a/tests/test-copy-file.scm b/tests/test-copy-file.scm
new file mode 100644
index 00000000..1062429c
--- /dev/null
+++ b/tests/test-copy-file.scm
@@ -0,0 +1,11 @@
+(import (chicken file)
+        (chicken file posix)
+        (chicken pathname))
+
+(delete-file* "csi.copy")
+(let* ((orig-csi (make-pathname ".." "csi"))
+       (orig-size (file-size orig-csi)))
+  (copy-file orig-csi "csi.copy")
+  (let ((copy-size (file-size "csi.copy")))
+    (delete-file "csi.copy")
+    (assert (= orig-size copy-size))))
Trap