commit 8ecbb4c4adee77eac4a151bd7d33ecd4b02d9e5c from: cage date: Sun Jan 30 11:27:00 2022 UTC - [regress-extra] added a test checking what happens when writing empty data on a file. commit - c67485c16831dc170960b5d8ae558e4d708469f8 commit + 8ecbb4c4adee77eac4a151bd7d33ecd4b02d9e5c blob - 150c00f7c113440fa2f50dfb3e90fa2cad46f692 blob + b08bccfbfb296e5d66a2a63c0f90e7531d5cd732 --- regress/lisp/9p-test/kami-tests.lisp +++ regress/lisp/9p-test/kami-tests.lisp @@ -131,7 +131,7 @@ *remote-test-path-contents* (example-slurp *remote-test-path*))) -(defun example-write (path &optional (root "/")) +(defun example-write-data (path data &optional (root "/")) (with-open-ssl-stream (stream socket *host* @@ -142,12 +142,16 @@ (*buffer-size* 256) (root-fid (mount stream root)) (fid (open-path stream root-fid path :mode +create-for-read-write+))) - (9p-write stream fid 0 *remote-test-path-contents*) + (9p-write stream fid 0 data) (read-all-pending-messages stream) t))) + +(defun example-write (path &optional (root "/")) + (example-write-data path *remote-test-path-contents* root)) (deftest test-write ((kami-suite) (test-open-path test-read)) - (assert-true (ignore-errors (example-write *remote-test-path-write*)))) + (assert-true (ignore-errors (example-write *remote-test-path-write*))) + (assert-true (ignore-errors (example-write-data *remote-test-path-write* #())))) (defun example-write-2-3 (path &optional (root "/")) (with-open-ssl-stream (stream