File: 2_exit.t

package info (click to toggle)
libimage-sane-perl 5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 324 kB
  • sloc: perl: 2,714; ansic: 5; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use warnings;
use strict;
use English;
use Test::Requires qw( v5.10 );
use Test::More tests => 1;

#########################

my $pl = <<'END';
use strict;
use warnings;
use Image::Sane ':all';
$Image::Sane::DEBUG = 1;
Image::Sane->get_version_scalar;
END

my $fname = 'examples/exit.pl';
open my $fh, '>', $fname;
print $fh $pl;
close $fh;
my $exe = "PERL5LIB=\"blib:blib/arch:lib:\$PERL5LIB\" $EXECUTABLE_NAME $fname";
my $output = `$exe`;
like $output, qr/Exiting via sane_exit/, 'sane_exit() reached';
unlink $fname;