-
-
13 Jul 2011 04:42:35 UTC
- Distribution: Test-Tail-Multi
- Module version: 0.06
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (496 / 0 / 0)
- Kwalitee
Bus factor: 1- 91.82% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (4.64KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Joe McMahon
- Dependencies
- File::Tail
- Test::Simple
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Test::Tail::Multi - execute code, monitor dynamic file contents
SYNOPSIS
use Test::Tail::Multi files => [qw(file1 file2)] tests=>2; # Can add files dynamically as well add_file('file3', "decided to add file3 too"); # Execute a command and check against output contents_like {system('my_command -my_args")} # Note no trailing comma! qr/expected value/, "got the expected output"); # if code to execute is undef, check against previously captured new content contents_unlike undef, # trailing command REQUIRED qr/unexpected text/, "unexpected stuff not found in same text"); # Shorten the delay to 1 second. delay(1, "Now a 1 second delay"); contents_like(sub {system('fast_command')}, # trailing comma in parens qr/expected/, "this command runs faster");
DESCRIPTION
Test::Tail::Multi
allows you to create tests or test classes that permit you to monitor the contents of one or more files a la <tail -f> using the niceFile::Tail
module. You can execute arbitrary code and then run tests versus the new content in the files.If you choose, you can run multiple tests against the same content by passing
undef
as the code to be executed;Test::Tail::Multi
will then reuse the contents it last extracted.You can also adjust the delay time to be used to allow the code you called to "settle down" before checking the tails.
Test::Tail::Multi
comes in handy for those testing jobs that require you to monitor several files at once to see what's happening in each one.AUTHOR
Joe McMahon, <mcmahon@yahoo-inc.com>
COPYRIGHT AND LICENSE
Copyright (C) 2005 by Joe McMahon and Yahoo!
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
Module Install Instructions
To install Test::Tail::Multi, copy and paste the appropriate command in to your terminal.
cpanm Test::Tail::Multi
perl -MCPAN -e shell install Test::Tail::Multi
For more information on module installation, please visit the detailed CPAN module installation guide.