#!/usr/bin/env perl
sub
test_loadClass : Init(1) {
shift
->useOk(
'Quiq::ContentProcessor'
);
}
sub
test_unitTest : Test(4) {
my
$self
=
shift
;
my
$storage
=
'/tmp/.storage'
;
my
$cop
= Quiq::ContentProcessor->new(
$storage
);
$self
->is(
ref
(
$cop
),
'Quiq::ContentProcessor'
);
my
$val
=
$cop
->get(
'storage'
);
$self
->is(
$val
,
'/tmp/.storage'
);
Quiq::Perl->createClass(
'MyTool::Program::Shell'
);
$cop
->registerType(
'MyTool::Program::Shell'
,
'xprg'
,
'Program'
,
'Program'
,
Language
=>
'Shell'
);
my
$sec
= Quiq::Section::Object->new(
'[Program]'
,{
Language
=>
'Shell'
});
my
$plg
=
$cop
->plugin(
$sec
);
$self
->ok(
$plg
);
$sec
= Quiq::Section::Object->new(
'[Program]'
,{
Language
=>
'Perl'
});
$plg
=
$cop
->plugin(
$sec
);
$self
->is(
$plg
,
undef
);
Quiq::Path->
delete
(
$storage
);
}
Quiq::ContentProcessor::Test->runTests;