X-Git-Url: http://git.kpe.io/?p=puri.git;a=blobdiff_plain;f=tests.lisp;h=4d77fff230797216df5a8a73c2acd7db8393b4ee;hp=b5cbe37e8132ddff3ae926c89c226e0d384811de;hb=HEAD;hpb=feebbfdc402097d14c9a4cd27bf1a7a12120f7c9 diff --git a/tests.lisp b/tests.lisp index b5cbe37..4d77fff 100644 --- a/tests.lisp +++ b/tests.lisp @@ -23,8 +23,8 @@ ;; $Id$ -(defpackage #:puri-tests (:use #:puri #:cl #:ptester)) -(in-package #:puri-tests) +(defpackage #:puri/test (:use #:puri #:cl #:ptester)) +(in-package #:puri/test) (unintern-uri t) @@ -408,6 +408,18 @@ :condition-type 'uri-parse-error) res) + ;;; tests for weird control characters + ;; http://www.ietf.org/rfc/rfc2396.txt 2.4.3 + (dolist (x '("https://example.com/q?foo%0abar%20baz" ;;an escaped newline + "https://example.com/q?%7f" ;; 7f, 127 + )) + (push + `(let ((weird-uri ,x)) + (test weird-uri + (puri:render-uri (puri:parse-uri weird-uri) nil) + :test #'string=) + ) res)) + `(progn ,@(nreverse res)))) (defun do-tests () @@ -415,5 +427,3 @@ (with-tests (:name "puri") (gen-test-forms))) t) - -