File: 06title.t

package info (click to toggle)
libbot-basicbot-pluggable-perl 1.20-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 528 kB
  • sloc: perl: 3,141; makefile: 17
file content (35 lines) | stat: -rw-r--r-- 875 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!perl
use warnings;
use strict;
use Test::More tests => 6;
use Test::Bot::BasicBot::Pluggable;

my $bot = Test::Bot::BasicBot::Pluggable->new();

my $title = $bot->load("Title");
ok( $title, "loaded Title module" );

SKIP: {

skip "Debian build systems do not have internet access", 1 if $ENV{NO_NETWORK};

like( $bot->tell_direct("http://google.com"),
    qr/Google/, "got title of google ok" );

}

# test to make sure that Title.pm isn't eating urls.
ok( $bot->load("Infobot"), "loaded Infobot module" );

SKIP: {

skip "Debian build systems do not have internet access", 2 if $ENV{NO_NETWORK};

my $t = $bot->tell_direct("google is at http:/google.com");
like( $t, qr/Google/, "got title of google ok" );
like( $t, qr/Okay/,   "infobot still there" );

}

$title->set( 'user_ignore_re' => 'perl' );
is( $bot->tell_direct("http://use.perl.org"), '', 'ignore_re works' );