From b5e00dd5534d7f6ec852b537f551bb872931fa04 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 11 Aug 2008 07:38:09 +0000 Subject: initial import --- t/14-rtf-OpenOffice.t | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 t/14-rtf-OpenOffice.t (limited to 't/14-rtf-OpenOffice.t') diff --git a/t/14-rtf-OpenOffice.t b/t/14-rtf-OpenOffice.t new file mode 100644 index 0000000..319eff7 --- /dev/null +++ b/t/14-rtf-OpenOffice.t @@ -0,0 +1,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' ); + -- cgit v1.2.1