|
From: <jgr...@us...> - 2003-08-22 00:25:57
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv20912
Modified Files:
stopwords tests.pl
Log Message:
Added tests for the HTML Advanced page and added new assertion type to test harness
Index: stopwords
===================================================================
RCS file: /cvsroot/popfile/engine/stopwords,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** stopwords 12 Jul 2003 06:37:46 -0000 1.3
--- stopwords 22 Aug 2003 00:25:52 -0000 1.4
***************
*** 1,193 ****
! var
! localhost
! jun
! head
! width
! you
! fri
! src
! did
! tbody
! cst
! cdt
! acronym
! helvetica
! basefont
! pst
! are
! colgroup
! pdt
! htm
! https
! smtp
! dir
! the
! would
! her
! div
! path
! font
! overlay
! mailto
! strike
! tab
! thu
! bgcolor
! center
! area
! frame
! height
! address
! table
! ask
! cite
! have
! base
! lang
! feb
! went
! big
! thead
! script
! listing
! all
! title
! esmtp
! www
! jan
! meta
! alt
! return
! xmp
! sep
! mon
! link
! mail
! http
! was
! from
! does
! cgi
! that
! being
! going
! sub
! html
! embed
! net
! code
! blockquote
! subject
! cellspacing
! multicol
! this
! sun
! col
! com
! sup
! aug
! its
! org
! map
! dec
! helo
! mar
! img
! wbr
! samp
! had
! will
! done
! del
! and
! received
! may
! tfoot
! encoding
! oct
! iframe
! message
! with
! has
! noframes
! caption
! ltd
! your
! spot
! align
! mbox
! having
! doing
! him
! menu
! abbrev
! any
! can
! form
! inc
! valign
! marquee
! his
! nobr
! sans
! range
! for
! color
! dfn
! yes
! yet
! goes
! ins
! could
! she
! span
! were
! textflow
! body
! not
! status
! nov
! bgsound
! small
! also
! blink
! applet
! gmt
! serif
! kbd
! est
! fig
! math
! edt
! tue
! edu
! textarea
! gone
! sat
! frameset
! person
! border
! wed
! apr
! charset
! nbsp
! banner
! strong
! pre
! etc
! input
! off
! param
! it's
! date
! but
! our
! plaintext
! out
! select
! been
! author
! isindex
! jul
! spacer
! note
--- 1,193 ----
! strike
! you
! date
! textflow
! form
! him
! pdt
! also
! code
! acronym
! pst
! valign
! subject
! cgi
! charset
! nbsp
! est
! sun
! your
! but
! title
! and
! multicol
! small
! xmp
! https
! area
! author
! all
! being
! dir
! she
! jan
! color
! will
! have
! received
! going
! serif
! htm
! edt
! can
! mbox
! height
! dfn
! iframe
! were
! com
! would
! off
! img
! etc
! noframes
! http
! bgsound
! jun
! sup
! gmt
! address
! basefont
! abbrev
! head
! tbody
! fri
! may
! ask
! aug
! overlay
! div
! www
! status
! doing
! tue
! person
! his
! cellspacing
! mon
! select
! helo
! esmtp
! alt
! note
! border
! message
! wbr
! big
! thu
! yes
! feb
! input
! table
! has
! not
! that
! meta
! isindex
! gone
! map
! our
! tfoot
! caption
! its
! encoding
! out
! base
! lang
! align
! strong
! marquee
! edu
! applet
! span
! nov
! with
! spacer
! width
! smtp
! goes
! did
! inc
! range
! wed
! frame
! dec
! localhost
! body
! nobr
! bgcolor
! html
! from
! var
! her
! oct
! banner
! del
! math
! blockquote
! path
! any
! spot
! textarea
! cdt
! the
! embed
! done
! yet
! it's
! font
! net
! blink
! thead
! plaintext
! could
! went
! does
! param
! jul
! this
! org
! for
! mailto
! src
! mar
! cst
! kbd
! listing
! ltd
! pre
! are
! having
! center
! helvetica
! samp
! been
! tab
! col
! fig
! mail
! cite
! link
! had
! script
! menu
! colgroup
! sans
! return
! ins
! sep
! was
! sub
! frameset
! sat
! apr
Index: tests.pl
===================================================================
RCS file: /cvsroot/popfile/engine/tests.pl,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** tests.pl 20 Aug 2003 17:30:50 -0000 1.27
--- tests.pl 22 Aug 2003 00:25:52 -0000 1.28
***************
*** 128,131 ****
--- 128,132 ----
#
# test_assert_regexp - Perform a test and assert that its result matches a regexp
+ # test_assert_not_regexp - Perform a test and assert that the regexp does not match
#
# $file The name of the file invoking the test
***************
*** 150,153 ****
--- 151,162 ----
}
+ sub test_assert_not_regexp
+ {
+ my ( $file, $line, $test, $expected, $context ) = @_;
+ my $result = !( $test =~ /$expected/m );
+
+ test_report( $result, "unexpected to match of [$expected]", $file, $line, $context );
+ }
+
# MAIN
***************
*** 184,187 ****
--- 193,197 ----
my $line = $_;
$ln += 1;
+ $line =~ s/(test_assert_not_regexp\()/$1 '$test', $ln,/g;
$line =~ s/(test_assert_regexp\()/$1 '$test', $ln,/g;
$line =~ s/(test_assert_equal\()/$1 '$test', $ln,/g;
|