From 3385eeb32ff2a8522071e2da7361a004724b489c Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Fri, 30 Oct 2015 13:49:59 -0400 Subject: [PATCH] error from Jon Stenerson --- net-test/tests/net/pr/pr1.rkt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 net-test/tests/net/pr/pr1.rkt diff --git a/net-test/tests/net/pr/pr1.rkt b/net-test/tests/net/pr/pr1.rkt new file mode 100644 index 0000000000..40bca7595f --- /dev/null +++ b/net-test/tests/net/pr/pr1.rkt @@ -0,0 +1,19 @@ +#lang racket/base +(require racket/port + racket/list + net/url) +(module+ test + (require rackunit) + (define url-no-slash + "http://www.racket-lang.org") + (define (test u) + (define r + (first + (port->lines + (head-impure-port + (string->url u))))) + (printf "~v => ~v\n" u r) + r) + (define no-slash-result (test url-no-slash)) + (define slash-result (test (format "~a/" url-no-slash))) + (check-equal? no-slash-result slash-result))