From 58e0f15104bb8a8bdb18ca604396269b0c367868 Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 6 Oct 2006 19:00:52 +0000 Subject: update tests to handle strictness change --- ChangeLog | 4 ++++ tests/http.test | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e038e58..49a069e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-10-06 Jeff Hobbs + + * tests/http.test: update tests to handle strictness change. + 2006-10-06 Pat Thoyts * win/rules.vc: bug #1571954: avoid /RTCc flag with MSVC8 diff --git a/tests/http.test b/tests/http.test index 1fca0c4..a1df4ca 100644 --- a/tests/http.test +++ b/tests/http.test @@ -12,7 +12,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.33.2.5 2006/09/15 19:53:33 hobbs Exp $ +# RCS: @(#) $Id: http.test,v 1.33.2.6 2006/10/06 19:00:53 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -137,6 +137,8 @@ set fullurl http://user:pass@[info hostname]:$port/a/b/c set binurl //[info hostname]:$port/binary set posturl //[info hostname]:$port/post set badposturl //[info hostname]:$port/droppost +set badcharurl //%user@[info hostname]:$port/a/^b/c + test http-3.4 {http::geturl} { set token [http::geturl $url] http::data $token @@ -313,23 +315,34 @@ test http-3.18 {http::geturl parse failures} -body { http::geturl http://somewhere:123456789/ } -returnCodes error -result {Invalid port number: 123456789} test http-3.19 {http::geturl parse failures} -body { + set ::http::strict 1 http::geturl http://{user}@somewhere } -returnCodes error -result {Illegal characters in URL user} test http-3.20 {http::geturl parse failures} -body { + set ::http::strict 1 http::geturl http://%user@somewhere } -returnCodes error -result {Illegal encoding character usage "%us" in URL user} test http-3.21 {http::geturl parse failures} -body { + set ::http::strict 1 http::geturl http://somewhere/{path} } -returnCodes error -result {Illegal characters in URL path} test http-3.22 {http::geturl parse failures} -body { + set ::http::strict 1 http::geturl http://somewhere/%path } -returnCodes error -result {Illegal encoding character usage "%pa" in URL path} test http-3.23 {http::geturl parse failures} -body { + set ::http::strict 1 http::geturl http://somewhere/path?{query} } -returnCodes error -result {Illegal characters in URL path} test http-3.24 {http::geturl parse failures} -body { + set ::http::strict 1 http::geturl http://somewhere/path?%query } -returnCodes error -result {Illegal encoding character usage "%qu" in URL path} +test http-3.25 {http::geturl parse failures} -body { + set ::http::strict 0 + set token [http::geturl $badcharurl] + http::cleanup $token +} -returnCodes ok -result {} test http-4.1 {http::Event} { set token [http::geturl $url] -- cgit v0.12