1
2#!/usr/bin/perl -w
3
4use strict;
5use File::Spec::Functions ':ALL';
6BEGIN {
7	$|  = 1;
8	$^W = 1;
9}
10
11use Test::More tests => 8;
12use Module::Extract;
13
14my $tarball = catfile( 't', 'dists', 'Config-Tiny-2.09.tar.gz' );
15ok( -f $tarball, "Tarball file $tarball exists"      );
16ok( -r $tarball, "Tarball file $tarball is readable" );
17
18
19
20
21
22#####################################################################
23# Create the handle
24
25SCOPE: {
26	my $mod = Module::Extract->new( dist_file => $tarball );
27	isa_ok( $mod, 'Module::Extract' );
28	is( $mod->dist_file, $tarball, '->dist_file ok' );
29	is( $mod->dist_type, 'tgz', '->dist_type ok' );
30	ok( -d $mod->dist_dir, '->dist_dir exists' );
31	ok( -f $mod->file_path('MANIFEST'), '->file_path ok' );
32	ok( -d $mod->dir_path('t'),   '->dir_path ok' );
33}
34