Skip to content

Instantly share code, notes, and snippets.

@jagtalon
Created June 2, 2014 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagtalon/aa14b9cadafc0091075b to your computer and use it in GitHub Desktop.
Save jagtalon/aa14b9cadafc0091075b to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'number';
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::SquareRoot
)],
'square root 25' => test_zci(5, html => "<h6>The square root of 25</h6><h2><strong> = 5</strong></h2><hr><p><span>In mathematics, a square root of a number a is a number y such that y^(2) = a, in other words, a number y whose square is a. For example, 4 and −4 are square roots of 16 because 4^(2) = 16. </span><br><br/>Read more at <a href = 'http://en.wikipedia.org/wiki/Square_root'>Wikipedia.</a></p>"),
);
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment