Commit graph

59 commits

Author SHA1 Message Date
Marc Durdin
dac9e80c97 fix(windows): unit test os version 2021-09-30 06:23:15 +10:00
Marc Durdin
a01000ba4b chore(developer): update tests 2021-03-16 16:56:43 +11:00
Marc Durdin
c3b70d0186 fix(windows): setup must save install start for restarts
Fixes #4467.

Background: in some scenarios, e.g. files in use, Setup must restart
before it completes. This is particularly the case if kmcomapi.dll is
locked and Windows will move the new version into place after a restart.
In this scenario, we would end up calling the old version of
kmcomapi.dll to install keyboards, etc, which is definitely not
desirable.

Problem: Setup was not saving complete state before the restart, so when
it resumed post-restart, would get a blank slate to work from, losing
command-line options passed in and any choices that the end user may
have made during the installation.

Fix: This PR adds serialization of the `TInstallInfo` state data, so
that the install state can be saved to disk before restart, and reloaded
after the restart. This also means that the `-c` parameter now takes a
filename, being the temporary state JSON file, and when in
"ContinueSetup" mode, no longer needs to perform all the checks it did
previously, making the second half of Setup somewhat faster.

Testing: Added a unit test for the serialization of `TInstallInfo`, and
have tested on a VM in various scenarios without problems.

This fix is somewhat broader than I really like to make while in Beta,
but I don't think there was a viable alternative.
2021-03-11 15:15:26 +11:00
Marc Durdin
c966f297cb
Merge branch 'beta' into feat/developer/improve-bcp47-canonicalization 2021-02-09 07:03:28 +11:00
Marc Durdin
7a59d073ff chore(windows): address review comments, add test 2021-02-09 06:56:43 +11:00
Marc Durdin
2dbb928852 chore(windows): update unit tests 2021-02-05 18:45:55 +11:00
Marc Durdin
558c8013ee feat(developer): improve BCP 47 canonicalization
Ensures we get a canonical tag per langtags.json as far as we possibly
can. This is a breaking change for the compiler as tags which were
formerly regarded as canonical are no longer regarded that way. This
mostly relates to script subtag but a secondary bug meant that some
other tags would have lost data in the canonicalization process
(because we did a lookup based only on the language subtag previously,
which is a no-no).

See keymanapp/keyboards#1452 for related work.
2021-02-05 16:56:21 +11:00
Marc Durdin
83b8c4af08 chore(windows): tests should be case-sensitive
DUnitX by default does case-insensitive string equality assertions, and
we don't really want to make that assumption.

There was one minor fail uncovered in Keyman.System.UILanguageManager as
a result of this -- it now returns a matching entry as found in the
list of UI languages, rather than the input, to get same case as the UI
language list entry.

Thank you @ermshiperete.
2021-02-03 06:52:52 +11:00
Marc Durdin
94a062f20a fix(developer): remove obsolete NRSIAllTags
Relates to #799.

Removes NRSIAllTags, alltags.txt, parser and utility units.

