modem-helpers: allow unquoted strings in +CCLK responses

Also:
  * define the leading '+' as a escaped value
  * allow any number of spaces between '+CCLK' and the string value.
This commit is contained in:
Aleksander Morgado
2017-08-09 21:59:31 +02:00
parent 9528450684
commit dec53d6ef6
2 changed files with 26 additions and 2 deletions
+21
View File
@@ -3203,6 +3203,27 @@ static const CclkTest cclk_tests[] = {
{ "+CCLK: \"15/02/28,20:30:40-32\"", TRUE, TRUE, TRUE,
"2015-02-28T20:30:40-08:00", -480 },
{ "+CCLK: 17/07/26,11:42:15+01", TRUE, TRUE, FALSE,
"2017-07-26T11:42:15+00:15", 15 },
{ "+CCLK: 17/07/26,11:42:15+01", TRUE, FALSE, TRUE,
"2017-07-26T11:42:15+00:15", 15 },
{ "+CCLK: 17/07/26,11:42:15+01", TRUE, TRUE, TRUE,
"2017-07-26T11:42:15+00:15", 15 },
{ "+CCLK: \"15/02/28,20:30:40-32\"", TRUE, TRUE, FALSE,
"2015-02-28T20:30:40-08:00", -480 },
{ "+CCLK: \"15/02/28,20:30:40-32\"", TRUE, FALSE, TRUE,
"2015-02-28T20:30:40-08:00", -480 },
{ "+CCLK: \"15/02/28,20:30:40-32\"", TRUE, TRUE, TRUE,
"2015-02-28T20:30:40-08:00", -480 },
{ "+CCLK: 17/07/26,11:42:15+01", TRUE, TRUE, FALSE,
"2017-07-26T11:42:15+00:15", 15 },
{ "+CCLK: 17/07/26,11:42:15+01", TRUE, FALSE, TRUE,
"2017-07-26T11:42:15+00:15", 15 },
{ "+CCLK: 17/07/26,11:42:15+01", TRUE, TRUE, TRUE,
"2017-07-26T11:42:15+00:15", 15 },
{ "+CCLK: \"XX/XX/XX,XX:XX:XX+XX\"", FALSE, TRUE, FALSE,
NULL, MM_NETWORK_TIMEZONE_OFFSET_UNKNOWN },