lib-restrict

 view release on metacpan or  search on metacpan

t/lib-restrict.t  view on Meta::CPAN

    lib_restrict_array_bad_y lib_restrict_code_ref  
);
    
use_ok('lib::restrict', 'foo');

@lib::ORIG_INC = @lib::ORIG_INC; # to avoid warning..
is_deeply(\@lib::ORIG_INC, \@lib::restrict::ORIG_INC, 'name space ORIG_INC');

SKIP: { 
    skip q{lib::restrict's tests need to be run as root}, $skip if $> != 0;
    skip q{Couldn't find valid non-root uid for testing}, $skip if !getpwuid($uuid); 

    # setup
    mkdir $_ for @dirs;
    chown $uuid, $uuid, qw(lib_restrict_array_ok_y lib_restrict_array_bad_y lib_restrict_user);
    no warnings 'uninitialized'; # $INC{1} is uninit @ times below
        
    # start tests
    use_ok('lib::restrict', 'lib_restrict_nouid');
    ok($INC[0] eq 'lib_restrict_nouid', 'no uid given'); 



( run in 0.224 second using v1.01-cache-2.11-cpan-454fe037f31 )