|
| 1 | +{ |
| 2 | + "$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json", |
| 3 | + "scenario": "Fallback", |
| 4 | + "description": "Test cases for fallback behaviour.", |
| 5 | + "defaultTestProperties": { |
| 6 | + "bidiIsolation": "none", |
| 7 | + "locale": "en-US", |
| 8 | + "expErrors": true |
| 9 | + }, |
| 10 | + "tests": [ |
| 11 | + { |
| 12 | + "description": "function with unquoted literal operand", |
| 13 | + "src": "{42 :test:function fails=format}", |
| 14 | + "exp": "{|42|}" |
| 15 | + }, |
| 16 | + { |
| 17 | + "description": "function with quoted literal operand", |
| 18 | + "src": "{|C:\\\\| :test:function fails=format}", |
| 19 | + "exp": "{|C:\\\\|}" |
| 20 | + }, |
| 21 | + { |
| 22 | + "description": "unannotated implicit input variable", |
| 23 | + "src": "{$var}", |
| 24 | + "exp": "{$var}" |
| 25 | + }, |
| 26 | + { |
| 27 | + "description": "annotated implicit input variable", |
| 28 | + "src": "{$var :number}", |
| 29 | + "exp": "{$var}" |
| 30 | + }, |
| 31 | + { |
| 32 | + "description": "local variable with unknown function in declaration", |
| 33 | + "src": ".local $var = {|val| :test:undefined} {{{$var}}}", |
| 34 | + "exp": "{$var}" |
| 35 | + }, |
| 36 | + { |
| 37 | + "description": "function with local variable operand with unknown function in declaration", |
| 38 | + "src": ".local $var = {|val| :test:undefined} {{{$var :test:function}}}", |
| 39 | + "exp": "{$var}" |
| 40 | + }, |
| 41 | + { |
| 42 | + "description": "local variable with unknown function in placeholder", |
| 43 | + "src": ".local $var = {|val|} {{{$var :test:undefined}}}", |
| 44 | + "exp": "{$var}" |
| 45 | + }, |
| 46 | + { |
| 47 | + "description": "function with no operand", |
| 48 | + "src": "{:test:undefined}", |
| 49 | + "exp": "{:test:undefined}" |
| 50 | + } |
| 51 | + ] |
| 52 | +} |
0 commit comments