File: 03-view_pod.t

package info (click to toggle)
libcgi-application-plugin-viewcode-perl 1.02-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 276 kB
  • sloc: perl: 1,783; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 751 bytes parent folder | download | duplicates (5)
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
use Test::More;
use Test::LongString;
use CGI;
use lib 't/lib';
use MyBase::MyApp;
use strict;

plan(tests => 3);

$ENV{'CGI_APP_RETURN_ONLY'} = 1;

# 1..3
# view_pod
{
    my $cgi = CGI->new({
        rm => 'view_pod',
    });
    my $app = MyBase::MyApp->new( QUERY => $cgi );
    my $output = $app->run();
    contains_string($output, q(<h1 id="NAME_MyBase_MyApp_Stuff">NAME MyBase::MyApp - Stuff</h1>));

    $cgi = CGI->new({
        rm     => 'view_pod',
        module => 'CGI::Application',
    });
    $app = MyBase::MyApp->new( QUERY => $cgi );
    $output = $app->run();
    contains_string($output, q(<h1 id="NAME">NAME</h1>));
    like_string($output, qr/>CGI::Application\s-\s+Framework for building reusable web-applications</);
}