Changeset 861

Show
Ignore:
Timestamp:
02/28/03 18:13:48
Author:
miyagawa
Message:

0.03
check sqlite/mysql install

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Class-DBI-View/trunk/Changes

    r857 r861  
    11Revision history for Perl extension Class::DBI::View 
     2 
     30.03  Fri Feb 28 18:11:16 JST 2003 
     4        - Fixed test code to check mysql/sqlite installation 
    25 
    360.02  Fri Feb 28 16:56:17 JST 2003 
  • Class-DBI-View/trunk/lib/Class/DBI/View.pm

    r860 r861  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.02
     5$VERSION = 0.03
    66 
    77use UNIVERSAL::require; 
  • Class-DBI-View/trunk/lib/Class/DBI/View/Having.pm

    r860 r861  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.02
     5$VERSION = 0.03
    66 
    77sub setup_view { 
  • Class-DBI-View/trunk/lib/Class/DBI/View/SubQuery.pm

    r860 r861  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.02
     5$VERSION = 0.03
    66 
    77sub setup_view { 
  • Class-DBI-View/trunk/lib/Class/DBI/View/TemporaryTable.pm

    r860 r861  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.02
     5$VERSION = 0.03
    66 
    77sub setup_view { 
  • Class-DBI-View/trunk/t/01_temptable.t

    r857 r861  
    11use strict; 
    2 use Test::More tests => 11
     2use Test::More
    33 
    44require_ok 'Class::DBI::View'; 
     
    88use CD::Tester; 
    99 
     10BEGIN { 
     11    plan check_mysql() ? (tests => 11) : (skip_all => 'no mysql'); 
     12} 
     13 
    1014CD::Tester->test_all('TemporaryTable', 'mysql'); 
  • Class-DBI-View/trunk/t/02_subquery.t

    r857 r861  
    11use strict; 
    2 use Test::More tests => 11
     2use Test::More
    33 
    44require_ok 'Class::DBI::View'; 
     
    88use CD::Tester; 
    99 
     10BEGIN { 
     11    plan check_sqlite() ? (tests => 11) : (skip_all => 'no sqlite'); 
     12} 
     13 
    1014CD::Tester->test_all('SubQuery', 'SQLite'); 
  • Class-DBI-View/trunk/t/03_having.t

    r857 r861  
    11use strict; 
    2 use Test::More tests => 11
     2use Test::More
    33 
    44require_ok 'Class::DBI::View'; 
     
    88use CD::Tester; 
    99 
     10BEGIN { 
     11    plan check_mysql() ? (tests => 11) : (skip_all => 'no mysql'); 
     12} 
     13 
    1014CD::Tester->test_all('Having', 'mysql'); 
  • Class-DBI-View/trunk/t/lib/CD/Tester.pm

    r857 r861  
    33use CD::Music; 
    44 
     5require Exporter; 
     6@CD::Tester::ISA = qw(Exporter); 
     7@CD::Tester::EXPORT = qw(check_mysql check_sqlite); 
     8 
     9sub check_mysql { 
     10    eval {  
     11        require DBI; 
     12        DBI->connect('dbi:mysql:test', '', '') or die $DBI::errstr; 
     13    }; 
     14    return !$@; 
     15} 
     16 
     17sub check_sqlite { 
     18    my $dbname = "t/test.db"; 
     19    eval {  
     20        require DBI; 
     21        DBI->connect("dbi:SQLite:dbname=$dbname") or die $DBI::errstr; 
     22        unlink $dbname; 
     23    }; 
     24    return !$@  
     25} 
     26 
    527sub populate { 
    628    my($this, $driver) = @_; 
    7     # populate 
    829    my @samples = ( 
    930        [ 'Ozzy Osbourne', 'Down to the Earth', 'Sony' ],