Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/specs/guests/message/message-functions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"id": "message-functions",
"wasm": "site/message/guest/message.wasm",
"pin": "site/message/guest.mjs",
"modules": [
"PrismMessage"
],
"dispatch": "PrismMessage::mfDispatch",
"vectors": "spec:message/functions",
"limits": [
3072,
8192,
6144
],
"memory": [
2048,
1048576
],
"as": "functions",
"sync": true
}
4 changes: 4 additions & 0 deletions app/specs/guests/message/message-functions.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"source": "db3095e3e151e151b811acf7b2c17532530825b70208b15d28210a8c7980c093",
"wasm": "386843b029d99fec2a4f6b5e9945c4a69fef9e46bc717a4c631e8cffb1437529"
}
4 changes: 2 additions & 2 deletions app/specs/guests/message/message-rules.lock.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"source": "dc30c797fe3c1f8fe99b21b51dd536ab231e09afed94564f0a48893aa5f19467",
"wasm": "ac7c15750106d23bf6f3ccf0f2ea0be62e9c21fad2b1e31c5d67987ff4ee0513"
"source": "fef551ef93a4f5946e5ea5fae2896c04b4fac1c9fbc6ee9cb07c59ea9f810167",
"wasm": "386843b029d99fec2a4f6b5e9945c4a69fef9e46bc717a4c631e8cffb1437529"
}
4 changes: 2 additions & 2 deletions app/specs/guests/message/message.lock.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"source": "43a37f0c401fc013b17ccc8fc0f55f1f27b3bd8adc4a51da2345a79f6fb5ac5b",
"wasm": "ac7c15750106d23bf6f3ccf0f2ea0be62e9c21fad2b1e31c5d67987ff4ee0513"
"source": "2565c909d8bc88c21e3ab5ef0f74955a4c048280088c5d752876239a1ea05842",
"wasm": "386843b029d99fec2a4f6b5e9945c4a69fef9e46bc717a4c631e8cffb1437529"
}
50 changes: 50 additions & 0 deletions app/specs/message/functions/spec.json

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions app/specs/message/rules/spec.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "message-rules",
"comment": "The acceptance vectors of the guest 'message-rules': the tests of every file of the Unicode MessageFormat 2.0 suite but syntax.json, as ../spec.json describes.",
"comment": "The acceptance vectors of the guest 'message-rules': the tests of every file of the Unicode MessageFormat 2.0 suite outside syntax.json and functions/, as ../spec.json describes.",
"examples": [
[
"check\n{\n \"bidiIsolation\": \"default\",\n \"locale\": \"en-US\"\n }\n{\n \"description\": \"simple-message = o [simple-start pattern]\",\n \"src\": \" \\u061C Hello world!\",\n \"exp\": \" \\u061C Hello world!\"\n }\n{\n \"description\": \"complex-message = o *(declaration o) complex-body o\",\n \"src\": \"\\u200E .local $x = {1} {{ {$x}}}\",\n \"exp\": \" \\u20681\\u2069\"\n }\n{\n \"description\": \"complex-message = o *(declaration o) complex-body o\",\n \"src\": \".local $x = {1} \\u200F {{ {$x}}}\",\n \"exp\": \" \\u20681\\u2069\"\n }\n{\n \"description\": \"complex-message = o *(declaration o) complex-body o\",\n \"src\": \".local $x = {1} {{ {$x}}} \\u2066\",\n \"exp\": \" \\u20681\\u2069\"\n }\n{\n \"description\": \"input-declaration = input o variable-expression\",\n \"src\": \".input \\u2067 {$x :number} {{hello}}\",\n \"params\": [{\"name\": \"x\", \"value\": \"1\"}],\n \"exp\": \"hello\"\n }\n{\n \"description\": \"local s variable o \\\"=\\\" o expression\",\n \"src\": \".local $x \\u2068 = \\u2069 {1} {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"local s variable o \\\"=\\\" o expression\",\n \"src\": \".local \\u2067 $x = {1} {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"local s variable o \\\"=\\\" o expression\",\n \"src\": \".local\\u2067 $x = {1} {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"o \\\"{{\\\" pattern \\\"}}\\\"\",\n \"src\": \"\\u2067 {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"match-statement s variant *(o variant)\",\n \"src\": \".local $x = {1 :number}.match $x\\u061c1 {{one}}* {{other}}\",\n \"expErrors\": [{\"type\": \"syntax-error\"}]\n }\n{\n \"description\": \"literal-expression = \\\"{\\\" o literal [s function] *(s attribute) o \\\"}\\\"\",\n \"src\": \"{\\u200E hello \\u200F}\",\n \"exp\": \"\\u2068hello\\u2069\"\n }\n{\n \"description\": \"variable-expression = \\\"{\\\" o variable [s function] *(s attribute) o \\\"}\\\"\",\n \"src\": \".local $x = {1} {{ {\\u200E $x \\u200F} }}\",\n \"exp\": \" \\u20681\\u2069 \"\n }\n{\n \"description\": \"markup = \\\"{\\\" o \\\"#\\\" identifier *(s option) *(s attribute) o [\\\"/\\\"] \\\"}\\\"\",\n \"src\": \"{\\u200F #b \\u200E }\",\n \"exp\": \"\"\n }\n{\n \"description\": \"markup = \\\"{\\\" o \\\"/\\\" identifier *(s option) *(s attribute) o \\\"}\\\"\",\n \"src\": \"{\\u200F /b \\u200E }\",\n \"exp\": \"\"\n }\n{\n \"description\": \"name... excludes bidi formatting character U+061C -- this parses as name -> [bidi] name-start *name-char\",\n \"src\": \".local $\\u061Cfoo = {1} {{ {$\\u061Cfoo} }}\",\n \"exp\": \" \\u20681\\u2069 \"\n }\n{\n \"description\": \"name excludes bidi formatting character U+061C\",\n \"src\": \".local $foo\\u061Cbar = {2} {{ }}\",\n \"expErrors\": [{\"type\": \"syntax-error\"}]\n }",
"check\n{\n \"bidiIsolation\": \"default\",\n \"locale\": \"en-US\"\n }\n{\n \"description\": \"simple-message = o [simple-start pattern]\",\n \"src\": \" \\u061C Hello world!\",\n \"exp\": \" \\u061C Hello world!\"\n }\n{\n \"description\": \"complex-message = o *(declaration o) complex-body o\",\n \"src\": \"\\u200E .local $x = {1} {{ {$x}}}\",\n \"exp\": \" \\u20681\\u2069\"\n }\n{\n \"description\": \"complex-message = o *(declaration o) complex-body o\",\n \"src\": \".local $x = {1} \\u200F {{ {$x}}}\",\n \"exp\": \" \\u20681\\u2069\"\n }\n{\n \"description\": \"complex-message = o *(declaration o) complex-body o\",\n \"src\": \".local $x = {1} {{ {$x}}} \\u2066\",\n \"exp\": \" \\u20681\\u2069\"\n }\n{\n \"description\": \"input-declaration = input o variable-expression\",\n \"src\": \".input \\u2067 {$x :number} {{hello}}\",\n \"params\": [{\"name\": \"x\", \"value\": \"1\"}],\n \"exp\": \"hello\"\n }\n{\n \"description\": \"local s variable o \\\"=\\\" o expression\",\n \"src\": \".local $x \\u2068 = \\u2069 {1} {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"local s variable o \\\"=\\\" o expression\",\n \"src\": \".local \\u2067 $x = {1} {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"local s variable o \\\"=\\\" o expression\",\n \"src\": \".local\\u2067 $x = {1} {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"o \\\"{{\\\" pattern \\\"}}\\\"\",\n \"src\": \"\\u2067 {{hello}}\",\n \"exp\": \"hello\"\n }\n{\n \"description\": \"match-statement s variant *(o variant)\",\n \"src\": \".local $x = {1 :number}\\n.match $x\\n1 {{one}}\\n\\u061C * {{other}}\",\n \"exp\": \"one\"\n }\n{\n \"description\": \"match-statement s variant *(o variant)\",\n \"src\": \".local $x = {1 :number}.match $x \\u061c1 {{one}}* {{other}}\",\n \"exp\": \"one\"\n }\n{\n \"description\": \"match-statement s variant *(o variant)\",\n \"src\": \".local $x = {1 :number}.match $x\\u061c1 {{one}}* {{other}}\",\n \"expErrors\": [{\"type\": \"syntax-error\"}]\n }\n{\n \"description\": \"variant = key *(s key) quoted-pattern\",\n \"src\": \".local $x = {1 :number} .local $y = {$x :number}.match $x $y\\n1 \\u200E 1 {{one}}* * {{other}}\",\n \"exp\": \"one\"\n }\n{\n \"description\": \"variant = key *(s key) quoted-pattern\",\n \"src\": \".local $x = {1 :number} .local $y = {$x :number}.match $x $y\\n1\\u200E 1 {{one}}* * {{other}}\",\n \"exp\": \"one\"\n }\n{\n \"description\": \"literal-expression = \\\"{\\\" o literal [s function] *(s attribute) o \\\"}\\\"\",\n \"src\": \"{\\u200E hello \\u200F}\",\n \"exp\": \"\\u2068hello\\u2069\"\n }\n{\n \"description\": \"variable-expression = \\\"{\\\" o variable [s function] *(s attribute) o \\\"}\\\"\",\n \"src\": \".local $x = {1} {{ {\\u200E $x \\u200F} }}\",\n \"exp\": \" \\u20681\\u2069 \"\n }",
"pass"
],
[
"check\n{\n \"bidiIsolation\": \"default\",\n \"locale\": \"en-US\"\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $\\u200Efoo\\u200F = {3} {{{$\\u200Efoo\\u200F}}}\",\n \"exp\": \"\\u20683\\u2069\"\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $foo = {4} {{{$\\u200Efoo\\u200F}}}\",\n \"exp\": \"\\u20684\\u2069\"\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $\\u200Efoo\\u200F = {5} {{{$foo}}}\",\n \"exp\": \"\\u20685\\u2069\"\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $foo\\u200Ebar = {5} {{{$foo\\u200Ebar}}}\",\n \"expErrors\": [{\"type\": \"syntax-error\"}]\n }",
"check\n{\n \"bidiIsolation\": \"default\",\n \"locale\": \"en-US\"\n }\n{\n \"description\": \"function-expression = \\\"{\\\" o function *(s attribute) o \\\"}\\\"\",\n \"src\": \"{1 \\u200E :number \\u200F}\",\n \"exp\": \"1\"\n }\n{\n \"description\": \"markup = \\\"{\\\" o \\\"#\\\" identifier *(s option) *(s attribute) o [\\\"/\\\"] \\\"}\\\"\",\n \"src\": \"{\\u200F #b \\u200E }\",\n \"exp\": \"\"\n }\n{\n \"description\": \"markup = \\\"{\\\" o \\\"/\\\" identifier *(s option) *(s attribute) o \\\"}\\\"\",\n \"src\": \"{\\u200F /b \\u200E }\",\n \"exp\": \"\"\n }\n{\n \"description\": \"option = identifier o \\\"=\\\" o (literal / variable)\",\n \"src\": \"{1 :number minimumFractionDigits\\u200F=\\u200E1 }\",\n \"exp\": \"1.0\"\n }\n{\n \"description\": \"attribute = \\\"@\\\" identifier [o \\\"=\\\" o (literal / variable)]\",\n \"src\": \"{1 :number @locale\\u200F=\\u200Een }\",\n \"exp\": \"1\"\n }\n{\n \"description\": \"name... excludes bidi formatting character U+061C -- this parses as name -> [bidi] name-start *name-char\",\n \"src\": \".local $\\u061Cfoo = {1} {{ {$\\u061Cfoo} }}\",\n \"exp\": \" \\u20681\\u2069 \"\n }\n{\n \"description\": \"name excludes bidi formatting character U+061C\",\n \"src\": \".local $foo\\u061Cbar = {2} {{ }}\",\n \"expErrors\": [{\"type\": \"syntax-error\"}]\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $\\u200Efoo\\u200F = {3} {{{$\\u200Efoo\\u200F}}}\",\n \"exp\": \"\\u20683\\u2069\"\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $foo = {4} {{{$\\u200Efoo\\u200F}}}\",\n \"exp\": \"\\u20684\\u2069\"\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $\\u200Efoo\\u200F = {5} {{{$foo}}}\",\n \"exp\": \"\\u20685\\u2069\"\n }\n{\n \"description\": \"name = [bidi] name-start *name-char [bidi]\",\n \"src\": \".local $foo\\u200Ebar = {5} {{{$foo\\u200Ebar}}}\",\n \"expErrors\": [{\"type\": \"syntax-error\"}]\n }",
"pass"
],
[
Expand All @@ -19,11 +19,7 @@
"pass"
],
[
"check\n{\n \"bidiIsolation\": \"none\",\n \"locale\": \"en-US\"\n }\n{\n \"description\": \"function with unquoted literal operand\",\n \"src\": \"{42 :test:function fails=format}\",\n \"exp\": \"{|42|}\",\n \"expParts\": [{ \"type\": \"fallback\", \"source\": \"|42|\" }],\n \"expErrors\": [{ \"type\": \"bad-option\" }]\n }\n{\n \"description\": \"function with quoted literal operand\",\n \"src\": \"{|C:\\\\\\\\| :test:function fails=format}\",\n \"exp\": \"{|C:\\\\\\\\|}\",\n \"expErrors\": [{ \"type\": \"bad-operand\" }]\n }\n{\n \"description\": \"unannotated implicit input variable\",\n \"src\": \"{$var}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unresolved-variable\" }]\n }\n{\n \"description\": \"local variable with unknown function in declaration\",\n \"src\": \".local $var = {|val| :test:undefined} {{{$var}}}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unknown-function\" }]\n }\n{\n \"description\": \"function with local variable operand with unknown function in declaration\",\n \"src\": \".local $var = {|val| :test:undefined} {{{$var :test:function}}}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unknown-function\" }, { \"type\": \"bad-operand\" }]\n }\n{\n \"description\": \"local variable with unknown function in placeholder\",\n \"src\": \".local $var = {|val|} {{{$var :test:undefined}}}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unknown-function\" }]\n }\n{\n \"description\": \"function with no operand\",\n \"src\": \"{:test:undefined}\",\n \"exp\": \"{:test:undefined}\",\n \"expParts\": [{ \"type\": \"fallback\", \"source\": \":test:undefined\" }],\n \"expErrors\": [{ \"type\": \"unknown-function\" }]\n }",
"pass"
],
[
"check\n{\n \"bidiIsolation\": \"none\",\n \"locale\": \"en-US\"\n }\n{\n \"src\": \".input {$foo :string} .match $foo |1| {{one}} * {{other}}\",\n \"params\": [\n {\n \"name\": \"foo\",\n \"value\": \"1\"\n }\n ],\n \"exp\": \"one\"\n }\n{\n \"src\": \".input {$foo :string} .match $foo 1 {{one}} * {{other}}\",\n \"params\": [\n {\n \"name\": \"foo\",\n \"value\": \"1\"\n }\n ],\n \"exp\": \"one\"\n }\n{\n \"src\": \".input {$foo :string} .match $foo 1 {{one}} * {{other}}\",\n \"params\": [\n {\n \"name\": \"foo\",\n \"value\": \"2\"\n }\n ],\n \"exp\": \"other\"\n }\n{\n \"src\": \".input {$foo :string} .match $foo 1 {{one}} * {{other}}\",\n \"exp\": \"other\",\n \"expErrors\": [\n {\n \"type\": \"unresolved-variable\"\n }\n ]\n }",
"check\n{\n \"bidiIsolation\": \"none\",\n \"locale\": \"en-US\"\n }\n{\n \"description\": \"function with unquoted literal operand\",\n \"src\": \"{42 :test:function fails=format}\",\n \"exp\": \"{|42|}\",\n \"expParts\": [{ \"type\": \"fallback\", \"source\": \"|42|\" }],\n \"expErrors\": [{ \"type\": \"bad-option\" }]\n }\n{\n \"description\": \"function with quoted literal operand\",\n \"src\": \"{|C:\\\\\\\\| :test:function fails=format}\",\n \"exp\": \"{|C:\\\\\\\\|}\",\n \"expErrors\": [{ \"type\": \"bad-operand\" }]\n }\n{\n \"description\": \"unannotated implicit input variable\",\n \"src\": \"{$var}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unresolved-variable\" }]\n }\n{\n \"description\": \"annotated implicit input variable\",\n \"src\": \"{$var :number}\",\n \"exp\": \"{$var}\",\n \"expParts\": [{ \"type\": \"fallback\", \"source\": \"$var\" }],\n \"expErrors\": [{ \"type\": \"unresolved-variable\" }, { \"type\": \"bad-operand\" }]\n }\n{\n \"description\": \"local variable with unknown function in declaration\",\n \"src\": \".local $var = {|val| :test:undefined} {{{$var}}}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unknown-function\" }]\n }\n{\n \"description\": \"function with local variable operand with unknown function in declaration\",\n \"src\": \".local $var = {|val| :test:undefined} {{{$var :test:function}}}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unknown-function\" }, { \"type\": \"bad-operand\" }]\n }\n{\n \"description\": \"local variable with unknown function in placeholder\",\n \"src\": \".local $var = {|val|} {{{$var :test:undefined}}}\",\n \"exp\": \"{$var}\",\n \"expErrors\": [{ \"type\": \"unknown-function\" }]\n }\n{\n \"description\": \"function with no operand\",\n \"src\": \"{:test:undefined}\",\n \"exp\": \"{:test:undefined}\",\n \"expParts\": [{ \"type\": \"fallback\", \"source\": \":test:undefined\" }],\n \"expErrors\": [{ \"type\": \"unknown-function\" }]\n }",
"pass"
],
[
Expand Down
Loading
Loading