Commit graph

212 commits

Author SHA1 Message Date
Darcy Wong
b566bcfaf4 fix(common): Set test9469 to Keyman 14 for build warnings 2025-10-30 15:39:19 +07:00
Darcy Wong
3872f57cbf fix(common): Update references to test9469 keyboard 2025-10-30 13:03:09 +07:00
Darcy Wong
66b5aeb614 chore(common): Move test9469 keyboard to common/test/keyboards/ 2025-10-30 11:56:07 +07:00
Darcy Wong
9b426a432a fix(common): Add keyboard description 2025-10-28 15:58:59 +07:00
Darcy Wong
66bf1c5f73 fix(common): Move source files to source/ 2025-10-28 14:11:17 +07:00
Darcy Wong
2e9dfec30c fix(common): Revert kpj changes 2025-10-28 13:33:22 +07:00
Darcy Wong
5bf5a5941f chore(common): Move platformtest to common/test/keyboards 2025-10-28 07:18:49 +07:00
Darcy Wong
d0ea16b975 chore(web): Move chirality.js to common/test/resources/keyboards/ 2025-10-21 13:49:37 +07:00
Eberhard Beilharz
229bdf8270
maint(resources): nest unit tests under parent block
This adds a modified `mocha-teamcity-reporter` that allows to nest the
unit tests under the parent block.

Fixes: #14839
Test-bot: skip
2025-10-06 16:09:47 +02:00
Joshua Horton
e9a1f6c349 maint(web): converts worker-thread tests to TS 2025-08-12 15:38:53 -05:00
Marc Durdin
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
65158a0526 maint(common): rename shellHelperFunctions.sh to utils.inc.sh
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.

Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
2025-08-02 06:58:40 +10:00
Eberhard Beilharz
3b136fcec9
maint(common): consolidate functions to determine OS
- add `builder_is_windows`, `builder_is_macos` and `builder_is_linux`
  functions
- add/move `BUILDER_OS` env variable to `resources/builder.inc.sh`
- use the new functions and env variable

Fixes: #14109
Test-bot: skip
2025-07-09 18:33:09 +02:00
Darcy Wong
838861d9b6
Update common/test/keyboards/build.sh
Co-authored-by: Marc Durdin <marc@durdin.net>
2025-06-09 21:26:58 -05:00
Darcy Wong
f02553df0b fix(common): Use zip.inc.sh for common test keyboards 2025-06-09 09:43:10 -05:00
Marc Durdin
9f15e7c7ec maint: add empty 'scripts' tag to package.json to silence warning
Also removes './' from front of gosh.js to address another npm cleanup
(from `npm pkg fix`).

