From f8f62c564008914a10d7fae1b635f0d388972226 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 28 Apr 2009 01:42:09 +0000 Subject: [PATCH] Add 1 more test to _isStopword --- t/Search.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/t/Search.t b/t/Search.t index daf080c86..96e8e4add 100644 --- a/t/Search.t +++ b/t/Search.t @@ -28,7 +28,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 6; # Increment this number for each test you create +plan tests => 7; # Increment this number for each test you create #---------------------------------------------------------------------------- # put your tests here @@ -37,11 +37,18 @@ use_ok('WebGUI::Search'); my $search = WebGUI::Search->new($session); +################################################ +# +# _isStopword +# +################################################ + ok(! $search->_isStopword('not a stopword'), '_isStopword: not a stopword'); ok( $search->_isStopword('the'), '_isStopword: "the" is a stopword'); ok( $search->_isStopword('all*'), '_isStopword: regex metacharacter * does not crash the search'); ok( $search->_isStopword('anybody+'), '_isStopword: regex metacharacter + does not crash the search'); ok( $search->_isStopword('maybe?'), '_isStopword: regex metacharacter ? does not crash the search'); +ok(! $search->_isStopword('private.+'), '_isStopword: regex metacharacter ? does not crash the search'); #---------------------------------------------------------------------------- # Cleanup