File Coverage

File:t/01.run.t
Coverage:96.8%

linestmtbrancondsubpodtimecode
1
1
1
1
11539
9416
8
use Test::More tests => 7;
2
1
1
1
255
1
35
use Data::Dumper;
3
1
1
1
4
2
17
use File::Spec;
4
5BEGIN {
6
1
6
      use_ok( 'Pipeline::Simple' );
7}
8
9sub test_input_file {
10
1
43
    return File::Spec->catfile('t', 'data', @_);
11}
12
13
1
108745
diag( "Testing Pipeline::Simple run from file" );
14
15
16# reading in a configuration
17
1
122
my $dir = "/tmp/pl$$";
18
1
5
my $pl = Pipeline::Simple->new
19   (config=>test_input_file('string_manipulation.xml'),
20    dir=>$dir, verbose=> -1);
21# verbose=> 1);
22#ok $pl->dir('/tmp/pl'), 'dir()';
23
1
10
my $string = $pl->stringify;
24#print $string;
25
1
17
ok $string =~ /# ->/, 'stringify())';
26
1
662
ok $pl->each_step, 'each_step';
27
1
273
ok $pl->run, 'run())';
28#print Dumper $pl;
29
1
339
my $dot = $pl->graphviz;
30
1
17169
ok $dot =~ /^digraph /, 'graphviz()';
31
32
1
513
ok $pl->start('s3'), 'start()';
33
1
184
ok$pl->stop('s4'), 'stop()';
34
35END {
36
1
211
    `rm -rf $dir` if $pl->verbose <0;
37}