List Info

Thread: cvs: pear /MDB2/tests MDB2_usage_testcase.php




cvs: pear /MDB2/tests MDB2_usage_testcase.php
user name
2006-08-20 18:14:10
Hi Lukas:

On Sun, Aug 20, 2006 at 08:06:14PM +0200, Lukas Kahwe Smith
wrote:
> 
> Not sure I understand what you are saying.
...
> RDBMS xyz does not automatically RTRIM data coming from
a CHAR field.

I'm proposing (additional ?) tests that run under 
MDB2_PORTABILITY_NONE.  The test would be something like
this for the 
test you used above:

switch
   mysql:
      $expected = 'some string';
   mssql:
      $expected = 'some string      ';

if ($actual == $expected)
   echo great
else
   echo oops


My proposal is in response to what I thought your initial
question was 
in this thread.  Perhaps I misunderstood.  If so, tests like
this 
might be a good thing anyway.  All that aside, this is just
a 
suggestion.

Thanks very much for your hard work on MDB2.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M
P A N Y
            data intensive web and database programming
                http://www.Analy
sisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f:
718-854-0409

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

cvs: pear /MDB2/tests MDB2_usage_testcase.php
user name
2006-08-20 18:46:24
Daniel Convissor wrote:

> Hi Lukas:
> 
> On Sun, Aug 20, 2006 at 08:06:14PM +0200, Lukas Kahwe
Smith wrote:
>> Not sure I understand what you are saying.
> ...
>> RDBMS xyz does not automatically RTRIM data coming
from a CHAR field.
> 
> I'm proposing (additional ?) tests that run under 
> MDB2_PORTABILITY_NONE.  The test would be something
like this for the 
> test you used above:
> 
> switch
>    mysql:
>       $expected = 'some string';
>    mssql:
>       $expected = 'some string      ';
> 
> if ($actual == $expected)
>    echo great
> else
>    echo oops
> 
> 
> My proposal is in response to what I thought your
initial question was 
> in this thread.  Perhaps I misunderstood.  If so, tests
like this 
> might be a good thing anyway.  All that aside, this is
just a 
> suggestion.

Ah ok. I am beginning to understand. Since obviously some
people might 
rely on how a given driver behaves if the portability
features are 
disabled, that this is also tested. Fair enough. Something
that should 
indeed be covered.

regards,
Lukas

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

cvs: pear /MDB2/tests MDB2_usage_testcase.php
user name
2006-08-20 23:10:33
On 8/20/06, Lukas Kahwe Smith <lsmithphp.net> wrote:
> Daniel Convissor wrote:
>
> > Hi Lukas:
> >
> > On Sun, Aug 20, 2006 at 08:06:14PM +0200, Lukas
Kahwe Smith wrote:
> >> Not sure I understand what you are saying.
> > ...
> >> RDBMS xyz does not automatically RTRIM data
coming from a CHAR field.
> >
> > I'm proposing (additional ?) tests that run under
> > MDB2_PORTABILITY_NONE.  The test would be
something like this for the
> > test you used above:
> >
> > switch
> >    mysql:
> >       $expected = 'some string';
> >    mssql:
> >       $expected = 'some string      ';
> >
> > if ($actual == $expected)
> >    echo great
> > else
> >    echo oops
> >
> >
> > My proposal is in response to what I thought your
initial question was
> > in this thread.  Perhaps I misunderstood.  If so,
tests like this
> > might be a good thing anyway.  All that aside,
this is just a
> > suggestion.
>
> Ah ok. I am beginning to understand. Since obviously
some people might
> rely on how a given driver behaves if the portability
features are
> disabled, that this is also tested. Fair enough.
Something that should
> indeed be covered.
>

That makes sense. Sorry for just unilaterally disabling the
test but I
figured it would spark a discussion here and it did. 

After reading this thread it seems like it might be a good
idea to
take these tests and move them to a different test
"module" which says
somewhere that it may fail differently for different RDBMS.

The above idea to test for RDBMS specific stuff like Oracle
always
returning CAPS fields mught also be nice but it would, of
course, be
an RDBMS specific test.

-- 
Justin Patrin

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )