Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://inkdroid.org/svn/www-wikipedia/trunk@977 4dc5e89f-90f6-0310-ab54-a6a856e7c30e
- Loading branch information
Showing
14 changed files
with
71 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More ( tests => 1 ); | ||
|
||
use_ok( 'WWW::Wikipedia' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More tests => 7; | ||
|
||
use WWW::Wikipedia; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More tests => 7; | ||
|
||
use WWW::Wikipedia; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
use strict; | ||
use warnings; | ||
use Test::More tests => 4; | ||
|
||
use WWW::Wikipedia; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
use strict; | ||
use warnings; | ||
use Test::More tests => 3; | ||
|
||
package WWW::Wikipedia; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
use Test::More tests => 2; | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More tests => 2; | ||
|
||
use_ok( 'WWW::Wikipedia' ); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
use Test::More tests => 2; | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More tests => 4; | ||
use WWW::Wikipedia; | ||
|
||
# test to make sure redirects in content are followed | ||
# the use of 'Systems Theory' over time may need to change | ||
my $q = 'Systems Theory'; | ||
my $wiki = WWW::Wikipedia->new(); | ||
|
||
# test to make sure redirects in content are followed | ||
{ | ||
my $entry = $wiki->search( $q ); | ||
isa_ok $entry, 'WWW::Wikipedia::Entry'; | ||
unlike $entry->text(), qr/REDIRECT/, 'redirect not found'; | ||
} | ||
|
||
$wiki = WWW::Wikipedia->new(); | ||
$entry = $wiki->search( 'Systems Theory' ); | ||
isa_ok $entry, 'WWW::Wikipedia::Entry'; | ||
unlike $entry->text(), qr/REDIRECT/, 'redirect not found'; | ||
# test to make sure redirects in content are not followed | ||
# when follow_redirects == 0 | ||
{ | ||
$wiki->follow_redirects( 0 ); | ||
my $entry = $wiki->search( $q ); | ||
isa_ok $entry, 'WWW::Wikipedia::Entry'; | ||
like $entry->text(), qr/REDIRECT/, 'redirect found'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
use strict; | ||
use warnings; | ||
use Test::More; | ||
|
||
eval "use Test::Pod 1.00"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters