#!/usr/bin/env perl use strict; use warnings; use Test::More; use DDG::Test::Goodie; use DDG::GoodieRole::ImageLoader; use DDG::Test::Location; zci answer_type => "solarsystem"; zci is_cached => 1; ddg_goodie_test( [qw( DDG::Goodie::SolarSystem )], #Test Imperial 'size earth' => test_zci("Earth - Radius is 3,958.8 mi", html => qr{
3,958.8 miEarth - Radius
}), 'what is the size of earth' => test_zci("Earth - Radius is 3,958.8 mi", html => qr{
3,958.8 miEarth - Radius
}), 'size of jupiter' => test_zci("Jupiter - Radius is 43,440.7 mi", html => qr{
43,440.7 miJupiter - Radius
}), 'size of object jupiter' => test_zci("Jupiter - Radius is 43,440.7 mi", html => qr{
43,440.7 miJupiter - Radius
}), 'volume of mars' => test_zci("Mars - Volume is 39,133,515,914 mi3", html => qr{
39,133,515,914 mi3Mars - Volume
}), 'surface area of mercury' => test_zci("Mercury - Surface Area is 28,879,000 mi2", html => qr{
28,879,000 mi2Mercury - Surface Area
}), 'mass of neptune' => test_zci("Neptune - Mass is 225,775,402,703,500,000,000,000,000 lbs", html => qr{
225,775,402,703,500,000,000,000,000 lbsNeptune - Mass
}), 'area of saturn' => test_zci("Saturn - Surface Area is 16,452,636,641 mi2", html => qr{
16,452,636,641 mi2Saturn - Surface Area
}), 'radius of uranus' => test_zci("Uranus - Radius is 15,759.2 mi", html => qr{
15,759.2 miUranus - Radius
}), 'size of venus' => test_zci("Venus - Radius is 3,760.4 mi", html => qr{
3,760.4 miVenus - Radius
}), 'size of pluto' => test_zci("Pluto - Radius is 715.2 mi", html => qr{
715.2 miPluto - Radius
}), #Test Metric DDG::Request->new(query_raw => "size earth", location => test_location("au")) => test_zci("Earth - Radius is 6,371.00 km", html => qr{
6,371.00 kmEarth - Radius
}), DDG::Request->new(query_raw => "what is the size of earth", location => test_location("au")) => test_zci("Earth - Radius is 6,371.00 km", html => qr{
6,371.00 kmEarth - Radius
}), DDG::Request->new(query_raw => "size of jupiter", location => test_location("au")) => test_zci("Jupiter - Radius is 69,911 km", html => qr{
69,911 kmJupiter - Radius
}), DDG::Request->new(query_raw => "size of object jupiter", location => test_location("au")) => test_zci("Jupiter - Radius is 69,911 km", html => qr{
69,911 kmJupiter - Radius
}), DDG::Request->new(query_raw => "volume of mars", location => test_location("au")) => test_zci("Mars - Volume is 163,115,609,799 km3", html => qr{
163,115,609,799 km3Mars - Volume
}), DDG::Request->new(query_raw => "surface area of mercury", location => test_location("au")) => test_zci("Mercury - Surface Area is 74,797,000 km2", html => qr{
74,797,000 km2Mercury - Surface Area
}), DDG::Request->new(query_raw => "mass of neptune", location => test_location("au")) => test_zci("Neptune - Mass is 102,410,000,000,000,000,000,000,000 kg", html => qr{
102,410,000,000,000,000,000,000,000 kgNeptune - Mass
}), DDG::Request->new(query_raw => "area of saturn", location => test_location("au")) => test_zci("Saturn - Surface Area is 42,612,133,285 km2", html => qr{
42,612,133,285 km2Saturn - Surface Area
}), DDG::Request->new(query_raw => "radius of uranus", location => test_location("au")) => test_zci("Uranus - Radius is 25,362 km", html => qr{
25,362 kmUranus - Radius
}), DDG::Request->new(query_raw => "size of venus", location => test_location("au")) => test_zci("Venus - Radius is 6,051.8 km", html => qr{
6,051.8 kmVenus - Radius
}), DDG::Request->new(query_raw => "size of pluto", location => test_location("au")) => test_zci("Pluto - Radius is 1,151 km", html => qr{
1,151 kmPluto - Radius
}), 'size of tomato' => undef, 'volume of water' => undef, 'mass of RMS titanic' => undef, 'surface area of united states' => undef, 'radius of orange' => undef ); done_testing;