-
-
Notifications
You must be signed in to change notification settings - Fork 35
Make expErrors use an array (and only an array) #1076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -5,7 +5,7 @@ | |||
"defaultTestProperties": { | |||
"bidiIsolation": "none", | |||
"locale": "en-US", | |||
"expErrors": false | |||
"expErrors": [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fallback.md you left out expErrors
. Here you supply an empty array. I think we should probably omit this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aphillips It's required in this file otherwise some tests would be left without an expectation (e.g. lines 44-55). This would also be the case in time.json
.
As Eemeli mentioned in his review comment, I think we need to keep the expErrors
in fallback.md
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are talking about fallback.json
, not fallback.md
?
I updated fallback.json
and added errors for each individual case, instead of doing it in defaultTestProperties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For date.json
, datetime.json
and time.json
I added "expErrors": []
to defaultTestProperties
because the schema says that entries are required to have one of exp
, expParts
or expErrors
In these 3 files we had tests with src
only.
So I had to add a expErrors
(not enough info for exp
, expParts
, exact date/time formatting not part of the spec)
@@ -5,7 +5,7 @@ | |||
"defaultTestProperties": { | |||
"bidiIsolation": "none", | |||
"locale": "en-US", | |||
"expErrors": false | |||
"expErrors": [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ibid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some fixes, may need a second pass later to make sure I caught everything.
Co-authored-by: Eemeli Aro <[email protected]>
Co-authored-by: Eemeli Aro <[email protected]>
Co-authored-by: Eemeli Aro <[email protected]>
Co-authored-by: Eemeli Aro <[email protected]>
Co-authored-by: Eemeli Aro <[email protected]>
Co-authored-by: Eemeli Aro <[email protected]>
need to change bad operand to bad option (2025-06-16) |
In 2025-06-30 call, we agreed to merge this once @eemeli has reviewed positively. Nudging him gently with this comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a test that also needs to be updated to use bad-option
.
}, | ||
"tests": [ | ||
{ | ||
"description": "function with unquoted literal operand", | ||
"src": "{42 :test:function fails=format}", | ||
"exp": "{|42|}", | ||
"expParts": [{ "type": "fallback", "source": "|42|" }] | ||
"expParts": [{ "type": "fallback", "source": "|42|" }], | ||
"expErrors": [{ "type": "bad-operand" }] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"expErrors": [{ "type": "bad-operand" }] | |
"expErrors": [{ "type": "bad-option" }] |
Fixes issue #993