File: get_from_file.t

package info (click to toggle)
libtest-prereq-perl 1.038-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 176 kB
  • ctags: 22
  • sloc: perl: 313; makefile: 4
file content (26 lines) | stat: -rw-r--r-- 622 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
use Test::More 0.95;

use Test::Prereq;

my $modules = Test::Prereq->_get_from_file( 't/pod.t' );
my @modules = grep ! /^CPANPLUS/, @$modules;

diag "Did not find right modules from t/pod.t!\n" .
	"Found <@modules>\n" unless
	ok(
		eq_array( \@modules, [] ),
			'Right modules for t/pod.t'
			);

$modules = Test::Prereq->_get_from_file( 'lib/Test/Prereq.pm' );
@modules = grep ! /^CPANPLUS/, @$modules;

diag "Did not find right modules for lib/Test/Prereq.pm!\n" .
	 "Found <@modules>\n" unless
		ok(
			eq_array( \@modules, [ 
			qw( Module::Info ) ] ),
			'Right modules for lib/Test/Prereq.pm'
			);

done_testing();