guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-41-g0d77e


From: Eli Zaretskii
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-41-g0d77e06
Date: Wed, 02 Jul 2014 15:29:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=0d77e062dc70ed10cfcedf1e6080287f8be20b1b

The branch, stable-2.0 has been updated
       via  0d77e062dc70ed10cfcedf1e6080287f8be20b1b (commit)
      from  c7161ee334c20a81cb50512b2d6ae0aebf34ede9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0d77e062dc70ed10cfcedf1e6080287f8be20b1b
Author: Eli Zaretskii <address@hidden>
Date:   Wed Jul 2 18:28:06 2014 +0300

        Fix deletion of ports.test test file on MS-Windows.
    
        * test-suite/tests/ports.test ("fdes->port", "seek")
        ("truncate-file"): Close every file and port we open, to avoid
        failure to delete the test file on MS-Windows when the test is
        completed.

-----------------------------------------------------------------------

Summary of changes:
 test-suite/tests/ports.test |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test
index d87257e..e7acd63 100644
--- a/test-suite/tests/ports.test
+++ b/test-suite/tests/ports.test
@@ -1270,9 +1270,10 @@
 (with-test-prefix
  "fdes->port"
  (pass-if "fdes->ports finds port"
-         (let ((port (open-file (test-file) "w")))
-
-           (not (not (memq port (fdes->ports (port->fdes port))))))))
+         (let* ((port (open-file (test-file) "w"))
+                (res (not (not (memq port (fdes->ports (port->fdes port)))))))
+           (close-port port)
+           res)))
 
 ;;;
 ;;; seek
@@ -1289,7 +1290,9 @@
       (let ((port (open-file (test-file) "r")))
        (read-char port)
        (seek port 2 SEEK_CUR)
-       (eqv? #\d (read-char port))))
+       (let ((res (eqv? #\d (read-char port))))
+         (close-port port)
+         res)))
 
     (pass-if "SEEK_SET"
       (call-with-output-file (test-file)
@@ -1298,7 +1301,9 @@
       (let ((port (open-file (test-file) "r")))
        (read-char port)
        (seek port 3 SEEK_SET)
-       (eqv? #\d (read-char port))))
+       (let ((res (eqv? #\d (read-char port))))
+         (close-port port)
+         res)))
 
     (pass-if "SEEK_END"
       (call-with-output-file (test-file)
@@ -1307,7 +1312,9 @@
       (let ((port (open-file (test-file) "r")))
        (read-char port)
        (seek port -2 SEEK_END)
-       (eqv? #\d (read-char port))))))
+       (let ((res (eqv? #\d (read-char port))))
+         (close-port port)
+         res)))))
 
 ;;;
 ;;; truncate-file
@@ -1370,7 +1377,8 @@
        (lambda (port)
          (display "hello" port)))
       (let ((port (open-file (test-file) "r+")))
-       (truncate-file port 1))
+       (truncate-file port 1)
+       (close-port port))
       (eqv? 1 (stat:size (stat (test-file)))))
 
     (pass-if "shorten to current pos"
@@ -1379,7 +1387,8 @@
          (display "hello" port)))
       (let ((port (open-file (test-file) "r+")))
        (read-char port)
-       (truncate-file port))
+       (truncate-file port)
+       (close-port port))
       (eqv? 1 (stat:size (stat (test-file)))))))
 
 


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]