-
Notifications
You must be signed in to change notification settings - Fork 79
valid/datetime/no-seconds fails when the decoder does not add now-optional seconds in the JSON output #183
Copy link
Copy link
Open
Description
This is what happens if the decoder outputs values without seconds as they were in the TOML file:
FAIL valid/datetime/no-seconds
Malformed output from your encoder: key "without-seconds-1" is not a datetime: "13:37"
input sent to parser-cmd (PID 186360):
1 │ # Seconds are optional in date-time and time.
2 │ without-seconds-1 = 13:37
3 │ without-seconds-2 = 1979-05-27 07:32Z
4 │ without-seconds-3 = 1979-05-27 07:32-07:00
5 │ without-seconds-4 = 1979-05-27T07:32
output from parser-cmd (PID 186360) (stdout):
1 │ {
2 │ "without-seconds-1": {"type": "time-local", "value": "13:37"},
3 │ "without-seconds-2": {"type": "datetime", "value": "1979-05-27 07:32Z"},
4 │ "without-seconds-3": {"type": "datetime", "value": "1979-05-27 07:32-07:00"},
5 │ "without-seconds-4": {"type": "datetime-local", "value": "1979-05-27T07:32"}
6 │ }
want:
1 │ {
2 │ "without-seconds-1": {"type": "time-local", "value": "13:37:00"},
3 │ "without-seconds-2": {"type": "datetime", "value": "1979-05-27T07:32:00Z"},
4 │ "without-seconds-3": {"type": "datetime", "value": "1979-05-27T07:32:00-07:00"},
5 │ "without-seconds-4": {"type": "datetime-local", "value": "1979-05-27T07:32:00"}
6 │ }
If seconds are optional in the TOML representation, should they be optional in the JSON output for the test runner as well?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels