mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-04 11:10:27 +02:00
(port-line): Check not truncated to "int" on 64-bit systems.
This commit is contained in:
parent
5722243989
commit
144e6ab5ca
1 changed files with 12 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
;;;; ports.test --- test suite for Guile I/O ports -*- scheme -*-
|
||||
;;;; Jim Blandy <jimb@red-bean.com> --- May 1999
|
||||
;;;;
|
||||
;;;; Copyright (C) 1999, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1999, 2001, 2004, 2006, 2007 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This program is free software; you can redistribute it and/or modify
|
||||
;;;; it under the terms of the GNU General Public License as published by
|
||||
|
@ -538,6 +538,17 @@
|
|||
(while (not (eof-object? (read-char port))))
|
||||
(= 8 (port-column port))))))
|
||||
|
||||
(with-test-prefix "port-line"
|
||||
|
||||
;; in guile 1.8.1 and earlier port-line was truncated to an int, whereas
|
||||
;; scm_t_port actually holds a long; this restricted the range on 64-bit
|
||||
;; systems
|
||||
(pass-if "set most-positive-fixnum/2"
|
||||
(let ((n (quotient most-positive-fixnum 2))
|
||||
(port (open-output-string)))
|
||||
(set-port-line! port n)
|
||||
(eqv? n (port-line port)))))
|
||||
|
||||
;;;
|
||||
;;; seek
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue