Re: First look at revamping regression tests for php3
| From: | Rocky Bernstein | Date: | Thu, 20 Aug 1998 05:07:25 +0000 |
| Subject: | Re: First look at revamping regression tests for php3 | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-341@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf writes:
> > 2. We don't support both POST and GET methods simultaneously. In fact
> > I was not aware that one could do this (let alone know how to program
> > it).
>
> Easy.
>
> <form
> action="http://blah.com/file.php3?a=123&b=456"
> method=POST>
> <input type=hidden name=c value=789>
> </form>
Yep. Easy. Basically all I had to do was remove the bug I had
inadvertently put in. (the bug caused another thing to fail too.)
So basically there was no change.
Here's the test control file for your example above:
--TEST--
Some description
--FILE--
file.php3?a=123&b=456
--POST--
c=789
--EXPECT--
It means probably I should remove the --GET-- line altogether, it is
sort of subsumed by --FILE--.
> > 3. The --EXPECT-- lines do not start out "Content-type: text/html\n"
> > This is currently assumed. Perhaps in the future we will decide
> > that we want to check header information.
>
> Yes, that is one of the main benefits of moving to an http-driven test
> suite. We need to be able to test that certain headers are present. The
> only way to test the SetCookie() function, for example, is to check the
> headers.
Now that you mention, I had meant to mention that in the
limitations/future directions part.
As with testphp, the comparison program used is the Unix "diff". Even
though the "diff" program is settable as an option, this is not really
an ideal platform-independent choice.
The perl program saves the expected output internally in a string in
addition. The thought behind saving the expected output and removing
the "diff" limitation would be to have the program do it's own diff.
And in redoing diff, we could accommodate a more pattern-directed
match and accomodate those things we want to match in the header and
body and those that don't.
For example one might imagine Perl pattern matching strings as the
expected output.
However for now I just took the straightforward simplification of
throwing out the header. Hey, right now I don't even have all the
regression tests converted. Or for that matter am I certain that
this will be the way to proceed.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net