Fixes: #13833
2025-05-25 06:35:28 +07:00
Eberhard Beilharz
4d81589f48
maint(common): use unique names for Keyman version variables
Previously the builder scripts defined a readonly `VERSION` environment
variable for the Keyman version. That caused problems when another
(external) script tried to define a `VERSION` variable. We encountered
this problem when trying to move the TC build steps of a configuration
into a single script (#13399) when we tried to source `~/.nvm/nvm.sh`.

This change uses a Keyman specific prefix for the version variables and
renames `VERSION` → `KEYMAN_VERSION` etc. Unfortunately these variables
are used in a lot of places, so this turned out to be a bit of a yak
shave.

Test-bot: skip
2025-05-07 18:46:51 +02:00
Joshua Horton
dc450cde9e chore(web): finalize removal of side-effect KMWString implementation 2025-04-22 11:40:57 +07:00
Joshua Horton
418f3d6aec chore(web): update all Web engine uses of kmwLength, kmwCodePointToCodeUnit, kmwCodeUnitToCodePoint 2025-04-22 10:17:07 +07:00
Marc Durdin
e1d8abcb5a chore(common): rebuild keyboard fixture with kmcomp 2025-03-22 06:08:16 +07:00
Eberhard Beilharz
930de0f04f
test(common): add baseline test for resetting context 2025-03-21 18:15:46 +01:00
Marc Durdin
03001bd971 chore(common): add unit test for nul and context() in context part of rule
The compiler and Core appear to be working correctly in this situation;
this test verifies Core's behaviour.

Fixes: #13299
2025-03-04 11:22:35 +01:00
Marc Durdin
2b9b8eb419 chore(core): add unit tests to validate nul with index and context
Add 4 test keyboards to validate `nul` and `if` used in conjunction with
`index` and `context` and corresponding references in core unit tests.

Add a script to rebuild baseline keyboards using a copy of kmcomp.exe
16.0.138; this is setup and tested only on Windows (YMMV on WINE, etc).

Add the 4 additional baseline test keyboards to kmcmplib unit tests for
build consistency between kmcomp 16 and kmcmplib 18 (all pass).

Note: two of the new Core tests currently fail. This is expected, see
issue #13304.

Fixes: #13303
2025-02-21 13:06:29 +07:00
Eberhard Beilharz
b9aa9ccd8c
refactor(web): move predictive-textworker-main
This moves `common/predictive-text/` →
`web/src/engine/predictive-text/worker-main/`.

This also moves `common/test/predictive-text/` →
`web/src/test/manual/predictive-text/`. Note though that this testing
tool is still broken.

Fixes: #12134
2024-08-15 12:26:50 +02:00
Joshua A. Horton
ae02e7d110 change(web): perform suggestion dupe-detection based on applied string, not displayAs 2024-06-28 14:13:08 +07:00
Joshua A. Horton
34986503c9 fix(web): patch-up automated tests that utilize dummy models
The dummy model never set a prediction's probability on the suggestion, so it never emitted p, lexical-p, or correction-p values before this branch's changes.
2024-06-27 09:49:09 +07:00
Joshua A. Horton
8841dd9ee2 chore(web): define common timeout variable for automated testing
Fixes: #11499
2024-06-20 11:43:11 +07:00
Joshua A. Horton
e527317d3a fix(common): remove subpackge entries for older TS version 2024-06-10 09:14:03 +07:00
Joshua A. Horton
7f9b1f0c35 chore(web): converts common/predictive-text browser-based tests 2024-05-15 14:31:36 +07:00
Joshua A. Horton
9942d5691c chore(web): removes unused flowId stuff, old resolved TODO 2024-05-15 14:09:42 +07:00
Joshua A. Horton
8e8906ddc4 fix(web): TC-reporter had mismatch in name for file suite start and end; also adds polish 2024-05-10 09:17:23 +07:00
Joshua A. Horton
b9b86e760c feat(web): adds 'stability reporter', exposing error reports when a test-runner launcher fails 2024-05-09 09:18:01 +07:00
Joshua A. Horton
b83a16d0ac chore(web): extra TC-reporter polish 2024-05-09 09:18:00 +07:00
Joshua A. Horton
53e84ff0ad feat(web): better cause-of-failure reporting; notes if spec'd test-files never ran 2024-05-09 09:14:01 +07:00
Joshua A. Horton
c765d3217b chore(web): figured out how to disambiguate browser configs 2024-05-09 09:13:13 +07:00
Joshua A. Horton
eecacc94e9 chore(web): initial TC-style string-escaping implementation 2024-05-09 09:12:47 +07:00
Joshua A. Horton
33dcfe31bf feat(web): prototype TC-reporter for @web/test-runner 2024-05-09 09:12:42 +07:00
Joshua A. Horton
7b9bff10b2 chore(web): Merge branch 'chore/web/chai-update' into chore/web/consistent-npm-types 2024-05-09 08:10:12 +07:00
Joshua A. Horton
5c43042589 chore(web): update Safari BrowserStack target as stopgap measure 2024-05-08 16:08:11 +07:00
Joshua A. Horton
01d0019d86 chore(web): removes package.json references to old @npm/types versions 2024-05-07 14:38:41 +07:00
Joshua A. Horton
398b9e0ae2 chore(common): drops package-specific 'chai', '@types/chai' versions
chore(web): missed leaving these out of the rebase
2024-05-07 14:35:09 +07:00
Marc Durdin
cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00
Marc Durdin
0f390d47cc chore(common): maintenance on build scripts - cd
Fixes #11324.

* Always `cd "$THIS_SCRIPT_PATH"`
* Remove unnecessary `cd` from all build.sh
* Remove unnecessary `set -eu` from all build.sh (and `# set -x`)
* Replace old build-utils.sh incantation in a few build.sh scripts
2024-05-02 15:54:29 +07:00
Marc Durdin
457275e46f fix(developer): ensure fatal errors report message or made non-fatal
Fixes #10678.

Some messages have been reduced to ERROR instead of FATAL, as they are
not internal compiler errors.

Where fatal messages are raised, the message will now be reported
through correctly to Sentry.
2024-02-20 11:10:39 +07:00
Joshua A. Horton
64ce55854a feat(web): adds sil_ipa, armenian keyboards for KMW testing 2024-01-23 14:02:12 +07:00
rc-swag
1cb288144c chore(core): Merge branch 'master' into fix/core/clear-core-context-invalidate 2023-12-19 09:13:43 +10:00
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