From 3d325ccb84ecd3b25dd86d829c448dfd9b41a08f Mon Sep 17 00:00:00 2001 From: Cody McGinnis Date: Fri, 28 Aug 2020 16:21:31 -0400 Subject: [PATCH] feat(test): add tests for none behavior --- app/tests/none/behavior_keymap.dtsi | 22 +++++++++++++++++++ app/tests/none/layered/events.patterns | 1 + .../none/layered/keycode_events.snapshot | 0 app/tests/none/layered/native_posix.keymap | 8 +++++++ app/tests/none/normal/events.patterns | 1 + app/tests/none/normal/keycode_events.snapshot | 0 app/tests/none/normal/native_posix.keymap | 8 +++++++ 7 files changed, 40 insertions(+) create mode 100644 app/tests/none/behavior_keymap.dtsi create mode 100644 app/tests/none/layered/events.patterns create mode 100644 app/tests/none/layered/keycode_events.snapshot create mode 100644 app/tests/none/layered/native_posix.keymap create mode 100644 app/tests/none/normal/events.patterns create mode 100644 app/tests/none/normal/keycode_events.snapshot create mode 100644 app/tests/none/normal/native_posix.keymap diff --git a/app/tests/none/behavior_keymap.dtsi b/app/tests/none/behavior_keymap.dtsi new file mode 100644 index 00000000..0a4f7cb7 --- /dev/null +++ b/app/tests/none/behavior_keymap.dtsi @@ -0,0 +1,22 @@ +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label ="Default keymap"; + + default_layer { + bindings = < + &none &mo 1 + &kp A &none>; + }; + + lower_layer { + bindings = < + &none &trans + &none &kp A>; + }; + }; +}; diff --git a/app/tests/none/layered/events.patterns b/app/tests/none/layered/events.patterns new file mode 100644 index 00000000..3c9d3f83 --- /dev/null +++ b/app/tests/none/layered/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode/kp/p \ No newline at end of file diff --git a/app/tests/none/layered/keycode_events.snapshot b/app/tests/none/layered/keycode_events.snapshot new file mode 100644 index 00000000..e69de29b diff --git a/app/tests/none/layered/native_posix.keymap b/app/tests/none/layered/native_posix.keymap new file mode 100644 index 00000000..59ea4811 --- /dev/null +++ b/app/tests/none/layered/native_posix.keymap @@ -0,0 +1,8 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&kscan { + events = ; +}; \ No newline at end of file diff --git a/app/tests/none/normal/events.patterns b/app/tests/none/normal/events.patterns new file mode 100644 index 00000000..3c9d3f83 --- /dev/null +++ b/app/tests/none/normal/events.patterns @@ -0,0 +1 @@ +s/.*hid_listener_keycode/kp/p \ No newline at end of file diff --git a/app/tests/none/normal/keycode_events.snapshot b/app/tests/none/normal/keycode_events.snapshot new file mode 100644 index 00000000..e69de29b diff --git a/app/tests/none/normal/native_posix.keymap b/app/tests/none/normal/native_posix.keymap new file mode 100644 index 00000000..94d7539c --- /dev/null +++ b/app/tests/none/normal/native_posix.keymap @@ -0,0 +1,8 @@ +#include +#include +#include +#include "../behavior_keymap.dtsi" + +&kscan { + events = ; +}; \ No newline at end of file