File: include.t

package info (click to toggle)
libtest-manifest-perl 2.02-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 156 kB
  • ctags: 12
  • sloc: perl: 154; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use strict;

use Test::More tests => 4;

use File::Copy qw(copy);
use File::Spec;

use Test::Manifest qw(get_t_files manifest_name);

ok( -e File::Spec->catfile( "t", "include_in_manifest.txt" ),
	"Found file I'll include in test_manifest" );
ok( -e 'test_manifest_with_include',
	"Found file that I'll copy to test_manifest" );

copy( 'test_manifest_with_include', manifest_name() );

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
my @expected_tests = map { File::Spec->catfile( "t", $_ ) } qw(
	00load.t
	99pod.t
	01get_test_files.t
	);

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
my $expected = join " ", @expected_tests;

my $string = get_t_files();

is( $string, $expected, "Single string version of tests is right" );

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

my @files = get_t_files();

is_deeply( \@files, \@expected_tests, "Array version of tests is right" );