zeroclickinfo-goodies/t/Latex.t

31 lines
785 B
Perl
Raw Normal View History

2013-11-20 16:52:48 -08:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'Latex';
zci is_cached => 1;
2013-11-20 16:52:48 -08:00
ddg_goodie_test(
[qw(
DDG::Goodie::Latex
)],
2013-12-18 10:00:38 -08:00
"latex integral" => test_zci('LaTeX command: \int_lowerbound^upperbound
Example: $\int_a^b f(x)dx$',
2013-12-12 21:05:57 -08:00
html => qr/\\int_lowerbound\^upperbound/,
2013-12-18 11:03:26 -08:00
heading => 'Integral (LaTeX)'),
2013-11-21 13:18:20 -08:00
2013-12-18 10:00:38 -08:00
"tex integral" => test_zci('LaTeX command: \int_lowerbound^upperbound
Example: $\int_a^b f(x)dx$',
2013-12-12 21:05:57 -08:00
html => qr/\\int_lowerbound\^upperbound/,
2013-12-18 11:03:26 -08:00
heading => 'Integral (LaTeX)'),
'latex summation' => test_zci('LaTeX command: \sum_{lower}^{upper}
Example: $\sum{i=0}^{10} x^{2}$',
html => qr/\\sum_\{lower\}\^\{upper\}/,
heading => 'Summation (LaTeX)'),
2013-11-20 16:52:48 -08:00
);
2013-11-20 16:52:48 -08:00
done_testing;