package tests::OutputFormatsPSTest;
use strict;
use base qw/Lire::Test::PluginTestCase/;
use Lire::OutputFormats::PS;
use Lire::PluginManager;
use File::Basename qw/dirname/;
sub set_up {
my $self = $_[0];
$self->SUPER::set_up();
$self->{'cfg'}{'lr_latex_include'} = 'custom.tex';
$self->{'testdir'} = dirname( __FILE__ ) ;
return;
}
sub tear_down {
my $self = $_[0];
$self->SUPER::tear_down();
return;
}
sub create_plugin {
return new Lire::OutputFormats::PS();
}
sub registration_file {
return dirname( __FILE__ ) . "/../Lire/OutputFormats/of_ps_init";
}
sub test_missing_requirements {
my $self = $_[0];
my $spec = $self->lire_default_config_spec();
$self->{'cfg'}{'lambda_path'} =
$spec->get( 'lambda_path' )->instance( 'value' => '/bin/true' );
$self->{'cfg'}{'odvips_path'} =
$spec->get( 'odvips_path' )->instance( 'value' => '' );
$self->test_registration_file();
my $ps = Lire::PluginManager->get_plugin( 'output_format', 'ps');
$self->assert_deep_equals( [ "missing Omega 'odvips' command" ],
[ $ps->missing_requirements() ] );
}
1;
syntax highlighted by Code2HTML, v. 0.9.1