File: source_filter.t

package info (click to toggle)
libcgi-compile-perl 0.27-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 248 kB
  • sloc: perl: 372; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 337 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Test::More;
use Capture::Tiny 'capture_stdout';
use CGI::Compile;

my $sub = eval {
    CGI::Compile->compile("t/switch.cgi");
};

is $@, '', 'CGI with source filter compiles' or do {
    done_testing;
    exit;
};

my $stdout = capture_stdout { $sub->() };
is $stdout, "filter works\n", 'source filter works in CGI';

done_testing;