File: 100-internal--perl-script.t

package info (click to toggle)
libtest-compile-perl 3.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 324 kB
  • sloc: perl: 816; makefile: 2; sh: 1
file content (33 lines) | stat: -rw-r--r-- 629 bytes parent folder | download
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
27
28
29
30
31
32
33
#!perl

use strict;
use warnings;

use Test::More;
use Test::Compile::Internal;

my $internal = Test::Compile::Internal->new();

# given
# when
my $taint = $internal->_perl_script('t/scripts/taint.pl');
# then
ok($taint, "taint.pl script is perll");

# Given
# When
my $datafile = $internal->_perl_script('t/scripts/datafile');
# Then
ok(!$datafile, "datafile isn't perl");

# Given
# When
my $perlscript = $internal->_perl_script('t/scripts/perlscript');
ok($perlscript, "perlscript is perl");

# Given
# When
my $module = $internal->_perl_script('t/scripts/Module.pm');
ok(!$module, "Module is not a script");

done_testing();