Changeset 2142
- Timestamp:
- 04/29/08 21:36:05 (7 months ago)
- Files:
-
- branches/release-36/t/driver-tests.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/release-36/t/driver-tests.pl
r2141 r2142 23 23 $driver =~ s/\.t$//; 24 24 $ENV{MT_CONFIG} = "$driver-test.cfg"; 25 } 26 27 BEGIN { 28 *CORE::GLOBAL::time = sub { CORE::time }; 29 *CORE::GLOBAL::sleep = sub { CORE::sleep }; 25 30 } 26 31 … … 44 49 package main; 45 50 51 my $core_time = time; 52 { 53 no warnings 'redefine'; 54 *CORE::GLOBAL::time = sub { $core_time }; 55 *CORE::GLOBAL::sleep = sub { $core_time += shift }; 56 } 57 46 58 if (-r $ENV{MT_CONFIG}) { 47 59 plan tests => TESTS(); … … 98 110 is_first_foo(scalar Foo->load({ created_on => $foo[0]->created_on }), 'Foo #1 by created_on hash'); 99 111 is_first_foo(scalar Foo->load({ status => $foo[0]->status }), 'Foo #1 by status hash'); 100 101 ## Sleep first so that they get different created_on timestamps.102 # TODO: can we replace CORE::time to fake this?103 sleep(2);104 112 105 113 ## Change column value, save, try to load using old value (fail?),