Also re-enables standardsdata.dpr unit test which needed some syntax
cleanup.
2020-11-04 18:41:17 +11:00
Marc Durdin
90dd2bc08b fix(windows): fix test dependency 2020-10-29 15:57:47 +11:00
Marc Durdin
d57bbbf20c fix(developer): missing dependencies 2020-09-25 11:10:25 +10:00
Marc Durdin
6d5ccbd719 fix(windows): add tests and improve canonical options 2020-09-01 09:41:33 +10:00
Marc Durdin
a691a30ea8 chore: address review comments 2020-08-28 15:33:07 +10:00
Marc Durdin
907ccc56bc feat(windows): add langtags.json data
This will be used for future updates for language search
and installation and will eventually allow us to remove
ethnologue and alltags data (and some of bcp47 subtag)
2020-08-28 12:17:28 +10:00
Marc Durdin
b2090bfd0d chore(windows): fix test dependencies 2020-08-04 08:11:39 +10:00
Marc Durdin
d71ae718e6 feat(windows): i18n for Setup 2020-08-03 10:56:27 +10:00
Marc Durdin
3a4f00b4da feat(windows): set default UI language at install 2020-07-31 15:44:51 +10:00
Marc Durdin
d569e7880d feat(windows): setup select tier from filename or parameter 2020-07-20 09:23:57 +10:00
Marc Durdin
a6a4780bb9 chore(windows): Merge branch 'feat/windows/prune-setup' into fix/windows/setup-cleanup-3339 2020-07-20 09:03:43 +10:00
Marc Durdin
7e5d39d432 chore(windows): fix dependency path 2020-07-20 08:35:22 +10:00
Marc Durdin
717a86257a feat(windows): strip ' (1)' from filename in setup 2020-07-20 08:32:33 +10:00
Marc Durdin
6781c94967 test(windows): jsonutil 2020-07-20 07:39:23 +10:00
Marc Durdin
74626c3102 fix(developer): tweak unit test path 2019-11-29 15:14:01 +00:00
Marc Durdin
a39986fc65 chore: fix test paths 2019-11-29 10:22:57 +00:00
Marc Durdin
a4a4d09197 [Developer] Cleanup last build errors relating to logging changes 2019-09-24 16:22:23 +10:00
Marc Durdin
f37dbac787 [Developer] Fix tests 2019-08-28 14:00:04 +10:00
Marc Durdin
4925f8cf49 [Developer] Update tests 2019-08-16 17:43:36 +10:00
Marc Durdin
85057743f5 [Developer] Fix unit tests 2019-01-18 09:32:22 +11:00
glasseyes
c83372546b rename build alltags in unit-tests 2018-11-12 16:12:17 +07:00
Marc Durdin
6dfb4d1b64 [Developer] Fix unit tests 2018-09-27 20:22:52 -06:00
Marc Durdin
9b3a5bdeab [Developer] Add missing dependency 2018-08-29 11:13:40 +10:00
Marc Durdin
5fd12cabdb [Developer] Remove final references to USE_PLUSMEMO and KEYMAN_ENCUMBERED_ROOT 2018-08-13 22:52:14 +10:00
Marc Durdin
473bf44867 Fixup unit test 2018-05-24 16:26:13 +07:00
Marc Durdin
ebd5c2efef Fixup test projects 2018-05-07 15:38:22 +07:00
Marc Durdin
5c64093a31 Fix test project includes 2018-04-30 14:35:40 +07:00
Marc Durdin
d94ebecbd8 Fix build dependency in unit-tests 2018-02-16 11:58:42 +07:00
Marc Durdin
324335771e Refactor kmxfile constants into kmxfileconsts to avoid pulling in too many dependencies 2018-02-15 16:18:51 +07:00
Marc Durdin
228dacbd67 Remove failure case 2018-02-13 16:07:32 +07:00
Marc Durdin
d7af6e8891 Test failure case 2018-02-13 16:00:10 +07:00
Marc Durdin
ef254a44df Rework to use nunit reporting to teamcity, cleanup, and don't stop the build on a failing test 2018-02-13 15:59:04 +07:00
Marc Durdin
be6c520a70 Try importData method of reporting test results 2018-02-13 15:37:47 +07:00
Marc Durdin
ea57f47e87 Report unit test results to TeamCity for Delphi tests 2018-02-13 14:03:15 +07:00
Marc Durdin
961dfcb016 Fix up unit tests after rsp19902 workaround 2018-02-12 16:09:19 +07:00
Marc Durdin
522a7d7c3f RSP-19902 workaround and unit test (plus a little unit test tidyup) 2018-02-08 13:44:16 +07:00
Marc Durdin
2a05611954 Remove versioning from compiled js keyboards, remove legacy id_load.js and id-version.json files from build 2018-01-18 15:00:29 +07:00
Marc Durdin
c9c03b1659 Add makefile for keymanapi tests and start to restructure test folders 2018-01-08 06:56:09 +11:00
Marc Durdin
3f71e076a0 Fixup tests to support release targets for msbuild 2017-12-30 07:56:29 +11:00
Marc Durdin
6a84de3006 Add unit test for keyboard-info language tag validation 2017-12-13 11:47:01 +07:00
Marc Durdin
294c114320 Unit test for package and keyboard version checks 2017-12-11 19:55:45 +07:00
Marc Durdin
3c9a71b95d Merge branch 'master' into developer-package-editor-real 2017-12-06 10:35:56 +07:00