diff --git a/test-suite/tests/ports.test b/test-suite/tests/ports.test index 9690122b5..2d25f420a 100644 --- a/test-suite/tests/ports.test +++ b/test-suite/tests/ports.test @@ -1,7 +1,7 @@ ;;;; ports.test --- test suite for Guile I/O ports -*- scheme -*- ;;;; Jim Blandy --- 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 ;;;