20 my $os = $non_unix{$^O} ? $^O : 'Unix';
22 if ( $os ne 'Unix' ) {
23 plan skip_all => 'tests require Unix';
28 my $context = 'Catalyst';
31 my $base = dir($FindBin::Bin)->relative->stringify;
33 isa_ok( Catalyst::path_to( $context, $base ), 'Path::Class::Dir' );
34 isa_ok( Catalyst::path_to( $context, $base, basename $0 ), 'Path::Class::File' );
36 my $config = Catalyst->config;
38 $config->{home} = '/home/sri/my-app/';
40 is( Catalyst::path_to( $context, 'foo' ), '/home/sri/my-app/foo', 'Unix path' );
42 $config->{home} = '/Users/sri/myapp/';
44 is( Catalyst::path_to( $context, 'foo', 'bar' ),
45 '/Users/sri/myapp/foo/bar', 'deep Unix path' );