Wrap a parameter/c contract around current-proxy-servers, so it may be used in calls to parameterize. Add test for same.

svn: r7030
This commit is contained in:
Noel Welsh 2007-08-06 13:58:22 +00:00
parent 6793e45228
commit 39d78f3fbf
2 changed files with 6 additions and 2 deletions

View File

@ -49,6 +49,6 @@
(combine-url/relative (url? string? . -> . url?)) (combine-url/relative (url? string? . -> . url?))
(url-exception? (any/c . -> . boolean?)) (url-exception? (any/c . -> . boolean?))
(current-proxy-servers (current-proxy-servers
(case-> ((or/c false/c (listof (list/c string? string? number?))) . -> . void?) (parameter/c (or/c false/c (listof (list/c string? string? number?))))))
(-> (or/c false/c (listof (list/c string? string? number?)))))))) )

View File

@ -44,6 +44,10 @@
(test 'amp-or-semi current-alist-separator-mode) (test 'amp-or-semi current-alist-separator-mode)
(err/rt-test (current-alist-separator-mode 'bad)) (err/rt-test (current-alist-separator-mode 'bad))
;; Test the current-proxy-servers parameter can be set
(parameterize ([current-proxy-servers '(("http" "proxy.com" 3128))])
(test '(("http" "proxy.com" 3128)) current-proxy-servers))
(let ([with-censor (load-relative "censor.ss")]) (let ([with-censor (load-relative "censor.ss")])
(with-censor (with-censor
(lambda () (lambda ()