mirror of https://github.com/nirenjan/libx52.git
Add clock tests to verify PDT/PST/UTC
parent
3981b873e0
commit
c40847b833
|
@ -1974,6 +1974,55 @@
|
|||
{"params": ["MMDDYY"], "output": [["00c4", "0102"], ["00c8", "0003"]]},
|
||||
{"params": ["YYMMDD"], "output": [["00c4", "0203"], ["00c8", "0001"]]}
|
||||
]
|
||||
},
|
||||
"Clock": {
|
||||
"function": "libx52_set_clock",
|
||||
"setup_hook": [
|
||||
"putenv(\"TZ=America/Los_Angeles\");"
|
||||
],
|
||||
"tests": [
|
||||
{
|
||||
"_comment": "2020-06-01 15:04:05 PDT",
|
||||
"params": ["1591049045", "1"],
|
||||
"output": [
|
||||
["00c4", "0601"],
|
||||
["00c8", "0014"],
|
||||
["00c0", "0f04"],
|
||||
["00c1", "01a4"],
|
||||
["00c2", "01a4"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"_comment": "2020-06-01 22:04:05 UTC",
|
||||
"params": ["1591049045", "0"],
|
||||
"output": [
|
||||
["00c4", "0601"],
|
||||
["00c8", "0014"],
|
||||
["00c0", "1604"]
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"_comment": "2020-03-01 15:04:05 PST",
|
||||
"params": ["1583103845", "1"],
|
||||
"output": [
|
||||
["00c4", "0301"],
|
||||
["00c8", "0014"],
|
||||
["00c0", "0f04"],
|
||||
["00c1", "01e0"],
|
||||
["00c2", "01e0"]
|
||||
]
|
||||
},
|
||||
{
|
||||
"_comment": "2020-03-01 23:04:05 UTC",
|
||||
"params": ["1583103845", "0"],
|
||||
"output": [
|
||||
["00c4", "0301"],
|
||||
["00c8", "0014"],
|
||||
["00c0", "1704"]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue