Add clock tests to verify PDT/PST/UTC

pull/22/head
nirenjan 2020-06-28 11:32:19 -07:00
parent 3981b873e0
commit c40847b833
1 changed files with 49 additions and 0 deletions

View File

@ -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"]
]
}
]
}
}