Subject: | t/data.t fails because SQL::Translator::Parser::MySQL ignores INSERT |
t/data.t is broken:
--cut--
[lth@dask Class-DBI-DATA-Schema-1.00]$ make test TEST_FILES=t/data.t
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/data.t
t/data....NOK 5
# Failed test 'We have one film automatically set up'
# in t/data.t at line 21.
# got: '0'
# expected: '1'
Can't call method "rating" on an undefined value at t/data.t line 27.
# Looks like you planned 10 tests but only ran 7.
# Looks like you failed 1 test of 7 run.
# Looks like your test died just after 7.
t/data....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 5, 8-10
Failed 4/10 tests, 60.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/data.t 255 65280 10 7 70.00% 5 8-10
Failed 1/1 test scripts, 0.00% okay. 4/10 subtests failed, 60.00% okay.
*** Error code 255
Stop in /usr/home/lth/cvs/ports/databases/p5-Class-DBI-DATA-Schema/work/Class-DBI-DATA-Schema-1.00.
[lth@dask Class-DBI-DATA-Schema-1.00]$
--cut--
The reason is that the SQL::Translator::Parser::MySQL grammar ignores INSERT statements:
--cut--
insert : /insert/i /[^;]+/ ';'
--cut--
/Lars