Skip to content

Commit

Permalink
Fix #993, make expErrors array only (not boolean)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihnita committed Jan 30, 2025
1 parent 04246c3 commit 5c67244
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
10 changes: 1 addition & 9 deletions test/schemas/v0/tests.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,7 @@
},
"expErrors": {
"description": "The runtime errors expected to be emitted when formatting the message. If expErrors is either absent or empty, the message must be formatted without errors.",
"type": [
"array",
"boolean"
],
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -395,11 +392,6 @@
"required": [
"expParts"
]
},
{
"required": [
"expErrors"
]
}
]
}
Expand Down
24 changes: 8 additions & 16 deletions test/tests/functions/currency.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,30 @@
"expErrors": [{ "type": "bad-operand" }]
},
{
"src": "{42 :currency currency=EUR}",
"expErrors": false
"src": "{42 :currency currency=EUR}"
},
{
"src": ".local $n = {42 :number} {{{$n :currency currency=EUR}}}",
"expErrors": false
"src": ".local $n = {42 :number} {{{$n :currency currency=EUR}}}"
},
{
"src": ".local $n = {42 :integer} {{{$n :currency currency=EUR}}}",
"expErrors": false
"src": ".local $n = {42 :integer} {{{$n :currency currency=EUR}}}"
},
{
"src": ".local $n = {42 :currency currency=EUR} {{{$n :currency}}}",
"expErrors": false
"src": ".local $n = {42 :currency currency=EUR} {{{$n :currency}}}"
},
{
"src": "{42 :currency currency=EUR fractionDigits=auto}",
"expErrors": false
"src": "{42 :currency currency=EUR fractionDigits=auto}"
},
{
"src": "{42 :currency currency=EUR fractionDigits=2}",
"expErrors": false
"src": "{42 :currency currency=EUR fractionDigits=2}"
},
{
"src": "{$x :currency currency=EUR}",
"params": [{ "name": "x", "value": 41 }],
"expErrors": false
"params": [{ "name": "x", "value": 41 }]
},
{
"src": ".local $n = {42 :currency currency=EUR} .match $n * {{other}}",
"exp": "other",
"expErrors": false
"exp": "other"
}
]
}

0 comments on commit 5c67244

Please sign in to comment.