Am Dienstag, 5. März 2013 schrieb Darshit Shah:
> Need some help with writing a test for this functionality.
> I have implemented a --method=HHTPMethod command that currently supports
> DELETE only.
> 
> I would be very grateful if someone can help me with writing a test to
> ensure that this is working correctly.
> Attaching the patch file that adds this functionality.

I am not shure, that a test for --method is needed.
Do you want to see Wget generate a DELETE request if you use --method=DELETE ? 
Just use -d ;-)

But to answer your request: You have to make HTTPServer.pm accept and answer 
DELETE requests (and POST would be nice then, too). Make a copy of a .px test 
and change the options of the wget command.

[just something personal]
I just did that for POST, but I can't see any benefit to add such a test.
And perl *really* sucks to me (but hey, i am a C and Java programmer).
It took me 45 minutes to understand the perl syntax + the existing test 
environment code... that is far too much for such a simple test environment. 
In fact, after that, the actual code change took me 3 minutes. 
But I know, I forget all about perl within hours or at least days... perl is 
"hack and forget" and a waste of time (to me, not to everyone).
I would prefer a C test environment for a C project, having tests written in 
C.

Regards, Tim

Reply via email to