diff options
author | Mark H Weaver <mhw@netris.org> | 2014-01-21 03:57:04 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-01-21 03:57:04 -0500 |
commit | ba578eb04460833c5acb1d8f4c08d2facde15e80 (patch) | |
tree | 9fcecf28c314eb14b35efb2c3c18e47bc0dea859 /test-suite | |
parent | a9eca8f5d1bb2a3aabb80b59c54fc355a00a0382 (diff) | |
parent | 611563fb05c18ca52f780746e9963ca9735e9bac (diff) | |
download | guile-ba578eb04460833c5acb1d8f4c08d2facde15e80.tar.gz |
Merge branch 'stable-2.0'
Conflicts:
libguile/read.c
test-suite/tests/web-response.test
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/coding.test | 10 | ||||
-rw-r--r-- | test-suite/tests/r6rs-ports.test | 9 | ||||
-rw-r--r-- | test-suite/tests/syntax.test | 17 | ||||
-rw-r--r-- | test-suite/tests/web-response.test | 6 |
4 files changed, 36 insertions, 6 deletions
diff --git a/test-suite/tests/coding.test b/test-suite/tests/coding.test index a8a415ff4..b57ef7da7 100644 --- a/test-suite/tests/coding.test +++ b/test-suite/tests/coding.test @@ -1,6 +1,6 @@ ;;;; coding.test --- test suite for coding declarations. -*- mode: scheme -*- ;;;; -;;;; Copyright (C) 2011, 2013 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 @@ -101,4 +101,10 @@ (pass-if-equal "second line, whitespace, nl" "ISO-8859-1" - (scan-coding "\n; coding: iso-8859-1 \n"))) + (scan-coding "\n; coding: iso-8859-1 \n")) + + (pass-if-equal "http://bugs.gnu.org/16463" + ;; On Guile <= 2.0.9, this would return "ISO-8". + "ISO-8859-1" + (scan-coding (string-append (make-string 485 #\space) + "; coding: ISO-8859-1")))) diff --git a/test-suite/tests/r6rs-ports.test b/test-suite/tests/r6rs-ports.test index abd5d6ff9..4bd8a700c 100644 --- a/test-suite/tests/r6rs-ports.test +++ b/test-suite/tests/r6rs-ports.test @@ -411,6 +411,15 @@ (not (or (port-has-port-position? port) (port-has-set-port-position!? port))))) + (pass-if-exception "custom binary input port 'read!' returns too much" + exception:out-of-range + ;; In Guile <= 2.0.9 this would segfault. + (let* ((read! (lambda (bv start count) + (+ count 4242))) + (port (make-custom-binary-input-port "the port" read! + #f #f #f))) + (get-bytevector-all port))) + (pass-if-equal "custom binary input port supports `port-position', \ not `set-port-position!'" 42 diff --git a/test-suite/tests/syntax.test b/test-suite/tests/syntax.test index 4bde635d8..d88e791cc 100644 --- a/test-suite/tests/syntax.test +++ b/test-suite/tests/syntax.test @@ -1,7 +1,7 @@ ;;;; syntax.test --- test suite for Guile's syntactic forms -*- scheme -*- ;;;; ;;;; Copyright (C) 2001, 2003, 2004, 2005, 2006, 2009, 2010, -;;;; 2011, 2012, 2013 Free Software Foundation, Inc. +;;;; 2011, 2012, 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 @@ -1275,7 +1275,20 @@ '((((x y) …) ...) (((x y) ...) …))))))) (define-syntax bar (foo x y z)) - (bar a b c)))) + (bar a b c))) + + ;; This test is given in SRFI-46. + (pass-if-equal "custom ellipsis is handled hygienically" + '((1) 2 (3) (4)) + (let-syntax + ((f (syntax-rules () + ((f ?e) + (let-syntax + ((g (syntax-rules --- () + ((g (??x ?e) (??y ---)) + '((??x) ?e (??y) ---))))) + (g (1 2) (3 4))))))) + (f ---)))) (with-test-prefix "syntax-error" diff --git a/test-suite/tests/web-response.test b/test-suite/tests/web-response.test index 4f88aa67e..3c1894e13 100644 --- a/test-suite/tests/web-response.test +++ b/test-suite/tests/web-response.test @@ -1,6 +1,6 @@ ;;;; web-response.test --- HTTP responses -*- mode: scheme; coding: utf-8; -*- ;;;; -;;;; Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc. +;;;; Copyright (C) 2010, 2011, 2012, 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 @@ -39,7 +39,9 @@ Content-Encoding: gzip\r Content-Length: 36\r Content-Type: text/html; charset=utf-8\r \r -abcdefghijklmnopqrstuvwxyz0123456789") +abcdefghijklmnopqrstuvwxyz0123456789 +-> Here is trailing garbage that should be ignored because it is + beyond Content-Length.") (define example-2 "HTTP/1.1 200 OK\r |