(in-package #:scgi-routes/tests) (5am:def-suite* scgi-routes-tests) (5am:test test1 (5am:finishes (routes:define-route index (:path (p1 p2 "index.cgi") :method :get :query (q1 (q2 :init-form "2") (q3 :name "named") (q4 :name "all" :init-form "4" :suppliedp q4p) (q5 :suppliedp q5p)) :fragment f :content-type "text/plain") (list p1 p2 q1 q2 q3 q4 q4p q5 q5p f))) (5am:is (equal (let (ret (uri "http://localhost:8080/foo/blah/index.cgi?b=1&c=2&q5")) (with-output-to-string (*standard-output*) (setf ret (test-route :get uri))) ret) (list "foo" "blah" nil "2" nil "4" t nil t nil))))