Fix my retardedness with ::MVC:: warning having no conditional. Pull all the stuff...
[catagits/Catalyst-Runtime.git] / t / unit_core_path_to.t
1 use strict;
2 use warnings;
3
4 use Test::More;
5
6 my %non_unix = (
7     MacOS   => 1,
8     MSWin32 => 1,
9     os2     => 1,
10     VMS     => 1,
11     epoc    => 1,
12     NetWare => 1,
13     dos     => 1,
14     cygwin  => 1
15 );
16
17 my $os = $non_unix{$^O} ? $^O : 'Unix';
18
19 if(  $os ne 'Unix' ) {
20     plan skip_all => 'tests require Unix';
21 }
22 else {
23     plan tests => 3;
24 }
25
26 use_ok('Catalyst');
27
28 my $context = 'Catalyst';
29
30 my $config = Catalyst->config;
31
32 $config->{home} = '/home/sri/my-app/';
33
34 is( Catalyst::path_to( $context, 'foo' ), '/home/sri/my-app/foo', 'Unix path' );
35
36 $config->{home} = '/Users/sri/myapp/';
37
38 is( Catalyst::path_to( $context, 'foo', 'bar' ),
39     '/Users/sri/myapp/foo/bar', 'deep Unix path' );