Skip to content

Commit

Permalink
Merge pull request #2 from einhverfr/master
Browse files Browse the repository at this point in the history
Fixing failing test cases due to optional dependencies not installed.
  • Loading branch information
einhverfr committed Apr 12, 2014
2 parents d564370 + ed51861 commit a44a311
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 9 deletions.
13 changes: 13 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
Revision history for the LaTeX::Driver module -*- indented-text -*-

0.200.4 2014-04-12
- Disabled bibtex tests by default due to frequently not found LaTex
sty not found.

- Disabled t/30 and t/31 unless dvips is found

0.200.3 2014-04-11
- xelatex tests now optional because they add too many external
dependencies

0.200.1 2014-04-10
- Fixed stale dependency (unused) in Test::LaTeX::Driver

0.20 2014-04-09
- Removed IPC::ShellCmd dependency since newer versions not on CPAN
- Fixed Win32 support
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NAME
LaTeX::Driver - Latex driver

VERSION
This document describes version 0.20 of "LaTeX::Driver".
This document describes version 0.200.4 of "LaTeX::Driver".

SYNOPSIS
use LaTeX::Driver;
Expand Down
6 changes: 3 additions & 3 deletions lib/LaTeX/Driver.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use File::pushd; # temporary cwd changes

Readonly our $DEFAULT_MAXRUNS => 10;

our $VERSION = "0.20";
our $VERSION = "0.200.4";

__PACKAGE__->mk_accessors( qw( basename basedir basepath options
source output tmpdir format timeout stderr
Expand Down Expand Up @@ -674,7 +674,7 @@ sub run_command {
my $exit_status;
if ($OSNAME eq 'MSWin32') {
$args = join(' ', @$args);
$cmd = "cmd /c \"$program $args\"";
$cmd = "\"$program\" $args";
$exit_status = system($cmd);
}
else {
Expand Down Expand Up @@ -820,7 +820,7 @@ LaTeX::Driver - Latex driver
=head1 VERSION
This document describes version 0.20 of C<LaTeX::Driver>.
This document describes version 0.200.4 of C<LaTeX::Driver>.
=head1 SYNOPSIS
Expand Down
4 changes: 3 additions & 1 deletion t/10-simpledoc.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use File::Spec;
use lib ("$Bin/../lib", "$Bin/lib");
use Data::Dumper;

use Test::More tests => 24;
use Test::More;
use Test::LaTeX::Driver;
use LaTeX::Driver;

Expand All @@ -18,6 +18,8 @@ my $drv = LaTeX::Driver->new( source => $docpath,
format => 'dvi',
@DEBUGOPTS );

plan skip_all => 'FORMATTER_TESTING not set' unless $ENV{FORMATTER_TESTING};
plan tests => 24;
diag("Checking the formatting of a simple LaTeX document");
isa_ok($drv, 'LaTeX::Driver');
#is($drv->basedir, $basedir, "checking basedir");
Expand Down
6 changes: 5 additions & 1 deletion t/15-bibtex.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ use File::Spec;
use lib ("$Bin/../lib", "$Bin/lib");
use Data::Dumper;

use Test::More tests => 8;
use Test::More;

use Test::LaTeX::Driver;
use LaTeX::Driver;

plan skip_all => 'BIBTEX_TESTS not set. Requires lastpage.sty.'
unless $ENV{BIBTEX_TESTS};
plan tests => 8;

tidy_directory($basedir, $docname, $debug);

my $drv = LaTeX::Driver->new( source => $docpath,
Expand Down
5 changes: 4 additions & 1 deletion t/30-output-to-variable.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ use File::Spec;
use lib ("$Bin/../lib", "$Bin/lib");
use Data::Dumper;

use Test::More tests => 9;
use Test::More;
use Test::LaTeX::Driver;
use LaTeX::Driver;

plan skip_all => 'dvips not installed' if system('dvips -v');
plan tests => 9;

tidy_directory($basedir, $docname, $debug);

my $output;
Expand Down
5 changes: 4 additions & 1 deletion t/31-input-from-variable.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ use File::Spec;
use lib ("$Bin/../lib", "$Bin/lib");
use Data::Dumper;

use Test::More tests => 11;
use Test::More;
use Test::LaTeX::Driver;
use LaTeX::Driver;
use File::Slurp;

plan skip_all => 'dvips not installed' if system('dvips -v');
plan tests => 11;

tidy_directory($basedir, $docname, $debug);

my $source = read_file($docpath) or die "cannot read the source data";
Expand Down
1 change: 0 additions & 1 deletion t/lib/Test/LaTeX/Driver.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ use warnings;
use Config;
use FindBin qw($Bin);
use Getopt::Long;
use IPC::ShellCmd;

use Test::More;
require Exporter;
Expand Down

0 comments on commit a44a311

Please sign in to comment.