cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: test200

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 5 Aug 2003 09:58:14 +0200 (CEST)

On Mon, 4 Aug 2003, David Byron wrote:

> I'm trying to get the testsuite to pass with the standalone windows version
> of curl I just built.

That's indeed a worthwhile project.

> A little odd I suppose because the testsuite requires cygwin (for
> configure/make/building sws/perl/etc.) but I still want to test my
> standalone version.

I've not specificly written things to require cygwin. I would very much like
the test suite to be possible to run in "pure" windows, but that would
probably take quite a few fixes since I believe I assume a number of unixish
features in there.

> Looking at data/test200, I'm curious about the command. Currently, it is:
>
> <command>
> file://localhost/%PWD/log/test200.txt
> </command>
>
> How come localhost is there? That may be a detail.

It is. That part of the file:// URL is ignored by curl.

> The real issue here is that runtests.pl has a routine called subVariables
> that swaps %PWD for whatever the pwd command spits out. pwd is a cygwin
> program that knows about /cygdrive/c, etc. However, the standalone windows
> version of curl doesn't know how to handle that.

Right, since the script needs to know where it runs to be able to create a
proper URL that finds the test file.

> I can write a patch to runtests.pl to make it call cygpath with -w.

Well, that would make the stand-alone test depend on a specific cygwin tool. I
don't see the benefit with that approach.

> $ ../src/curl file://localhost/c:/src/cobra/curl/tests/log/test200.txt
>
> doesn't work for me.
>
> $ ../src/curl file://c:/src/cobra/curl/tests/log/test200.txt
>
> does work.

Right, having drive letters in file URLs doesn't work in curl. I haven't
really noticed this before... I think it happens because the path is prefixed
with a slash which it shouldn't be in this case. Care to write up a fix for
it?

The reason the second version "works" is that curl completely ignores the
string between the second and third slash in file: URLs. Try writing g: there
instead and it'll run exactly the same!

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-05