Commit graph

15 commits

Author SHA1 Message Date
rc-swag
2f737981f7 fix(core): add expected_context to keyboard unit tests
The unit tests needed to be updated to handle the cases
where the context is invalidated by a keystroke. However, they
still need to be able to verify the final string the application
should recieve. To do this a expected context token has been added
to the unit test format.
2023-12-15 11:20:08 +10:00
rc-swag
8e20fcf6b2 fix(core): missed checking in baseline.kpj 2023-12-14 14:20:05 +10:00
rc-swag
437f938368 fix(core): fix baseline test cases k_000 and k_0008
Test k_000___null_keyboard has been updated as the [RALT K_B] should
cause the context to be reset.

Test k_008___vkey_input__ctrl_alt_2_ has been updated as the [LCTRL LALT
K_B] does not match a keyboard rule the context is deemed invalid and should be
reset.

It could be a consideration to modify the text_store object to better
reflect the state of a applications context however this would mean
we would need two expected results one for the application and one
for the context
2023-12-14 12:25:32 +10:00
rc-swag
4a511bde1e fix(core): clear core context on invalidate cache 2023-12-12 23:49:04 +10:00
Eberhard Beilharz
46cdd07e22
fix(linux): Fix baseline tests
Change the test to use characters in the context that don't appear in
the keyboard.
2023-11-08 12:13:56 +07:00
Eberhard Beilharz
fde460ecea chore(core): Recompile keyboard with kmcomp 2023-11-07 05:02:30 +01:00
Eberhard Beilharz
eb64ca4d01
chore(core): Fix test keyboard 2023-11-07 08:29:45 +07:00
Eberhard Beilharz
09843634bb
chore(web): Address code review comments 2023-11-06 17:28:25 +07:00
Eberhard Beilharz
4851c547a9
chore(core): Enhance core test 2023-11-06 15:57:07 +07:00
Eberhard Beilharz
2e71ec9e70
chore(web): Add failing test for deadkey bug
Also adds a similar testcase to the baseline keyboard tests.
2023-11-06 13:28:49 +07:00
Eberhard Beilharz
fa0b3e839e
refactor(core): Remove obsolete comments
Since things are working in both cases it seems that the problem got
fixed and the comments are obsolete.
2023-11-06 12:20:56 +07:00
Marc Durdin
236b1ebc54 fix(developer): enable and update unit tests
Several unit tests were not running as they were not referenced in
developer/src/test/auto/Makefile. This meant that some tests were
outdated:

* two keyboard fixtures needed recompiling with kmcomp in order to match
* some interfaces had changed slightly, necessitating updates to
  corresponding unit tests.
2023-10-31 13:50:34 +07:00
Marc Durdin
a86bcb9248 chore(common): fixup legacy test keyboards 2023-09-28 16:10:46 +07:00
Marc Durdin
3468a36100 chore(common): add baseline.kpj
This makes it possible to run the common/test/keyboards build.sh and
makes all the baseline keyboards available as a build artifact (but
currently only in .kmx, not .kmp; this may come as a future update.)
2023-03-28 06:50:00 +07:00
Marc Durdin
c18ef54029 refactor(common): move core baseline tests into common
Decided to use the name `baseline` for this set of tests. They can be
used by any project in the repo now. Tests will be treated as shared,
and not modified (except in the case of a buggy test).

* Moves .kmn files, add `&NAME` line (don't use meson templating for
  these files)
* Generates reference .kmx files using kmcomp for use as a baseline with
  kmcmplib (kmc) tests, and for linux tests
* Updates references in core, kmcmplib, and linux builds
* Renames all the .kmn / .kmx to use a standardized, clean name format
  (this was needed for building packages in the core tests)
2023-03-28 05:20:45 +07:00