mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
tests: Use 'pass-if-equal' in web-http chunked encoding tests.
* test-suite/tests/web-http.test ("chunked encoding"): Use 'pass-if-equal' where appropriate.
This commit is contained in:
parent
fd17cf9f72
commit
c6d88d1234
1 changed files with 16 additions and 15 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;;; web-uri.test --- URI library -*- mode: scheme; coding: utf-8; -*-
|
;;;; web-uri.test --- URI library -*- mode: scheme; coding: utf-8; -*-
|
||||||
;;;;
|
;;;;
|
||||||
;;;; Copyright (C) 2010, 2011, 2014, 2016 Free Software Foundation, Inc.
|
;;;; Copyright (C) 2010-2011, 2014-2016 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -369,11 +369,12 @@
|
||||||
(with-test-prefix "chunked encoding"
|
(with-test-prefix "chunked encoding"
|
||||||
(let* ((s "5\r\nFirst\r\nA\r\n line\n Sec\r\n8\r\nond line\r\n0\r\n")
|
(let* ((s "5\r\nFirst\r\nA\r\n line\n Sec\r\n8\r\nond line\r\n0\r\n")
|
||||||
(p (make-chunked-input-port (open-input-string s))))
|
(p (make-chunked-input-port (open-input-string s))))
|
||||||
(pass-if (equal? "First line\n Second line"
|
(pass-if-equal
|
||||||
(get-string-all p)))
|
"First line\n Second line"
|
||||||
|
(get-string-all p))
|
||||||
(pass-if (port-eof? (make-chunked-input-port (open-input-string "0\r\n")))))
|
(pass-if (port-eof? (make-chunked-input-port (open-input-string "0\r\n")))))
|
||||||
(pass-if
|
(pass-if-equal
|
||||||
(equal? (call-with-output-string
|
(call-with-output-string
|
||||||
(lambda (out-raw)
|
(lambda (out-raw)
|
||||||
(let ((out-chunked (make-chunked-output-port out-raw
|
(let ((out-chunked (make-chunked-output-port out-raw
|
||||||
#:keep-alive? #t)))
|
#:keep-alive? #t)))
|
||||||
|
@ -383,4 +384,4 @@
|
||||||
(force-output out-chunked)
|
(force-output out-chunked)
|
||||||
(display "Third chunk" out-chunked)
|
(display "Third chunk" out-chunked)
|
||||||
(close-port out-chunked))))
|
(close-port out-chunked))))
|
||||||
"b\r\nFirst chunk\r\nc\r\nSecond chunk\r\nb\r\nThird chunk\r\n0\r\n")))
|
"b\r\nFirst chunk\r\nc\r\nSecond chunk\r\nb\r\nThird chunk\r\n0\r\n"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue