Fix a test

lseek on /dev/zero returns zero on linux
This commit is contained in:
Stas Boukarev 2026-08-04 00:33:34 +03:00
parent bf87e9ab2c
commit 588d0d281a

View file

@ -547,17 +547,17 @@
(assert (equalp x #(0))))))
(with-test (:name :composite-streams-file-position)
(with-open-file (str (or #+win32 "zero" "/dev/zero"))
(with-open-file (str "zero")
(read-char str)
(assert (= (file-position (make-concatenated-stream str))
(file-position str))))
(with-open-file (str (or #+win32 "/dev/null" "/dev/zero") :if-exists :append :direction :output)
(with-open-file (str (or #+win32 "nul" "/dev/null") :if-exists :append :direction :output)
(write-char #\a str)
(assert (= (file-position (make-broadcast-stream str))
(file-position str))))
(with-open-file (i (or #+win32 "zero" "/dev/zero"))
(with-open-file (o (or #+win32 "/dev/null" "/dev/zero") :if-exists :append :direction :output)
(with-open-file (i "zero")
(with-open-file (o (or #+win32 "nul" "/dev/null") :if-exists :append :direction :output)
(assert (null (file-position (make-echo-stream i o))))))
(with-open-file (i (or #+win32 "zero" "/dev/zero"))
(with-open-file (o (or #+win32 "/dev/null" "/dev/zero") :if-exists :append :direction :output)
(with-open-file (i "zero")
(with-open-file (o (or #+win32 "nul" "/dev/null") :if-exists :append :direction :output)
(assert (null (file-position (make-two-way-stream i o)))))))