From 02fef8ac1869f00a522981a4942701f9eb4e3ec0 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 9 May 2023 13:09:55 +0700 Subject: [PATCH] chore(developer): use older pattern for row id In order to match existing behaviour with the legacy KeymanWeb compiler, we should use quoted numbers for row ids. This behaviour can probably be changed over to the new model in the future, but for now this prevents unit tests from causing us grief. --- developer/src/kmc-keyboard/test/fixtures/basic-no-debug.js | 2 +- developer/src/kmc-keyboard/test/fixtures/basic.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/developer/src/kmc-keyboard/test/fixtures/basic-no-debug.js b/developer/src/kmc-keyboard/test/fixtures/basic-no-debug.js index 177d55963e..48317a457a 100644 --- a/developer/src/kmc-keyboard/test/fixtures/basic-no-debug.js +++ b/developer/src/kmc-keyboard/test/fixtures/basic-no-debug.js @@ -1 +1 @@ -if(typeof keyman === 'undefined') {console.error('Keyboard requires KeymanWeb 16.0 or later');} else {KeymanWeb.KR(new Keyboard_basic());}function Keyboard_basic() {this.KI="Keyboard_basic";this.KN={"value":"TestKbd"};this.KMINVER="16.0";this.KV={F: '10pt "Arial"', K102: 0};this.KV.KLS={TODO_LDML: 2};this.KDU=1;this.KH="";this.KM=0;this.KBVER="1.0.0";this.KMBM=0;this.KVKL={"desktop":{"defaultHint":"none","layer":[{"id":"base","row":[{"id":0,"key":[{"id":"T_hmaqtugha","text":"ħ"},{"id":"T_that","text":"ថា"}]}]}]}};this.gs=function(t,e){return 0;};} \ No newline at end of file +if(typeof keyman === 'undefined') {console.error('Keyboard requires KeymanWeb 16.0 or later');} else {KeymanWeb.KR(new Keyboard_basic());}function Keyboard_basic() {this.KI="Keyboard_basic";this.KN={"value":"TestKbd"};this.KMINVER="16.0";this.KV={F: '10pt "Arial"', K102: 0};this.KV.KLS={TODO_LDML: 2};this.KDU=1;this.KH="";this.KM=0;this.KBVER="1.0.0";this.KMBM=0;this.KVKL={"desktop":{"defaultHint":"none","layer":[{"id":"base","row":[{"id":"0","key":[{"id":"T_hmaqtugha","text":"ħ"},{"id":"T_that","text":"ថា"}]}]}]}};this.gs=function(t,e){return 0;};} \ No newline at end of file diff --git a/developer/src/kmc-keyboard/test/fixtures/basic.js b/developer/src/kmc-keyboard/test/fixtures/basic.js index 59a1902ee6..179fa0dc06 100644 --- a/developer/src/kmc-keyboard/test/fixtures/basic.js +++ b/developer/src/kmc-keyboard/test/fixtures/basic.js @@ -24,7 +24,7 @@ function Keyboard_basic() { "id": "base", "row": [ { - "id": 0, + "id": "0", "key": [ { "id": "T_hmaqtugha",