File: 01-HTML-Display-TempFile-share.t

package info (click to toggle)
libhtml-display-perl 0.40-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 244 kB
  • sloc: perl: 1,166; makefile: 2
file content (26 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (6)
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
use strict;
use Test::More tests => 2;
use lib 'inc';
use IO::Catch;
use vars qw( $display $captured_html $_STDOUT_ $_STDERR_);

tie *STDOUT, 'IO::Catch', '_STDOUT_' or die $!;
tie *STDERR, 'IO::Catch', '_STDERR_' or die $!;
$SIG{__WARN__} = sub { $_STDERR_ .= join "", @_};

{ package HTML::Display::TempFile::Test;
  use parent 'HTML::Display::TempFile';

  sub browsercmd { qq{$^X -lne "" "%s" } };
};

SKIP: {
  use_ok("HTML::Display");

  $display = HTML::Display->new( class => 'HTML::Display::TempFile::Test' );
  $display->display("# Hello World");
  is($_STDERR_,undef,"Could launch tempfile program");
};

untie *STDOUT;
untie *STDERR;