#!/usr/bin/perl
BEGIN {
$| = 1;
$^W = 1;
}
my
$input
= catfile(
't'
,
'data'
,
'simple.fbp'
);
my
$output
= catfile(
't'
,
'data'
,
'script.pl'
);
ok( -f
$input
,
"Found test file $input"
);
ok( -f
$output
,
"Found test file $output"
);
my
$fbp
= FBP->new;
isa_ok(
$fbp
,
'FBP'
);
ok(
$fbp
->parse_file(
$input
),
'->parse_file ok'
);
my
$project
=
$fbp
->find_first(
isa
=>
'FBP::Project'
,
);
my
$code
= FBP::Perl->new(
project
=>
$project
,
version
=>
$FBP::Perl::VERSION
,
nocritic
=> 1,
);
isa_ok(
$project
,
'FBP::Project'
);
isa_ok(
$code
,
'FBP::Perl'
);
my
$have
=
$code
->script_app;
my
$want
= slurp(
$output
);
code(
$have
,
$want
,
'->app_class ok'
);
compiles(
$have
,
undef
,
'Project class compiled'
);