• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json",
3  "scenario": "String function",
4  "description": "The built-in formatter for strings.",
5  "defaultTestProperties": {
6    "locale": "en-US"
7  },
8  "tests": [
9    {
10      "src": ".input {$foo :string} .match $foo |1| {{one}} * {{other}}",
11      "params": [
12        {
13          "name": "foo",
14          "value": "1"
15        }
16      ],
17      "exp": "one"
18    },
19    {
20      "src": ".input {$foo :string} .match $foo 1 {{one}} * {{other}}",
21      "params": [
22        {
23          "name": "foo",
24          "value": 1
25        }
26      ],
27      "exp": "one"
28    },
29    {
30      "src": ".input {$foo :string} .match $foo 1 {{one}} * {{other}}",
31      "params": [
32        {
33          "name": "foo",
34          "value": null
35        }
36      ],
37      "exp": "other"
38    },
39    {
40      "src": ".input {$foo :string} .match $foo 1 {{one}} * {{other}}",
41      "exp": "other",
42      "expErrors": [
43        {
44          "type": "unresolved-variable"
45        }
46      ]
47    }
48  ]
49}
50