forked from duckduckgo/zeroclickinfo-goodies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AspectRatio.t
49 lines (45 loc) · 1.17 KB
/
AspectRatio.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'aspect_ratio';
zci is_cached => 1;
ddg_goodie_test([qw(
DDG::Goodie::AspectRatio
)
],
'aspect ratio 4:3 640:?' => test_zci(
'Aspect ratio: 640:480 (4:3)',
structured_answer => {
input => ['4:3'],
operation => 'Aspect ratio',
result => '640:480'
}
),
'aspect ratio 4:3 ?:480' => test_zci(
'Aspect ratio: 640:480 (4:3)',
structured_answer => {
input => ['4:3'],
operation => 'Aspect ratio',
result => '640:480'
}
),
'aspect ratio 1:1.5 20:?' => test_zci(
'Aspect ratio: 20:30 (1:1.5)',
structured_answer => {
input => ['1:1.5'],
operation => 'Aspect ratio',
result => '20:30'
}
),
'aspect ratio 1:1.5 ?:15' => test_zci(
'Aspect ratio: 10:15 (1:1.5)',
structured_answer => {
input => ['1:1.5'],
operation => 'Aspect ratio',
result => '10:15'
}
),
);
done_testing;