1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 02:00:26 +02:00

Merge remote-tracking branch 'origin/stable-2.0'

Conflicts:
	libguile/ports.c
	libguile/ports.h
	libguile/read.c
	libguile/vm-i-system.c
This commit is contained in:
Andy Wingo 2012-05-08 22:43:04 +02:00
commit a3ded46520
12 changed files with 225 additions and 116 deletions

View file

@ -2,7 +2,7 @@
;;;; Jim Blandy <jimb@red-bean.com> --- May 1999
;;;;
;;;; Copyright (C) 1999, 2001, 2004, 2006, 2007, 2009, 2010,
;;;; 2011 Free Software Foundation, Inc.
;;;; 2011, 2012 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -1064,6 +1064,29 @@
(list read read-char read-line)
'("read" "read-char" "read-line")))
(with-test-prefix "setvbuf"
(pass-if "line/column number preserved"
;; In Guile 2.0.5, `setvbuf' would erroneously decrease the port's
;; line and/or column number.
(call-with-output-file (test-file)
(lambda (p)
(display "This is GNU Guile.\nWelcome." p)))
(call-with-input-file (test-file)
(lambda (p)
(and (eq? #\T (read-char p))
(let ((line (port-line p))
(col (port-column p)))
(and (= line 0) (= col 1)
(begin
(setvbuf p _IOFBF 777)
(let ((line* (port-line p))
(col* (port-column p)))
(and (= line line*)
(= col col*)))))))))))
(delete-file (test-file))
;;; Local Variables:

View file

@ -1,6 +1,6 @@
;;;; texinfo.test -*- scheme -*-
;;;;
;;;; Copyright (C) 2010, 2011 Free Software Foundation, Inc.
;;;; Copyright (C) 2010, 2011, 2012 Free Software Foundation, Inc.
;;;; Copyright (C) 2001,2002 Oleg Kiselyov <oleg at pobox dot com>
;;;;
;;;; This library is free software; you can redistribute it and/or
@ -177,8 +177,9 @@
(test (string-append "foo bar baz\n@settitle " title "\n" str)
expected-res))
(define (test-body str expected-res)
(pass-if (equal? expected-res
(cddr (try-with-title "zog" str)))))
(pass-if str
(equal? expected-res
(cddr (try-with-title "zog" str)))))
(define (list-intersperse src-l elem)
(if (null? src-l) src-l
@ -218,6 +219,19 @@
'((para (code "abc " (code)))))
(test-body "@code{ arg }"
'((para (code "arg"))))
(test-body "@acronym{GNU}"
'((para (acronym (% (acronym "GNU"))))))
(test-body "@acronym{GNU, not unix}"
'((para (acronym (% (acronym "GNU")
(meaning "not unix"))))))
(test-body "@acronym{GNU, @acronym{GNU}'s Not Unix}"
'((para (acronym (% (acronym "GNU")
(meaning (acronym (% (acronym "GNU")))
"'s Not Unix"))))))
(test-body "@example\n foo asdf asd sadf asd \n@end example\n"
'((example " foo asdf asd sadf asd ")))
(test-body (join-lines