DBIx-Custom / t / common-sqlite.t /
Newer Older
29 lines | 1.11kb
added common test executing ...
Yuki Kimoto authored on 2011-08-07
1
use strict;
2
use warnings;
3

            
4
use FindBin;
5
$ENV{DBIX_CUSTOM_TEST_RUN} = 1;
6

            
7
use DBIx::Custom;
8
{
9
    package DBIx::Custom;
10
    no warnings 'redefine';
cleanup
Yuki Kimoto authored on 2011-08-10
11
    
12
    my $date = 'Date';
13
    my $time = 'Time';
14
    my $datetime = 'Datetime';
15
    
test cleanup
Yuki Kimoto authored on 2011-08-10
16
    has dsn => 'dbi:SQLite:dbname=:memory:';
cleanup test
Yuki Kimoto authored on 2011-08-10
17
    sub create_table1 { 'create table table1 (key1 varchar, key2 varchar);' }
18
    sub create_table1_2 {'create table table1 (key1 varchar, key2 varchar, key3 varchar, key4 varchar, key5 varchar);' }
cleanup
Yuki Kimoto authored on 2011-08-10
19
    sub create_table1_type { "create table table1 (key1 $date, key2 $time);" }
test cleanup
Yuki Kimoto authored on 2011-08-10
20
    
cleanup test
Yuki Kimoto authored on 2011-08-10
21
    sub create_table1_highperformance { "create table table1 (ab varchar, bc varchar, ik varchar, hi varchar, ui varchar, pq varchar, dc varchar);" }
test cleanup
Yuki Kimoto authored on 2011-08-10
22
    
cleanup test
Yuki Kimoto authored on 2011-08-10
23
    sub create_table2 { 'create table table2 (key1 varchar, key3 varchar);' }
24
    sub create_table2_2 { "create table table2 (key1 varchar, key2 varchar, key3 varchar)" }
25
    sub create_table3 { "create table table3 (key1 varchar, key2 varchar, key3 varchar)" }
26
    sub create_table_reserved { 'create table "table" ("select" varchar, "update" varchar)' }
added common test executing ...
Yuki Kimoto authored on 2011-08-07
27
}
28

            
29
require "$FindBin::Bin/common.t";