diff options
author | Andy Wingo <wingo@pobox.com> | 2021-03-12 22:06:56 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2021-03-12 22:08:16 +0100 |
commit | e30ee9047845751615ca6726e22b67aa9b38e187 (patch) | |
tree | 29a997fb7f97a7fae49a08b634e74a6ab2fac87a /test-suite | |
parent | 1c472fef54d1f9a632ec8f91ea6d00ccf55a026a (diff) | |
download | guile-e30ee9047845751615ca6726e22b67aa9b38e187.tar.gz |
Revert "Handle CRLF and Unicode line endings in read-line"
This reverts commit 0f983e3db0c43ad7c89f57ea84f792ede373ba0c.
After discussing with Mike we are going to punt the read-line changes
for now. Open the port in O_TEXT mode if you want to chomp the CR in
CFLF sequences.
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/rdelim.test | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/test-suite/tests/rdelim.test b/test-suite/tests/rdelim.test index 1060d5c17..3aaa0b253 100644 --- a/test-suite/tests/rdelim.test +++ b/test-suite/tests/rdelim.test @@ -1,7 +1,7 @@ ;;;; rdelim.test --- Delimited I/O. -*- mode: scheme; coding: utf-8; -*- ;;;; Ludovic Courtès <ludo@gnu.org> ;;;; -;;;; Copyright (C) 2011, 2013, 2014, 2021 Free Software Foundation, Inc. +;;;; Copyright (C) 2011, 2013, 2014 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 @@ -62,46 +62,6 @@ (read-line p 'split))) (eof-object? (read-line p))))) - (pass-if "two lines, split, CRLF" - (let* ((s "foo\r\nbar\r\n") - (p (open-input-string s))) - (and (equal? '(("foo" . "\r\n") - ("bar" . "\r\n")) - (list (read-line p 'split) - (read-line p 'split))) - (eof-object? (read-line p))))) - - (pass-if "two long lines, split, CRLF" - ;; Must be longer than 256 codepoints - (let* ((text0 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") - (text1 (string-append text0 text0 text0 text0 text0)) - (text2 (string-append text1 "\r\n" text1 "\r\n"))) - (let* ((s text2) - (p (open-input-string s))) - (and (equal? `((,text1 . "\r\n") - (,text1 . "\r\n")) - (list (read-line p 'split) - (read-line p 'split))) - (eof-object? (read-line p)))))) - - (pass-if "two lines, split, LS" - (let* ((s "foo\u2028bar\u2028") - (p (open-input-string s))) - (and (equal? '(("foo" . #\x2028) - ("bar" . #\x2028)) - (list (read-line p 'split) - (read-line p 'split))) - (eof-object? (read-line p))))) - - (pass-if "two lines, split, PS" - (let* ((s "foo\u2029bar\u2029") - (p (open-input-string s))) - (and (equal? '(("foo" . #\x2029) - ("bar" . #\x2029)) - (list (read-line p 'split) - (read-line p 'split))) - (eof-object? (read-line p))))) - (pass-if "two Greek lines, trim" (let* ((s "λαμβδα\nμυ\n") (p (open-input-string s))) |