zeroclickinfo-goodies/t/FIGlet.t

210 lines
5.4 KiB
Perl
Raw Normal View History

2014-03-09 10:05:19 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Deep;
2014-03-09 10:05:19 -07:00
use DDG::Test::Goodie;
zci answer_type => 'figlet';
zci is_cached => 1;
ddg_goodie_test(
2015-12-30 09:22:14 -08:00
[
'DDG::Goodie::FIGlet'
],
'figlet DuckDuckGo' => test_zci(
' ____ _ ____ _ ____
| _ \ _ _ ___| | _| _ \ _ _ ___| | __/ ___| ___
| | | | | | |/ __| |/ | | | | | | |/ __| |/ | | _ / _ \
2014-04-06 07:11:11 -07:00
| |_| | |_| | (__| <| |_| | |_| | (__| <| |_| | (_) |
|____/ \__,_|\___|_|\_|____/ \__,_|\___|_|\_\\\____|\___/
2014-03-09 10:05:19 -07:00
',
2015-12-30 09:22:14 -08:00
structured_answer => {
data => {
title => ' ____ _ ____ _ ____
| _ \ _ _ ___| | _| _ \ _ _ ___| | __/ ___| ___
| | | | | | |/ __| |/ | | | | | | |/ __| |/ | | _ / _ \
2014-04-06 07:11:11 -07:00
| |_| | |_| | (__| <| |_| | |_| | (__| <| |_| | (_) |
|____/ \__,_|\___|_|\_|____/ \__,_|\___|_|\_\\\____|\___/
2015-12-30 09:22:14 -08:00
',
subtitle => "Font: standard",
},
templates => {
group => 'text',
}
}
),
2014-03-09 10:05:19 -07:00
2015-12-30 09:22:14 -08:00
'bigtext mini DDG' => test_zci(
' _ _ __
| \ | \ /__
|_/ |_/ \_|
2014-03-09 10:05:19 -07:00
',
2015-12-30 09:22:14 -08:00
structured_answer => {
data => {
title => ' _ _ __
| \ | \ /__
|_/ |_/ \_|
2015-12-30 09:22:14 -08:00
',
subtitle => "Font: mini",
},
templates => {
group => 'text',
}
}
),
2015-12-30 09:22:14 -08:00
'figlet-mini DDG' => test_zci(
' _ _ __
| \ | \ /__
|_/ |_/ \_|
2014-03-09 10:05:19 -07:00
',
2015-12-30 09:22:14 -08:00
structured_answer => {
data => {
title => ' _ _ __
| \ | \ /__
|_/ |_/ \_|
2015-12-30 09:22:14 -08:00
',
subtitle => "Font: mini",
},
templates => {
group => 'text',
}
}
),
2014-03-09 10:05:19 -07:00
2015-12-30 09:22:14 -08:00
'figlet-stop' => test_zci(
' _
___| |_ ___ _ __
/ __| __/ _ \| \'_ \
\__ | || (_) | |_) |
|___/\__\___/| .__/
|_|
2014-03-09 10:05:19 -07:00
',
2015-12-30 09:22:14 -08:00
structured_answer => {
data => {
title => ' _
___| |_ ___ _ __
/ __| __/ _ \| \'_ \
\__ | || (_) | |_) |
|___/\__\___/| .__/
|_|
2015-12-30 09:22:14 -08:00
',
subtitle => "Font: standard",
},
templates => {
group => 'text',
}
}
),
2015-12-30 09:22:14 -08:00
'DuckDuckGo bigtext' => test_zci(
' ____ _ ____ _ ____
| _ \ _ _ ___| | _| _ \ _ _ ___| | __/ ___| ___
| | | | | | |/ __| |/ | | | | | | |/ __| |/ | | _ / _ \
2014-04-06 07:11:11 -07:00
| |_| | |_| | (__| <| |_| | |_| | (__| <| |_| | (_) |
|____/ \__,_|\___|_|\_|____/ \__,_|\___|_|\_\\\____|\___/
',
2015-12-30 09:22:14 -08:00
structured_answer => {
data => {
title => ' ____ _ ____ _ ____
| _ \ _ _ ___| | _| _ \ _ _ ___| | __/ ___| ___
| | | | | | |/ __| |/ | | | | | | |/ __| |/ | | _ / _ \
2014-04-06 07:11:11 -07:00
| |_| | |_| | (__| <| |_| | |_| | (__| <| |_| | (_) |
|____/ \__,_|\___|_|\_|____/ \__,_|\___|_|\_\\\____|\___/
2015-12-30 09:22:14 -08:00
',
subtitle => "Font: standard",
},
templates => {
group => 'text',
}
}
),
2015-12-30 09:22:14 -08:00
'DuckDuckGo big text' => test_zci(
' ____ _ ____ _ ____
| _ \ _ _ ___| | _| _ \ _ _ ___| | __/ ___| ___
| | | | | | |/ __| |/ | | | | | | |/ __| |/ | | _ / _ \
| |_| | |_| | (__| <| |_| | |_| | (__| <| |_| | (_) |
|____/ \__,_|\___|_|\_|____/ \__,_|\___|_|\_\\\____|\___/
',
2015-12-30 09:22:14 -08:00
structured_answer => {
data => {
title => ' ____ _ ____ _ ____
| _ \ _ _ ___| | _| _ \ _ _ ___| | __/ ___| ___
| | | | | | |/ __| |/ | | | | | | |/ __| |/ | | _ / _ \
| |_| | |_| | (__| <| |_| | |_| | (__| <| |_| | (_) |
|____/ \__,_|\___|_|\_|____/ \__,_|\___|_|\_\\\____|\___/
2015-12-30 09:22:14 -08:00
',
subtitle => "Font: standard",
},
templates => {
group => 'text',
}
}
),
2016-01-14 11:57:40 -08:00
'figlet rot13 </fpevcg>' => test_zci(
"</script>
2016-01-14 11:57:40 -08:00
",
structured_answer => {
data => {
title => "</script>
2016-01-14 11:57:40 -08:00
",
subtitle => "Font: rot13",
},
templates => {
group => 'text',
}
}
),
'figlet mnemonic </script>' => test_zci(
"</script>
2016-01-14 11:57:40 -08:00
",
structured_answer => {
data => {
title => "</script>
2016-01-14 11:57:40 -08:00
",
subtitle => "Font: mnemonic",
},
templates => {
group => 'text',
}
}
),
'figlet term </script>' => test_zci(
"</script>
2016-01-14 11:57:40 -08:00
",
structured_answer => {
data => {
title => "</script>
2016-01-14 11:57:40 -08:00
",
subtitle => "Font: term",
},
templates => {
group => 'text',
}
}
),
2015-12-30 09:22:14 -08:00
'figlet' => undef,
'bigtext' => undef,
'big text' => undef,
2014-03-09 10:05:19 -07:00
);
2016-05-16 06:18:04 -07:00
done_testing;