[usocket-cvs] r616 - usocket/branches/0.5.x/test
Chun Tian (binghe)
ctian at common-lisp.net
Wed Mar 30 15:13:37 UTC 2011
Author: ctian
Date: Wed Mar 30 11:13:37 2011
New Revision: 616
Log:
Fixed HTTP 1.0 test cases
Modified:
usocket/branches/0.5.x/test/test-usocket.lisp
Modified: usocket/branches/0.5.x/test/test-usocket.lisp
==============================================================================
--- usocket/branches/0.5.x/test/test-usocket.lisp (original)
+++ usocket/branches/0.5.x/test/test-usocket.lisp Wed Mar 30 11:13:37 2011
@@ -118,13 +118,11 @@
(unwind-protect
(progn
(format (usocket:socket-stream sock)
- "GET / HTTP/1.0~c~c~c~c"
- #\Return #\linefeed #\Return #\linefeed)
+ "GET / HTTP/1.0~2%")
(force-output (usocket:socket-stream sock))
- (read-line (usocket:socket-stream sock)))
+ (subseq (read-line (usocket:socket-stream sock)) 0 15))
(usocket:socket-close sock))))
- #+(or mcl clisp) "HTTP/1.1 200 OK"
- #-(or mcl clisp) #.(format nil "HTTP/1.1 200 OK~A" #\Return) nil)
+ "HTTP/1.1 200 OK")
(deftest socket-name.1
(with-caught-conditions (nil nil)
@@ -188,14 +186,12 @@
(unwind-protect
(progn
(format (usocket:socket-stream sock)
- "GET / HTTP/1.0~c~c~c~c"
- #\Return #\linefeed #\Return #\linefeed)
+ "GET / HTTP/1.0~2%")
(force-output (usocket:socket-stream sock))
(usocket:wait-for-input sock :timeout *wait-for-input-timeout*)
- (read-line (usocket:socket-stream sock)))
+ (subseq (read-line (usocket:socket-stream sock)) 0 15))
(usocket:socket-close sock))))
- #+(or mcl clisp) "HTTP/1.1 200 OK"
- #-(or mcl clisp) #.(format nil "HTTP/1.1 200 OK~A" #\Return) nil)
+ "HTTP/1.1 200 OK")
(defun run-usocket-tests ()
(do-tests))
More information about the usocket-cvs
mailing list