Subject: | place.t - test #15 failing |
Test #15 is failing with
not ok 15
# Failed test in .\t\place.t at line 61.
# Structures begin differing at:
# $got->[0][1] = 'Jan 3 1998 12:00AM'
# $expected->[0][1] = 'Jan 03 1998 12:00AM'
I'm running against a SQL server. I propose to change the testing value to Jan 11 so it has two digits and the test succeeds on SQL Server as well.
--- t\place#1.t 2014-02-14 19:00:36.000000000 +-0100
+++ t\place.t 2014-02-14 18:58:53.000000000 +-0100
@@ -30,13 +30,13 @@
$rc = $dbh->do("create table #t(string varchar(20), date datetime, val float, other_val numeric(9,3))");
ok($rc, 'Create table');
my $sth = $dbh->prepare("insert #t values(?, ?, ?, ?)");
ok($sth, 'prepare');
- $rc = $sth->execute("test", "Jan 3 1998", 123.4, 222.3334);
+ $rc = $sth->execute("test", "Jan 11 1998", 123.4, 222.3334);
ok($rc, 'insert 1');
ok $sth->bind_param(1, "other test");
ok $sth->bind_param(2, "Jan 25 1998");
# the order of these two bind_param's is swapped on purpose
ok $sth->bind_param(4, 2);
@@ -37,25 +37,25 @@
ok($rc, 'insert 1');
ok $sth->bind_param(1, "other test");
ok $sth->bind_param(2, "Jan 25 1998");
# the order of these two bind_param's is swapped on purpose
ok $sth->bind_param(4, 2);
};
ok(!$rc, 'insert 3 (fail)');
$sth = $dbh->prepare("select * from #t where date > ? and val > ?");
ok($sth, 'prepare 2');
- $rc = $sth->execute('Jan 1 1998', 120);
+ $rc = $sth->execute('Jan 9 1998', 120);
ok($rc, 'select');
my $rows = $sth->fetchall_arrayref;
is(@$rows, 2, 'fetch count');
is_deeply [
- [ 'test', 'Jan 3 1998 12:00AM', '123.4', '222.333' ],
+ [ 'test', 'Jan 11 1998 12:00AM', '123.4', '222.333' ],
[ 'other test', 'Jan 25 1998 12:00AM', '4445123.4', '2.000' ]
], $rows;
ok $sth->execute('Jan 1 1998', 140);
$rows = $sth->fetchall_arrayref;