#!/bin/sh
#
# Copyright (C) 1997 - 2001 Loic Dachary
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#

. test_functions

samples=$srcdir/htdocs/htmlcontent

#
# Basic tests on all tags recognized by the parser
#
Csimple() {
./t_htmlcontent -f $samples/simple.html
}

Cscript() {
./t_htmlcontent -f $samples/script.html
./t_htmlcontent -f $samples/script1.html
}

Cstyle() {
./t_htmlcontent -f $samples/style.html
}

Ciso8859() {
./t_htmlcontent -f $samples/iso8859-1.html
}

Centities() {
./t_htmlcontent -f $samples/entities.html
}

#
# Chuncked calls
#
Cbig() {
./t_htmlcontent -f $samples/big.html
}

#
# Text contains escaped chars, href in comments, meta
# with strange names, meta with content and not name
#
Chairy() {
./t_htmlcontent -f $samples/hairy.html
./t_htmlcontent -f $samples/hairy1.html
}

#
# Font change in midle of word is not considered white space
# Control L is considered a white space
#
Cchangefont() {
./t_htmlcontent -f $samples/changefont.html
}

#
# <meta ...><meta ...> (no space between them)
#
Cglued() {
./t_htmlcontent -f $samples/glued.html
}

#
# Big meta keyword
#
Cbigmeta() {
./t_htmlcontent -f $samples/bigmeta.html
}

testing ${*:-"Csimple Cbig Chairy Cchangefont Cglued Cscript Cstyle Ciso8859 Centities Cbigmeta "}
