DDG::Test::Spice - Adds keywords to easily test Spice plugins.
version 1016
Installs functions for testing Spice.
Warning: Be aware that you only use this module inside your test files in t/.
Easy function to generate a DDG::ZeroClickInfo::Spice for the test. See "ddg_spice_test".
You can predefine parameters via "spice".
The first parameter gets treated as the call of the DDG::ZeroClickInfo::Spice
You can predefine DDG::ZeroClickInfo::Spice parameters for usage in "test_spice".
This function can be used several times to change specific defaults on the fly.
With this function you can easily generate a small own DDG::Block for testing your DDG::Spice alone or in combination with others.
ddg_spice_test( [qw( DDG::Spice::MySpice )], 'myspice data' => test_spice('/js/spice/my_spice/data'), 'myspice data2' => test_spice('/js/spice/my_spice/data2'), );
Use this function to verify your spice's alt_to definitions:
alt_to_test('DDG::Spice::My::Spice', [qw(alt1 alt2 alt3)]);
This would check for the following:
callbacks 'ddg_spice_my_alt[123]' paths '/js/spice/my/alt[123]/'
DuckDuckGo <open@duckduckgo.com>
This software is Copyright (c) 2013 by DuckDuckGo, Inc. https://duckduckgo.com/.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
To install DDG, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DDG
CPAN shell
perl -MCPAN -e shell install DDG
For more information on module installation, please visit the detailed CPAN module installation guide.