#! /bin/sh

. ${srcdir:=.}/t.frame

cat > "$TMPDIR/input" <<_EOF
From 
Subject: test url encoding
MIME-Version: 1.0
Content-Type: text/html; charset="iso-8859-1"

<html>
<body>

<a href="http://%32%31.2%332.%316%30.1%305/%7a/s%69l%76e%72/f%61r%6d/i%6ed%65x.%68t%6dl">

<img border="0" src="http://%322%31.2%332.%316%30.1%305/%7a/s%69l%76e%72/f%61r%6d/e%6et.%6ap%67" width="500" height="300"></a></p>

<a target="_blank" href="http://%322%31.2%332.%316%30.1%305/%7a/d%6fn%651.%68t%6dl">

</body>
</html>
_EOF

cat > "$TMPDIR/reference" <<_EOF
href
http
21.232.160.105
silver
farm
index.html
border
src
http
221.232.160.105
silver
farm
ent.jpg
width
height
target
blank
href
http
221.232.160.105
done1.html
_EOF

$BOGOLEXER -p -C < "$TMPDIR/input" | grep -v ":" > "$TMPDIR/output"
cmp "$TMPDIR/reference" "$TMPDIR/output" \
|| diff "$TMPDIR/reference" "$TMPDIR/output"
