File: basic.t

package info (click to toggle)
libtest-indistdir-perl 1.112071-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112 kB
  • sloc: perl: 91; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 503 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;
package basic;

use Test::More;
use File::Spec;

require_ok("Test::InDistDir");
can_ok( "Test::InDistDir", "import" );

chdir "t" if -d "t";
@INC = grep { !/\bblib\b/ and !/\blib\b/ } @INC;

my $script = ( File::Spec->splitpath( $0 ) )[-1];

ok( !-f "t/$script", "test script not visible" );

Test::InDistDir->import;

ok( -f "t/$script", "we moved up one directory, so test script is visible" );
ok( scalar( grep { /\blib\b/ } @INC ), "lib was added to INC" );

done_testing;