File: 04_taghandlers.t

package info (click to toggle)
libwx-perl 1%3A0.9932-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,300 kB
  • sloc: cpp: 11,064; perl: 8,603; ansic: 711; makefile: 53
file content (24 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl -w

use strict;
use Wx;
use Wx::Html;
use lib "../../t";
use Test::More tests => 1;
use Tests_Helper qw(in_frame);

# this test indirectly tests that wxModule initialization works
# in wxPerl submodules
in_frame sub {
    my( $frame ) = @_;
    my $htmlwin = Wx::HtmlWindow->new( $frame );
    $htmlwin->Show;
    $htmlwin->SetSize( 400, 400 );
    $htmlwin->SetPage( "<html><head><title>Title</title></head><body><h1>Test</h1><p>A test</p></body></html>" );

    my $text = $htmlwin->ToText;

    # if tag handlers are correctly initialized, the test will only
    # contain the actual test
    is( $text, "\nTest\nA test" );
};