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

Remove trailing whitespace from ports.test.

This commit is contained in:
Eli Zaretskii 2014-07-03 21:05:49 +03:00
parent 8c6b62e7d5
commit c53b5d891f

View file

@ -106,7 +106,7 @@
(equal? string in-string))) (equal? string in-string)))
(close-port port)) (close-port port))
(delete-file filename)) (delete-file filename))
;;; Write out a string, and read it back a character at a time. ;;; Write out a string, and read it back a character at a time.
(let ((string "This is a test string\nwith no newline at the end") (let ((string "This is a test string\nwith no newline at the end")
(filename (test-file))) (filename (test-file)))
@ -663,10 +663,10 @@
(newline port))))) (newline port)))))
(pass-if "display text" (pass-if "display text"
(equal? in-string (string-append string "\n")))) (equal? in-string (string-append string "\n"))))
;; Write an s-expression to a string port. ;; Write an s-expression to a string port.
(let* ((sexpr '("more utterly random text" 1729 #(a vector) 3.1415926)) (let* ((sexpr '("more utterly random text" 1729 #(a vector) 3.1415926))
(in-sexpr (in-sexpr
(call-with-input-string (call-with-output-string (call-with-input-string (call-with-output-string
(lambda (port) (lambda (port)
(write sexpr port))) (write sexpr port)))
@ -996,7 +996,7 @@
;; Return a list of input ports that all return the same text. ;; Return a list of input ports that all return the same text.
;; We map tests over this list. ;; We map tests over this list.
(define (input-port-list text) (define (input-port-list text)
;; Create a text file some of the ports will use. ;; Create a text file some of the ports will use.
(let ((out-port (open-output-file port-loop-temp))) (let ((out-port (open-output-file port-loop-temp)))
(display text out-port) (display text out-port)
@ -1396,10 +1396,10 @@
(with-test-prefix "read-delimited!" (with-test-prefix "read-delimited!"
(let ((c (make-string 20 #\!))) (let ((c (make-string 20 #\!)))
(call-with-input-string (call-with-input-string
"defdef\nghighi\n" "defdef\nghighi\n"
(lambda (port) (lambda (port)
(read-delimited! "\n" c port 'concat) (read-delimited! "\n" c port 'concat)
(pass-if "read-delimited! reads a first line" (pass-if "read-delimited! reads a first line"
(string=? c "defdef\n!!!!!!!!!!!!!")) (string=? c "defdef\n!!!!!!!!!!!!!"))