[tapx-dev] [commit][185] ** maybe a little silly **
ewilhelm at hexten.net
ewilhelm at hexten.net
Mon Jul 16 07:51:26 BST 2007
Revision: 185
Author: ewilhelm
Date: 2007-07-16 07:51:26 +0100 (Mon, 16 Jul 2007)
Log Message:
-----------
** maybe a little silly **
t/execls - directory listing is valid tap, but probably breaks MANIFEST
t/120-harness.t - hmm, exec cat instead?
Modified Paths:
--------------
trunk/t/120-harness.t
Added Paths:
-----------
trunk/t/execls/
trunk/t/execls/1..1
trunk/t/execls/ok 1
Modified: trunk/t/120-harness.t
===================================================================
--- trunk/t/120-harness.t 2007-07-15 23:12:08 UTC (rev 184)
+++ trunk/t/120-harness.t 2007-07-16 06:51:26 UTC (rev 185)
@@ -28,7 +28,7 @@
use TAP::Harness::Color;
my @HARNESSES = 'TAP::Harness';
-my $PLAN = 71;
+my $PLAN = 72;
if ( TAP::Harness::Color->can_color ) {
push @HARNESSES, 'TAP::Harness::Color';
@@ -297,6 +297,41 @@
isa_ok $parser, 'TAP::Parser';
}
+# make sure we can exec something ... anything!
+SKIP: {
+
+ my $ls = '/bin/ls';
+ unless(-e $ls) {
+ skip "no '$ls'", 1;
+ }
+
+ my @output;
+ local $^W;
+ local *TAP::Harness::_should_show_count = sub {0};
+ local *TAP::Harness::output = sub {
+ my $self = shift;
+ push @output => grep { $_ ne '' }
+ map {
+ local $_ = $_;
+ chomp;
+ trim($_)
+ } @_;
+ };
+ my $harness = TAP::Harness->new(
+ { verbose => 1,
+ exec => [$ls],
+ }
+ );
+
+ eval { $harness->runtests( 't/execls' ) };
+
+ chomp(@output);
+ pop @output; # get rid of summary line
+ my $answer = pop @output;
+ is( $answer, 'All tests successful.', 'ls speaks tap' );
+}
+
+# catches "exec accumulates arguments" issue (r77)
{
my @output;
local $^W;
Added: trunk/t/execls/1..1
===================================================================
Added: trunk/t/execls/ok 1
===================================================================
More information about the tapx-dev
mailing list