Changeset 2133
- Timestamp:
- 04/28/08 22:41:12 (5 months ago)
- Files:
-
- branches/release-36/t/driver-tests.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-36/t/driver-tests.pl
r1490 r2133 10 10 use warnings; 11 11 use Data::Dumper; 12 13 $| = 1; 12 use English qw( -no_match_vars ); 13 14 $OUTPUT_AUTOFLUSH = 1; 14 15 15 16 # Run this script as a symlink, in the form of 99-driver.t, ie: … … 24 25 } 25 26 26 use Test::More tests => 233; 27 use lib 't/lib', 'extlib', 'lib', '../lib', '../extlib'; 27 use constant TESTS => 232; 28 29 use Test::More; 30 use lib 't/lib'; 28 31 use MT::Test qw(:testdb); 29 32 … … 41 44 package main; 42 45 43 print "Please configure for this test by creating $ENV{MT_CONFIG} with your database, username, and password\n" 44 unless -r $ENV{MT_CONFIG}; 45 SKIP: { 46 skip("$ENV{MT_CONFIG} configuration not found", 227) 47 unless ok(-r $ENV{MT_CONFIG}, "$ENV{MT_CONFIG} configuration"); 46 if (-r $ENV{MT_CONFIG}) { 47 plan tests => TESTS(); 48 } 49 else { 50 print "Please configure for this test by creating $ENV{MT_CONFIG} with your database, username, and password\n"; 51 plan skip_all => "$ENV{MT_CONFIG} configuration not found"; 52 } 48 53 49 54 my(@foo, @bar); … … 712 717 skip(1, '$tmp[1] undefined') unless $tmp[1]; 713 718 ok($tmp[1] && ($tmp[1]->name eq 'this'), 'name'); 714 }715 716 719 } 717 720 … … 743 746 $newdata->save; 744 747 745 my$count = Foo->count( [{status => 10}, -or => {name => 'Apple'}] );748 $count = Foo->count( [{status => 10}, -or => {name => 'Apple'}] ); 746 749 # ==> select count(*) from mt_foo where foo_status = 10 or foo_name = 'Apple' 747 750 is($count, 3, '-or count');
