#!/bin/sh
set -e

: ${LLOCONV=`pwd`/lloconv}
tmp=`mktemp -d`
trap 'rm -rf "$tmp"' 0 1 2 13 15

cd "$tmp"
echo '<html><title>foo</title><body>hello world</body></html>' > in.html
$LLOCONV -q in.html out.doc
file --mime-type out.doc | grep -q '^out\.doc: application/msword$'
$LLOCONV -q out.doc rev.txt
grep -q 'hello world' rev.txt
