File: 300.Builder.t

package info (click to toggle)
publican 4.2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,584 kB
  • ctags: 450
  • sloc: perl: 12,896; xml: 11,510; makefile: 45; sh: 6
file content (41 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use strict;
use warnings;

use Test::More tests => 5;
use File::pushd;
use Cwd qw(abs_path);

BEGIN {
    use_ok('Publican');
    use_ok('Publican::Builder::DocBook4');
}

my $dir = pushd("Test_Book");

my $publican = Publican->new(
    {   debug     => 1,
        NOCOLOURS => 1,
        QUIET     => 1,
    }
);

my $builder = Publican::Builder::DocBook4->new();
isa_ok( $builder, 'Publican::Builder::DocBook4',
    'creating a Publican::Builder::DocBook4' );

eval {
    $builder->build(
        { formats => "html,pdf", langs => "en-US", pub_dir => 'publishing' }
    );
};
my $e = $@;
ok( ( not $e ), "build a book" );
diag($e) if $e;

eval { $builder->package( { lang => "en-US" } ) };
$e = $@;
ok( ( not $e ), "package a book" );
diag($e) if $e;

$dir = undef;