File: 02-block-use-module.t

package info (click to toggle)
libtest-without-module-perl 0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 100 kB
  • ctags: 10
  • sloc: perl: 139; makefile: 15
file content (11 lines) | stat: -rwxr-xr-x 427 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl -w
use strict;

use Test::More tests => 4;

BEGIN{ use_ok( "Test::Without::Module", qw( Digest::MD5 )); };

is_deeply( [sort keys %{Test::Without::Module::get_forbidden_list()}],[ qw[ Digest::MD5 ]],"Module list" );
eval q{ use Digest::MD5 };
ok( $@ ne '', 'Importing raises an error' );
like( $@, qr!^(Can't locate Digest/MD5.pm in \@INC|Digest/MD5.pm did not return a true value at)!, "Hid module");