[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: tests: Use 'pass-if-equal' in web-http chunked en
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 01/02: tests: Use 'pass-if-equal' in web-http chunked encoding tests. |
Date: |
Sun, 01 Mar 2015 22:43:50 +0000 |
civodul pushed a commit to branch stable-2.0
in repository guile.
commit d0d64e6bbf35464049ab08c3d52f5cb5a9322cc7
Author: Ludovic Courtès <address@hidden>
Date: Sun Mar 1 22:46:55 2015 +0100
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.
---
test-suite/tests/web-http.test | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/test-suite/tests/web-http.test b/test-suite/tests/web-http.test
index 45cce02..7bba9ec 100644
--- a/test-suite/tests/web-http.test
+++ b/test-suite/tests/web-http.test
@@ -1,6 +1,6 @@
;;;; web-uri.test --- URI library -*- mode: scheme; coding: utf-8; -*-
;;;;
-;;;; Copyright (C) 2010, 2011, 2014 Free Software Foundation, Inc.
+;;;; Copyright (C) 2010, 2011, 2014, 2015 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
@@ -360,18 +360,19 @@
(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")
(p (make-chunked-input-port (open-input-string s))))
- (pass-if (equal? "First line\n Second line"
- (get-string-all p)))
+ (pass-if-equal
+ "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
- (equal? (call-with-output-string
- (lambda (out-raw)
- (let ((out-chunked (make-chunked-output-port out-raw
- #:keep-alive?
#t)))
- (display "First chunk" out-chunked)
- (force-output out-chunked)
- (display "Second chunk" out-chunked)
- (force-output out-chunked)
- (display "Third chunk" out-chunked)
- (close-port out-chunked))))
- "b\r\nFirst chunk\r\nc\r\nSecond chunk\r\nb\r\nThird
chunk\r\n0\r\n")))
+ (pass-if-equal
+ (call-with-output-string
+ (lambda (out-raw)
+ (let ((out-chunked (make-chunked-output-port out-raw
+ #:keep-alive? #t)))
+ (display "First chunk" out-chunked)
+ (force-output out-chunked)
+ (display "Second chunk" out-chunked)
+ (force-output out-chunked)
+ (display "Third chunk" out-chunked)
+ (close-port out-chunked))))
+ "b\r\nFirst chunk\r\nc\r\nSecond chunk\r\nb\r\nThird chunk\r\n0\r\n"))