File tree 8 files changed +48
-5
lines changed
8 files changed +48
-5
lines changed Original file line number Diff line number Diff line change 1
1
c-src /* .o
2
2
c-src /* .so
3
3
/main
4
+ /coverage /
Original file line number Diff line number Diff line change 1
1
BORINGSSL_COMMIT =251b5169fd44345f455438312ec4e18ae07fd58c
2
+ LISP ?= sbcl
3
+ sbcl_TEST_OPTS =--noinform --disable-debugger --quit --load ./run-tests.lisp
2
4
3
5
.PHONY : lsquic build test
4
6
@@ -25,3 +27,6 @@ src/ffi-dns.lisp: dns.i Makefile c-src/libdns.so
25
27
26
28
src/ffi-udp.lisp : udp.i Makefile c-src/libudp.so
27
29
swig -cffi -module ffi -outdir src/udp -I./c-src udp.i
30
+
31
+ test :
32
+ @$(LISP ) $($(LISP ) _TEST_OPTS)
Original file line number Diff line number Diff line change
1
+ (in-package # :cl-user)
2
+
3
+ (defmacro with-silence (&body body)
4
+ ` (let ((*standard-output* (make-broadcast-stream ))
5
+ (*error-output* (make-broadcast-stream ))
6
+ (*trace-output* (make-broadcast-stream )))
7
+ ,@ body))
8
+
9
+ (with-silence
10
+ (ql :quickload :fiveam ))
11
+
12
+ (asdf :test-system :http3/test )
Original file line number Diff line number Diff line change 13
13
:static-vectors
14
14
:weird-pointers
15
15
:usocket ))
16
+
17
+ (defsystem :http3/test
18
+ :version " 0.0.1"
19
+ :description " HTTP3 Client tests"
20
+ :licence " WTFPL"
21
+ :components ((:module " test"
22
+ :components
23
+ ((:file " tests" ))))
24
+ :depends-on (:http3 :fiveam )
25
+ :perform (test-op :after (o s)
26
+ (fiveam :run! :http3 )))
Original file line number Diff line number Diff line change
1
+ (defpackage #:http3/test
2
+ (:use :cl :http3 :fiveam ))
3
+
4
+ (in-package # :http3/test)
5
+ (def-suite :http3 )
6
+ (in-suite :http3 )
7
+
8
+ (test can-create-request
9
+ (let ((request (make-instance ' lsquic:request :authority " google.com" )))
10
+ (is (lsquic :lsxpack-headers request))))
Original file line number Diff line number Diff line change 68
68
(let ((client (weird-pointers :restore peer-ctx)))
69
69
(let ((count (udp :send-packets-out dest-sa iov iovlen (sb-bsd-sockets :socket-file-descriptor (socket (socket client))))))
70
70
(when (< count 0 )
71
- (error )))
71
+ (error " short write " )))
72
72
(incf n)
73
73
(cffi :incf-pointer specs)))))
74
74
(if (> n 0 )
Original file line number Diff line number Diff line change 3
3
(:export
4
4
# :engine
5
5
6
+ # :request
7
+ # :header
8
+ # :lsxpack-headers
9
+
6
10
# :set-context
7
11
# :process-conns
8
12
# :packets-in
Original file line number Diff line number Diff line change 6
6
(value :initarg :value :accessor value)))
7
7
8
8
(defclass request ()
9
- ((path :initarg :path :accessor path)
10
- (scheme :initarg :scheme :accessor scheme)
11
- (headers :initarg :headers :accessor headers)
9
+ ((path :initarg :path :initform " / " : accessor path)
10
+ (scheme :initarg :scheme :initform " https " : accessor scheme)
11
+ (headers :initarg :headers :initform nil : accessor headers)
12
12
(authority :initarg :authority :accessor authority)
13
- (verb :initarg :verb :accessor verb)
13
+ (verb :initarg :verb :initform " GET " : accessor verb)
14
14
(body :initarg :body :accessor body)))
15
15
16
16
(defmethod make-lsxpack-header ((header header))
You can’t perform that action at this time.
0 commit comments