line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Run::CmdLine::Trap::Prove; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
70331
|
use strict; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
8
|
use vars (qw($VERSION)); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$VERSION = '0.0132'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
582
|
use Moose; |
|
1
|
|
|
|
|
475394
|
|
|
1
|
|
|
|
|
6
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
extends('Test::Run::Trap::Obj'); |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
8344
|
use Test::Trap qw( trap $trap :flow:stderr(systemsafe):stdout(systemsafe):warn ); |
|
1
|
|
|
|
|
45451
|
|
|
1
|
|
|
|
|
6
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has 'system_ret' => (is => "rw", isa => "Num"); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub trap_run |
19
|
|
|
|
|
|
|
{ |
20
|
36
|
|
|
36
|
1
|
274297
|
my ($class, $args) = @_; |
21
|
|
|
|
|
|
|
|
22
|
36
|
|
|
|
|
123
|
my $cmdline = $args->{cmdline}; |
23
|
36
|
|
|
|
|
83
|
my $runprove = $args->{runprove}; |
24
|
36
|
|
|
|
|
90
|
my $system_ret; |
25
|
|
|
|
|
|
|
|
26
|
36
|
|
|
36
|
|
375
|
trap { $system_ret = system("$runprove $cmdline"); }; |
|
36
|
|
|
|
|
32699110
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
return $class->new({ |
29
|
36
|
|
|
|
|
72083
|
( map { $_ => $trap->$_() } |
|
288
|
|
|
|
|
3342
|
|
30
|
|
|
|
|
|
|
(qw(stdout stderr die leaveby exit return warn wantarray))), |
31
|
|
|
|
|
|
|
system_ret => $system_ret, |
32
|
|
|
|
|
|
|
}); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 NAME |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Test::Run::CmdLine::Trap::Prove - trap the output of a runprove run. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Testing class to trap the output of a runprove run. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 METHODS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 Test::Run::CmdLine::Trap::Prove->trap_run({runprove => $path_to_exe, cmdline => $cmdline}) |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Traps the output of the runprove $path_to_exe with the command line args |
50
|
|
|
|
|
|
|
of $cmdline. Returns the object to be used as a constructor. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 AUTHORS |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Shlomi Fish, L<http://www.shlomifish.org/> . |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 BUGS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
59
|
|
|
|
|
|
|
C<bug-test-run-cmdline@rt.cpan.org>, or through the web interface at |
60
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-CmdLine>. |
61
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
62
|
|
|
|
|
|
|
your bug as I make changes. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 SUPPORT |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
perldoc Test::Run::CmdLine |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
You can also look for information at: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=over 4 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * CPAN Ratings |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Test::Run::CmdLine> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::CmdLine> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * Search CPAN |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Test::Run::CmdLine/> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=back |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
The latest source of Test::Run::CmdLine is available from the Test::Run |
91
|
|
|
|
|
|
|
BerliOS Subversion repository: |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
L<https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/> |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 SEE ALSO |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
L<Test::Trap>, L<Test::Run::Trap::Obj> |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Copyright 2005 Shlomi Fish, all rights reserved. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This program is released under the MIT X11 License. |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=cut |