File: coderef_args.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 (10 lines) | stat: -rw-r--r-- 233 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
use Test::More;
use Capture::Tiny 'capture_stdout';
use CGI::Compile;

my $sub = CGI::Compile->compile("t/args.cgi");

my $stdout = capture_stdout { $sub->(1,2,3) };
like $stdout, qr/Hello \@_: 1,2,3 \@ARGV: 1,2,3\z/;

done_testing;