1 use Test::More tests=>7;
6 # simulates an entire testapp rooted at t/something
7 # except without bothering creating it since its
8 # only the -e check on the Makefile.PL that matters
10 BEGIN { use_ok 'Catalyst::Utils' }
14 $INC{'TestApp.pm'} = "$FindBin::Bin/something/script/foo/../../lib/TestApp.pm";
15 my $home = Catalyst::Utils::home('TestApp');
16 like($home, qr{t[\/\\]something}, "has path TestApp/t/something");
17 unlike($home, qr{[\/\\]script[\/\\]foo}, "doesn't have path /script/foo");
21 $INC{'TestApp.pm'} = "$FindBin::Bin/something/script/foo/bar/../../../lib/TestApp.pm";
22 my $home = Catalyst::Utils::home('TestApp');
23 like($home, qr{t[\/\\]something}, "has path TestApp/t/something");
24 unlike($home, qr{[\/\\]script[\/\\]foo[\/\\]bar}, "doesn't have path /script/foo/bar");
28 $INC{'TestApp.pm'} = "$FindBin::Bin/something/script/../lib/TestApp.pm";
29 my $home = Catalyst::Utils::home('TestApp');
30 like($home, qr{t[\/\\]something}, "has path TestApp/t/something");
31 unlike($home, qr{[\/\\]script[\/\\]foo}, "doesn't have path /script/foo");