line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Run::CmdLine::Trap::ProveApp; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
21540
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use vars (qw($VERSION)); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
54
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
$VERSION = '0.0131'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
692
|
use parent 'Test::Run::Trap::Obj'; |
|
1
|
|
|
|
|
271
|
|
|
1
|
|
|
|
|
5
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
1314851
|
use Test::Trap qw( trap $trap :flow:stderr(systemsafe):stdout(systemsafe):warn ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub trap_run |
15
|
|
|
|
|
|
|
{ |
16
|
1
|
|
|
1
|
1
|
304
|
my ($class, $args) = @_; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
3
|
my $cmdline = $args->{cmdline}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
trap { |
21
|
1
|
|
|
1
|
|
1129333
|
system( |
22
|
|
|
|
|
|
|
$^X, "-MTest::Run::CmdLine::Prove::App", "-e", "run()", "--", |
23
|
|
|
|
|
|
|
@$cmdline, |
24
|
|
|
|
|
|
|
); |
25
|
1
|
|
|
|
|
9
|
}; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
return $class->new({ |
28
|
1
|
|
|
|
|
1672
|
( map { $_ => $trap->$_() } |
|
8
|
|
|
|
|
119
|
|
29
|
|
|
|
|
|
|
(qw(stdout stderr die leaveby exit return warn wantarray))) |
30
|
|
|
|
|
|
|
}); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 NAME |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Test::Run::CmdLine::Trap::ProveApp - trap the output of a run of |
38
|
|
|
|
|
|
|
L<Test::Run::CmdLine::Prove::App>. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Testing class to trap the output of a |
43
|
|
|
|
|
|
|
C<perl -MTest::Run::CmdLine::Prove::App ...> run. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 METHODS |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 Test::Run::CmdLine::Trap::Prove->trap_run({cmdline => [@ARGS]}) |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Traps the output of the application with the command line args of C<@ARGS>. |
50
|
|
|
|
|
|
|
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::Trap::ProveApp |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
You can also look for information at: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=over 4 |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<http://annocpan.org/dist/Test::Run::CmdLine> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item * CPAN Ratings |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
L<http://cpanratings.perl.org/d/Test::Run::CmdLine> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::CmdLine> |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item * Search CPAN |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Test::Run::CmdLine/> |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The latest source of Test::Run::CmdLine is available from the Test::Run |
95
|
|
|
|
|
|
|
BerliOS Subversion repository: |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
L<https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 SEE ALSO |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
L<Test::Trap>, L<Test::Run::Trap::Obj> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Copyright 2005 Shlomi Fish, all rights reserved. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This program is released under the MIT X11 License. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |