From 54671ed0876c92c52fa657533ae0a558cde9b6f5 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 6 Jul 2006 23:01:54 +0000 Subject: [PATCH] WebGUI::HTML test script for filter subroutine --- t/HTML.t | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 t/HTML.t diff --git a/t/HTML.t b/t/HTML.t new file mode 100644 index 000000000..9183e2540 --- /dev/null +++ b/t/HTML.t @@ -0,0 +1,70 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2006 Plain Black Corporation. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------- +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------- + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; + +use WebGUI::Test; +use WebGUI::HTML; +use WebGUI::Session; +use HTML::TokeParser; + +use Test::More; # increment this value for each test you create + +my $session = WebGUI::Test->session; + +my @filterSets = ( + { + inputText => q!

Paragraph

^H();,^SQL("select * from users","^0;,^1;")!, + output => q!

Paragraph

^H();,^SQL("select * from users","^0;,^1;")!, + type => 'macros', + comment => 'filter macros, valid or not', + }, + { + inputText => q!

Paragraph

^H();!, + output => q!

Paragraph

^H();!, + type => 'macros', + comment => 'filter macros leaves HTML alone', + }, + { + inputText => q!

Paragraph

!, + output => q!Paragraph!, + type => 'all', + comment => 'all filter HTML', + }, + { + inputText => q!

Paragraph

^H();!, + output => q!Paragraph^H();!, + type => 'all', + comment => 'all filters macros and HTML', + }, + { + inputText => q!