summaryrefslogtreecommitdiff
path: root/t/14-rtf-OpenOffice.t
blob: 319eff73b07b05911fab7b6ddcf640df26b1eaf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!perl

BEGIN { chomp($pwd=`pwd`); $ENV{PATH} .= ":$pwd/bin"; };

use Test::More tests => 2;

use HTML::AutoConvert;

my $c = new HTML::AutoConvert;

my $force = 'OpenOffice';
#$c->{'handlers'}{'doc'}{$force}{'weight'} = -1;
my @del = grep { $_ ne $force } keys %{ $c->{'handlers'}{'rtf'} };
delete($c->{'handlers'}{'rtf'}{$_}) foreach @del;

my $html = $c->html_convert('t/VEGAN_RECIPES.rtf');

#match $html against something;
like( $html, qr/Gumbo/, 'text has Gumbo' );
like( $html, qr/Cheesecake/, 'text has Cheesecake' );