1 # Copyright 2002-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: harness.coretag,v 1.4 2007-03-30 23:40:49 pajamian Exp $
10 UserTag harness addAttr
11 UserTag harness hasEndTag
12 UserTag harness PosNumber 0
13 UserTag harness Version $Revision: 1.4 $
14 UserTag harness Routine <<EOR
17 my ($opt, $input) = @_;
19 my $expected = $opt->{expected} || 'OK';
22 $input =~ s:\s*\[expected\](.*)\[/expected\]\s*::s
24 $input =~ s:\[not\](.*)\[/not\]::s
28 if defined $opt->{name};
31 $result = Vend::Interpolate::interpolate_html($input);
34 my $msg = "DIED in test $name. \$\@: $@";
39 return "NOT OK $name: $result!=$expected" unless $result =~ /$expected/;
42 return "NOT OK $name: $result==$not" unless $result !~ /$not/;