- Timestamp:
- 01/27/12 06:20:36 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Release01x01/UnitTestContrib/test/unit/Fn_SEARCH.pm
r13835 r13843 21 21 our @ISA = qw( FoswikiFnTestCase ); 22 22 23 use Assert; 23 24 use Foswiki(); 24 use Error qw( :try ); 25 use Assert; 26 use English qw( -no_match_vars ); 25 use Foswiki::Func(); 27 26 use Foswiki::Search(); 28 27 use Foswiki::Search::InfoCache(); 28 use English qw( -no_match_vars ); 29 use Error qw( :try ); 29 30 30 31 use File::Spec qw(case_tolerant) … … 5920 5921 $this->createNewFoswikiSession( $Foswiki::cfg{AdminUserLogin}, $query ); 5921 5922 $this->assert_str_equals( $this->{test_web}, $this->{session}->{webName} ); 5922 require Foswiki::Address;5923 5923 while ( my ( $fwaddress, $metatext ) = each %topics ) { 5924 my $addrObj = Foswiki::Address->new( string => $fwaddress ); 5924 my ( $web, $topic ) = 5925 Foswiki::Func::normalizeWebTopicName( '', $fwaddress ); 5925 5926 my $topicObj; 5926 5927 5927 if ( not Foswiki::Func::webExists( $addrObj->web()) ) {5928 if ( not Foswiki::Func::webExists($web) ) { 5928 5929 my @webs; 5929 5930 5930 foreach my $part ( @{ $addrObj->webpath() }) {5931 my $w eb;5931 foreach my $part ( split( /\//, $web ) ) { 5932 my $w; 5932 5933 5933 5934 push( @webs, $part ); 5934 $w eb= join( '/', @webs );5935 if ( not Foswiki::Func::webExists($w eb) ) {5936 Foswiki::Func::createWeb( $w eb, '_default' );5935 $w = join( '/', @webs ); 5936 if ( not Foswiki::Func::webExists($w) ) { 5937 Foswiki::Func::createWeb( $w, '_default' ); 5937 5938 } 5938 5939 } 5939 5940 } 5940 ($topicObj) = 5941 Foswiki::Func::readTopic( $addrObj->web(), $addrObj->topic() ); 5941 ($topicObj) = Foswiki::Func::readTopic( $web, $topic ); 5942 5942 $topicObj->text($metatext); 5943 5943 $topicObj->save();
Note: See TracChangeset
for help on using the changeset viewer.
