diff options
author | Tom Feist <shabble@metavore.org> | 2011-03-04 03:06:03 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2011-03-04 03:06:03 +0000 |
commit | bdcbcad70d9f5380b5be7c68dfdb2d0ef7365924 (patch) | |
tree | 142db82dfe822042ff8b972e15eff62225a05960 /testing/lib/Test/Irssi/Driver.pm | |
parent | Test::Irssi::Test - whitespace cleanup (diff) | |
download | irssi-scripts-bdcbcad70d9f5380b5be7c68dfdb2d0ef7365924.tar.gz irssi-scripts-bdcbcad70d9f5380b5be7c68dfdb2d0ef7365924.zip |
testing: cleaned up a lot of the testing logic. Subtests are now reported at the end.
Diffstat (limited to '')
-rw-r--r-- | testing/lib/Test/Irssi/Driver.pm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/testing/lib/Test/Irssi/Driver.pm b/testing/lib/Test/Irssi/Driver.pm index 1319f2a..81e4f28 100644 --- a/testing/lib/Test/Irssi/Driver.pm +++ b/testing/lib/Test/Irssi/Driver.pm @@ -17,6 +17,12 @@ has 'parent' required => 1, ); +has 'headless' + => ( + is => 'rw', + isa => 'Bool', + default => 0, + ); sub START { my ($self, $kernel, $heap) = @_[OBJECT, KERNEL, HEAP]; @@ -94,14 +100,16 @@ sub terminal_stdin { $heap->{program}->put($input); } - ### Handle STDOUT from the child program. sub child_stdout { my ($self, $heap, $input) = @_[OBJECT, HEAP, ARG0]; # process via vt $self->parent->vt->process($input); - # send to terminal - $heap->{stdio}->put($input); + + if (not $self->headless) { + # send to terminal + $heap->{stdio}->put($input); + } } ### Handle SIGCHLD. Shut down if the exiting child process was the |