#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci is_cached => 1;
zci answer_type => 'jskeycodes';
ddg_goodie_test(
[qw(
DDG::Goodie::JsKeycodes
)],
'js charCode backspace' => test_zci('Keycode for backspace: 8 (JavaScript)',
html => qr:
backspace | :),
'javascript charcode tab' => test_zci('Keycode for tab: 9 (JavaScript)',
html => qr:
tab | :),
'JavaScript keycode enter' => test_zci('Keycode for enter: 13 (JavaScript)',
html => qr:
enter | :),
'js keyCode shift' => test_zci('Keycode for shift: 16 (JavaScript)',
html => qr:
shift | :),
'js ctrl charcode' => test_zci('Keycode for ctrl: 17 (JavaScript)',
html => qr:
ctrl | :),
'js alt charCode' => test_zci('Keycode for alt: 18 (JavaScript)',
html => qr:
alt | :),
'js pause keycode' => test_zci('Keycode for pause: 19 (JavaScript)',
html => qr:
pause | :),
'js break keyCode' => test_zci('Keycode for break: 19 (JavaScript)',
html => qr:
break | :),
'js charCode 0' => test_zci('Keycode for 0: 48 (JavaScript)',
html => qr:
0 | :),
'js charCode 3' => test_zci('Keycode for 3: 51 (JavaScript)',
html => qr:
3 | :),
'js 6 charCode' => test_zci('Keycode for 6: 54 (JavaScript)',
html => qr:
6 | :),
'js charcode 8' => test_zci('Keycode for 8: 56 (JavaScript)',
html => qr:
8 | :),
'js a charCode' => test_zci('Keycode for a: 65 (JavaScript)',
html => qr:
a | :),
'js charCode A' => test_zci('Keycode for a: 65 (JavaScript)',
html => qr:
a | :),
'js charcode H' => test_zci('Keycode for h: 73 (JavaScript)',
html => qr:
h | :),
'js charcode h' => test_zci('Keycode for h: 73 (JavaScript)',
html => qr:
h | :),
'js p charcode' => test_zci('Keycode for p: 80 (JavaScript)',
html => qr:
p | :),
'js charcode P' => test_zci('Keycode for p: 80 (JavaScript)',
html => qr:
p | :),
'js charCode f1' => test_zci('Keycode for f1: 112 (JavaScript)',
html => qr:
f1 | :),
'js charcode f4' => test_zci('Keycode for f4: 115 (JavaScript)',
html => qr:
f4 | :),
'js numpad 1 keyCode' => test_zci('Keycode for numpad 1: 97 (JavaScript)',
html => qr:
numpad 1 | :),
'js charCode num lock' => test_zci('Keycode for num lock: 144 (JavaScript)',
html => qr:
num lock | :),
'js scroll lock charcode ' => test_zci('Keycode for scroll lock: 145 (JavaScript)',
html => qr:
scroll lock | :),
'js charcode ;' => test_zci('Keycode for ;: 186 (JavaScript)',
html => qr:
; | :),
'js keycode =' => test_zci('Keycode for =: 187 (JavaScript)',
html => qr:
= | :),
'js keyCode \\' => test_zci('Keycode for \: 220 (JavaScript)',
html => qr:
\\ | :),
'js charCode quote' => test_zci('Keycode for quote: 222 (JavaScript)',
html => qr:
quote | :),
'js charcode (' => test_zci('Keycode for (: 219 (JavaScript)',
html => qr:
\( | :),
);
done_testing;