test backtrace-interrupted-condition-wait works on Darwin/x86-64
[sbcl.git] / tests / stream.impure.lisp
index 0071bcc..a4922cc 100644 (file)
 #-win32
 (require :sb-posix)
 
-#-win32
-(with-test (:name :interrupt-open)
+(with-test (:name :interrupt-open :skipped-on :win32)
   (let ((fifo nil)
         (to 0))
     (unwind-protect
 
 #-win32
 (require :sb-posix)
-#-win32
-(with-test (:name :overeager-character-buffering)
+(with-test (:name :overeager-character-buffering :skipped-on :win32)
   (let ((fifo nil)
         (proc nil))
     (maphash
            (setf fifo nil))))
      sb-impl::*external-formats*)))
 
-(with-test (:name :bug-657183)
+(with-test (:name :bug-657183 :skipped-on '(not :sb-unicode))
+  #+sb-unicode
   (let ((name (merge-pathnames "stream-impure.temp-test"))
         (text '(#\GREEK_SMALL_LETTER_LAMDA
                 #\JAPANESE_BANK_SYMBOL
              (assert (eql (file-length f) 9))))
       (ignore-errors (delete-file name)))))
 
+(with-test (:name :bug-561642)
+  (let ((p "bug-561642-test.tmp"))
+    (unwind-protect
+         (progn
+           (with-open-file (f p
+                              :if-exists :supersede
+                              :if-does-not-exist :create
+                              :direction :output)
+             (write-line "FOOBAR" f))
+           (with-open-file (f p
+                              :if-exists :append
+                              :direction :output)
+             (let ((p0 (file-position f))
+                   (p1 (progn
+                         (write-char #\newline f)
+                         (file-position f)))
+                   (p2 (progn
+                         (write-char #\newline f)
+                         (finish-output f)
+                         (file-position f))))
+               (assert (eql 7 p0))
+               (assert (eql 8 p1))
+               (assert (eql 9 p2)))))
+      (ignore-errors (delete-file p)))))
+
 ;;; success