Release Vulpes OS 2.7-preview.22
This commit is contained in:
parent
200d1fb235
commit
a138f97877
294 changed files with 515786 additions and 187 deletions
26
tundra/tests/beatles-keymap-test.c
Normal file
26
tundra/tests/beatles-keymap-test.c
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* SPDX-License-Identifier: MPL-2.0 */
|
||||
#include <assert.h>
|
||||
#define main keypad_reader_main
|
||||
#include "../probes/beatles-keypad.c"
|
||||
#undef main
|
||||
|
||||
int main(void) {
|
||||
for(unsigned code=KEY_1;code<=KEY_0;code++)assert(symbol(code)!=NoSymbol);
|
||||
const unsigned controls[]={KEY_UP,KEY_DOWN,KEY_LEFT,KEY_RIGHT,KEY_OK,
|
||||
KEY_BACK,KEY_BACKSPACE,KEY_MENU,KEY_SEND,KEY_POWER,KEY_CAMERA,
|
||||
KEY_NUMERIC_STAR,KEY_NUMERIC_POUND,KEY_VOLUMEUP,KEY_VOLUMEDOWN};
|
||||
for(unsigned i=0;i<sizeof(controls)/sizeof(controls[0]);i++)
|
||||
assert(symbol(controls[i])!=NoSymbol);
|
||||
assert(native_code("Notifications")==KEY_CAMERA);
|
||||
assert(symbol(KEY_CAMERA)==XK_F2);
|
||||
/* Do not give the assistance key an accidental call/emergency action. */
|
||||
assert(symbol(112)==NoSymbol);
|
||||
assert(!allow_key(KEY_SEND,1,1));
|
||||
assert(!allow_key(KEY_2,1,1));
|
||||
assert(allow_key(KEY_SEND,0,1));
|
||||
assert(allow_key(KEY_VOLUMEUP,1,1));
|
||||
assert(allow_key(KEY_VOLUMEDOWN,1,1));
|
||||
assert(allow_key(KEY_2,1,0));
|
||||
puts("Nokia key map and closed-lid input policy: OK");
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in a new issue