[Pharo-dev] Failing Pharo 2.0 test case (new)

Stéphane Ducasse stephane.ducasse at inria.fr
Wed Aug 21 14:16:23 EDT 2013


thanks richard.
I will forawrd your mail to the pharo mailing-list.
 
Stef

On Aug 21, 2013, at 6:34 PM, Richard Sargent <richard.sargent at gemtalksystems.com> wrote:

> Hi Stephane,
> 
> I was looking at some of the Pharo code and discovered a gap in the logic. (But is is perhaps a gap in my understanding of the underlying specification.) The same error may well be found in 3.0 (I have not checked).
> 
> Try the following.
> 
> UrlTest>>#testUsernameEncodedWithoutPassword2
>     "Sometimes, weird usernames or passwords are necessary in applications, and, thus, we might receive them in a Url. The @ and the : are the kind of critical ones."
> 
>     #(      "('user' 'pword' 'host' port 'path')"
>     ('Stéphane rst Pückler' '' 'cottbus.brandenburg' 80 'mein/Zuhause')
>     ('Jeannde.d''Arc' '' 'orleans' 8080 'une/deux/trois')
>     ('HaXor at roxor:fnac' '' 'cbase' 42 'do/not_try')
>     ) do: [:urlParts | |theUrl|
>             theUrl := ('http://{1}@{3}:{4}/{5}' format: {
>                 (urlParts at: 1) encodeForHTTP. 
>                 (urlParts at: 2) encodeForHTTP.
>                 urlParts at: 3. urlParts at: 4. urlParts at: 5.
>             }) asUrl.
>         self assert: (theUrl schemeName = 'http').
>         self assert: (theUrl username = (urlParts at: 1)).
>         self assert: (theUrl password = (urlParts at: 2)).
>         self assert: (theUrl authority = (urlParts at: 3)).
>         self assert: (theUrl port = (urlParts at: 4)).
>         self assert: theUrl path first = ((urlParts at: 5) copyUpTo: $/ )]
> 
> -- 
> Richard Sargent
> Business Development Manager
> richard.sargent at gemtalksystems.com	GemTalk Systems
> 15220 NW Greenbrier Parkway #240
> Beaverton, OR 97006

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130821/de291af2/attachment-0002.html>


More information about the Pharo-dev mailing list