added common test executing ...
|
1 |
use strict; |
2 |
use warnings; |
|
3 | ||
4 |
use FindBin; |
|
test cleanup
|
5 |
use lib "$FindBin::Bin/common"; |
added common test executing ...
|
6 |
$ENV{DBIX_CUSTOM_TEST_RUN} = 1; |
7 | ||
finised mysql test cleanup
|
8 | |
9 | ||
added common test executing ...
|
10 |
use DBIx::Custom; |
11 |
{ |
|
12 |
package DBIx::Custom; |
|
13 |
no warnings 'redefine'; |
|
cleanup
|
14 |
|
test cleanup in progress
|
15 |
my $table1 = 'table1'; |
16 |
my $table2 = 'table2'; |
|
17 |
my $table2_alias = 'table2_alias'; |
|
18 |
my $table3 = 'table3'; |
|
19 |
my $key1 = 'key1'; |
|
20 |
my $key2 = 'key2'; |
|
21 |
my $key3 = 'key3'; |
|
22 |
my $key4 = 'key4'; |
|
23 |
my $key5 = 'key5'; |
|
24 |
my $key6 = 'key6'; |
|
25 |
my $key7 = 'key7'; |
|
26 |
my $key8 = 'key8'; |
|
27 |
my $key9 = 'key9'; |
|
28 |
my $key10 = 'key10'; |
|
29 |
|
|
30 |
has table1 => $table1; |
|
31 |
has table2 => $table2; |
|
32 |
has table2_alias => $table2_alias; |
|
33 |
has table3 => $table3; |
|
34 |
has key1 => $key1; |
|
35 |
has key2 => $key2; |
|
36 |
has key3 => $key3; |
|
37 |
has key4 => $key4; |
|
38 |
has key5 => $key5; |
|
39 |
has key6 => $key6; |
|
40 |
has key7 => $key7; |
|
41 |
has key8 => $key8; |
|
42 |
has key9 => $key9; |
|
43 |
has key10 => $key10; |
|
44 |
|
|
test cleanup
|
45 |
my $date_typename = 'Date'; |
46 |
my $datetime_typename = 'Datetime'; |
|
47 |
|
|
48 |
sub date_typename { lc $date_typename } |
|
49 |
sub datetime_typename { lc $datetime_typename } |
|
50 | ||
51 |
my $date_datatype = 'Date'; |
|
52 |
my $datetime_datatype = 'Datetime'; |
|
53 |
|
|
54 |
sub date_datatype { lc $date_datatype } |
|
55 |
sub datetime_datatype { lc $datetime_datatype } |
|
fixed SQL Server tests
|
56 | |
test cleanup
|
57 |
has dsn => 'dbi:SQLite:dbname=:memory:'; |
cleanup test
|
58 |
sub create_table1 { "create table $table1 ($key1 varchar, $key2 varchar)" } |
59 |
sub create_table1_2 {"create table $table1 ($key1 varchar, $key2 varchar, $key3 varchar, key4 varchar, key5 varchar)" } |
|
60 |
sub create_table1_type { "create table $table1 ($key1 $date_typename, $key2 $datetime_typename)" } |
|
test cleanup
|
61 |
|
cleanup test
|
62 |
sub create_table1_highperformance { "create table $table1 (key1 varchar, key2 varchar, key3 varchar, key4 varchar, key5 varchar, key6 varchar, key7 varchar)" } |
test cleanup
|
63 |
|
cleanup test
|
64 |
sub create_table2 { "create table $table2 ($key1 varchar, $key3 varchar)" } |
test cleanup in progress
|
65 |
sub create_table2_2 { "create table $table2 ($key1 varchar, $key2 varchar, $key3 varchar)" } |
66 |
sub create_table3 { "create table $table3 ($key1 varchar, $key2 varchar, $key3 varchar)" } |
|
cleanup test
|
67 |
sub create_table_reserved { 'create table "table" ("select" varchar, "update" varchar)' } |
test cleanup
|
68 |
|
added common test executing ...
|
69 |
} |
70 | ||
71 |
require "$FindBin::Bin/common.t"; |