From 327dd4fca73655fdbf0d501d8597027a8b5b1dbd Mon Sep 17 00:00:00 2001 From: nan-xiansen Date: Thu, 3 Mar 2022 19:28:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90startup=5Flite=E3=80=91=E3=80=90master?= =?UTF-8?q?=E3=80=91add=20SecurityPatchTag=20interface=20time=20format=20v?= =?UTF-8?q?erification=20case?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nan-xiansen Change-Id: Ibb844c33dcea25d7d012c18aa58c99812b56209c --- .../syspara_hal/src/parameter_func_test.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/startup_lite/syspara_hal/src/parameter_func_test.c b/startup_lite/syspara_hal/src/parameter_func_test.c index 07a75e788..626191948 100755 --- a/startup_lite/syspara_hal/src/parameter_func_test.c +++ b/startup_lite/syspara_hal/src/parameter_func_test.c @@ -209,6 +209,23 @@ LITE_TEST_CASE(ParameterFuncTestSuite, testObtainSysPara013, Function | MediumTe AssertNotEmpty(value); }; +/** + * @tc.number : SUB_UTILS_PARAMETER_8200 + * @tc.name : Obtaining system parameter SecurityPatchTag which format is yy--mm--dd + * @tc.desc : [C- SOFTWARE -0200] + */ +LITE_TEST_CASE(ParameterFuncTestSuite, testGetSecurityPatchTag02, Function | MediumTest | Level1) +{ + const char *value = GetSecurityPatchTag(); + printf("Secure Patch Level=%s\n", value); + int year, month, day; + + sscanf(value, "%04d-%02d-%02d", &year, &month, &day); + printf("%d-%02d-%02d\n", year, month, day); + char *str = ("%d-%02d-%02d\n", year, month, day); + TEST_ONLY(); +}; + /** * @tc.number : SUB_UTILS_PARAMETER_1400 * @tc.name : Obtaining system parameter AbiList -- GitLab