GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::Corpus::Audio::MPD(3) User Contributed Perl Documentation Test::Corpus::Audio::MPD(3)

Test::Corpus::Audio::MPD - automate launching of fake mdp for testing purposes

version 1.120990

    use Test::Corpus::Audio::MPD; # die if error
    [...]
    stop_test_mpd();

This module will try to launch a new mpd server for testing purposes. This mpd server will then be used during POE::Component::Client::MPD or Audio::MPD tests.

In order to achieve this, the module will create a fake mpd.conf file with the correct pathes (ie, where you untarred the module tarball). It will then check if some mpd server is already running, and stop it if the "MPD_TEST_OVERRIDE" environment variable is true (die otherwise). Last it will run the test mpd with its newly created configuration file.

Everything described above is done automatically when the module is "use"-d.

Once the tests are run, the mpd server will be shut down, and the original one will be relaunched (if there was one).

Note that the test mpd will listen to "localhost", so you are on the safe side. Note also that the test suite comes with its own ogg files. Those files are 2 seconds tracks recording my voice saying ok, and are freely redistributable under the same license as the code itself.

In case you want more control on the test mpd server, you can use the supplied public methods. This might be useful when trying to test connections with mpd server.

Create a fake mpd configuration file, based on the file mpd.conf.template located in share subdir. The string PWD will be replaced by the real path (ie, where the tarball has been untarred), while TMP will be replaced by a new temp directory. The string PORT will be replaced by $port if specified, 6600 otherwise (MPD's default).

Return the temp dir where the test playlists will be stored.

Start the fake mpd, and die if there were any error.

Kill the fake mpd.

You can look for information on this module at:
  • Search CPAN

    <http://search.cpan.org/dist/Test-Corpus-Audio-MPD>

  • See open / report bugs

    <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Corpus-Audio-MPD>

  • Mailing-list (same as Audio::MPD)

    <http://groups.google.com/group/audio-mpd>

  • Git repository

    <http://github.com/jquelin/test-corpus-audio-mpd>

  • AnnoCPAN: Annotated CPAN documentation

    <http://annocpan.org/dist/Test-Corpus-Audio-MPD>

  • CPAN Ratings

    <http://cpanratings.perl.org/d/Test-Corpus-Audio-MPD>

Jerome Quelin

This software is copyright (c) 2009 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2022-04-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.