X-Git-Url: http://git.kpe.io/?p=puri.git;a=blobdiff_plain;f=tests.lisp;h=03449227920c8dc5b69973e5a17ea051a3aff4ea;hp=77d19612ad56fb7af08b630a51503ad1c5712adb;hb=7960648a3b7cff1d4f0ea2b2a5569e910c95bf91;hpb=1c768744300916893c359ccf18cfe2dbb55b3978 diff --git a/tests.lisp b/tests.lisp index 77d1961..0344922 100644 --- a/tests.lisp +++ b/tests.lisp @@ -408,15 +408,17 @@ :condition-type 'uri-parse-error) res) - - ;;an escaped newline isn't rendered properly - (push - `(let ((weird-uri "https://example.com/q?foo%0abar%20baz")) - (test - weird-uri - (puri:render-uri (puri:parse-uri weird-uri) nil) - :test #'string=) - ) 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))))